# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	smake-1.2.1
#	smake-1.2.1/RULES
#	smake-1.2.1/RULES/MKLINKS
#	smake-1.2.1/RULES/rules.top
#	smake-1.2.1/RULES/cc-pcc.rul
#	smake-1.2.1/RULES/i86pc-sunos5-pcc.rul
#	smake-1.2.1/RULES/9000-725-hp-ux-cc.rul
#	smake-1.2.1/RULES/9000-725-hp-ux-gcc.rul
#	smake-1.2.1/RULES/README
#	smake-1.2.1/RULES/alpha-osf1-cc.rul
#	smake-1.2.1/RULES/alpha-osf1-gcc.rul
#	smake-1.2.1/RULES/aviion-dgux3-cc.rul
#	smake-1.2.1/RULES/aviion-dgux3-gcc.rul
#	smake-1.2.1/RULES/aviion-dgux4-cc.rul
#	smake-1.2.1/RULES/aviion-dgux4-gcc.rul
#	smake-1.2.1/RULES/bemac-beos-cc.rul
#	smake-1.2.1/RULES/bemac-beos-mwcc.rul
#	smake-1.2.1/RULES/bepc-beos-cc.rul
#	smake-1.2.1/RULES/bepc-beos-gcc.rul
#	smake-1.2.1/RULES/dn5500-domainos-cc.rul
#	smake-1.2.1/RULES/dummy.dep
#	smake-1.2.1/RULES/gmake.wrn
#	smake-1.2.1/RULES/hppa-nextstep-cc.rul
#	smake-1.2.1/RULES/hppa-nextstep-gcc.rul
#	smake-1.2.1/RULES/i386-at386-gnu-cc.rul
#	smake-1.2.1/RULES/i386-at386-gnu-gcc.rul
#	smake-1.2.1/RULES/i386-bsd-os-cc.rul
#	smake-1.2.1/RULES/i386-bsd-os-gcc.rul
#	smake-1.2.1/RULES/i386-bsd-os3-cc.rul
#	smake-1.2.1/RULES/i386-bsd-os3-gcc.rul
#	smake-1.2.1/RULES/i386-freebsd-cc.rul
#	smake-1.2.1/RULES/mk-.id
#	smake-1.2.1/RULES/i386-freebsd-gcc.rul
#	smake-1.2.1/RULES/i386-mingw32_nt-gcc.rul
#	smake-1.2.1/RULES/i386-ms-dos-gcc.rul
#	smake-1.2.1/RULES/i386-netbsd-cc.rul
#	smake-1.2.1/RULES/i386-netbsd-gcc.rul
#	smake-1.2.1/RULES/i386-openbsd-cc.rul
#	smake-1.2.1/RULES/i386-openbsd-gcc.rul
#	smake-1.2.1/RULES/i386-openserver-cc.rul
#	smake-1.2.1/RULES/i386-openserver-gcc.rul
#	smake-1.2.1/RULES/i386-os2-gcc.rul
#	smake-1.2.1/RULES/i386-unixware-cc.rul
#	smake-1.2.1/RULES/i386-unixware-gcc.rul
#	smake-1.2.1/RULES/i486-cygwin32_nt-cc.rul
#	smake-1.2.1/RULES/i486-cygwin32_nt-gcc.rul
#	smake-1.2.1/RULES/i486-mingw32_nt-gcc.rul
#	smake-1.2.1/RULES/i586-linux-cc.rul
#	smake-1.2.1/RULES/i586-linux-gcc.rul
#	smake-1.2.1/RULES/i586-mingw32_nt-gcc.rul
#	smake-1.2.1/RULES/i686-mingw32_nt-gcc.rul
#	smake-1.2.1/RULES/i786-mingw32_nt-gcc.rul
#	smake-1.2.1/RULES/i86pc-sunos5-cc.rul
#	smake-1.2.1/RULES/i86pc-sunos5-gcc.rul
#	smake-1.2.1/RULES/ip22-irix-cc.rul
#	smake-1.2.1/RULES/ip22-irix-gcc.rul
#	smake-1.2.1/RULES/ldummy.cnf
#	smake-1.2.1/RULES/local.cnf
#	smake-1.2.1/RULES/m68k-amigaos-gcc.rul
#	smake-1.2.1/RULES/man-bsd.def
#	smake-1.2.1/RULES/man-sysv.def
#	smake-1.2.1/RULES/mk-gmake.id
#	smake-1.2.1/RULES/mk-smake.id
#	smake-1.2.1/RULES/news4000-newsos6-cc.rul
#	smake-1.2.1/RULES/os-aix.def
#	smake-1.2.1/RULES/os-aix.id
#	smake-1.2.1/RULES/os-amigaos.def
#	smake-1.2.1/RULES/os-amigaos.id
#	smake-1.2.1/RULES/os-beos.def
#	smake-1.2.1/RULES/os-beos.id
#	smake-1.2.1/RULES/version
#	smake-1.2.1/RULES/os-bsd-os.def
#	smake-1.2.1/RULES/os-bsd-os.id
#	smake-1.2.1/RULES/os-bsd-os3.def
#	smake-1.2.1/RULES/os-cygwin32_nt.def
#	smake-1.2.1/RULES/os-cygwin32_nt.id
#	smake-1.2.1/RULES/os-cygwin_95-4.0.id
#	smake-1.2.1/RULES/os-cygwin_98-4.10.id
#	smake-1.2.1/RULES/os-cygwin_me-4.90.id
#	smake-1.2.1/RULES/os-cygwin_nt-4.0.id
#	smake-1.2.1/RULES/os-cygwin_nt-5.0.id
#	smake-1.2.1/RULES/os-cygwin_nt-5.1.id
#	smake-1.2.1/RULES/os-darwin.def
#	smake-1.2.1/RULES/os-darwin.id
#	smake-1.2.1/RULES/os-dgux.id
#	smake-1.2.1/RULES/os-dgux3.def
#	smake-1.2.1/RULES/os-dgux4.def
#	smake-1.2.1/RULES/os-domainos.def
#	smake-1.2.1/RULES/os-domainos.id
#	smake-1.2.1/RULES/sub.htm
#	smake-1.2.1/RULES/os-freebsd.def
#	smake-1.2.1/RULES/os-freebsd.id
#	smake-1.2.1/RULES/os-gnu.def
#	smake-1.2.1/RULES/os-gnu.id
#	smake-1.2.1/RULES/os-hp-ux.def
#	smake-1.2.1/RULES/os-hp-ux.id
#	smake-1.2.1/RULES/os-irix.def
#	smake-1.2.1/RULES/os-irix.id
#	smake-1.2.1/RULES/os-linux.def
#	smake-1.2.1/RULES/os-linux.id
#	smake-1.2.1/RULES/os-mac-os.id
#	smake-1.2.1/RULES/os-mac-os10.def
#	smake-1.2.1/RULES/os-mingw32_95-4.0.id
#	smake-1.2.1/RULES/os-mingw32_98-4.0.id
#	smake-1.2.1/RULES/os-mingw32_98-4.10.id
#	smake-1.2.1/RULES/os-mingw32_me-4.90.id
#	smake-1.2.1/RULES/os-mingw32_nt-4.0.id
#	smake-1.2.1/RULES/os-mingw32_nt-5.0.id
#	smake-1.2.1/RULES/os-mingw32_nt-5.1.id
#	smake-1.2.1/RULES/os-mingw32_nt-5.2.id
#	smake-1.2.1/RULES/os-mingw32_nt.def
#	smake-1.2.1/RULES/os-mingw32_nt.id
#	smake-1.2.1/RULES/os-ms-dos.def
#	smake-1.2.1/RULES/os-ms-dos.id
#	smake-1.2.1/RULES/os-netbsd.def
#	smake-1.2.1/RULES/os-netbsd.id
#	smake-1.2.1/RULES/os-news-os.id
#	smake-1.2.1/RULES/os-newsos6.def
#	smake-1.2.1/RULES/os-nextstep.def
#	smake-1.2.1/RULES/os-nextstep.id
#	smake-1.2.1/RULES/os-openbsd.def
#	smake-1.2.1/RULES/os-openbsd.id
#	smake-1.2.1/RULES/os-openserver.def
#	smake-1.2.1/RULES/os-os-2.id
#	smake-1.2.1/RULES/os-os2.def
#	smake-1.2.1/RULES/os-osf1.def
#	smake-1.2.1/RULES/os-osf1.id
#	smake-1.2.1/RULES/os-qnx.def
#	smake-1.2.1/RULES/os-qnx.id
#	smake-1.2.1/RULES/os-rhapsody.def
#	smake-1.2.1/RULES/os-rhapsody.id
#	smake-1.2.1/RULES/os-sco_sv.id
#	smake-1.2.1/RULES/os-sunos.id
#	smake-1.2.1/RULES/os-sunos4.def
#	smake-1.2.1/RULES/os-sunos5.def
#	smake-1.2.1/RULES/os-unix_sv.id
#	smake-1.2.1/RULES/os-unixware.def
#	smake-1.2.1/RULES/os-unixware.id
#	smake-1.2.1/RULES/pci-qnx-cc.rul
#	smake-1.2.1/RULES/power-macintosh-darwin-cc.rul
#	smake-1.2.1/RULES/power-macintosh-darwin-gcc.rul
#	smake-1.2.1/RULES/power-macintosh-rhapsody-cc.rul
#	smake-1.2.1/RULES/power-macintosh-rhapsody-gcc.rul
#	smake-1.2.1/RULES/powerpc-beos-gcc.rul
#	smake-1.2.1/RULES/powerpc-beos-mwcc.rul
#	smake-1.2.1/RULES/r-gmake.dep
#	smake-1.2.1/RULES/r-gmake.tag
#	smake-1.2.1/RULES/r-make.dep
#	smake-1.2.1/RULES/r-make.obj
#	smake-1.2.1/RULES/r-make.tag
#	smake-1.2.1/RULES/r-smake.dep
#	smake-1.2.1/RULES/r-smake.obj
#	smake-1.2.1/RULES/r-smake.tag
#	smake-1.2.1/RULES/rs6000-aix-cc.rul
#	smake-1.2.1/RULES/rs6000-aix-gcc.rul
#	smake-1.2.1/RULES/rules.aux
#	smake-1.2.1/RULES/rules.clr
#	smake-1.2.1/RULES/rules.cmd
#	smake-1.2.1/RULES/rules.cnf
#	smake-1.2.1/RULES/rules.dep
#	smake-1.2.1/RULES/rules.dir
#	smake-1.2.1/RULES/rules.drv
#	smake-1.2.1/RULES/rules.hlp
#	smake-1.2.1/RULES/rules.inc
#	smake-1.2.1/RULES/rules.ins
#	smake-1.2.1/RULES/rules.lib
#	smake-1.2.1/RULES/rules.lnt
#	smake-1.2.1/RULES/rules.loc
#	smake-1.2.1/RULES/rules.man
#	smake-1.2.1/RULES/rules.mkd
#	smake-1.2.1/RULES/rules.mks
#	smake-1.2.1/RULES/rules.mod
#	smake-1.2.1/RULES/rules.obj
#	smake-1.2.1/RULES/rules.prg
#	smake-1.2.1/RULES/rules.rdi
#	smake-1.2.1/RULES/rules.rel
#	smake-1.2.1/RULES/rules.scr
#	smake-1.2.1/RULES/rules.shl
#	smake-1.2.1/RULES/rules.tag
#	smake-1.2.1/RULES/rules1.dir
#	smake-1.2.1/RULES/rules1.top
#	smake-1.2.1/RULES/sun3-sunos4-cc.rul
#	smake-1.2.1/RULES/sun3-sunos4-gcc.rul
#	smake-1.2.1/RULES/sun4-sunos4-cc.rul
#	smake-1.2.1/RULES/sun4-sunos4-gcc.rul
#	smake-1.2.1/RULES/sun4-sunos5-cc.rul
#	smake-1.2.1/RULES/sun4-sunos5-gcc.rul
#	smake-1.2.1/RULES/x86pc-qnx-gcc.rul
#	smake-1.2.1/RULES/rules.sps
#	smake-1.2.1/RULES/rules.tpk
#	smake-1.2.1/RULES/i86pc-sunos5-cc64.rul
#	smake-1.2.1/RULES/cc-dec.rul
#	smake-1.2.1/RULES/sun4-sunos5-cc64.rul
#	smake-1.2.1/RULES/i86pc-sunos5-gcc64.rul
#	smake-1.2.1/RULES/os-dragonfly.def
#	smake-1.2.1/RULES/os-dragonfly.id
#	smake-1.2.1/RULES/sun4-sunos5-gcc64.rul
#	smake-1.2.1/RULES/cc-dg.rul
#	smake-1.2.1/RULES/i486-cygwin32_nt-cl.rul
#	smake-1.2.1/RULES/os-interix.def
#	smake-1.2.1/RULES/os-interix.id
#	smake-1.2.1/RULES/x86-interix-gcc.rul
#	smake-1.2.1/RULES/cc-apollo.rul
#	smake-1.2.1/RULES/cc-bemwcc.rul
#	smake-1.2.1/RULES/cc-dumb.rul
#	smake-1.2.1/RULES/cc-gcc.rul
#	smake-1.2.1/RULES/cc-gcc64.rul
#	smake-1.2.1/RULES/cc-hp.rul
#	smake-1.2.1/RULES/cc-ibm.rul
#	smake-1.2.1/RULES/cc-msc.rul
#	smake-1.2.1/RULES/cc-sco_os.rul
#	smake-1.2.1/RULES/cc-sco_uw.rul
#	smake-1.2.1/RULES/cc-sgi.rul
#	smake-1.2.1/RULES/cc-sony.rul
#	smake-1.2.1/RULES/cc-sun.rul
#	smake-1.2.1/RULES/cc-sunpro.rul
#	smake-1.2.1/RULES/cc-sunpro64.rul
#	smake-1.2.1/RULES/dynamic.lnk
#	smake-1.2.1/RULES/static.lnk
#	smake-1.2.1/RULES/rules.dyn
#	smake-1.2.1/RULES/rules.cpl
#	smake-1.2.1/RULES/rules.htm
#	smake-1.2.1/RULES/os-cygwin_nt-5.2.id
#	smake-1.2.1/RULES/x86-interix-cl.rul
#	smake-1.2.1/RULES/cc-msposix.rul
#	smake-1.2.1/RULES/x86-interix-cc.rul
#	smake-1.2.1/RULES/rules.csw
#	smake-1.2.1/RULES/os-interix-nt-4.0.id
#	smake-1.2.1/RULES/os-interix-nt-5.0.id
#	smake-1.2.1/RULES/os-interix-nt-5.1.id
#	smake-1.2.1/RULES/os-interix-nt-5.2.id
#	smake-1.2.1/RULES/i586-linux-suncc.rul
#	smake-1.2.1/RULES/rules.pkg
#	smake-1.2.1/RULES/i586-linux-suncc64.rul
#	smake-1.2.1/RULES/atarist-freemint-gcc.rul
#	smake-1.2.1/RULES/os-freemint.def
#	smake-1.2.1/RULES/os-freemint.id
#	smake-1.2.1/RULES/i586-syllable-cc.rul
#	smake-1.2.1/RULES/i586-syllable-gcc.rul
#	smake-1.2.1/RULES/os-haiku.id
#	smake-1.2.1/RULES/os-syllable.def
#	smake-1.2.1/RULES/os-syllable.id
#	smake-1.2.1/RULES/bepc-haiku-cc.rul
#	smake-1.2.1/RULES/bepc-haiku-gcc.rul
#	smake-1.2.1/RULES/os-haiku.def
#	smake-1.2.1/RULES/cc-msc64.rul
#	smake-1.2.1/RULES/os-cygwin_nt-6.0.id
#	smake-1.2.1/RULES/os-cygwin_nt-6.1.id
#	smake-1.2.1/RULES/os-cygwin32_wow64.def
#	smake-1.2.1/RULES/os-cygwin32_wow64.id
#	smake-1.2.1/RULES/os-cygwin_nt-5.2-wow64.id
#	smake-1.2.1/RULES/i686-cygwin32_wow64-cl64.rul
#	smake-1.2.1/RULES/power-macintosh-darwin-cc64.rul
#	smake-1.2.1/RULES/power-macintosh-darwin-gcc64.rul
#	smake-1.2.1/RULES/os-cygwin_nt-6.0-wow64.id
#	smake-1.2.1/RULES/os-cygwin_nt-6.1-wow64.id
#	smake-1.2.1/RULES/i486-cygwin32_nt-cc64.rul
#	smake-1.2.1/RULES/rules.nul
#	smake-1.2.1/RULES/i486-cygwin32_nt-gcc64.rul
#	smake-1.2.1/RULES/rules.env
#	smake-1.2.1/RULES/9000-725-hp-ux-cc64.rul
#	smake-1.2.1/RULES/cc-hp64.rul
#	smake-1.2.1/RULES/os-openvms.def
#	smake-1.2.1/RULES/os-openvms.id
#	smake-1.2.1/RULES/cc-openvms.rul
#	smake-1.2.1/RULES/alpha-openvms-cc.rul
#	smake-1.2.1/RULES/ip22-irix-cc64.rul
#	smake-1.2.1/RULES/ip22-irix-gcc64.rul
#	smake-1.2.1/RULES/cc-sgi64.rul
#	smake-1.2.1/DEFAULTS
#	smake-1.2.1/DEFAULTS/Defaults.mingw32_nt
#	smake-1.2.1/DEFAULTS/Defaults
#	smake-1.2.1/DEFAULTS/Defaults.aix
#	smake-1.2.1/DEFAULTS/Defaults.dgux
#	smake-1.2.1/DEFAULTS/Defaults.dgux3
#	smake-1.2.1/DEFAULTS/Defaults.dgux4
#	smake-1.2.1/DEFAULTS/Defaults.freebsd
#	smake-1.2.1/DEFAULTS/Defaults.hp-ux
#	smake-1.2.1/DEFAULTS/Defaults.irix
#	smake-1.2.1/DEFAULTS/Defaults.linux
#	smake-1.2.1/DEFAULTS/Defaults.sunos4
#	smake-1.2.1/DEFAULTS/Defaults.sunos5
#	smake-1.2.1/DEFAULTS/Defaults.netbsd
#	smake-1.2.1/DEFAULTS/Defaults.openbsd
#	smake-1.2.1/DEFAULTS/Defaults.cygwin32_nt
#	smake-1.2.1/DEFAULTS/MKLINKS
#	smake-1.2.1/DEFAULTS/Defaults.bsd-os
#	smake-1.2.1/DEFAULTS/Defaults.osf1
#	smake-1.2.1/DEFAULTS/Defaults.nextstep
#	smake-1.2.1/DEFAULTS/vc7-setup
#	smake-1.2.1/DEFAULTS/Defaults.rhapsody
#	smake-1.2.1/DEFAULTS/Defaults.newsos6
#	smake-1.2.1/DEFAULTS/Defaults.beos
#	smake-1.2.1/DEFAULTS/Defaults.os2
#	smake-1.2.1/DEFAULTS/Defaults.qnx
#	smake-1.2.1/DEFAULTS/Defaults.openserver
#	smake-1.2.1/DEFAULTS/Defaults.unixware
#	smake-1.2.1/DEFAULTS/Defaults.mac-os10
#	smake-1.2.1/DEFAULTS/Defaults.darwin
#	smake-1.2.1/DEFAULTS/Defaults.domainos
#	smake-1.2.1/DEFAULTS/Defaults.amigaos
#	smake-1.2.1/DEFAULTS/Defaults.gnu
#	smake-1.2.1/DEFAULTS/Defaults.bsd-os3
#	smake-1.2.1/DEFAULTS/Defaults.ms-dos
#	smake-1.2.1/DEFAULTS/Defaults.interix
#	smake-1.2.1/DEFAULTS/dummy-setup
#	smake-1.2.1/DEFAULTS/vc6-setup
#	smake-1.2.1/DEFAULTS/vc6-cygwin-setup
#	smake-1.2.1/DEFAULTS/vc6-interix-setup
#	smake-1.2.1/DEFAULTS/vc9-setup
#	smake-1.2.1/DEFAULTS/vc7-cygwin-setup
#	smake-1.2.1/DEFAULTS/vc7-interix-setup
#	smake-1.2.1/DEFAULTS/Defaults.dragonfly
#	smake-1.2.1/DEFAULTS/Defaults.freemint
#	smake-1.2.1/DEFAULTS/Defaults.syllable
#	smake-1.2.1/DEFAULTS/Defaults.haiku
#	smake-1.2.1/DEFAULTS/vc7_64-cygwin-setup
#	smake-1.2.1/DEFAULTS/vc7_64-setup
#	smake-1.2.1/DEFAULTS/Defaults.cygwin32_wow64
#	smake-1.2.1/DEFAULTS/vc9-cygwin-setup
#	smake-1.2.1/DEFAULTS/Defaults.openvms
#	smake-1.2.1/DEFAULTS_ENG
#	smake-1.2.1/DEFAULTS_ENG/Defaults.mingw32_nt
#	smake-1.2.1/DEFAULTS_ENG/Defaults
#	smake-1.2.1/DEFAULTS_ENG/Defaults.aix
#	smake-1.2.1/DEFAULTS_ENG/Defaults.dgux
#	smake-1.2.1/DEFAULTS_ENG/Defaults.dgux3
#	smake-1.2.1/DEFAULTS_ENG/Defaults.dgux4
#	smake-1.2.1/DEFAULTS_ENG/Defaults.freebsd
#	smake-1.2.1/DEFAULTS_ENG/Defaults.hp-ux
#	smake-1.2.1/DEFAULTS_ENG/Defaults.irix
#	smake-1.2.1/DEFAULTS_ENG/Defaults.linux
#	smake-1.2.1/DEFAULTS_ENG/Defaults.sunos4
#	smake-1.2.1/DEFAULTS_ENG/Defaults.sunos5
#	smake-1.2.1/DEFAULTS_ENG/README
#	smake-1.2.1/DEFAULTS_ENG/Defaults.netbsd
#	smake-1.2.1/DEFAULTS_ENG/Defaults.openbsd
#	smake-1.2.1/DEFAULTS_ENG/Defaults.bsd-os
#	smake-1.2.1/DEFAULTS_ENG/Defaults.cygwin32_nt
#	smake-1.2.1/DEFAULTS_ENG/MKLINKS
#	smake-1.2.1/DEFAULTS_ENG/Defaults.osf1
#	smake-1.2.1/DEFAULTS_ENG/Defaults.nextstep
#	smake-1.2.1/DEFAULTS_ENG/Defaults.rhapsody
#	smake-1.2.1/DEFAULTS_ENG/Defaults.newsos6
#	smake-1.2.1/DEFAULTS_ENG/Defaults.beos
#	smake-1.2.1/DEFAULTS_ENG/Defaults.os2
#	smake-1.2.1/DEFAULTS_ENG/Defaults.qnx
#	smake-1.2.1/DEFAULTS_ENG/Defaults.openserver
#	smake-1.2.1/DEFAULTS_ENG/Defaults.unixware
#	smake-1.2.1/DEFAULTS_ENG/Defaults.mac-os10
#	smake-1.2.1/DEFAULTS_ENG/Defaults.darwin
#	smake-1.2.1/DEFAULTS_ENG/Defaults.domainos
#	smake-1.2.1/DEFAULTS_ENG/Defaults.amigaos
#	smake-1.2.1/DEFAULTS_ENG/Defaults.gnu
#	smake-1.2.1/DEFAULTS_ENG/Defaults.bsd-os3
#	smake-1.2.1/DEFAULTS_ENG/Defaults.ms-dos
#	smake-1.2.1/DEFAULTS_ENG/Defaults.interix
#	smake-1.2.1/DEFAULTS_ENG/vc7-setup
#	smake-1.2.1/DEFAULTS_ENG/dummy-setup
#	smake-1.2.1/DEFAULTS_ENG/vc6-setup
#	smake-1.2.1/DEFAULTS_ENG/vc6-cygwin-setup
#	smake-1.2.1/DEFAULTS_ENG/vc6-interix-setup
#	smake-1.2.1/DEFAULTS_ENG/vc7-cygwin-setup
#	smake-1.2.1/DEFAULTS_ENG/vc7-interix-setup
#	smake-1.2.1/DEFAULTS_ENG/Defaults.dragonfly
#	smake-1.2.1/DEFAULTS_ENG/Defaults.freemint
#	smake-1.2.1/DEFAULTS_ENG/Defaults.syllable
#	smake-1.2.1/DEFAULTS_ENG/Defaults.haiku
#	smake-1.2.1/DEFAULTS_ENG/vc7_64-cygwin-setup
#	smake-1.2.1/DEFAULTS_ENG/vc7_64-setup
#	smake-1.2.1/DEFAULTS_ENG/Defaults.cygwin32_wow64
#	smake-1.2.1/DEFAULTS_ENG/Defaults.openvms
#	smake-1.2.1/smake
#	smake-1.2.1/smake/Makefile
#	smake-1.2.1/smake/make.c
#	smake-1.2.1/smake/make.h
#	smake-1.2.1/smake/archconf.c
#	smake-1.2.1/smake/memory.c
#	smake-1.2.1/smake/parse.c
#	smake-1.2.1/smake/readfile.c
#	smake-1.2.1/smake/rules.c
#	smake-1.2.1/smake/update.c
#	smake-1.2.1/smake/smake.1
#	smake-1.2.1/smake/defaults.smk
#	smake-1.2.1/smake/Makefile.man
#	smake-1.2.1/smake/Makefile.def
#	smake-1.2.1/include
#	smake-1.2.1/include/schily
#	smake-1.2.1/include/schily/alloca.h
#	smake-1.2.1/include/schily/btorder.h
#	smake-1.2.1/include/schily/ccomdefs.h
#	smake-1.2.1/include/schily/deflts.h
#	smake-1.2.1/include/schily/device.h
#	smake-1.2.1/include/schily/dirent.h
#	smake-1.2.1/include/schily/fcntl.h
#	smake-1.2.1/include/schily/fnmatch.h
#	smake-1.2.1/include/schily/getargs.h
#	smake-1.2.1/include/schily/getcwd.h
#	smake-1.2.1/include/schily/intcvt.h
#	smake-1.2.1/include/schily/jmpdefs.h
#	smake-1.2.1/include/schily/libport.h
#	smake-1.2.1/include/schily/librmt.h
#	smake-1.2.1/include/schily/maxpath.h
#	smake-1.2.1/include/schily/mconfig.h
#	smake-1.2.1/include/schily/mman.h
#	smake-1.2.1/include/schily/mtio.h
#	smake-1.2.1/include/schily/nlsdefs.h
#	smake-1.2.1/include/schily/patmatch.h
#	smake-1.2.1/include/schily/prototyp.h
#	smake-1.2.1/include/schily/rmtio.h
#	smake-1.2.1/include/schily/schily.h
#	smake-1.2.1/include/schily/sigblk.h
#	smake-1.2.1/include/schily/signal.h
#	smake-1.2.1/include/schily/standard.h
#	smake-1.2.1/include/schily/stat.h
#	smake-1.2.1/include/schily/stdlib.h
#	smake-1.2.1/include/schily/stkframe.h
#	smake-1.2.1/include/schily/string.h
#	smake-1.2.1/include/schily/termcap.h
#	smake-1.2.1/include/schily/termios.h
#	smake-1.2.1/include/schily/time.h
#	smake-1.2.1/include/schily/unistd.h
#	smake-1.2.1/include/schily/param.h
#	smake-1.2.1/include/schily/utime.h
#	smake-1.2.1/include/schily/utypes.h
#	smake-1.2.1/include/schily/varargs.h
#	smake-1.2.1/include/schily/wait.h
#	smake-1.2.1/include/schily/align.h
#	smake-1.2.1/include/schily/avoffset.h
#	smake-1.2.1/include/schily/xmconfig.h
#	smake-1.2.1/include/schily/errno.h
#	smake-1.2.1/include/schily/archdefs.h
#	smake-1.2.1/include/schily/xconfig.h
#	smake-1.2.1/include/schily/Makefile
#	smake-1.2.1/include/schily/align.mk
#	smake-1.2.1/include/schily/alloca.mk
#	smake-1.2.1/include/schily/archdefs.mk
#	smake-1.2.1/include/schily/avoffset.mk
#	smake-1.2.1/include/schily/btorder.mk
#	smake-1.2.1/include/schily/ccomdefs.mk
#	smake-1.2.1/include/schily/deflts.mk
#	smake-1.2.1/include/schily/device.mk
#	smake-1.2.1/include/schily/dirent.mk
#	smake-1.2.1/include/schily/errno.mk
#	smake-1.2.1/include/schily/fcntl.mk
#	smake-1.2.1/include/schily/fnmatch.mk
#	smake-1.2.1/include/schily/getargs.mk
#	smake-1.2.1/include/schily/getcwd.mk
#	smake-1.2.1/include/schily/intcvt.mk
#	smake-1.2.1/include/schily/jmpdefs.mk
#	smake-1.2.1/include/schily/types.h
#	smake-1.2.1/include/schily/types.mk
#	smake-1.2.1/include/schily/iconv.h
#	smake-1.2.1/include/schily/libport.mk
#	smake-1.2.1/include/schily/librmt.mk
#	smake-1.2.1/include/schily/maxpath.mk
#	smake-1.2.1/include/schily/mconfig.mk
#	smake-1.2.1/include/schily/mman.mk
#	smake-1.2.1/include/schily/mtio.mk
#	smake-1.2.1/include/schily/nlsdefs.mk
#	smake-1.2.1/include/schily/patmatch.mk
#	smake-1.2.1/include/schily/prototyp.mk
#	smake-1.2.1/include/schily/rmtio.mk
#	smake-1.2.1/include/schily/schily.mk
#	smake-1.2.1/include/schily/sigblk.mk
#	smake-1.2.1/include/schily/signal.mk
#	smake-1.2.1/include/schily/standard.mk
#	smake-1.2.1/include/schily/stat.mk
#	smake-1.2.1/include/schily/stdlib.mk
#	smake-1.2.1/include/schily/stkframe.mk
#	smake-1.2.1/include/schily/string.mk
#	smake-1.2.1/include/schily/termcap.mk
#	smake-1.2.1/include/schily/termios.mk
#	smake-1.2.1/include/schily/time.mk
#	smake-1.2.1/include/schily/unistd.mk
#	smake-1.2.1/include/schily/ioctl.h
#	smake-1.2.1/include/schily/utime.mk
#	smake-1.2.1/include/schily/utypes.mk
#	smake-1.2.1/include/schily/varargs.mk
#	smake-1.2.1/include/schily/wait.mk
#	smake-1.2.1/include/schily/xconfig.mk
#	smake-1.2.1/include/schily/xmconfig.mk
#	smake-1.2.1/include/schily/param.mk
#	smake-1.2.1/include/schily/wchar.h
#	smake-1.2.1/include/schily/wchar.mk
#	smake-1.2.1/include/schily/schilyp.h
#	smake-1.2.1/include/schily/schilyp.mk
#	smake-1.2.1/include/schily/siconv.h
#	smake-1.2.1/include/schily/iconv.mk
#	smake-1.2.1/include/schily/siconv.mk
#	smake-1.2.1/include/schily/ioctl.mk
#	smake-1.2.1/include/schily/checkerr.h
#	smake-1.2.1/include/schily/checkerr.mk
#	smake-1.2.1/include/schily/fetchdir.h
#	smake-1.2.1/include/schily/find.mk
#	smake-1.2.1/include/schily/find.h
#	smake-1.2.1/include/schily/walk.mk
#	smake-1.2.1/include/schily/fstream.h
#	smake-1.2.1/include/schily/fetchdir.mk
#	smake-1.2.1/include/schily/idcache.h
#	smake-1.2.1/include/schily/idcache.mk
#	smake-1.2.1/include/schily/walk.h
#	smake-1.2.1/include/schily/md4.mk
#	smake-1.2.1/include/schily/hostname.h
#	smake-1.2.1/include/schily/fstream.mk
#	smake-1.2.1/include/schily/stdio.h
#	smake-1.2.1/include/schily/hostname.mk
#	smake-1.2.1/include/schily/sysexits.h
#	smake-1.2.1/include/schily/stdio.mk
#	smake-1.2.1/include/schily/wctype.h
#	smake-1.2.1/include/schily/sysexits.mk
#	smake-1.2.1/include/schily/dlfcn.h
#	smake-1.2.1/include/schily/wctype.mk
#	smake-1.2.1/include/schily/shcall.h
#	smake-1.2.1/include/schily/dlfcn.mk
#	smake-1.2.1/include/schily/limits.h
#	smake-1.2.1/include/schily/shcall.mk
#	smake-1.2.1/include/schily/locale.h
#	smake-1.2.1/include/schily/md4.h
#	smake-1.2.1/include/schily/limits.mk
#	smake-1.2.1/include/schily/md5.mk
#	smake-1.2.1/include/schily/md5.h
#	smake-1.2.1/include/schily/pwd.mk
#	smake-1.2.1/include/schily/sigset.h
#	smake-1.2.1/include/schily/locale.mk
#	smake-1.2.1/include/schily/pwd.h
#	smake-1.2.1/include/schily/grp.mk
#	smake-1.2.1/include/schily/grp.h
#	smake-1.2.1/include/schily/in.mk
#	smake-1.2.1/include/schily/ctype.h
#	smake-1.2.1/include/schily/sigset.mk
#	smake-1.2.1/include/schily/Targets
#	smake-1.2.1/include/schily/in.h
#	smake-1.2.1/include/schily/inet.mk
#	smake-1.2.1/include/schily/inet.h
#	smake-1.2.1/include/schily/io.mk
#	smake-1.2.1/include/schily/io.h
#	smake-1.2.1/include/schily/sha1.mk
#	smake-1.2.1/include/schily/systeminfo.h
#	smake-1.2.1/include/schily/ctype.mk
#	smake-1.2.1/include/schily/netdb.h
#	smake-1.2.1/include/schily/resource.mk
#	smake-1.2.1/include/schily/setjmp.h
#	smake-1.2.1/include/schily/netdb.mk
#	smake-1.2.1/include/schily/shadow.h
#	smake-1.2.1/include/schily/setjmp.mk
#	smake-1.2.1/include/schily/socket.h
#	smake-1.2.1/include/schily/shadow.mk
#	smake-1.2.1/include/schily/times.h
#	smake-1.2.1/include/schily/socket.mk
#	smake-1.2.1/include/schily/utsname.h
#	smake-1.2.1/include/schily/times.mk
#	smake-1.2.1/include/schily/vfork.h
#	smake-1.2.1/include/schily/utsname.mk
#	smake-1.2.1/include/schily/sha1.h
#	smake-1.2.1/include/schily/priv.mk
#	smake-1.2.1/include/schily/resource.h
#	smake-1.2.1/include/schily/vfork.mk
#	smake-1.2.1/include/schily/select.h
#	smake-1.2.1/include/schily/select.mk
#	smake-1.2.1/include/schily/priv.h
#	smake-1.2.1/include/schily/ipc.mk
#	smake-1.2.1/include/schily/assert.h
#	smake-1.2.1/include/schily/assert.mk
#	smake-1.2.1/include/schily/syslog.h
#	smake-1.2.1/include/schily/syslog.mk
#	smake-1.2.1/include/schily/procfs.h
#	smake-1.2.1/include/schily/procfs.mk
#	smake-1.2.1/include/schily/float.h
#	smake-1.2.1/include/schily/float.mk
#	smake-1.2.1/include/schily/ipc.h
#	smake-1.2.1/include/schily/sem.mk
#	smake-1.2.1/include/schily/sem.h
#	smake-1.2.1/include/schily/shm.mk
#	smake-1.2.1/include/schily/shm.h
#	smake-1.2.1/include/schily/sha2.mk
#	smake-1.2.1/include/schily/rmd160.h
#	smake-1.2.1/include/schily/rmd160.mk
#	smake-1.2.1/include/schily/sha2.h
#	smake-1.2.1/include/schily/math.mk
#	smake-1.2.1/include/schily/math.h
#	smake-1.2.1/include/schily/dbgmalloc.h
#	smake-1.2.1/include/schily/systeminfo.mk
#	smake-1.2.1/include/schily/dbgmalloc.mk
#	smake-1.2.1/include/Makefile
#	smake-1.2.1/incs
#	smake-1.2.1/lib
#	smake-1.2.1/lib/Targets
#	smake-1.2.1/lib/stdio
#	smake-1.2.1/lib/stdio/cvmod.c
#	smake-1.2.1/lib/stdio/dat.c
#	smake-1.2.1/lib/stdio/fcons.c
#	smake-1.2.1/lib/stdio/fcons64.c
#	smake-1.2.1/lib/stdio/fileopen.c
#	smake-1.2.1/lib/stdio/fileopen64.c
#	smake-1.2.1/lib/stdio/fileread.c
#	smake-1.2.1/lib/stdio/fileseek.c
#	smake-1.2.1/lib/stdio/fileseek64.c
#	smake-1.2.1/lib/stdio/filewrite.c
#	smake-1.2.1/lib/stdio/flag.c
#	smake-1.2.1/lib/stdio/niread.c
#	smake-1.2.1/lib/stdio/schilyio.h
#	smake-1.2.1/lib/stdio/niwrite.c
#	smake-1.2.1/lib/astoi.c
#	smake-1.2.1/lib/astoll.c
#	smake-1.2.1/lib/comerr.c
#	smake-1.2.1/lib/cvt.c
#	smake-1.2.1/lib/error.c
#	smake-1.2.1/lib/fconv.c
#	smake-1.2.1/lib/fillbytes.c
#	smake-1.2.1/lib/format.c
#	smake-1.2.1/lib/getargs.c
#	smake-1.2.1/lib/getav0.c
#	smake-1.2.1/lib/geterrno.c
#	smake-1.2.1/lib/getfp.c
#	smake-1.2.1/lib/jsprintf.c
#	smake-1.2.1/lib/jssnprintf.c
#	smake-1.2.1/lib/jssprintf.c
#	smake-1.2.1/lib/movebytes.c
#	smake-1.2.1/lib/raisecond.c
#	smake-1.2.1/lib/rename.c
#	smake-1.2.1/lib/saveargs.c
#	smake-1.2.1/lib/seterrno.c
#	smake-1.2.1/lib/libschily.mk
#	smake-1.2.1/lib/strcatl.c
#	smake-1.2.1/lib/libschily_p.mk
#	smake-1.2.1/lib/streql.c
#	smake-1.2.1/lib/strtod.c
#	smake-1.2.1/lib/Makefile
#	smake-1.2.1/lib/shlschily.mk
#	smake-1.2.1/lib/strlcpy.c
#	smake-1.2.1/lib/strncpy.c
#	smake-1.2.1/lib/noshlschily.mk
#	smake-1.2.1/libs
#	smake-1.2.1/man
#	smake-1.2.1/man/man4
#	smake-1.2.1/man/man4/makefiles.4
#	smake-1.2.1/man/man4/makerules.4
#	smake-1.2.1/man/man4/makefiles.mk
#	smake-1.2.1/man/man4/makerules.mk
#	smake-1.2.1/man/man4/Makefile
#	smake-1.2.1/man/Makefile
#	smake-1.2.1/Makefile
#	smake-1.2.1/inc
#	smake-1.2.1/inc/align_test.c
#	smake-1.2.1/inc/avoffset.c
#	smake-1.2.1/inc/getfp.c
#	smake-1.2.1/inc/Makefile
#	smake-1.2.1/inc/align_test.mk
#	smake-1.2.1/inc/avoffset.mk
#	smake-1.2.1/inc/README
#	smake-1.2.1/inc/MKLINKS
#	smake-1.2.1/README.linux
#	smake-1.2.1/conf
#	smake-1.2.1/conf/makeinc
#	smake-1.2.1/conf/install-sh
#	smake-1.2.1/conf/src-get
#	smake-1.2.1/conf/oarch.sh
#	smake-1.2.1/conf/Makefile
#	smake-1.2.1/conf/mkdep-aix.sh
#	smake-1.2.1/conf/mkdir-sh
#	smake-1.2.1/conf/cc-config.sh
#	smake-1.2.1/conf/mkdep-hpux.sh
#	smake-1.2.1/conf/mkdep-sco.sh
#	smake-1.2.1/conf/wget.sh
#	smake-1.2.1/conf/srcroot.sh
#	smake-1.2.1/conf/setup.sh
#	smake-1.2.1/conf/mkdir.sh
#	smake-1.2.1/conf/mkdep-msc.sh
#	smake-1.2.1/conf/xconfig.mk
#	smake-1.2.1/conf/post.html
#	smake-1.2.1/conf/pre.html
#	smake-1.2.1/conf/mkdep-msc-interix.sh
#	smake-1.2.1/psmake
#	smake-1.2.1/psmake/Makefile
#	smake-1.2.1/psmake/cpfiles
#	smake-1.2.1/psmake/rmlinks
#	smake-1.2.1/psmake/lnfiles
#	smake-1.2.1/psmake/MAKE-sh
#	smake-1.2.1/psmake/include
#	smake-1.2.1/psmake/include/schily
#	smake-1.2.1/psmake/include/align.h
#	smake-1.2.1/psmake/include/avoffset.h
#	smake-1.2.1/psmake/.clean
#	smake-1.2.1/psmake/MAKE-all
#	smake-1.2.1/TEMPLATES
#	smake-1.2.1/TEMPLATES/Defaults.gcc
#	smake-1.2.1/TEMPLATES/Defaults.xcc
#	smake-1.2.1/TEMPLATES/Makefile.aux
#	smake-1.2.1/TEMPLATES/Makefile.cmd
#	smake-1.2.1/TEMPLATES/Makefile.dir
#	smake-1.2.1/TEMPLATES/Makefile.drv
#	smake-1.2.1/TEMPLATES/Makefile.inc
#	smake-1.2.1/TEMPLATES/Makefile.lib
#	smake-1.2.1/TEMPLATES/Makefile.loc
#	smake-1.2.1/TEMPLATES/Makefile.man
#	smake-1.2.1/TEMPLATES/Makefile.mks
#	smake-1.2.1/TEMPLATES/Makefile.mod
#	smake-1.2.1/TEMPLATES/Makefile.root
#	smake-1.2.1/TEMPLATES/Makefile.scr
#	smake-1.2.1/TEMPLATES/Makefile.shl
#	smake-1.2.1/TEMPLATES/Makefile_de.man
#	smake-1.2.1/TEMPLATES/cmd.mk
#	smake-1.2.1/TEMPLATES/inc.mk
#	smake-1.2.1/TEMPLATES/lib.mk
#	smake-1.2.1/TEMPLATES/shl.mk
#	smake-1.2.1/TEMPLATES/temp-gcc.rul
#	smake-1.2.1/TEMPLATES/MKLINKS
#	smake-1.2.1/TEMPLATES/temp-xcc.rul
#	smake-1.2.1/TEMPLATES/Makefile.wrap
#	smake-1.2.1/TEMPLATES/noshlxxx.mk
#	smake-1.2.1/COPYING
#	smake-1.2.1/AN-1.2
#	smake-1.2.1/BOOTSTRAP
#	smake-1.2.1/README.mingw32
#	smake-1.2.1/.clean
#	smake-1.2.1/Targetdirs
#	smake-1.2.1/Gmake
#	smake-1.2.1/Gmake.linux
#	smake-1.2.1/README.compile
#	smake-1.2.1/README.gmake
#	smake-1.2.1/README.ppc
#	smake-1.2.1/BUILD
#	smake-1.2.1/README.solaris
#	smake-1.2.1/COMPILE
#	smake-1.2.1/INSTALL
#	smake-1.2.1/README.hpux
#	smake-1.2.1/README.win32
#	smake-1.2.1/SMakefile
#	smake-1.2.1/Makefile.old
#	smake-1.2.1/PORTING
#	smake-1.2.1/MKLINKS
#	smake-1.2.1/configure
#	smake-1.2.1/README.aix
#	smake-1.2.1/README.SSPM
#	smake-1.2.1/dos_make.bat
#	smake-1.2.1/README.msdos
#	smake-1.2.1/README.macosX
#	smake-1.2.1/README.macosX-old-versions
#	smake-1.2.1/CDDL.Schily.txt
#	smake-1.2.1/GPL-2.0.txt
#	smake-1.2.1/CONTRIBUTING
#	smake-1.2.1/autoconf
#	smake-1.2.1/autoconf/acgeneral.m4
#	smake-1.2.1/autoconf/aclocal.m4
#	smake-1.2.1/autoconf/acoldnames.m4
#	smake-1.2.1/autoconf/acspecific.m4
#	smake-1.2.1/autoconf/autoconf
#	smake-1.2.1/autoconf/autoconf.m4
#	smake-1.2.1/autoconf/autoheader.m4
#	smake-1.2.1/autoconf/config.guess
#	smake-1.2.1/autoconf/config.sub
#	smake-1.2.1/autoconf/configure
#	smake-1.2.1/autoconf/configure.in
#	smake-1.2.1/autoconf/install-sh
#	smake-1.2.1/autoconf/rules.cnf.in
#	smake-1.2.1/autoconf/xconfig.h.in
#	smake-1.2.1/AN-1.2.1
#	smake-1.2.1/.links
#
echo c - smake-1.2.1
mkdir -p smake-1.2.1 > /dev/null 2>&1
echo c - smake-1.2.1/RULES
mkdir -p smake-1.2.1/RULES > /dev/null 2>&1
echo x - smake-1.2.1/RULES/MKLINKS
sed 's/^X//' >smake-1.2.1/RULES/MKLINKS << 'END-of-smake-1.2.1/RULES/MKLINKS'
X#!/bin/sh
X###########################################################################
X#ident "@(#)MKLINKS	1.86 10/02/22 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X# Copyright (c) 1996-2009 J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xif [ -r ldummy.lnk ]; then
X	if [ $# -le 0 ]; then
X		exit 0
X	fi
Xfi
X###########################################################################
Xsymlink="ln -s"
Xrm -f xxzzy.123 xxzzy.345
Xecho test > xxzzy.123
X$symlink xxzzy.123 xxzzy.345
Xtest $? = 0 || symlink=cp
Xtest -r xxzzy.345 || symlink=cp
Xrm -f xxzzy.123 xxzzy.345
X###########################################################################
X
X$symlink	ldummy.cnf		ldummy.lnk
X$symlink	mk-.id			mk-make.id
X$symlink	9000-725-hp-ux-cc.rul	9000-710-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-712-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-715-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-735-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-743-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-755-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-777-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-778-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-780-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-782-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-785-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-800-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-820-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-831-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-899-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	ia64-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-710-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-712-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-715-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-735-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-743-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-755-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-777-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-778-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-780-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-782-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-785-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-800-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-820-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-831-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-899-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	ia64-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-710-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-712-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-715-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-735-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-743-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-755-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-777-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-778-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-780-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-782-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-785-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-800-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-820-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-831-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-899-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	ia64-hp-ux-gcc.rul
X$symlink	hppa-nextstep-cc.rul	i386-nextstep-cc.rul
X$symlink	hppa-nextstep-cc.rul	m68k-nextstep-cc.rul
X$symlink	hppa-nextstep-cc.rul	sparc-nextstep-cc.rul
X$symlink	hppa-nextstep-cc.rul	i386-nextstep-gcc.rul
X$symlink	hppa-nextstep-cc.rul	m68k-nextstep-gcc.rul
X$symlink	hppa-nextstep-cc.rul	sparc-nextstep-gcc.rul
X$symlink	os-irix.id		os-irix64.id
X$symlink	ip22-irix-cc.rul	ip17-irix-cc.rul
X$symlink	ip22-irix-cc.rul	ip20-irix-cc.rul
X$symlink	ip22-irix-cc.rul	ip27-irix-cc.rul
X$symlink	ip22-irix-cc.rul	ip28-irix-cc.rul
X$symlink	ip22-irix-cc.rul	ip30-irix-cc.rul
X$symlink	ip22-irix-cc.rul	ip32-irix-cc.rul
X$symlink	ip22-irix-cc.rul	ip35-irix-cc.rul
X$symlink	ip22-irix-gcc.rul	ip17-irix-gcc.rul
X$symlink	ip22-irix-gcc.rul	ip20-irix-gcc.rul
X$symlink	ip22-irix-gcc.rul	ip27-irix-gcc.rul
X$symlink	ip22-irix-gcc.rul	ip28-irix-gcc.rul
X$symlink	ip22-irix-gcc.rul	ip30-irix-gcc.rul
X$symlink	ip22-irix-gcc.rul	ip32-irix-gcc.rul
X$symlink	ip22-irix-gcc.rul	ip35-irix-gcc.rul
X$symlink	ip22-irix-cc64.rul	ip17-irix-cc64.rul
X$symlink	ip22-irix-cc64.rul	ip20-irix-cc64.rul
X$symlink	ip22-irix-cc64.rul	ip27-irix-cc64.rul
X$symlink	ip22-irix-cc64.rul	ip28-irix-cc64.rul
X$symlink	ip22-irix-cc64.rul	ip30-irix-cc64.rul
X$symlink	ip22-irix-cc64.rul	ip32-irix-cc64.rul
X$symlink	ip22-irix-cc64.rul	ip35-irix-cc64.rul
X$symlink	ip22-irix-gcc64.rul	ip17-irix-gcc64.rul
X$symlink	ip22-irix-gcc64.rul	ip20-irix-gcc64.rul
X$symlink	ip22-irix-gcc64.rul	ip27-irix-gcc64.rul
X$symlink	ip22-irix-gcc64.rul	ip28-irix-gcc64.rul
X$symlink	ip22-irix-gcc64.rul	ip30-irix-gcc64.rul
X$symlink	ip22-irix-gcc64.rul	ip32-irix-gcc64.rul
X$symlink	ip22-irix-gcc64.rul	ip35-irix-gcc64.rul
X$symlink	i386-at386-gnu-cc.rul	i686-at386-gnu-cc.rul
X$symlink	i386-at386-gnu-gcc.rul	i686-at386-gnu-gcc.rul
X$symlink	i386-freebsd-cc.rul	sparc64-freebsd-cc.rul
X$symlink	i386-freebsd-gcc.rul	sparc64-freebsd-gcc.rul
X$symlink	i386-freebsd-cc.rul	i386-dragonfly-cc.rul
X$symlink	i386-freebsd-gcc.rul	i386-dragonfly-gcc.rul
X$symlink	i386-freebsd-cc.rul	x86_64-dragonfly-cc.rul
X$symlink	i386-freebsd-gcc.rul	x86_64-dragonfly-gcc.rul
X$symlink	i386-netbsd-cc.rul	amd64-netbsd-cc.rul
X$symlink	i386-netbsd-gcc.rul	amd64-netbsd-gcc.rul
X$symlink	i386-netbsd-cc.rul	alpha-netbsd-cc.rul
X$symlink	i386-netbsd-gcc.rul	alpha-netbsd-gcc.rul
X$symlink	i386-netbsd-cc.rul	sparc-netbsd-cc.rul
X$symlink	i386-netbsd-gcc.rul	sparc-netbsd-gcc.rul
X$symlink	i386-netbsd-cc.rul	mac68k-netbsd-cc.rul
X$symlink	i386-netbsd-gcc.rul	mac68k-netbsd-gcc.rul
X$symlink	i386-netbsd-cc.rul	amiga-netbsd-cc.rul
X$symlink	i386-netbsd-gcc.rul	amiga-netbsd-gcc.rul
X$symlink	i386-netbsd-cc.rul	macppc-netbsd-cc.rul
X$symlink	i386-netbsd-gcc.rul	macppc-netbsd-gcc.rul
X$symlink	i386-bsd-os-cc.rul	sparc-bsd-os-cc.rul
X$symlink	i386-bsd-os-gcc.rul	sparc-bsd-os-gcc.rul
X$symlink	i386-bsd-os3-cc.rul	sparc-bsd-os3-cc.rul
X$symlink	i386-bsd-os3-gcc.rul	sparc-bsd-os3-gcc.rul
X$symlink	i586-linux-cc.rul	i386-linux-cc.rul
X$symlink	i586-linux-cc.rul	i486-linux-cc.rul
X$symlink	i586-linux-cc.rul	i686-linux-cc.rul
X$symlink	i586-linux-gcc.rul	i386-linux-gcc.rul
X$symlink	i586-linux-gcc.rul	i486-linux-gcc.rul
X$symlink	i586-linux-gcc.rul	i686-linux-gcc.rul
X$symlink	i586-linux-cc.rul	sparc-linux-cc.rul
X$symlink	i586-linux-gcc.rul	sparc-linux-gcc.rul
X$symlink	i586-linux-cc.rul	sparc64-linux-cc.rul
X$symlink	i586-linux-gcc.rul	sparc64-linux-gcc.rul
X$symlink	i586-linux-cc.rul	alpha-linux-cc.rul
X$symlink	i586-linux-gcc.rul	alpha-linux-gcc.rul
X$symlink	i586-linux-cc.rul	ppc-linux-cc.rul
X$symlink	i586-linux-gcc.rul	ppc-linux-gcc.rul
X$symlink	i586-linux-cc.rul	m68k-linux-cc.rul
X$symlink	i586-linux-gcc.rul	m68k-linux-gcc.rul
X$symlink	i586-linux-cc.rul	armv4l-linux-cc.rul
X$symlink	i586-linux-gcc.rul	armv4l-linux-gcc.rul
X$symlink	i586-linux-cc.rul	mips-linux-cc.rul
X$symlink	i586-linux-gcc.rul	mips-linux-gcc.rul
X$symlink	i586-linux-cc.rul	mipsel-linux-cc.rul
X$symlink	i586-linux-gcc.rul	mipsel-linux-gcc.rul
X$symlink	i586-linux-cc.rul	mips64-linux-cc.rul
X$symlink	i586-linux-gcc.rul	mips64-linux-gcc.rul
X$symlink	i586-linux-cc.rul	s390-linux-cc.rul
X$symlink	i586-linux-gcc.rul	s390-linux-gcc.rul
X$symlink	i586-linux-cc.rul	parisc-linux-cc.rul
X$symlink	i586-linux-gcc.rul	parisc-linux-gcc.rul
X$symlink	i586-linux-cc.rul	parisc64-linux-cc.rul
X$symlink	i586-linux-gcc.rul	parisc64-linux-gcc.rul
X$symlink	i586-linux-cc.rul	ia64-linux-cc.rul
X$symlink	i586-linux-gcc.rul	ia64-linux-gcc.rul
X$symlink	i586-linux-cc.rul	x86_64-linux-cc.rul
X$symlink	i586-linux-gcc.rul	x86_64-linux-gcc.rul
X$symlink	i586-linux-cc.rul	armv5teb-linux-cc.rul
X$symlink	i586-linux-gcc.rul	armv5teb-linux-gcc.rul
X$symlink	i586-linux-cc.rul	sh3-linux-cc.rul
X$symlink	i586-linux-gcc.rul	sh3-linux-gcc.rul
X$symlink	i586-linux-cc.rul	sh4-linux-cc.rul
X$symlink	i586-linux-gcc.rul	sh4-linux-gcc.rul
X$symlink	i586-linux-cc.rul	sh4a-linux-cc.rul
X$symlink	i586-linux-gcc.rul	sh4a-linux-gcc.rul
X$symlink	i586-linux-suncc.rul	i686-linux-suncc.rul
X$symlink	i586-linux-suncc.rul	i486-linux-suncc.rul
X$symlink	i586-linux-suncc.rul	i386-linux-suncc.rul
X$symlink	i586-linux-suncc.rul	x86_64-linux-suncc.rul
X$symlink	i586-linux-suncc64.rul	i686-linux-suncc64.rul
X$symlink	i586-linux-suncc64.rul	x86_64-linux-suncc64.rul	
X#$symlink	os-cygwin32_nt.id	os-cygwin_95-4.0.id
X#$symlink	os-cygwin32_nt.id	os-cygwin_98-4.0.id
X#$symlink	os-cygwin32_nt.id	os-cygwin_98-4.10.id
X#$symlink	os-cygwin32_nt.id	os-cygwin_me-4.90.id 
X#$symlink	os-cygwin32_nt.id	os-cygwin_nt-4.0.id
X#$symlink	os-cygwin32_nt.id	os-cygwin_nt-5.0.id
X#$symlink	os-cygwin32_nt.id	os-cygwin_nt-5.1.id
X$symlink	os-cygwin_95-4.0.id	os-cygwin_98-4.0.id
X$symlink	os-unixware.id		os-openunix.id
X$symlink	i486-cygwin32_nt-cc.rul	i386-cygwin32_nt-cc.rul
X$symlink	i486-cygwin32_nt-cc.rul	i586-cygwin32_nt-cc.rul
X$symlink	i486-cygwin32_nt-cc.rul	i686-cygwin32_nt-cc.rul
X$symlink	i486-cygwin32_nt-cc.rul	i786-cygwin32_nt-cc.rul
X$symlink	i486-cygwin32_nt-cc.rul	i686-cygwin32_wow64-cc.rul
X$symlink	i486-cygwin32_nt-cc.rul	i786-cygwin32_wow64-cc.rul
X$symlink	i486-cygwin32_nt-cc64.rul	i686-cygwin32_wow64-cc64.rul
X$symlink	i486-cygwin32_nt-cc64.rul	i786-cygwin32_wow64-cc64.rul
X$symlink	i486-cygwin32_nt-cl.rul	i386-cygwin32_nt-cl.rul
X$symlink	i486-cygwin32_nt-cl.rul	i586-cygwin32_nt-cl.rul
X$symlink	i486-cygwin32_nt-cl.rul	i686-cygwin32_nt-cl.rul
X$symlink	i486-cygwin32_nt-cl.rul	i786-cygwin32_nt-cl.rul
X$symlink	i486-cygwin32_nt-cl.rul	i686-cygwin32_wow64-cl.rul
X$symlink	i486-cygwin32_nt-cl.rul	i786-cygwin32_wow64-cl.rul
X$symlink	i686-cygwin32_wow64-cl64.rul	i686-cygwin32_nt-cl64.rul
X$symlink	i686-cygwin32_wow64-cl64.rul	i786-cygwin32_nt-cl64.rul
X$symlink	i486-cygwin32_nt-gcc.rul	i386-cygwin32_nt-gcc.rul
X$symlink	i486-cygwin32_nt-gcc.rul	i586-cygwin32_nt-gcc.rul
X$symlink	i486-cygwin32_nt-gcc.rul	i686-cygwin32_nt-gcc.rul
X$symlink	i486-cygwin32_nt-gcc.rul	i786-cygwin32_nt-gcc.rul
X$symlink	i486-cygwin32_nt-gcc.rul	i686-cygwin32_wow64-gcc.rul
X$symlink	i486-cygwin32_nt-gcc.rul	i786-cygwin32_wow64-gcc.rul
X$symlink	i486-cygwin32_nt-gcc64.rul	i686-cygwin32_wow64-gcc64.rul
X$symlink	i486-cygwin32_nt-gcc64.rul	i786-cygwin32_wow64-gcc64.rul
X$symlink	power-macintosh-rhapsody-cc.rul	power-macintosh-mac-os10-cc.rul
X$symlink	power-macintosh-rhapsody-gcc.rul	power-macintosh-mac-os10-gcc.rul
X$symlink	power-macintosh-darwin-cc.rul	i386-darwin-cc.rul
X$symlink	power-macintosh-darwin-gcc.rul	i386-darwin-gcc.rul
X$symlink	power-macintosh-darwin-cc64.rul	i386-darwin-cc64.rul
X$symlink	power-macintosh-darwin-gcc64.rul	i386-darwin-gcc64.rul
X$symlink	sun4-sunos4-cc.rul	sun4c-sunos4-cc.rul
X$symlink	sun4-sunos4-gcc.rul	sun4c-sunos4-gcc.rul
X$symlink	sun4-sunos5-cc.rul	sun4c-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4c-sunos5-gcc.rul
X$symlink	sun4-sunos4-cc.rul	sun4m-sunos4-cc.rul
X$symlink	sun4-sunos4-gcc.rul	sun4m-sunos4-gcc.rul
X$symlink	sun4-sunos5-cc.rul	sun4m-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4m-sunos5-gcc.rul
X$symlink	sun4-sunos5-cc.rul	sun4d-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4d-sunos5-gcc.rul
X$symlink	sun4-sunos5-cc.rul	sun4e-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4e-sunos5-gcc.rul
X$symlink	sun4-sunos5-cc.rul	sun4L-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4L-sunos5-gcc.rul
X$symlink	sun4-sunos5-cc.rul	sun4u-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4u-sunos5-gcc.rul
X$symlink	sun4-sunos5-cc64.rul	sun4u-sunos5-cc64.rul
X$symlink	sun4-sunos5-gcc64.rul	sun4u-sunos5-gcc64.rul
X$symlink	sun4-sunos5-cc.rul	sun4us-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4us-sunos5-gcc.rul
X$symlink	sun4-sunos5-cc64.rul	sun4us-sunos5-cc64.rul
X$symlink	sun4-sunos5-gcc64.rul	sun4us-sunos5-gcc64.rul
X$symlink	sun4-sunos5-cc.rul	sun4v-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4v-sunos5-gcc.rul
X$symlink	sun4-sunos5-cc64.rul	sun4v-sunos5-cc64.rul
X$symlink	sun4-sunos5-gcc64.rul	sun4v-sunos5-gcc64.rul
X$symlink	i386-unixware-cc.rul	i486-unixware-cc.rul
X$symlink	i386-unixware-gcc.rul	i486-unixware-gcc.rul
X$symlink	i386-unixware-cc.rul	i586-unixware-cc.rul
X$symlink	i386-unixware-gcc.rul	i586-unixware-gcc.rul
X$symlink	i386-unixware-cc.rul	pentium-iii-unixware-cc.rul
X$symlink	i386-unixware-gcc.rul	pentium-iii-unixware-gcc.rul
X$symlink	i386-unixware-cc.rul	pentium-pro-unixware-cc.rul
X$symlink	i386-unixware-gcc.rul	pentium-pro-unixware-gcc.rul
X$symlink	i386-unixware-cc.rul	pentium-4-unixware-cc.rul
X$symlink	i386-unixware-gcc.rul	pentium-4-unixware-gcc.rul
X$symlink	i386-ms-dos-gcc.rul	i486-ms-dos-gcc.rul
X$symlink	i386-ms-dos-gcc.rul	i586-ms-dos-gcc.rul
X$symlink	i386-ms-dos-gcc.rul	i686-ms-dos-gcc.rul
X$symlink	i386-ms-dos-gcc.rul	i786-ms-dos-gcc.rul
X$symlink	atarist-freemint-gcc.rul	atariclone-freemint-gcc.rul
X$symlink	atarist-freemint-gcc.rul	atariste-freemint-gcc.rul
X$symlink	atarist-freemint-gcc.rul	ataritt-freemint-gcc.rul
X$symlink	atarist-freemint-gcc.rul	falcon-freemint-gcc.rul
X$symlink	atarist-freemint-gcc.rul	milan-freemint-gcc.rul
X$symlink	atarist-freemint-gcc.rul	hades-freemint-gcc.rul
X$symlink	atarist-freemint-gcc.rul	aranym-freemint-gcc.rul
X$symlink	bepc-beos-gcc.rul	bemac-beos-gcc.rul
X$symlink	bepc-haiku-cc.rul	bemac-haiku-cc.rul
X$symlink	bepc-haiku-gcc.rul	bemac-haiku-gcc.rul
X$symlink	alpha-openvms-cc.rul	alphaserver_ds20_500_mhz-openvms-cc.rul
X#
X$symlink	mk-smake.id		mk-build.id
X$symlink	r-smake.dep		r-build.dep
X$symlink	r-smake.obj		r-build.obj
X$symlink	r-smake.tag		r-build.tag
X$symlink	r-make.obj		r-gmake.obj
X
Xif [ -r r-make.c4x ]; then
X	$symlink	r-make.c4x		r-gmake.c4x
X	$symlink	r-make.c4x-dep		r-gmake.c4x-dep
X	$symlink	r-smake.c4x		r-build.c4x
X	$symlink	r-smake.c4x-dep		r-build.c4x-dep
Xfi
END-of-smake-1.2.1/RULES/MKLINKS
echo x - smake-1.2.1/RULES/rules.top
sed 's/^X//' >smake-1.2.1/RULES/rules.top << 'END-of-smake-1.2.1/RULES/rules.top'
X#ident "@(#)rules.top	1.20 09/07/26 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules that should be included at top of every Makefile
X# This is the general purpose C-language version
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X#
X# Make sure this becomes the default target
X#
X###########################################################################
Xall:
X
X###########################################################################
X#
X# First make sure that all symlinks in $(SRCROOT)/$(RULESDIR)/ are present
X#
X# $(DUMMY_LNK) is needed to work around a Sun make bug that has been
X# fixed with Solaris 11 but that is present for all old Solaris versions.
X#
X###########################################################################
X_DUMMY_LNK=	$(SRCROOT)/$(RULESDIR)/ldummy.lnk
XDUMMY_LNK=	$(_DUMMY_LNK:./%=%)
X
X$(DUMMY_LNK):
X	@echo "	==> MAKING SYMLINKS in $(SRCROOT)/$(RULESDIR)/" && \
X			cd $(SRCROOT)/$(RULESDIR) && sh ./MKLINKS
X
Xinclude 	$(DUMMY_LNK)
X
X###########################################################################
X#
X# Include global language independent macros
X#
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules1.top
X
X###########################################################################
X#
X# Workaround for GNU make design bug (include does not trigger rule evaluation)
X# A correctly working "make" did create the symlinks already while
X# including "ldummy.lnk" above.
X#
X###########################################################################
X$(SRCROOT)/$(RULESDIR)/$(XARCH).rul: $(SRCROOT)/$(RULESDIR)/ldummy.lnk
X
X###########################################################################
X#
X# Include platform dependent macros for C-language here.
X#
X# If a project needs other languages too, additional rules may be defined.
X# These additional rules should be placed in a file that uses a hierarchy
X# similar to rules.top and mey be called e.g. yacc.top.
X#
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/$(XARCH).rul
X
X###########################################################################
X#
X# Include global autofonfiguration rules
X#
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cnf
END-of-smake-1.2.1/RULES/rules.top
echo x - smake-1.2.1/RULES/cc-pcc.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-pcc.rul << 'END-of-smake-1.2.1/RULES/cc-pcc.rul'
X#ident "@(#)cc-pcc.rul	1.1 10/02/23 "
X###########################################################################
X# Written 2010 by J. Schilling
X###########################################################################
X#
X# Platform independent MACROS for PCC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(GCCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(G++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
X#		-Wtraditional now causes more pain than it helps 
X#*CWOPTS=		-Wall -Wtraditional
X#*CWOPTS=		-Wall -Wno-unknown-pragmas \
X#*		-Wshadow -Wmissing-prototypes -Wstrict-prototypes
XCOPTOPT=	-O
XCOPTDYN=	-fpic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	$(CWOPTS)
XC++OPTOPT=	$(COPTOPT)
XC++OPTDYN=	-fpic
XC++OPTGPROF=	-pg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		pcc
XCC=		@echo "	==> COMPILING \"$@\""; pcc
XCC++ =		@echo "	==> COMPILING \"$@\""; p++
XLDCC=		@echo "	==> LINKING \"$@\""; pcc
XLDCC++ =	@echo "	==> LINKING \"$@\""; p++
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; pcc
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; p++
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); pcc -M
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); p++ -M
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-pcc.rul
echo x - smake-1.2.1/RULES/i86pc-sunos5-pcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i86pc-sunos5-pcc.rul << 'END-of-smake-1.2.1/RULES/i86pc-sunos5-pcc.rul'
X#ident "@(#)i86pc-sunos5-pcc.rul	1.1 10/02/28 "
X###########################################################################
X# Written 2010 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x for PC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-pcc.rul
XCC_COM=		pcc
X
XOSDEFS +=	-D__SVR4 -DSVR4
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
XLDOPTDYN=	-dy -G -Wl,-ztext -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl
X
XARFLAGS=	crs
END-of-smake-1.2.1/RULES/i86pc-sunos5-pcc.rul
echo x - smake-1.2.1/RULES/9000-725-hp-ux-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/9000-725-hp-ux-cc.rul << 'END-of-smake-1.2.1/RULES/9000-725-hp-ux-cc.rul'
X#ident "@(#)9000-725-hp-ux-cc.rul	1.13 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for HP/UX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-hp.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/9000-725-hp-ux-cc.rul
echo x - smake-1.2.1/RULES/9000-725-hp-ux-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/9000-725-hp-ux-gcc.rul << 'END-of-smake-1.2.1/RULES/9000-725-hp-ux-gcc.rul'
X#ident "@(#)9000-725-hp-ux-gcc.rul	1.10 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for HP/UX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.sl
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLNDYNLIB=	@
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/9000-725-hp-ux-gcc.rul
echo x - smake-1.2.1/RULES/README
sed 's/^X//' >smake-1.2.1/RULES/README << 'END-of-smake-1.2.1/RULES/README'
XPATH setzen
XLD_RUN_PATH loeschen
XLD_LIBRARY_PATH Loeschen
Xumask setzen
X
Xsymlink libxxx.so -> libxxx.so.x.y
Xbei install setzen
X
Xhighlevel rules:
X
Xrules.aux
Xrules.cmd
Xrules.dir
Xrules.drv
Xrules.lib
Xrules.loc
Xrules.mks
Xrules.mod
Xrules.rdi
Xrules.shl
X
Xsollten umbenannt werden z.B. in xrules.*
X
XSunPRo	 -mt		GCC	-D_REENTRANT -lthread
X
XDESTDIR fuer GNU autoconf Kompatibilitaet?
X
END-of-smake-1.2.1/RULES/README
echo x - smake-1.2.1/RULES/alpha-osf1-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/alpha-osf1-cc.rul << 'END-of-smake-1.2.1/RULES/alpha-osf1-cc.rul'
X#ident "@(#)alpha-osf1-cc.rul	1.7 07/05/08 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Digital UNIX (OSF1)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-dec.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/alpha-osf1-cc.rul
echo x - smake-1.2.1/RULES/alpha-osf1-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/alpha-osf1-gcc.rul << 'END-of-smake-1.2.1/RULES/alpha-osf1-gcc.rul'
X#ident "@(#)alpha-osf1-gcc.rul	1.8 07/05/09 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Digital UNIX (OSF1)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLIBS_PATH=	-L$(OLIBSDIR) -L/usr/ccs/lib
X
XLDLIBS=		$(LIBS) $(LIBX) -lrt
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/alpha-osf1-gcc.rul
echo x - smake-1.2.1/RULES/aviion-dgux3-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/aviion-dgux3-cc.rul << 'END-of-smake-1.2.1/RULES/aviion-dgux3-cc.rul'
X#ident "@(#)aviion-dgux3-cc.rul	1.8 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for DGUX 3.x on mc88100
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-dg.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
X
XARFLAGS=	crs
END-of-smake-1.2.1/RULES/aviion-dgux3-cc.rul
echo x - smake-1.2.1/RULES/aviion-dgux3-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/aviion-dgux3-gcc.rul << 'END-of-smake-1.2.1/RULES/aviion-dgux3-gcc.rul'
X#ident "@(#)aviion-dgux3-gcc.rul	1.9 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for DGUX 3.x on mc88100
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
X
X#LDOPTDYN=	-dy -G -ztext -h $(TARGET) -ldl
XLDOPTDYN=	-shared -ztext -h $(TARGET) -ldl
X
XARFLAGS=	crs
END-of-smake-1.2.1/RULES/aviion-dgux3-gcc.rul
echo x - smake-1.2.1/RULES/aviion-dgux4-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/aviion-dgux4-cc.rul << 'END-of-smake-1.2.1/RULES/aviion-dgux4-cc.rul'
X#ident "@(#)aviion-dgux4-cc.rul	1.8 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for DGUX 4.x on mc88100/pentium
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-dg.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
X
XARFLAGS=	crs
END-of-smake-1.2.1/RULES/aviion-dgux4-cc.rul
echo x - smake-1.2.1/RULES/aviion-dgux4-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/aviion-dgux4-gcc.rul << 'END-of-smake-1.2.1/RULES/aviion-dgux4-gcc.rul'
X#ident "@(#)aviion-dgux4-gcc.rul	1.9 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for DGUX 4.x on mc88100/pentium
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
X
XLDOPTDYN=	-shared -ztext -h $(TARGET) -ldl
X
XARFLAGS=	crs
END-of-smake-1.2.1/RULES/aviion-dgux4-gcc.rul
echo x - smake-1.2.1/RULES/bemac-beos-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/bemac-beos-cc.rul << 'END-of-smake-1.2.1/RULES/bemac-beos-cc.rul'
X#ident @(#)bemac-beos-cc.rul	1.9 07/05/08 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-bemwcc.rul
X
XOSDEFS +=
X
XCPPOPTS=	-O4 -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
X#LIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
X
XLN=             /bin/ln -s
END-of-smake-1.2.1/RULES/bemac-beos-cc.rul
echo x - smake-1.2.1/RULES/bemac-beos-mwcc.rul
sed 's/^X//' >smake-1.2.1/RULES/bemac-beos-mwcc.rul << 'END-of-smake-1.2.1/RULES/bemac-beos-mwcc.rul'
X#ident @(#)bemac-beos-mwcc.rul	1.9 07/05/08 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-bemwcc.rul
X
XOSDEFS +=
X
XCPPOPTS=	-relax_pointers -opt all -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
X#LIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
X
XLN=             /bin/ln -s
END-of-smake-1.2.1/RULES/bemac-beos-mwcc.rul
echo x - smake-1.2.1/RULES/bepc-beos-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/bepc-beos-cc.rul << 'END-of-smake-1.2.1/RULES/bepc-beos-cc.rul'
X#ident @(#)bepc-beos-cc.rul	1.10 07/05/09 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X#
X# XXX Old BeOS needs libroot.so to get [efg]cvt()
X# XXX New BeOS seems to have this in libc and in addition we include
X# XXX strtod.c for floating point conversion on OS without such code.
X# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been
X# XXX removed and printing floating numbers will work with old/new BeOS
X#
X#OSDEFS +=	-DNO_FLOATINGPOINT -DUSE_FLOATINGARGS
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#CONFFLAGS=	i586
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so
X
XLIB_SOCKET=	-lsocket -lbind
XLIB_MATH=
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XLN=             /bin/ln -s
END-of-smake-1.2.1/RULES/bepc-beos-cc.rul
echo x - smake-1.2.1/RULES/bepc-beos-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/bepc-beos-gcc.rul << 'END-of-smake-1.2.1/RULES/bepc-beos-gcc.rul'
X#ident @(#)bepc-beos-gcc.rul	1.12 07/05/09 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X#
X# XXX Old BeOS needs libroot.so to get [efg]cvt()
X# XXX New BeOS seems to have this in libc and in addition we include
X# XXX strtod.c for floating point conversion on OS without such code.
X# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been
X# XXX removed and printing floating numbers will work with old/new BeOS
X#
X#OSDEFS +=	-DNO_FLOATINGPOINT -DUSE_FLOATINGARGS
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#CONFFLAGS=	i586
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so
X
XLIB_SOCKET=	-lsocket -lbind
XLIB_MATH=
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XLN=             /bin/ln -s
END-of-smake-1.2.1/RULES/bepc-beos-gcc.rul
echo x - smake-1.2.1/RULES/dn5500-domainos-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/dn5500-domainos-cc.rul << 'END-of-smake-1.2.1/RULES/dn5500-domainos-cc.rul'
X#ident "@(#)dn5500-domainos-cc.rul	1.6 07/05/08 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for DomainOS (sys5.3, 10.4.1)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-apollo.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
X
END-of-smake-1.2.1/RULES/dn5500-domainos-cc.rul
echo x - smake-1.2.1/RULES/dummy.dep
sed 's/^X//' >smake-1.2.1/RULES/dummy.dep << 'END-of-smake-1.2.1/RULES/dummy.dep'
X#ident @(#)dummy.dep	1.2 06/05/14 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Dependency building dummy rules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xdepend rmdep:
X	@echo "$@: nothing to make"
END-of-smake-1.2.1/RULES/dummy.dep
echo x - smake-1.2.1/RULES/gmake.wrn
sed 's/^X//' >smake-1.2.1/RULES/gmake.wrn << 'END-of-smake-1.2.1/RULES/gmake.wrn'
X		W A R N I N G	Messages like:
X
Xgmake[2]: Entering directory `/tmp/cdrtools-2.01/libschily'
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/cvmod.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/dat.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/fcons.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/fdown.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/fdup.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/ffileread.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/ffilewrite.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/fgetline.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/fgetstr.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/file_raise.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/fileclose.d: No such file or directory
X....
X
Xare caused by a GNU make bug and not by the Schily makefile system.
X
XThe related bug has been reported to the GNU make maintainers in 1998 but
Xas the bug has not yet been fixed, it seems that GNU make is unmaintained :-(
XA working highly portable make program is at ftp://ftp.berlios.de/pub/smake
X
XYou may switch off this warning by calling "gmake GMAKE_NOWARN=true ..."
END-of-smake-1.2.1/RULES/gmake.wrn
echo x - smake-1.2.1/RULES/hppa-nextstep-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/hppa-nextstep-cc.rul << 'END-of-smake-1.2.1/RULES/hppa-nextstep-cc.rul'
X#ident "@(#)hppa-nextstep-cc.rul	1.10 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for NeXT Step on hppa (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
XMKDIR=		$(MKDIR_SH)
X
X####
X# XXX Better use something like CC=cc
X####
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M
END-of-smake-1.2.1/RULES/hppa-nextstep-cc.rul
echo x - smake-1.2.1/RULES/hppa-nextstep-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/hppa-nextstep-gcc.rul << 'END-of-smake-1.2.1/RULES/hppa-nextstep-gcc.rul'
X#ident "@(#)hppa-nextstep-gcc.rul	1.10 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for NeXT Step on hppa (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
XMKDIR=		$(MKDIR_SH)
END-of-smake-1.2.1/RULES/hppa-nextstep-gcc.rul
echo x - smake-1.2.1/RULES/i386-at386-gnu-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-at386-gnu-cc.rul << 'END-of-smake-1.2.1/RULES/i386-at386-gnu-cc.rul'
X#ident "@(#)i386-at386-gnu-cc.rul	1.7 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for GNU (hurd)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i386-at386-gnu-cc.rul
echo x - smake-1.2.1/RULES/i386-at386-gnu-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-at386-gnu-gcc.rul << 'END-of-smake-1.2.1/RULES/i386-at386-gnu-gcc.rul'
X#ident "@(#)i386-at386-gnu-gcc.rul	1.7 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for GNU (hurd)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i386-at386-gnu-gcc.rul
echo x - smake-1.2.1/RULES/i386-bsd-os-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-bsd-os-cc.rul << 'END-of-smake-1.2.1/RULES/i386-bsd-os-cc.rul'
X#ident "@(#)i386-bsd-os-cc.rul	1.14 07/05/09 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BSD/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
X#SHL_SUFFIX=	.so.1.0
XSHL_SUFFIX=
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLDOPTDYN=
XLNDYNLIB=
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-smake-1.2.1/RULES/i386-bsd-os-cc.rul
echo x - smake-1.2.1/RULES/i386-bsd-os-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-bsd-os-gcc.rul << 'END-of-smake-1.2.1/RULES/i386-bsd-os-gcc.rul'
X#ident "@(#)i386-bsd-os-gcc.rul	1.14 07/05/09 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BSD/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
X#SHL_SUFFIX=	.so.1.0
XSHL_SUFFIX=
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLDOPTDYN=
XLNDYNLIB=
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-smake-1.2.1/RULES/i386-bsd-os-gcc.rul
echo x - smake-1.2.1/RULES/i386-bsd-os3-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-bsd-os3-cc.rul << 'END-of-smake-1.2.1/RULES/i386-bsd-os3-cc.rul'
X#ident "@(#)i386-bsd-os3-cc.rul	1.12 07/05/09 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BSD/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
X#SHL_SUFFIX=	.so.1.0
XSHL_SUFFIX=
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLDOPTDYN=
XLNDYNLIB=
X
X#		shlicc2 is not present oln older or newer systems
X#LDCC=		@echo "	==> LINKING \"$@\""; shlicc2
XLDCC=		@echo "	==> LINKING \"$@\""; shlicc
X#DYNLD=		@echo "	==> LINKING dynamic library \"$@\""; gcc
XDYNLD=
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-smake-1.2.1/RULES/i386-bsd-os3-cc.rul
echo x - smake-1.2.1/RULES/i386-bsd-os3-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-bsd-os3-gcc.rul << 'END-of-smake-1.2.1/RULES/i386-bsd-os3-gcc.rul'
X#ident "@(#)i386-bsd-os3-gcc.rul	1.12 07/05/09 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BSD/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
X#SHL_SUFFIX=	.so.1.0
XSHL_SUFFIX=
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLDOPTDYN=
XLNDYNLIB=
X
X#		shlicc2 is not present oln older or newer systems
X#LDCC=		@echo "	==> LINKING \"$@\""; shlicc2
XLDCC=		@echo "	==> LINKING \"$@\""; shlicc
X#DYNLD=		@echo "	==> LINKING dynamic library \"$@\""; gcc
XDYNLD=
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-smake-1.2.1/RULES/i386-bsd-os3-gcc.rul
echo x - smake-1.2.1/RULES/i386-freebsd-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-freebsd-cc.rul << 'END-of-smake-1.2.1/RULES/i386-freebsd-cc.rul'
X#ident "@(#)i386-freebsd-cc.rul	1.8 07/05/08 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for FreeBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-smake-1.2.1/RULES/i386-freebsd-cc.rul
echo x - smake-1.2.1/RULES/mk-.id
sed 's/^X//' >smake-1.2.1/RULES/mk-.id << 'END-of-smake-1.2.1/RULES/mk-.id'
X#ident "@(#)mk-.id	1.16 09/09/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Name of make program (make/gmake/smake)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XMAKEPROG=	make		# Sun make
X
X###########################################################################
X#
X# standard (automatic) machine identification
X#
X###########################################################################
X#
X# XP_ARCH = uname -p	= mach	  # Processor (sparc/mc68020)
X# XK_ARCH = uname -m	= arch -k # Kernel (sun3/sun4c/sun4m)
X# XM_ARCH = arch	~ arch -k # Machine (sun3/sun4)
X#
X###########################################################################
X#
X# Due to a bug in /usr/xpg*/bin/tr on Solaris, we cannot directly translit
X# many different chars to '-' using e.g. tr ', /\\()"' ',------'
X#
X# This is why we use sed 'y%ABC\\%abc-%'. Note that this will not work on *BSD
X#
X###########################################################################
X
XXP_ARCH:sh=	(mach || uname -p || true)2>/dev/null      | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
XXK_ARCH:sh=	uname -m                                   | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
XXM_ARCH:sh=	(arch || /usr/ucb/arch || true)2>/dev/null | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
X
XP_ARCH=		$(XP_ARCH)
XK_ARCH=		$(XK_ARCH)
XM_ARCH=		$(XM_ARCH)
X
X_XP_ARCH=	$(XP_ARCH:unknown=$(K_ARCH))
X
X_P_ARCH=	$(_UNIQ)$(_XP_ARCH)
X__P_ARCH=	$(_P_ARCH:$(_UNIQ)=$(K_ARCH))
XP_ARCH=		$(__P_ARCH:$(_UNIQ)%=%)
X
X_M_ARCH=	$(_UNIQ)$(XM_ARCH)
X__M_ARCH=	$(_M_ARCH:$(_UNIQ)=$(K_ARCH))
XM_ARCH=		$(__M_ARCH:$(_UNIQ)%=%)
X
XOSNAME:sh=	uname -s | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
XOSREL:sh=	uname -r | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
XOSVERSION:sh=	uname -v | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
END-of-smake-1.2.1/RULES/mk-.id
echo x - smake-1.2.1/RULES/i386-freebsd-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-freebsd-gcc.rul << 'END-of-smake-1.2.1/RULES/i386-freebsd-gcc.rul'
X#ident "@(#)i386-freebsd-gcc.rul	1.8 07/05/08 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for FreeBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-smake-1.2.1/RULES/i386-freebsd-gcc.rul
echo x - smake-1.2.1/RULES/i386-mingw32_nt-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-mingw32_nt-gcc.rul << 'END-of-smake-1.2.1/RULES/i386-mingw32_nt-gcc.rul'
X#ident "@(#)i386-mingw32_nt-gcc.rul	1.7 07/05/08 "
X###########################################################################
X#
X# Platform dependent MACROS for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX) -lmgw32
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XMKDIR=		$(MKDIR_SH)
END-of-smake-1.2.1/RULES/i386-mingw32_nt-gcc.rul
echo x - smake-1.2.1/RULES/i386-ms-dos-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-ms-dos-gcc.rul << 'END-of-smake-1.2.1/RULES/i386-ms-dos-gcc.rul'
X#ident "@(#)i386-ms-dos-gcc.rul	1.5 07/05/08 "
X###########################################################################
X#
X# Platform dependent MACROS for MSDOS/DJGPP v2
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XCOPTDYN=
XCOPTGPROF=	-pg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=
X
X#LDCC=		@echo "	==> LINKING \"$@\""; gcc -Wl,--strip-all
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i386-ms-dos-gcc.rul
echo x - smake-1.2.1/RULES/i386-netbsd-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-netbsd-cc.rul << 'END-of-smake-1.2.1/RULES/i386-netbsd-cc.rul'
X#ident "@(#)i386-netbsd-cc.rul	1.11 07/05/09 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for NetBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X#OSDEFS +=	-DIS_UNIX
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-smake-1.2.1/RULES/i386-netbsd-cc.rul
echo x - smake-1.2.1/RULES/i386-netbsd-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-netbsd-gcc.rul << 'END-of-smake-1.2.1/RULES/i386-netbsd-gcc.rul'
X#ident "@(#)i386-netbsd-gcc.rul	1.11 07/05/09 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for NetBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X#OSDEFS +=	-DIS_UNIX
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-smake-1.2.1/RULES/i386-netbsd-gcc.rul
echo x - smake-1.2.1/RULES/i386-openbsd-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-openbsd-cc.rul << 'END-of-smake-1.2.1/RULES/i386-openbsd-cc.rul'
X#ident "@(#)i386-openbsd-cc.rul	1.10 07/05/09 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for OpenBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-smake-1.2.1/RULES/i386-openbsd-cc.rul
echo x - smake-1.2.1/RULES/i386-openbsd-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-openbsd-gcc.rul << 'END-of-smake-1.2.1/RULES/i386-openbsd-gcc.rul'
X#ident "@(#)i386-openbsd-gcc.rul	1.10 07/05/09 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for OpenBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-smake-1.2.1/RULES/i386-openbsd-gcc.rul
echo x - smake-1.2.1/RULES/i386-openserver-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-openserver-cc.rul << 'END-of-smake-1.2.1/RULES/i386-openserver-cc.rul'
X#ident "@(#)i386-openserver-cc.rul	1.4 07/05/08 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Platform dependent MACROS for SCO OpenServer 5 using cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sco_os.rul
X
XOSDEFS +=	-DSCO -DOPENSERVER
X
XKDEFINES=	-DKERNEL -D_KERNEL 
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	
X
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; cc
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XLORDER=		echo
XTSORT=		cat
X
END-of-smake-1.2.1/RULES/i386-openserver-cc.rul
echo x - smake-1.2.1/RULES/i386-openserver-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-openserver-gcc.rul << 'END-of-smake-1.2.1/RULES/i386-openserver-gcc.rul'
X#ident "@(#)i386-openserver-gcc.rul	1.7 07/05/08 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Platform dependent MACROS for SCO OpenServer 5 using gcc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-DSCO -DOPENSERVER
XCOPTS=		-melf
X
XKDEFINES=	-DKERNEL -D_KERNEL 
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-dy -G $(TARGET)
X
XLORDER=		echo
XTSORT=		cat
X
XMKDIR=		$(MKDIR_SH)
END-of-smake-1.2.1/RULES/i386-openserver-gcc.rul
echo x - smake-1.2.1/RULES/i386-os2-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-os2-gcc.rul << 'END-of-smake-1.2.1/RULES/i386-os2-gcc.rul'
X#ident "@(#)i386-os2-gcc.rul	1.13 07/05/09 "
X###########################################################################
X# First version written 1999 by C. Wohlgemuth 
X###########################################################################
X#
X# Platform dependent MACROS for OS/2 using gcc (EMX)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X# XXX strtod.c now does floating point conversion on OS without ?cvt().
X# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been
X# XXX removed and printing floating numbers will work on any OS.
X#
XOSDEFS +=	-D__OS2
X
X#
X#		Using -Zcrtdll is a hack to allow this flag to be seen
X#		from configure too.
XCOPTS=		-Zcrtdll
X
XKDEFINES=
X
XCOPTDYN=
XCOPTGPROF=
XLIB_PREFIX=
XLIB_SUFFIX=	.a
XSHL_SUFFIX=
X
XLIB_SOCKET=	-lsocket
XLIB_MATH=
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLDOPTDYN=
X
XLDCC=		@echo "	==> LINKING \"$@\""; gcc -Zcrtdll
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i386-os2-gcc.rul
echo x - smake-1.2.1/RULES/i386-unixware-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-unixware-cc.rul << 'END-of-smake-1.2.1/RULES/i386-unixware-cc.rul'
X#ident "@(#)i386-unixware-cc.rul	1.7 07/05/08 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Platform dependent MACROS for SCO UnixWare 2.x / 7.x using cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sco_uw.rul
X
XOSDEFS +=	-DUNIXWARE -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL 
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XARFLAGS=	cr
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i386-unixware-cc.rul
echo x - smake-1.2.1/RULES/i386-unixware-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i386-unixware-gcc.rul << 'END-of-smake-1.2.1/RULES/i386-unixware-gcc.rul'
X#ident "@(#)i386-unixware-gcc.rul	1.6 07/05/08 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Platform dependent MACROS for SCO UnixWare 2.x / 7.x using gcc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-DUNIXWARE -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL 
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-dy -G $(TARGET)
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i386-unixware-gcc.rul
echo x - smake-1.2.1/RULES/i486-cygwin32_nt-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/i486-cygwin32_nt-cc.rul << 'END-of-smake-1.2.1/RULES/i486-cygwin32_nt-cc.rul'
X#ident "@(#)i486-cygwin32_nt-cc.rul	1.10 07/05/09 "
X###########################################################################
X# Written 1998 by B. Bochow
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-mwin32
X
XKDEFINES=
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dll
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLDOPTDYN=
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLNDYNLIB=
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i486-cygwin32_nt-cc.rul
echo x - smake-1.2.1/RULES/i486-cygwin32_nt-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i486-cygwin32_nt-gcc.rul << 'END-of-smake-1.2.1/RULES/i486-cygwin32_nt-gcc.rul'
X#ident "@(#)i486-cygwin32_nt-gcc.rul	1.10 07/05/09 "
X###########################################################################
X# Written 1998 by B. Bochow
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-mwin32
X
XKDEFINES=
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dll
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLDOPTDYN=
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLNDYNLIB=
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i486-cygwin32_nt-gcc.rul
echo x - smake-1.2.1/RULES/i486-mingw32_nt-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i486-mingw32_nt-gcc.rul << 'END-of-smake-1.2.1/RULES/i486-mingw32_nt-gcc.rul'
X#ident "@(#)i486-mingw32_nt-gcc.rul	1.7 07/05/08 "
X###########################################################################
X#
X# Platform dependent MACROS for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XCPPOPTS=	-I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDLIBS=		$(LIBS) $(LIBX) -lmgw32
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XMKDIR=		$(MKDIR_SH)
END-of-smake-1.2.1/RULES/i486-mingw32_nt-gcc.rul
echo x - smake-1.2.1/RULES/i586-linux-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/i586-linux-cc.rul << 'END-of-smake-1.2.1/RULES/i586-linux-cc.rul'
X#ident "@(#)i586-linux-cc.rul	1.13 08/11/15 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Linux
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X#
X# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux
X#
XINCDIRSX +=	$(LINUX_SRC_INCLUDE)
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
X#
X# Uncomment the next line in case you are on an old Linux version that
X# does not support the -R linker flag.
X#
X#LDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i586-linux-cc.rul
echo x - smake-1.2.1/RULES/i586-linux-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i586-linux-gcc.rul << 'END-of-smake-1.2.1/RULES/i586-linux-gcc.rul'
X#ident "@(#)i586-linux-gcc.rul	1.13 08/11/15 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Linux
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X#
X# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux
X#
XINCDIRSX +=	$(LINUX_SRC_INCLUDE)
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
X#
X# Uncomment the next line in case you are on an old Linux version that
X# does not support the -R linker flag.
X#
X#LDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i586-linux-gcc.rul
echo x - smake-1.2.1/RULES/i586-mingw32_nt-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i586-mingw32_nt-gcc.rul << 'END-of-smake-1.2.1/RULES/i586-mingw32_nt-gcc.rul'
X#ident "@(#)i586-mingw32_nt-gcc.rul	1.7 07/05/08 "
X###########################################################################
X#
X# Platform dependent MACROS for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDLIBS=		$(LIBS) $(LIBX) -lmgw32
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XMKDIR=		$(MKDIR_SH)
END-of-smake-1.2.1/RULES/i586-mingw32_nt-gcc.rul
echo x - smake-1.2.1/RULES/i686-mingw32_nt-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i686-mingw32_nt-gcc.rul << 'END-of-smake-1.2.1/RULES/i686-mingw32_nt-gcc.rul'
X#ident "@(#)i686-mingw32_nt-gcc.rul	1.7 07/05/08 "
X###########################################################################
X#
X# Platform dependent MACROS for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDLIBS=		$(LIBS) $(LIBX) -lmgw32
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XMKDIR=		$(MKDIR_SH)
END-of-smake-1.2.1/RULES/i686-mingw32_nt-gcc.rul
echo x - smake-1.2.1/RULES/i786-mingw32_nt-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i786-mingw32_nt-gcc.rul << 'END-of-smake-1.2.1/RULES/i786-mingw32_nt-gcc.rul'
X#ident "@(#)i786-mingw32_nt-gcc.rul	1.7 07/05/08 "
X###########################################################################
X#
X# Platform dependent MACROS for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDLIBS=		$(LIBS) $(LIBX) -lmgw32
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XMKDIR=		$(MKDIR_SH)
END-of-smake-1.2.1/RULES/i786-mingw32_nt-gcc.rul
echo x - smake-1.2.1/RULES/i86pc-sunos5-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/i86pc-sunos5-cc.rul << 'END-of-smake-1.2.1/RULES/i86pc-sunos5-cc.rul'
X#ident "@(#)i86pc-sunos5-cc.rul	1.11 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x on PC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
XLDOPTDYN=	-dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl
X
XARFLAGS=	crs
END-of-smake-1.2.1/RULES/i86pc-sunos5-cc.rul
echo x - smake-1.2.1/RULES/i86pc-sunos5-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i86pc-sunos5-gcc.rul << 'END-of-smake-1.2.1/RULES/i86pc-sunos5-gcc.rul'
X#ident "@(#)i86pc-sunos5-gcc.rul	1.13 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x for PC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
X#
X# We should use -Wl,-ztext here, but gcc does not create fully compliant
X# object files.
X#
XLDOPTDYN=	-dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl
X
XARFLAGS=	crs
END-of-smake-1.2.1/RULES/i86pc-sunos5-gcc.rul
echo x - smake-1.2.1/RULES/ip22-irix-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/ip22-irix-cc.rul << 'END-of-smake-1.2.1/RULES/ip22-irix-cc.rul'
X#ident "@(#)ip22-irix-cc.rul	1.9 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Silicon Graphics IRIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sgi.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4 $(LARGEFILE_OPT)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XARFLAGS=	crs
X#
X# lorder seems not to work on some machines, disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/ip22-irix-cc.rul
echo x - smake-1.2.1/RULES/ip22-irix-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/ip22-irix-gcc.rul << 'END-of-smake-1.2.1/RULES/ip22-irix-gcc.rul'
X#ident "@(#)ip22-irix-gcc.rul	1.11 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Silicon Graphics IRIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XARFLAGS=	crs
X#
X# lorder seems not to work on some machines, disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/ip22-irix-gcc.rul
echo x - smake-1.2.1/RULES/ldummy.cnf
sed 's/^X//' >smake-1.2.1/RULES/ldummy.cnf << 'END-of-smake-1.2.1/RULES/ldummy.cnf'
X#ident @(#)ldummy.cnf	1.2 06/05/14 
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Dummy Make Rules for local dynamic configuration
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
END-of-smake-1.2.1/RULES/ldummy.cnf
echo x - smake-1.2.1/RULES/local.cnf
sed 's/^X//' >smake-1.2.1/RULES/local.cnf << 'END-of-smake-1.2.1/RULES/local.cnf'
X#ident @(#)local.cnf	1.9 08/08/01 
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Make Rules for local dynamic configuration
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xconfigure: autoconf.m4 acgeneral.m4 acspecific.m4 acoldnames.m4 aclocal.m4 \
X						local.cnf.in lconfig.h.in
X	@echo "	==> AUTOCONFIGURING LOCAL \"$@\""; sh ./autoconf
X
X#config: $(ARCHDIR)/local.cnf
X
X$(ARCHDIR)/Inull:
X	$(MKDIR) -p $(ARCHDIR)
X	@echo > $@
X
X$(ARCHDIR)/local.cnf $(ARCHDIR)/lconfig.h: $(LCONFIG_DEP) $(ARCHDIR)/Inull \
X						configure local.cnf.in lconfig.h.in
X	$(RUL_LCONF)
X
X###########################################################################
XRUL_LCONF=	@echo "	==> CONFIGURING LOCAL RULES \"$@\""; $(RM_F) $@; \
X		cd $(ARCHDIR); \
X		CONFIG_NOFAIL=TRUE CC="$(XCC_COM)" CFLAGS="$(CFLAGS)" \
X		CXXFLAGS="$(C++FLAGS)" CPPFLAGS="$(OSDEFS)" \
X		LDFLAGS="$(LDOPTS)" sh ../../configure $(CONFFLAGS)
X###########################################################################
Xinclude $(ARCHDIR)/Inull
Xinclude $(ARCHDIR)/local.cnf
X###########################################################################
END-of-smake-1.2.1/RULES/local.cnf
echo x - smake-1.2.1/RULES/m68k-amigaos-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/m68k-amigaos-gcc.rul << 'END-of-smake-1.2.1/RULES/m68k-amigaos-gcc.rul'
X#ident "@(#)m68k-amigaos-gcc.rul	1.7 07/05/09 "
X###########################################################################
X# Written 1997,2001 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for AmigaOS GCC systems
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/m68k-amigaos-gcc.rul
echo x - smake-1.2.1/RULES/man-bsd.def
sed 's/^X//' >smake-1.2.1/RULES/man-bsd.def << 'END-of-smake-1.2.1/RULES/man-bsd.def'
X#ident @(#)man-bsd.def	1.2 06/05/14 
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Definition for manual sections on BSD based systems
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XMANSECT_CMD=		man1
XMANSECT_SYSCALL=	man2
XMANSECT_LIB=		man3
XMANSECT_FILEFORM=	man5
XMANSECT_HDR=		man7
XMANSECT_TABLES=		man7
XMANSECT_MACROS=		man7
XMANSECT_GAMES=		man6
XMANSECT_DEMOS=		man6
XMANSECT_DEVICE=		man4
XMANSECT_NETWORK=	man4
XMANSECT_ADMIN=		man8
XMANSECT_DRIVER=		man4
X
XMANSUFF_CMD=		1
XMANSUFF_SYSCALL=	2
XMANSUFF_LIB=		3
XMANSUFF_FILEFORM=	5
XMANSUFF_HDR=		7
XMANSUFF_TABLES=		7
XMANSUFF_MACROS=		7
XMANSUFF_GAMES=		6
XMANSUFF_DEMOS=		6
XMANSUFF_DEVICE=		4
XMANSUFF_NETWORK=	4
XMANSUFF_ADMIN=		8
XMANSUFF_DRIVER=		4
END-of-smake-1.2.1/RULES/man-bsd.def
echo x - smake-1.2.1/RULES/man-sysv.def
sed 's/^X//' >smake-1.2.1/RULES/man-sysv.def << 'END-of-smake-1.2.1/RULES/man-sysv.def'
X#ident @(#)man-sysv.def	1.2 06/05/14 
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Definition for manual sections on SYSV based systems
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XMANSECT_CMD=		man1
XMANSECT_SYSCALL=	man2
XMANSECT_LIB=		man3
XMANSECT_FILEFORM=	man4
XMANSECT_HDR=		man5
XMANSECT_TABLES=		man5
XMANSECT_MACROS=		man5
XMANSECT_GAMES=		man6
XMANSECT_DEMOS=		man6
XMANSECT_DEVICE=		man7
XMANSECT_NETWORK=	man7
XMANSECT_ADMIN=		man8
XMANSECT_DRIVER=		man9
X
XMANSUFF_CMD=		1
XMANSUFF_SYSCALL=	2
XMANSUFF_LIB=		3
XMANSUFF_FILEFORM=	4
XMANSUFF_HDR=		5
XMANSUFF_TABLES=		5
XMANSUFF_MACROS=		5
XMANSUFF_GAMES=		6
XMANSUFF_DEMOS=		6
XMANSUFF_DEVICE=		7
XMANSUFF_NETWORK=	7
XMANSUFF_ADMIN=		8
XMANSUFF_DRIVER=		9
END-of-smake-1.2.1/RULES/man-sysv.def
echo x - smake-1.2.1/RULES/mk-gmake.id
sed 's/^X//' >smake-1.2.1/RULES/mk-gmake.id << 'END-of-smake-1.2.1/RULES/mk-gmake.id'
X#ident "@(#)mk-gmake.id	1.22 09/09/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Name of make program (make/gmake/smake)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X_SETENV=	$(_UNIQ)$(SETENV)
X__SETENV=	$(_SETENV:$(_UNIQ)=rules.env)
X___SETENV=	$(__SETENV:$(_UNIQ)none=rules.nul)
XSET_ENV=	$(___SETENV:$(_UNIQ)%=%)
X
Xinclude		$(SRCROOT)/$(RULESDIR)/$(SET_ENV)
X
XMAKEPROG=	gmake
X
X###########################################################################
X#
X# standard (automatic) machine identification
X#
X###########################################################################
X#
X# XP_ARCH = uname -p	= mach	  # Processor (sparc/mc68020)
X# XK_ARCH = uname -m	= arch -k # Kernel (sun3/sun4c/sun4m)
X# XM_ARCH = arch	~ arch -k # Machine (sun3/sun4)
X#
X###########################################################################
X#
X# Due to a bug in /usr/xpg*/bin/tr on Solaris, we cannot directly translit
X# many different chars to '-' using e.g. tr ', /\\()"' ',------'
X# This is why we first tranliterate everything to '/ and later to '-'
X#
X# Due to a bug in *BSDs sed, we cannot use sed 'y%ABC\\%abc-%'
X#
X###########################################################################
X
Xifndef		ARCH_DONE
X
Xifndef		GMAKE_NOWARN
X__gmake_warn:=	$(shell cat $(SRCROOT)/$(RULESDIR)/gmake.wrn 1>&2; sleep 2)
Xendif
X
X_MACHCMD=	(mach || uname -p || true)	2> /dev/null
X_ARCHCMD=	(arch || /usr/ucb/arch || true)	2> /dev/null
X
XXP_ARCH:=	$(shell $(_MACHCMD) | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-')
XXK_ARCH:=	$(shell uname -m    | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-')
XXM_ARCH:=	$(shell $(_ARCHCMD) | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-')
X
XP_ARCH=		$(XP_ARCH)
XK_ARCH=		$(XK_ARCH)
XM_ARCH=		$(XM_ARCH)
X
X_XP_ARCH=	$(XP_ARCH:unknown=$(K_ARCH))
X
X_P_ARCH=	$(_UNIQ)$(_XP_ARCH)
X__P_ARCH=	$(_P_ARCH:$(_UNIQ)=$(K_ARCH))
XP_ARCH=		$(__P_ARCH:$(_UNIQ)%=%)
X
X_M_ARCH=	$(_UNIQ)$(XM_ARCH)
X__M_ARCH=	$(_M_ARCH:$(_UNIQ)=$(K_ARCH))
XM_ARCH=		$(__M_ARCH:$(_UNIQ)%=%)
X
XOSNAME:=	$(shell uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-')
XOSREL:=		$(shell uname -r | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-')
XOSVERSION:=	$(shell uname -v | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-')
X
XARCH_DONE=	TRUE
X
Xexport		XP_ARCH
Xexport		K_ARCH
Xexport		XM_ARCH
Xexport		P_ARCH
Xexport		M_ARCH
Xexport		OSNAME
Xexport		OSREL
Xexport		OSVERSION
Xexport		ARCH_DONE
X
Xendif
END-of-smake-1.2.1/RULES/mk-gmake.id
echo x - smake-1.2.1/RULES/mk-smake.id
sed 's/^X//' >smake-1.2.1/RULES/mk-smake.id << 'END-of-smake-1.2.1/RULES/mk-smake.id'
X#ident "@(#)mk-smake.id	1.7 09/08/12 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Name of make program (make/gmake/smake)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X_SETENV=	$(_UNIQ)$(SETENV)
X__SETENV=	$(_SETENV:$(_UNIQ)=rules.env)
X___SETENV=	$(__SETENV:$(_UNIQ)none=rules.nul)
XSET_ENV=	$(___SETENV:$(_UNIQ)%=%)
X
Xinclude		$(SRCROOT)/$(RULESDIR)/$(SET_ENV)
X
XMAKEPROG=	$(MAKE_NAME)
X
X###########################################################################
X#
X# standard (automatic) machine identification
X#
X###########################################################################
X#
X# XP_ARCH = MAKE_ARCH   = uname -p	= mach	  # Processor (sparc/mc68020)
X# XK_ARCH = MAKE_MACH   = uname -m	= arch -k # Kernel (sun3/sun4c/sun4m)
X# XM_ARCH = MAKE_M_ARCH = arch		~ arch -k # Machine (sun3/sun4)
X#
X###########################################################################
X
XXP_ARCH=	$(MAKE_ARCH)
XXK_ARCH=	$(MAKE_MACH)
XXM_ARCH=	$(MAKE_M_ARCH)
X
XP_ARCH=		$(XP_ARCH)
XK_ARCH=		$(XK_ARCH)
XM_ARCH=		$(XM_ARCH)
X
X_P_ARCH=	$(_UNIQ)$(XP_ARCH)
X__P_ARCH=	$(_P_ARCH:$(_UNIQ)=$(MAKE_MACH))
XP_ARCH=		$(__P_ARCH:$(_UNIQ)%=%)
X
X_M_ARCH=	$(_UNIQ)$(MAKE_M_ARCH)
X__M_ARCH=	$(_M_ARCH:$(_UNIQ)=$(MAKE_MACH))
XM_ARCH=		$(__M_ARCH:$(_UNIQ)%=%)
X
XHOSTNAME=	$(MAKE_HOST)
XOSNAME=		$(MAKE_OS)
XOSDEFS=		$(MAKE_OSDEFS)
XOSREL=		$(MAKE_OSREL)
XOSVERSION=	$(MAKE_OSVERSION)
END-of-smake-1.2.1/RULES/mk-smake.id
echo x - smake-1.2.1/RULES/news4000-newsos6-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/news4000-newsos6-cc.rul << 'END-of-smake-1.2.1/RULES/news4000-newsos6-cc.rul'
X#ident @(#)news4000-newsos6-cc.rul	1.6 07/05/08 
X###########################################################################
X#
X# Platform dependent MACROS for Sony NEWS-OS 6.x
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sony.rul
X
X#
X#		From objectx@polyphony.scei.co.jp XXX is -D__STDC__=0 correct ???
X#
XOSDEFS +=	-D__SVR4 -DSVR4 -D__STDC__=0
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	-lsocket
XLIB_MATH=	-lm
XLIB_KVM=	
X
XARFLAGS=	crs
X#
X# lorder seems not to work on some machines, disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/news4000-newsos6-cc.rul
echo x - smake-1.2.1/RULES/os-aix.def
sed 's/^X//' >smake-1.2.1/RULES/os-aix.def << 'END-of-smake-1.2.1/RULES/os-aix.def'
X#ident "@(#)os-aix.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for AIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-smake-1.2.1/RULES/os-aix.def
echo x - smake-1.2.1/RULES/os-aix.id
sed 's/^X//' >smake-1.2.1/RULES/os-aix.id << 'END-of-smake-1.2.1/RULES/os-aix.id'
X#ident "@(#)os-aix.id	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for AIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		aix
X-O_ARCH=	-$(O_ARCH)
XK_ARCH=		rs6000
XP_ARCH=		rs6000
END-of-smake-1.2.1/RULES/os-aix.id
echo x - smake-1.2.1/RULES/os-amigaos.def
sed 's/^X//' >smake-1.2.1/RULES/os-amigaos.def << 'END-of-smake-1.2.1/RULES/os-amigaos.def'
X#ident "@(#)os-amigaos.def	1.2 06/05/14 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# Global os definitions for AmigaOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-amigaos.def
echo x - smake-1.2.1/RULES/os-amigaos.id
sed 's/^X//' >smake-1.2.1/RULES/os-amigaos.id << 'END-of-smake-1.2.1/RULES/os-amigaos.id'
X#ident "@(#)os-amigaos.id	1.2 06/05/14 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for AmigaOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		amigaos
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-amigaos.id
echo x - smake-1.2.1/RULES/os-beos.def
sed 's/^X//' >smake-1.2.1/RULES/os-beos.def << 'END-of-smake-1.2.1/RULES/os-beos.def'
X#ident @(#)os-beos.def	1.2 06/05/14 
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-beos.def
echo x - smake-1.2.1/RULES/os-beos.id
sed 's/^X//' >smake-1.2.1/RULES/os-beos.id << 'END-of-smake-1.2.1/RULES/os-beos.id'
X#ident @(#)os-beos.id	1.2 06/05/14 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		beos
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-beos.id
echo x - smake-1.2.1/RULES/version
sed 's/^X//' >smake-1.2.1/RULES/version << 'END-of-smake-1.2.1/RULES/version'
X#ident "@(#)version	1.4 07/11/02 "
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X
XMAKEFILES_VERSION=1.5a05
END-of-smake-1.2.1/RULES/version
echo x - smake-1.2.1/RULES/os-bsd-os.def
sed 's/^X//' >smake-1.2.1/RULES/os-bsd-os.def << 'END-of-smake-1.2.1/RULES/os-bsd-os.def'
X#ident "@(#)os-bsd-os.def	1.2 06/05/14 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Global os definitions for BSD/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-bsd-os.def
echo x - smake-1.2.1/RULES/os-bsd-os.id
sed 's/^X//' >smake-1.2.1/RULES/os-bsd-os.id << 'END-of-smake-1.2.1/RULES/os-bsd-os.id'
X#ident "@(#)os-bsd-os.id	1.3 06/05/14 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for BSD/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X_O_ARCH=	$(OSREL:3.%=bsd-os3)
XO_ARCH=		$(_O_ARCH:4.%=bsd-os)
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-bsd-os.id
echo x - smake-1.2.1/RULES/os-bsd-os3.def
sed 's/^X//' >smake-1.2.1/RULES/os-bsd-os3.def << 'END-of-smake-1.2.1/RULES/os-bsd-os3.def'
X#ident "@(#)os-bsd-os3.def	1.2 06/05/14 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Global os definitions for BSD/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-bsd-os3.def
echo x - smake-1.2.1/RULES/os-cygwin32_nt.def
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin32_nt.def << 'END-of-smake-1.2.1/RULES/os-cygwin32_nt.def'
X#ident "@(#)os-cygwin32_nt.def	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for CYGWIN32_NT
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
X
END-of-smake-1.2.1/RULES/os-cygwin32_nt.def
echo x - smake-1.2.1/RULES/os-cygwin32_nt.id
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin32_nt.id << 'END-of-smake-1.2.1/RULES/os-cygwin32_nt.id'
X#ident "@(#)os-cygwin32_nt.id	1.5 07/05/29 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		cygwin32_nt
X-O_ARCH=	-$(O_ARCH)
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0400
END-of-smake-1.2.1/RULES/os-cygwin32_nt.id
echo x - smake-1.2.1/RULES/os-cygwin_95-4.0.id
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin_95-4.0.id << 'END-of-smake-1.2.1/RULES/os-cygwin_95-4.0.id'
X#ident "@(#)os-cygwin_95-4.0.id	1.2 07/05/08 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows 4.0 (WIN-95)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XOSDEFS +=	-D_WIN32_WINDOWS=0x0400
END-of-smake-1.2.1/RULES/os-cygwin_95-4.0.id
echo x - smake-1.2.1/RULES/os-cygwin_98-4.10.id
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin_98-4.10.id << 'END-of-smake-1.2.1/RULES/os-cygwin_98-4.10.id'
X#ident "@(#)os-cygwin_98-4.10.id	1.2 07/05/08 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows 4.10 (WIN-98)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XOSDEFS +=	-D_WIN32_WINDOWS=0x0410
END-of-smake-1.2.1/RULES/os-cygwin_98-4.10.id
echo x - smake-1.2.1/RULES/os-cygwin_me-4.90.id
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin_me-4.90.id << 'END-of-smake-1.2.1/RULES/os-cygwin_me-4.90.id'
X#ident "@(#)os-cygwin_me-4.90.id	1.2 07/05/08 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows 4.90 (ME)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XOSDEFS +=	-D_WIN32_WINDOWS=0x0490
END-of-smake-1.2.1/RULES/os-cygwin_me-4.90.id
echo x - smake-1.2.1/RULES/os-cygwin_nt-4.0.id
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin_nt-4.0.id << 'END-of-smake-1.2.1/RULES/os-cygwin_nt-4.0.id'
X#ident "@(#)os-cygwin_nt-4.0.id	1.4 07/05/29 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-4.0 (NT-4.0)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0400
END-of-smake-1.2.1/RULES/os-cygwin_nt-4.0.id
echo x - smake-1.2.1/RULES/os-cygwin_nt-5.0.id
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin_nt-5.0.id << 'END-of-smake-1.2.1/RULES/os-cygwin_nt-5.0.id'
X#ident "@(#)os-cygwin_nt-5.0.id	1.4 07/05/29 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-5.0 (WIN2000)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0500
END-of-smake-1.2.1/RULES/os-cygwin_nt-5.0.id
echo x - smake-1.2.1/RULES/os-cygwin_nt-5.1.id
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin_nt-5.1.id << 'END-of-smake-1.2.1/RULES/os-cygwin_nt-5.1.id'
X#ident "@(#)os-cygwin_nt-5.1.id	1.4 07/05/29 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-5.1 (XP)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0501
END-of-smake-1.2.1/RULES/os-cygwin_nt-5.1.id
echo x - smake-1.2.1/RULES/os-darwin.def
sed 's/^X//' >smake-1.2.1/RULES/os-darwin.def << 'END-of-smake-1.2.1/RULES/os-darwin.def'
X#ident "@(#)os-darwin.def	1.2 06/05/14 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# Global definitions for Mac OS X (Darwin)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-darwin.def
echo x - smake-1.2.1/RULES/os-darwin.id
sed 's/^X//' >smake-1.2.1/RULES/os-darwin.id << 'END-of-smake-1.2.1/RULES/os-darwin.id'
X#ident "@(#)os-darwin.id	1.2 06/05/14 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Mac OS X (Darwin)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		darwin
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-darwin.id
echo x - smake-1.2.1/RULES/os-dgux.id
sed 's/^X//' >smake-1.2.1/RULES/os-dgux.id << 'END-of-smake-1.2.1/RULES/os-dgux.id'
X#ident "@(#)os-dgux.id	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for DGUX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X_O_ARCH=	$(OSREL:r4.%=dgux4)
XO_ARCH=		$(_O_ARCH:5.4r3%=dgux3)
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-dgux.id
echo x - smake-1.2.1/RULES/os-dgux3.def
sed 's/^X//' >smake-1.2.1/RULES/os-dgux3.def << 'END-of-smake-1.2.1/RULES/os-dgux3.def'
X#ident "@(#)os-dgux3.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for DGUX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-smake-1.2.1/RULES/os-dgux3.def
echo x - smake-1.2.1/RULES/os-dgux4.def
sed 's/^X//' >smake-1.2.1/RULES/os-dgux4.def << 'END-of-smake-1.2.1/RULES/os-dgux4.def'
X#ident "@(#)os-dgux4.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for DGUX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-smake-1.2.1/RULES/os-dgux4.def
echo x - smake-1.2.1/RULES/os-domainos.def
sed 's/^X//' >smake-1.2.1/RULES/os-domainos.def << 'END-of-smake-1.2.1/RULES/os-domainos.def'
X#ident "@(#)os-domainos.def	1.2 06/05/14 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Apollo Domain/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X# Domain/OS uses it's own style, so let's use SVSv.
X###########################################################################
XMANSTYLE=	sysv
END-of-smake-1.2.1/RULES/os-domainos.def
echo x - smake-1.2.1/RULES/os-domainos.id
sed 's/^X//' >smake-1.2.1/RULES/os-domainos.id << 'END-of-smake-1.2.1/RULES/os-domainos.id'
X#ident "@(#)os-domainos.id	1.2 06/05/14 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Apollo Domain/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		domainos
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-domainos.id
echo x - smake-1.2.1/RULES/sub.htm
sed 's/^X//' >smake-1.2.1/RULES/sub.htm << 'END-of-smake-1.2.1/RULES/sub.htm'
X#ident "@(#)sub.htm	1.4 08/04/19 "
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Manual page to html converting rules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xhtml htmlx:
X	@if [ ".$(XMK_FILE)" != . ] ; then				\
X		for XMK_F in $(XMK_FILE) XxZzY-- ; do			\
X			(						\
X			if [ -r ./$$XMK_F ] ; then				\
X				echo "	==> MAKING \"install\" ON SUBCOMPONENT \"$(CURDIR)/$$XMK_F\""; \
X				"$(MAKE)" -f $$XMK_F $(MAKEMACS) XARCH=$(XARCH) $@; \
X			else							\
X				if [ $$XMK_F != XxZzY-- ]; then		\
X					echo "NOTICE: Partial source ($(DIRNAME)/$$XMK_F) missing";\
X				fi					\
X			fi						\
X			);						\
X		done							\
X	fi
END-of-smake-1.2.1/RULES/sub.htm
echo x - smake-1.2.1/RULES/os-freebsd.def
sed 's/^X//' >smake-1.2.1/RULES/os-freebsd.def << 'END-of-smake-1.2.1/RULES/os-freebsd.def'
X#ident "@(#)os-freebsd.def	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for FreeBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-freebsd.def
echo x - smake-1.2.1/RULES/os-freebsd.id
sed 's/^X//' >smake-1.2.1/RULES/os-freebsd.id << 'END-of-smake-1.2.1/RULES/os-freebsd.id'
X#ident "@(#)os-freebsd.id	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for FreeBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		freebsd
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-freebsd.id
echo x - smake-1.2.1/RULES/os-gnu.def
sed 's/^X//' >smake-1.2.1/RULES/os-gnu.def << 'END-of-smake-1.2.1/RULES/os-gnu.def'
X#ident "@(#)os-gnu.def	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for GNU (hurd)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-gnu.def
echo x - smake-1.2.1/RULES/os-gnu.id
sed 's/^X//' >smake-1.2.1/RULES/os-gnu.id << 'END-of-smake-1.2.1/RULES/os-gnu.id'
X#ident "@(#)os-gnu.id	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for GNU (hurd)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		gnu
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-gnu.id
echo x - smake-1.2.1/RULES/os-hp-ux.def
sed 's/^X//' >smake-1.2.1/RULES/os-hp-ux.def << 'END-of-smake-1.2.1/RULES/os-hp-ux.def'
X#ident "@(#)os-hp-ux.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for HP-UX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-smake-1.2.1/RULES/os-hp-ux.def
echo x - smake-1.2.1/RULES/os-hp-ux.id
sed 's/^X//' >smake-1.2.1/RULES/os-hp-ux.id << 'END-of-smake-1.2.1/RULES/os-hp-ux.id'
X#ident "@(#)os-hp-ux.id	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for HP/UX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		hp-ux
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-hp-ux.id
echo x - smake-1.2.1/RULES/os-irix.def
sed 's/^X//' >smake-1.2.1/RULES/os-irix.def << 'END-of-smake-1.2.1/RULES/os-irix.def'
X#ident "@(#)os-irix.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for IRIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-irix.def
echo x - smake-1.2.1/RULES/os-irix.id
sed 's/^X//' >smake-1.2.1/RULES/os-irix.id << 'END-of-smake-1.2.1/RULES/os-irix.id'
X#ident "@(#)os-irix.id	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Silicon Graphics IRIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		irix
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-irix.id
echo x - smake-1.2.1/RULES/os-linux.def
sed 's/^X//' >smake-1.2.1/RULES/os-linux.def << 'END-of-smake-1.2.1/RULES/os-linux.def'
X#ident "@(#)os-linux.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Linux
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-linux.def
echo x - smake-1.2.1/RULES/os-linux.id
sed 's/^X//' >smake-1.2.1/RULES/os-linux.id << 'END-of-smake-1.2.1/RULES/os-linux.id'
X#ident "@(#)os-linux.id	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Linux
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		linux
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-linux.id
echo x - smake-1.2.1/RULES/os-mac-os.id
sed 's/^X//' >smake-1.2.1/RULES/os-mac-os.id << 'END-of-smake-1.2.1/RULES/os-mac-os.id'
X#ident "@(#)os-mac-os.id	1.2 06/05/14 "
X###########################################################################
X# Written 2000 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Mac OS X
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X_O_ARCH=	$(OSREL:9.%=mac-os9)
XO_ARCH=		$(_O_ARCH:10.%=mac-os10)
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-mac-os.id
echo x - smake-1.2.1/RULES/os-mac-os10.def
sed 's/^X//' >smake-1.2.1/RULES/os-mac-os10.def << 'END-of-smake-1.2.1/RULES/os-mac-os10.def'
X#ident "@(#)os-mac-os10.def	1.2 06/05/14 "
X###########################################################################
X# Written 2000 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Mac OS X
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-mac-os10.def
echo x - smake-1.2.1/RULES/os-mingw32_95-4.0.id
sed 's/^X//' >smake-1.2.1/RULES/os-mingw32_95-4.0.id << 'END-of-smake-1.2.1/RULES/os-mingw32_95-4.0.id'
X#ident "@(#)os-mingw32_95-4.0.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-mingw32_95-4.0.id
echo x - smake-1.2.1/RULES/os-mingw32_98-4.0.id
sed 's/^X//' >smake-1.2.1/RULES/os-mingw32_98-4.0.id << 'END-of-smake-1.2.1/RULES/os-mingw32_98-4.0.id'
X#ident "@(#)os-mingw32_98-4.0.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-mingw32_98-4.0.id
echo x - smake-1.2.1/RULES/os-mingw32_98-4.10.id
sed 's/^X//' >smake-1.2.1/RULES/os-mingw32_98-4.10.id << 'END-of-smake-1.2.1/RULES/os-mingw32_98-4.10.id'
X#ident "@(#)os-mingw32_98-4.10.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-mingw32_98-4.10.id
echo x - smake-1.2.1/RULES/os-mingw32_me-4.90.id
sed 's/^X//' >smake-1.2.1/RULES/os-mingw32_me-4.90.id << 'END-of-smake-1.2.1/RULES/os-mingw32_me-4.90.id'
X#ident "@(#)os-mingw32_me-4.90.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-mingw32_me-4.90.id
echo x - smake-1.2.1/RULES/os-mingw32_nt-4.0.id
sed 's/^X//' >smake-1.2.1/RULES/os-mingw32_nt-4.0.id << 'END-of-smake-1.2.1/RULES/os-mingw32_nt-4.0.id'
X#ident "@(#)os-mingw32_nt-4.0.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-mingw32_nt-4.0.id
echo x - smake-1.2.1/RULES/os-mingw32_nt-5.0.id
sed 's/^X//' >smake-1.2.1/RULES/os-mingw32_nt-5.0.id << 'END-of-smake-1.2.1/RULES/os-mingw32_nt-5.0.id'
X#ident "@(#)os-mingw32_nt-5.0.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-mingw32_nt-5.0.id
echo x - smake-1.2.1/RULES/os-mingw32_nt-5.1.id
sed 's/^X//' >smake-1.2.1/RULES/os-mingw32_nt-5.1.id << 'END-of-smake-1.2.1/RULES/os-mingw32_nt-5.1.id'
X#ident "@(#)os-mingw32_nt-5.1.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-mingw32_nt-5.1.id
echo x - smake-1.2.1/RULES/os-mingw32_nt-5.2.id
sed 's/^X//' >smake-1.2.1/RULES/os-mingw32_nt-5.2.id << 'END-of-smake-1.2.1/RULES/os-mingw32_nt-5.2.id'
X#ident "@(#)os-mingw32_nt-5.2.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-mingw32_nt-5.2.id
echo x - smake-1.2.1/RULES/os-mingw32_nt.def
sed 's/^X//' >smake-1.2.1/RULES/os-mingw32_nt.def << 'END-of-smake-1.2.1/RULES/os-mingw32_nt.def'
X#ident "@(#)os-mingw32_nt.def	1.2 06/05/14 "
X###########################################################################
X#
X# Global os definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-mingw32_nt.def
echo x - smake-1.2.1/RULES/os-mingw32_nt.id
sed 's/^X//' >smake-1.2.1/RULES/os-mingw32_nt.id << 'END-of-smake-1.2.1/RULES/os-mingw32_nt.id'
X#ident "@(#)os-mingw32_nt.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-mingw32_nt.id
echo x - smake-1.2.1/RULES/os-ms-dos.def
sed 's/^X//' >smake-1.2.1/RULES/os-ms-dos.def << 'END-of-smake-1.2.1/RULES/os-ms-dos.def'
X#ident "@(#)os-ms-dos.def	1.2 06/05/14 "
X###########################################################################
X#
X# Global os definitions for MS-DOS/DJGPP v2
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-smake-1.2.1/RULES/os-ms-dos.def
echo x - smake-1.2.1/RULES/os-ms-dos.id
sed 's/^X//' >smake-1.2.1/RULES/os-ms-dos.id << 'END-of-smake-1.2.1/RULES/os-ms-dos.id'
X#ident "@(#)os-ms-dos.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for MS-DOS/DJGPP v2
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		ms-dos
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-ms-dos.id
echo x - smake-1.2.1/RULES/os-netbsd.def
sed 's/^X//' >smake-1.2.1/RULES/os-netbsd.def << 'END-of-smake-1.2.1/RULES/os-netbsd.def'
X#ident "@(#)os-netbsd.def	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for NetBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-netbsd.def
echo x - smake-1.2.1/RULES/os-netbsd.id
sed 's/^X//' >smake-1.2.1/RULES/os-netbsd.id << 'END-of-smake-1.2.1/RULES/os-netbsd.id'
X#ident "@(#)os-netbsd.id	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for NetBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		netbsd
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-netbsd.id
echo x - smake-1.2.1/RULES/os-news-os.id
sed 's/^X//' >smake-1.2.1/RULES/os-news-os.id << 'END-of-smake-1.2.1/RULES/os-news-os.id'
X#ident @(#)os-news-os.id	1.2 06/05/14 
X###########################################################################
X#
X# OS specific MACRO definitions for Sony NEWS-OS 6.x
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X_O_ARCH=	$(OSREL:5.%=newsos5)
XO_ARCH=		$(_O_ARCH:6.%=newsos6)
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-news-os.id
echo x - smake-1.2.1/RULES/os-newsos6.def
sed 's/^X//' >smake-1.2.1/RULES/os-newsos6.def << 'END-of-smake-1.2.1/RULES/os-newsos6.def'
X#ident @(#)os-newsos6.def	1.2 06/05/14 
X###########################################################################
X#
X# Global os definitions for Sony NEWS-OS 6.x
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-smake-1.2.1/RULES/os-newsos6.def
echo x - smake-1.2.1/RULES/os-nextstep.def
sed 's/^X//' >smake-1.2.1/RULES/os-nextstep.def << 'END-of-smake-1.2.1/RULES/os-nextstep.def'
X#ident "@(#)os-nextstep.def	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for NeXT Step
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-nextstep.def
echo x - smake-1.2.1/RULES/os-nextstep.id
sed 's/^X//' >smake-1.2.1/RULES/os-nextstep.id << 'END-of-smake-1.2.1/RULES/os-nextstep.id'
X#ident "@(#)os-nextstep.id	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for NeXT Step
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		nextstep
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-nextstep.id
echo x - smake-1.2.1/RULES/os-openbsd.def
sed 's/^X//' >smake-1.2.1/RULES/os-openbsd.def << 'END-of-smake-1.2.1/RULES/os-openbsd.def'
X#ident "@(#)os-openbsd.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for OpenBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-openbsd.def
echo x - smake-1.2.1/RULES/os-openbsd.id
sed 's/^X//' >smake-1.2.1/RULES/os-openbsd.id << 'END-of-smake-1.2.1/RULES/os-openbsd.id'
X#ident "@(#)os-openbsd.id	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for OpenBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		openbsd
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-openbsd.id
echo x - smake-1.2.1/RULES/os-openserver.def
sed 's/^X//' >smake-1.2.1/RULES/os-openserver.def << 'END-of-smake-1.2.1/RULES/os-openserver.def'
X#ident "@(#)os-openserver.def	1.2 06/05/14 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Global os definitions for SCO OpenServer 5 Systems
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-smake-1.2.1/RULES/os-openserver.def
echo x - smake-1.2.1/RULES/os-os-2.id
sed 's/^X//' >smake-1.2.1/RULES/os-os-2.id << 'END-of-smake-1.2.1/RULES/os-os-2.id'
X#ident "@(#)os-os-2.id	1.2 06/05/14 "
X###########################################################################
X# Written 1999 by C. Wohlgemuth
X###########################################################################
X#
X# OS specific MACRO definitions for OS/2
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		os2
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-os-2.id
echo x - smake-1.2.1/RULES/os-os2.def
sed 's/^X//' >smake-1.2.1/RULES/os-os2.def << 'END-of-smake-1.2.1/RULES/os-os2.def'
X#ident "@(#)os-os2.def	1.2 06/05/14 "
X###########################################################################
X# Written 1998 by C. Wohlgemuth
X###########################################################################
X#
X# Global os definitions for OS/2
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-os2.def
echo x - smake-1.2.1/RULES/os-osf1.def
sed 's/^X//' >smake-1.2.1/RULES/os-osf1.def << 'END-of-smake-1.2.1/RULES/os-osf1.def'
X#ident "@(#)os-osf1.def	1.2 06/05/14 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Digital UNIX (OSF1)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-osf1.def
echo x - smake-1.2.1/RULES/os-osf1.id
sed 's/^X//' >smake-1.2.1/RULES/os-osf1.id << 'END-of-smake-1.2.1/RULES/os-osf1.id'
X#ident "@(#)os-osf1.id	1.2 06/05/14 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Digital UNIX (OSF1)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		osf1
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-osf1.id
echo x - smake-1.2.1/RULES/os-qnx.def
sed 's/^X//' >smake-1.2.1/RULES/os-qnx.def << 'END-of-smake-1.2.1/RULES/os-qnx.def'
X#ident "@(#)os-qnx.def	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for QNX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-smake-1.2.1/RULES/os-qnx.def
echo x - smake-1.2.1/RULES/os-qnx.id
sed 's/^X//' >smake-1.2.1/RULES/os-qnx.id << 'END-of-smake-1.2.1/RULES/os-qnx.id'
X#ident "@(#)os-qnx.id	1.2 06/05/14 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for QNX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		qnx
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-qnx.id
echo x - smake-1.2.1/RULES/os-rhapsody.def
sed 's/^X//' >smake-1.2.1/RULES/os-rhapsody.def << 'END-of-smake-1.2.1/RULES/os-rhapsody.def'
X#ident "@(#)os-rhapsody.def	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global definitions for NeXT Step (Apple Rhapsody)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-rhapsody.def
echo x - smake-1.2.1/RULES/os-rhapsody.id
sed 's/^X//' >smake-1.2.1/RULES/os-rhapsody.id << 'END-of-smake-1.2.1/RULES/os-rhapsody.id'
X#ident "@(#)os-rhapsody.id	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for NeXT Step (Apple Rhapsody)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		rhapsody
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-rhapsody.id
echo x - smake-1.2.1/RULES/os-sco_sv.id
sed 's/^X//' >smake-1.2.1/RULES/os-sco_sv.id << 'END-of-smake-1.2.1/RULES/os-sco_sv.id'
X#ident "@(#)os-sco_sv.id	1.3 07/05/03 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# OS specific MACRO definitions for SCO OpenServer 5 Systems
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		openserver
X
X_O_ARCH=	$(OSVERSION:5.%=openserver)
XO_ARCH=		$(_O_ARCH:6.%=unixware)
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-sco_sv.id
echo x - smake-1.2.1/RULES/os-sunos.id
sed 's/^X//' >smake-1.2.1/RULES/os-sunos.id << 'END-of-smake-1.2.1/RULES/os-sunos.id'
X#ident "@(#)os-sunos.id	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for SunOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X_O_ARCH=	$(OSREL:4.%=sunos4)
XO_ARCH=		$(_O_ARCH:5.%=sunos5)
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-sunos.id
echo x - smake-1.2.1/RULES/os-sunos4.def
sed 's/^X//' >smake-1.2.1/RULES/os-sunos4.def << 'END-of-smake-1.2.1/RULES/os-sunos4.def'
X#ident "@(#)os-sunos4.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for SunOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-sunos4.def
echo x - smake-1.2.1/RULES/os-sunos5.def
sed 's/^X//' >smake-1.2.1/RULES/os-sunos5.def << 'END-of-smake-1.2.1/RULES/os-sunos5.def'
X#ident "@(#)os-sunos5.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Solaris
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-smake-1.2.1/RULES/os-sunos5.def
echo x - smake-1.2.1/RULES/os-unix_sv.id
sed 's/^X//' >smake-1.2.1/RULES/os-unix_sv.id << 'END-of-smake-1.2.1/RULES/os-unix_sv.id'
X#ident "@(#)os-unix_sv.id	1.2 06/05/14 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# OS specific MACRO definitions for UnixWare 2
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		unixware
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-unix_sv.id
echo x - smake-1.2.1/RULES/os-unixware.def
sed 's/^X//' >smake-1.2.1/RULES/os-unixware.def << 'END-of-smake-1.2.1/RULES/os-unixware.def'
X#ident "@(#)os-unixware.def	1.2 06/05/14 "
X###########################################################################
X# Written 2000 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Global os definitions for UnixWare 7
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-smake-1.2.1/RULES/os-unixware.def
echo x - smake-1.2.1/RULES/os-unixware.id
sed 's/^X//' >smake-1.2.1/RULES/os-unixware.id << 'END-of-smake-1.2.1/RULES/os-unixware.id'
X#ident "@(#)os-unixware.id	1.2 06/05/14 "
X###########################################################################
X# Written 2000 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# OS specific MACRO definitions for UnixWare 7
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		unixware
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-unixware.id
echo x - smake-1.2.1/RULES/pci-qnx-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/pci-qnx-cc.rul << 'END-of-smake-1.2.1/RULES/pci-qnx-cc.rul'
X#ident "@(#)pci-qnx-cc.rul	1.7 07/05/08 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for unknown systems systems with dumb cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-dumb.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
X#					Set Stack size to 256k
XLDOPTS=		$(LIBS_PATH) $(LDPATH) -N 256k
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/pci-qnx-cc.rul
echo x - smake-1.2.1/RULES/power-macintosh-darwin-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/power-macintosh-darwin-cc.rul << 'END-of-smake-1.2.1/RULES/power-macintosh-darwin-cc.rul'
X#ident "@(#)power-macintosh-darwin-cc.rul	1.16 09/07/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Darwin-1.2 ff. (Apple MacOS X) PPC (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XCOPTDYN=	-fPIC
XC++OPTDYN=	-fPIC
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dylib
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation
XLDOPTDYN=	-install_name $(INSBASE)/lib/$(TARGET)
XLDLIBDYN=	-lgcc
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
X#
X# lorder seems not to work on some versions because Apple installed
X# a broken /bin/sh that is not POSIX cimpliant an will not
X# be able to run the /usr/bin/lorder script. The error messages are:
X#	type: not found
X#	type: not found
X#	lorder: nm: not found
X# ... disable it
X#
XLORDER=		echo
XTSORT=		cat
X
X####
X# XXX Better use something like CC=cc
X####
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M
END-of-smake-1.2.1/RULES/power-macintosh-darwin-cc.rul
echo x - smake-1.2.1/RULES/power-macintosh-darwin-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/power-macintosh-darwin-gcc.rul << 'END-of-smake-1.2.1/RULES/power-macintosh-darwin-gcc.rul'
X#ident "@(#)power-macintosh-darwin-gcc.rul	1.16 09/07/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Darwin-1.2 ff. (Apple MacOS X) PPC (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XCOPTDYN=	-fPIC
XC++OPTDYN=	-fPIC
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dylib
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation
XLDOPTDYN=	-install_name $(INSBASE)/lib/$(TARGET)
XLDLIBDYN=	-lgcc
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
X#
X# lorder seems not to work on some versions because Apple installed
X# a broken /bin/sh that is not POSIX cimpliant an will not
X# be able to run the /usr/bin/lorder script. The error messages are:
X#	type: not found
X#	type: not found
X#	lorder: nm: not found
X# ... disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/power-macintosh-darwin-gcc.rul
echo x - smake-1.2.1/RULES/power-macintosh-rhapsody-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/power-macintosh-rhapsody-cc.rul << 'END-of-smake-1.2.1/RULES/power-macintosh-rhapsody-cc.rul'
X#ident "@(#)power-macintosh-rhapsody-cc.rul	1.11 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for NeXT Step 4.x (Apple Rhapsody) PPC (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
X#
X# lorder seems not to work on some versions because Apple installed
X# a broken /bin/sh that is not POSIX cimpliant an will not
X# be able to run the /usr/bin/lorder script. The error messages are:
X#	type: not found
X#	type: not found
X#	lorder: nm: not found
X# ... disable it
X#
XLORDER=		echo
XTSORT=		cat
X
X####
X# XXX Better use something like CC=cc
X####
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M
END-of-smake-1.2.1/RULES/power-macintosh-rhapsody-cc.rul
echo x - smake-1.2.1/RULES/power-macintosh-rhapsody-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/power-macintosh-rhapsody-gcc.rul << 'END-of-smake-1.2.1/RULES/power-macintosh-rhapsody-gcc.rul'
X#ident "@(#)power-macintosh-rhapsody-gcc.rul	1.11 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for NeXT Step 4.x (Apple Rhapsody) PPC (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
X#
X# lorder seems not to work on some versions because Apple installed
X# a broken /bin/sh that is not POSIX cimpliant an will not
X# be able to run the /usr/bin/lorder script. The error messages are:
X#	type: not found
X#	type: not found
X#	lorder: nm: not found
X# ... disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/power-macintosh-rhapsody-gcc.rul
echo x - smake-1.2.1/RULES/powerpc-beos-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/powerpc-beos-gcc.rul << 'END-of-smake-1.2.1/RULES/powerpc-beos-gcc.rul'
X#ident "@(#)powerpc-beos-gcc.rul	1.8 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X#
X# XXX Old BeOS needs libroot.so to get [efg]cvt()
X# XXX New BeOS seems to have this in libc and in addition we include
X# XXX strtod.c for floating point conversion on OS without such code.
X# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been
X# XXX removed and printing floating numbers will work with old/new BeOS
X#
X#OSDEFS +=	-DNO_FLOATINGPOINT -DUSE_FLOATINGARGS
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#CONFFLAGS=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so
X
XLIB_SOCKET=	
XLIB_MATH=
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/powerpc-beos-gcc.rul
echo x - smake-1.2.1/RULES/powerpc-beos-mwcc.rul
sed 's/^X//' >smake-1.2.1/RULES/powerpc-beos-mwcc.rul << 'END-of-smake-1.2.1/RULES/powerpc-beos-mwcc.rul'
X#ident "@(#)powerpc-beos-mwcc.rul	1.10 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-bemwcc.rul
X
XOSDEFS +=
X
XCPPOPTS=	-relax_pointers -opt global -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
X#LIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XLDOPTS=		-multidefs -sym on -g $(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XLN=             /bin/ln -s
END-of-smake-1.2.1/RULES/powerpc-beos-mwcc.rul
echo x - smake-1.2.1/RULES/r-gmake.dep
sed 's/^X//' >smake-1.2.1/RULES/r-gmake.dep << 'END-of-smake-1.2.1/RULES/r-gmake.dep'
X#ident "@(#)r-gmake.dep	1.13 06/07/21 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Dependency building rules for gmake
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XDEP_SUFFIX=	.d
XRMDEP=		$(RM) $(RM_FORCE) $@
X___C++DEP_FILES= $(C++FILES:%.C=%.d)
X__C++DEP_FILES=	$(___C++DEP_FILES:%.cc=%.d)
X_C++DEP_FILES=	$(__C++DEP_FILES:%.cpp=%.d)
XC++DEP_FILES=	$(_C++DEP_FILES:%.cxx=%.d)
XC++PDEP_FILES=	$(C++DEP_FILES:%=$(ARCHDIR)/%)
XDEP_FILE=	$(CFILES:%.c=%.d)		$(C++DEP_FILES)
XPDEP_FILE=	$(CFILES:%.c=$(ARCHDIR)/%.d)	$(C++PDEP_FILES)
XPALLDEP_FILE=	$(CFILES:%.c=$(ARCHDIR)/%.d)	$(C++PDEP_FILES)	$(ARCHDIR)/$(TARGET).dep
XDEP_DEP=	$(ARCHDIR)/Dnull
X###########################################################################
Xdepend: rmdep $(DEP_FILE)
X
Xrmdep:
X	$(RM) $(RM_FORCE) $(PALLDEP_FILE)
X
X###########################################################################
X#
X# Make the complete path to the architecture subdirectory.
X#
X###########################################################################
X$(ARCHDIR):
X		$(MKDIR) -p $@
X
X###########################################################################
X#
X# Generate dependency file(s).
X# This rules is checked when the dependency file(s) are included.
X#
X# Modify the the path for .o files to reflect that they are placed in
X# $(ARCHDIR). Add the dependency file itself to each line so that
X# the dependencies will be rebuilt if a source is newer that the
X# appropriate dependency file.
X#
X###########################################################################
X$(ARCHDIR)/%.d: %.c
X		$(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \
X			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o \1.d:;' > $@
X
X$(ARCHDIR)/%.d: %.C
X		$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o \1.d:;' > $@
X$(ARCHDIR)/%.d: %.cc
X		$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o \1.d:;' > $@
X$(ARCHDIR)/%.d: %.cpp
X		$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o \1.d:;' > $@
X$(ARCHDIR)/%.d: %.cxx
X		$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o \1.d:;' > $@
X
X#$(DEP_FILE):	$(DEP_DEP) $(CFILES)
X#		$(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $(^:%$(DEP_DEP)=%) \
X#			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o $(DEP_FILE):;' > $@
X
X$(PDEP_FILE): $(DEP_DEP)
X
X$(PDEP_FILE): $(DEP_DEP)
X
X$(DEP_DEP):	$(ARCHDIR)
X	@if [ ! -f $@ ]; then	\
X		echo > $@;	\
X	fi
X
X###########################################################################
X#
X# Include the dependency file(s) generated from the rules above.
X#
X###########################################################################
X-include	$(PDEP_FILE)
END-of-smake-1.2.1/RULES/r-gmake.dep
echo x - smake-1.2.1/RULES/r-gmake.tag
sed 's/^X//' >smake-1.2.1/RULES/r-gmake.tag << 'END-of-smake-1.2.1/RULES/r-gmake.tag'
X#ident "@(#)r-gmake.tag	1.3 07/12/01 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Tag building rules for gmake
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XTAGS:		$(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
X		$(ETAGS) $+
X
Xtags:		$(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
X		$(CTAGS) -t $+
END-of-smake-1.2.1/RULES/r-gmake.tag
echo x - smake-1.2.1/RULES/r-make.dep
sed 's/^X//' >smake-1.2.1/RULES/r-make.dep << 'END-of-smake-1.2.1/RULES/r-make.dep'
X#ident "@(#)r-make.dep	1.8 06/07/21 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Dependency building rules for make
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X#	Note that we currently do not support C++ with Sun make as Sun make
X#	only allows one file to folllow a include directive
X#
XDEP_SUFFIX=	.dep
XRMDEP=		$(RM) $(RM_FORCE) $@
X___C++DEP_FILES= $(C++FILES:%.C=$(ARCHDIR)/%.d)
X__C++DEP_FILES=	$(___C++DEP_FILES:%.cc=$(ARCHDIR)/%.d)
X_C++DEP_FILES=	$(__C++DEP_FILES:%.cpp=$(ARCHDIR)/%.d)
XC++DEP_FILES=	$(_C++DEP_FILES:%.cxx=$(ARCHDIR)/%.d)
XC++PDEP_FILES=	$(C++DEP_FILES)
XDEP_FILE=	$(ARCHDIR)/$(TARGET).dep
XPDEP_FILE=	$(ARCHDIR)/$(TARGET).dep
XPALLDEP_FILE=	$(CFILES:%.c=$(ARCHDIR)/%.d)	$(C++PDEP_FILES) $(ARCHDIR)/$(TARGET).dep
XDEP_DEP=	$(ARCHDIR)/Dnull
X###########################################################################
Xdepend: rmdep $(DEP_FILE)
X
Xrmdep:
X	$(RM) $(RM_FORCE) $(PALLDEP_FILE)
X
X###########################################################################
X#
X# Make the complete path to the architecture subdirectory.
X#
X###########################################################################
X$(ARCHDIR):
X		$(MKDIR) -p $@
X
X###########################################################################
X#
X# Generate dependency file(s).
X# This rules is checked when the dependency file(s) are included.
X#
X# Modify the the path for .o files to reflect that they are placed in
X# $(ARCHDIR). Add the dependency file itself to each line so that
X# the dependencies will be rebuilt if a source is newer that the
X# appropriate dependency file.
X#
X###########################################################################
X$(ARCHDIR)/%.dep: %.c
X		$(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \
X			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o $(DEP_FILE):;' > $@
X
X$(DEP_FILE):	$(DEP_DEP) $(CFILES)
X		$(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $(CFILES) \
X			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o $(DEP_FILE):;' > $@
X
X$(DEP_DEP):	$(ARCHDIR)
X	@if [ ! -f $@ ]; then	\
X		echo > $@;	\
X	fi
X
X###########################################################################
X#
X# Include the dependency file(s) generated from the rules above.
X#
X###########################################################################
Xinclude		$(DEP_FILE)
END-of-smake-1.2.1/RULES/r-make.dep
echo x - smake-1.2.1/RULES/r-make.obj
sed 's/^X//' >smake-1.2.1/RULES/r-make.obj << 'END-of-smake-1.2.1/RULES/r-make.obj'
X#ident @(#)r-make.obj	1.7 07/04/27 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Object building rules for gmake
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X# This defines a rule that compiles source files from current directory and
X# puts the resultant objects directly into $(ARCHDIR),
X# to allow concurrent compilation on different platforms.
X# Object file names are constructed from $(CFILES) and $(C++FILES).
X###########################################################################
XARCHDIRX=		$(ARCHDIR)/
X___C++OFILES=		$(C++FILES:%.C=$(ARCHDIR)/%.$o)
X__C++OFILES=		$(___C++OFILES:%.cc=$(ARCHDIR)/%.$o)
X_C++OFILES=		$(__C++OFILES:%.cpp=$(ARCHDIR)/%.$o)
XC++OFILES=		$(_C++OFILES:%.cxx=$(ARCHDIR)/%.$o)
XC++POFILES=		$(C++OFILES)
XOFILES=			$(CFILES:%.c=$(ARCHDIR)/%.$o)	$(C++OFILES)
XPOFILES=		$(CFILES:%.c=$(ARCHDIR)/%.$o)	$(C++POFILES)
X###########################################################################
X__COMPILE.c=		$(_UNIQ)$(COMPILE.c)
X___COMPILE.c=		$(__COMPILE.c:$(_UNIQ)=$(CC) $(CFLAGS) $(CPPFLAGS) -c)
X_COMPILE.c=		$(___COMPILE.c:$(_UNIQ)%=%)
X
X__COMPILE.cc=		$(_UNIQ)$(COMPILE.cc)
X___COMPILE.cc=		$(__COMPILE.cc:$(_UNIQ)=$(CC++) $(C++FLAGS) $(CPPFLAGS) -c)
X_COMPILE.cc=		$(___COMPILE.cc:$(_UNIQ)%=%)
X
X__OUTPUT_OPTION=	$(_UNIQ)$(OUTPUT_OPTION)
X___OUTPUT_OPTION=	$(__OUTPUT_OPTION:$(_UNIQ)=-o $@)
X_OUTPUT_OPTION=		$(___OUTPUT_OPTION:$(_UNIQ)%=%)
X###########################################################################
X
X$(ARCHDIR)/%.$o:	%.c
X			$(_COMPILE.c) $(_OUTPUT_OPTION) $<  $(CC_OUTPUT_FILTER)
X$(ARCHDIR)/%.$o:	%.C
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X$(ARCHDIR)/%.$o:	%.cc
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X$(ARCHDIR)/%.$o:	%.cpp
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X$(ARCHDIR)/%.$o:	%.cxx
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X###########################################################################
END-of-smake-1.2.1/RULES/r-make.obj
echo x - smake-1.2.1/RULES/r-make.tag
sed 's/^X//' >smake-1.2.1/RULES/r-make.tag << 'END-of-smake-1.2.1/RULES/r-make.tag'
X#ident "@(#)r-make.tag	1.3 07/12/01 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Tag building rules for make
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XTAGS:		$(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
X		$(ETAGS) $(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
X
Xtags:		$(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
X		$(CTAGS) -t $(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
END-of-smake-1.2.1/RULES/r-make.tag
echo x - smake-1.2.1/RULES/r-smake.dep
sed 's/^X//' >smake-1.2.1/RULES/r-smake.dep << 'END-of-smake-1.2.1/RULES/r-smake.dep'
X#ident "@(#)r-smake.dep	1.13 09/11/23 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Dependency building rules for smake
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XDEP_SUFFIX=	.d
XRMDEP=		$(RM) $(RM_FORCE) $(ARCHDIR)/$@
X___C++DEP_FILES= $(C++FILES:%.C=%.d)
X__C++DEP_FILES=	$(___C++DEP_FILES:%.cc=%.d)
X_C++DEP_FILES=	$(__C++DEP_FILES:%.cpp=%.d)
XC++DEP_FILES=	$(_C++DEP_FILES:%.cxx=%.d)
XC++PDEP_FILES=	$(C++DEP_FILES:%=$(ARCHDIR)/%)
XDEP_FILE=	$(CFILES:%.c=%.d)		$(C++DEP_FILES)
XPDEP_FILE=	$(CFILES:%.c=$(ARCHDIR)/%.d)	$(C++PDEP_FILES)
XPALLDEP_FILE=	$(CFILES:%.c=$(ARCHDIR)/%.d)	$(C++PDEP_FILES)	$(ARCHDIR)/$(TARGET).dep
X###########################################################################
Xdepend: rmdep $(DEP_FILE)
X
Xrmdep:
X	$(RM) $(RM_FORCE) $(PALLDEP_FILE)
X
X###########################################################################
X#
X# Make the complete path to the architecture subdirectory.
X#
X###########################################################################
X$(ARCHDIR):
X		$(MKDIR) -p $@
X
X###########################################################################
X#
X# Generate dependency file(s).
X# This rules is checked when the dependency file(s) are included.
X#
X# Modify the the path for .o files to reflect that they are placed in
X# $(ARCHDIR). Add the dependency file itself to each line so that
X# the dependencies will be rebuilt if a source is newer that the
X# appropriate dependency file.
X#
X###########################################################################
X
X# Do not define Simple Suffix Rules anymore
X#.d:	.c
X#	$(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \
X#		| sed -e 's;^\(.*\)\.$o[ 	]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@
X
X%.d: %.c
X	$(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \
X		| sed -e 's;^\(.*\)\.$o[ 	]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@
X
X%.d: %.C
X	$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X		| sed -e 's;^\(.*\)\.$o[ 	]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@
X%.d: %.cc
X	$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X		| sed -e 's;^\(.*\)\.$o[ 	]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@
X%.d: %.cpp
X	$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X		| sed -e 's;^\(.*\)\.$o[ 	]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@
X%.d: %.cxx
X	$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X		| sed -e 's;^\(.*\)\.$o[ 	]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@
X
XDnull: $(ARCHDIR)
X	@echo > $O/$@
X
X#$(DEP_FILE):
X#		$(MKDEP) $(CPPFLAGS) -f - $(CFILES) \
X#			| sed -e 's;^\(.*\.$o[ 	]*:\);$(ARCHDIR)/\1;' > $@
X
X###########################################################################
X#
X# Include the dependency file(s) generated from the rules above.
X#
X###########################################################################
X-include	Dnull $(DEP_FILE)
END-of-smake-1.2.1/RULES/r-smake.dep
echo x - smake-1.2.1/RULES/r-smake.obj
sed 's/^X//' >smake-1.2.1/RULES/r-smake.obj << 'END-of-smake-1.2.1/RULES/r-smake.obj'
X#ident @(#)r-smake.obj	1.9 07/04/27 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Object building rules for smake
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X# This defines a rule that compiles source files from current directory and
X# puts the resultant objects directly into $(ARCHDIR),
X# to allow concurrent compilation on different platforms.
X# Object file names are constructed from $(CFILES) and $(C++FILES).
X###########################################################################
XARCHDIRX=
X___C++OFILES=		$(C++FILES:%.C=%.$o)
X__C++OFILES=		$(___C++OFILES:%.cc=%.$o)
X_C++OFILES=		$(__C++OFILES:%.cpp=%.$o)
XC++OFILES=		$(_C++OFILES:%.cxx=%.$o)
XC++POFILES=		$(C++OFILES:%=$(ARCHDIR)/%)
XOFILES=			$(CFILES:%.c=%.$o)		$(C++OFILES)
XPOFILES=		$(CFILES:%.c=$(ARCHDIR)/%.$o)	$(C++POFILES)
X.OBJDIR:		$(ARCHDIR)
X###########################################################################
X__COMPILE.c=		$(_UNIQ)$(COMPILE.c)
X___COMPILE.c=		$(__COMPILE.c:$(_UNIQ)=$(CC) $(CFLAGS) $(CPPFLAGS) -c)
X_COMPILE.c=		$(___COMPILE.c:$(_UNIQ)%=%)
X
X__COMPILE.cc=		$(_UNIQ)$(COMPILE.cc)
X___COMPILE.cc=		$(__COMPILE.cc:$(_UNIQ)=$(CC++) $(C++FLAGS) $(CPPFLAGS) -c)
X_COMPILE.cc=		$(___COMPILE.cc:$(_UNIQ)%=%)
X
X__OUTPUT_OPTION=	$(_UNIQ)$(OUTPUT_OPTION)
X___OUTPUT_OPTION=	$(__OUTPUT_OPTION:$(_UNIQ)=-o $O/$@)
X_OUTPUT_OPTION=		$(___OUTPUT_OPTION:$(_UNIQ)%=%)
X###########################################################################
X%.$o: %.c
X			$(_COMPILE.c) $(_OUTPUT_OPTION) $<  $(CC_OUTPUT_FILTER)
X%.$o: %.C
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X%.$o: %.cc
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X%.$o: %.cpp
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X%.$o: %.cxx
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X
X#$(ARCHDIR)/%.$o: %.c
X#			$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $(*F).c
X
X###########################################################################
END-of-smake-1.2.1/RULES/r-smake.obj
echo x - smake-1.2.1/RULES/r-smake.tag
sed 's/^X//' >smake-1.2.1/RULES/r-smake.tag << 'END-of-smake-1.2.1/RULES/r-smake.tag'
X#ident "@(#)r-smake.tag	1.4 07/12/01 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Tag building rules for smake
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XTAGS:		$(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
X		$(ETAGS) $r1
X
Xtags:		$(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
X		$(CTAGS) -t $r1
END-of-smake-1.2.1/RULES/r-smake.tag
echo x - smake-1.2.1/RULES/rs6000-aix-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/rs6000-aix-cc.rul << 'END-of-smake-1.2.1/RULES/rs6000-aix-cc.rul'
X#ident "@(#)rs6000-aix-cc.rul	1.10 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for AIX on RS6000
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-ibm.rul
X
XOSDEFS +=	-DPROTOTYTPES
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-smake-1.2.1/RULES/rs6000-aix-cc.rul
echo x - smake-1.2.1/RULES/rs6000-aix-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/rs6000-aix-gcc.rul << 'END-of-smake-1.2.1/RULES/rs6000-aix-gcc.rul'
X#ident "@(#)rs6000-aix-gcc.rul	1.9 07/05/09 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for AIX on RS6000
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-DPROTOTYTPES
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XCOPTDYN=	-pic
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-smake-1.2.1/RULES/rs6000-aix-gcc.rul
echo x - smake-1.2.1/RULES/rules.aux
sed 's/^X//' >smake-1.2.1/RULES/rules.aux << 'END-of-smake-1.2.1/RULES/rules.aux'
X#ident "@(#)rules.aux	1.8 07/05/06 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Rules for installing auxiliary files
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XPTARGET=	$(TARGET)
XSRCFILE=	$(TARGET)
X###########################################################################
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
Xall:		$(SRCFILE)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/dummy.dep
X###########################################################################
END-of-smake-1.2.1/RULES/rules.aux
echo x - smake-1.2.1/RULES/rules.clr
sed 's/^X//' >smake-1.2.1/RULES/rules.clr << 'END-of-smake-1.2.1/RULES/rules.clr'
X#ident @(#)rules.clr	1.6 06/05/14 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules to make source tree clean
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X# Do not remove target if it is in the current directory
X###########################################################################
XRMTARGET=	$(PTARGET:$(TARGET)%=%)
X###########################################################################
Xclean:
X			$(RM) $(RM_FORCE)	$(CLEAN_FILES) $(POFILES) \
X						$(PTARGETC)	\
X						$(CLEAN_FILEX) \
X						$(PYOFILES) $(PLOFILES)
X
Xclobber:		clean
X			$(RM) $(RM_FORCE)	$(RMTARGET) $(PALLDEP_FILE) \
X						$(PTARGETC)	\
X						$(CLOBBER_FILEX)
X			$(RM) $(RM_FORCE)	$(ARCHDIR)/Dnull
X
Xdistclean:
X			$(RM) $(RM_RF)		$(CLEAN_FILES) \
X						.EDTMP *.bak OBJ/* \
X						$(SRCROOT)/libs/* $(SRCROOT)/incs/*
X
Xrmtarget:
X			$(RM) $(RM_FORCE)	$(RMTARGET)
X
Xrelink:	rmtarget all
END-of-smake-1.2.1/RULES/rules.clr
echo x - smake-1.2.1/RULES/rules.cmd
sed 's/^X//' >smake-1.2.1/RULES/rules.cmd << 'END-of-smake-1.2.1/RULES/rules.cmd'
X#ident @(#)rules.cmd	1.12 07/05/06 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules for user level commands (usually found in .../bin)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X_EXEEXT=	$(EXEEXT)
X_XEXEEXT=	$(XEXEEXT)
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.obj
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dyn
X###########################################################################
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEX))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
X__LD_OUTPUT_OPTION=	$(_UNIQ)$(LD_OUTPUT_OPTION)
X___LD_OUTPUT_OPTION=	$(__LD_OUTPUT_OPTION:$(_UNIQ)=-o $@)
X_LD_OUTPUT_OPTION=	$(___LD_OUTPUT_OPTION:$(_UNIQ)%=%)
X
XLIBS_PATH += $(LIBS_PATH_STATIC)
X
Xall:		$(PTARGET)
X
X$(PTARGET):	$(OFILES) $(SRCLIBS)
X		$(LDCC) $(_LD_OUTPUT_OPTION) $(POFILES) $(LDFLAGS) $(LDLIBS)
X#		$(CC) -o $@ $(OFILES) $(LDPATH) $(RUNPATH) $(SRCLIBS) $(LIBS)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lnt
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dep
X###########################################################################
END-of-smake-1.2.1/RULES/rules.cmd
echo x - smake-1.2.1/RULES/rules.cnf
sed 's/^X//' >smake-1.2.1/RULES/rules.cnf << 'END-of-smake-1.2.1/RULES/rules.cnf'
X#ident @(#)rules.cnf	1.13 08/08/01 
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Make Rules for global dynamic configuration
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X$(SRCROOT)/autoconf/configure: $(SRCROOT)/autoconf/autoconf.m4 \
X				$(SRCROOT)/autoconf/acgeneral.m4 \
X				$(SRCROOT)/autoconf/acspecific.m4 \
X				$(SRCROOT)/autoconf/acoldnames.m4 \
X				$(SRCROOT)/autoconf/aclocal.m4 \
X				$(SRCROOT)/autoconf/rules.cnf.in \
X				$(SRCROOT)/autoconf/xconfig.h.in
X	@echo "	==> AUTOCONFIGURING GLOBAL \"$@\""; \
X	cd $(SRCROOT)/autoconf && sh ./autoconf
X
Xconfig: $(OINCSDIR)/rules.cnf
X
X$(OINCSDIR)/Inull:
X	$(MKDIR) -p $(OINCSDIR)
X	@echo > $@
X
X$(OINCSDIR):
X	$(MKDIR) -p $@
X
X#
X# Hack until the <mach>-<os>-*cc.rul files are updated
X#
X_HCC_COM=	$(OARCH:%-gcc=gcc)
XHCC_COM=	$(_HCC_COM:%-cc=cc)
X
X_CC_COM=	$(_UNIQ)$(CC_COM)
X__CC_COM=	$(_CC_COM:$(_UNIQ)=$(HCC_COM))
XXCC_COM=	$(__CC_COM:$(_UNIQ)%=%)
X
X#CONFFLAGS +=	-cc=$(XCC_COM)
X
X$(OINCSDIR)/rules.cnf $(OINCSDIR)/xconfig.h: $(OINCSDIR)/Inull \
X					$(SRCROOT)/autoconf/configure \
X					$(SRCROOT)/autoconf/rules.cnf.in \
X					$(SRCROOT)/autoconf/xconfig.h.in
X	$(RUL_CONF)
X
X###########################################################################
XRUL_CONF=	@echo "	==> CONFIGURING RULES \"$@\""; $(RM_F) $@; \
X		cd $(OINCSDIR); \
X		CONFIG_NOFAIL=TRUE CC="$(XCC_COM)" CFLAGS="$(CFLAGS)" \
X		CXXFLAGS="$(C++FLAGS)" CPPFLAGS="$(OSDEFS)" \
X		LDFLAGS="$(LDOPTS)" sh ../../autoconf/configure $(CONFFLAGS)
X###########################################################################
Xinclude $(OINCSDIR)/Inull
Xinclude $(OINCSDIR)/rules.cnf
X###########################################################################
Xinclude	$(SRCROOT)/$(RULESDIR)/$(LOCAL_CNF)
END-of-smake-1.2.1/RULES/rules.cnf
echo x - smake-1.2.1/RULES/rules.dep
sed 's/^X//' >smake-1.2.1/RULES/rules.dep << 'END-of-smake-1.2.1/RULES/rules.dep'
X#ident "@(#)rules.dep	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Dependency building rules ... use MAKEPROG specific version
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/r-$(MAKEPROG).dep
END-of-smake-1.2.1/RULES/rules.dep
echo x - smake-1.2.1/RULES/rules.dir
sed 's/^X//' >smake-1.2.1/RULES/rules.dir << 'END-of-smake-1.2.1/RULES/rules.dir'
X#ident @(#)rules.dir	1.8 06/05/14 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# DIRS contains the names of all directories where sub make should take place
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xinclude		$(SRCROOT)/$(RULESDIR)/rules1.dir
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
X###########################################################################
END-of-smake-1.2.1/RULES/rules.dir
echo x - smake-1.2.1/RULES/rules.drv
sed 's/^X//' >smake-1.2.1/RULES/rules.drv << 'END-of-smake-1.2.1/RULES/rules.drv'
X#ident @(#)rules.drv	1.8 08/12/27 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules for loadable drivers
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.obj
X###########################################################################
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEX))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
Xall:		$(PTARGET)
X
X$(PTARGET):	$(OFILES) $(SRCLIBS)
X		$(LD) -r -o $@ $(POFILES) $(SRCLIBS) $(LIBS)
X
XINSBASE=	$(INS_KBASE:%/=%)
XCPPOPTS +=	$(KDEFINES)
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dep
X###########################################################################
END-of-smake-1.2.1/RULES/rules.drv
echo x - smake-1.2.1/RULES/rules.hlp
sed 's/^X//' >smake-1.2.1/RULES/rules.hlp << 'END-of-smake-1.2.1/RULES/rules.hlp'
X#ident "@(#)rules.hlp	1.15 09/07/10 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Help rules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X# Location for targets:
X#
X# - all						: see appropriate rules
X# - lint					: rules.lnt
X# - clean, clobber, distclean, relink, rmtarget	: rules.clr
X# - rel						: rules.rel
X# - install, ibins				: rules.ins
X# - html, htmlx					: rules.htm & sub.htm
X# - tarpkg, tarpkg1 tarpkg2			: rules.sps
X# - depend, rmdep				: rules.dep
X# - config					: rules.cnf
X# - tags, TAGS					: rules.tag
X# - .help					: rules.hlp
X# - .version					: rules.hlp
X# - tinfo					: rules.dir/rules.rdi
X#
X###########################################################################
X.help:
X	@echo "Usage: make [target]"
X	@echo "Available targets are:" $(ALLTARGETS)
X	@echo "	all		make the default target"
X	@echo "	lint		lint all sources for the default target"
X	@echo "	clean		remove all made objects and the default target"
X	@echo "	clobber		remove all from 'clean' and all dependency files"
X	@echo "	distclean	remove all from 'clobber' and all made files"
X	@echo "			for all architectures"
X	@echo "	relink		remove and relink the default target"
X	@echo "	rmtarget	remove the default target"
X	@echo "	install		install the default target to final destination"
X	@echo "	ibins		install the default target to local dir 'bins'"
X	@echo "	html		create html vesions from the manual pages"
X	@echo "	htmlx		create enhanced html vesions from the manual pages"
X	@echo "	tarpkg		create an installable tar packet -> tarpkg1 + parpkg2"
X	@echo "	tarpkg1		helps to create an installable tar packet - install stage"
X	@echo "	tarpkg2		installable tar packet - tar -c stage"
X	@echo "	depend		remove dependency file to prepare a remake"
X	@echo "	config		remake the dynamic configuration files"
X	@echo "	tags		make vi/ved compatible tag file"
X	@echo "	TAGS		make emacs compatible tag file"
X	@echo "	.help		display this help"
X	@echo "	.version	display version information for the makefile system"
X	@echo "	tinfo		display target info for slottable target components"
X	@echo "	shell		start $(SHELL) with the environment used for compilation"
X
X.version:
X	@echo "Makefiles (The Schily Makefile System) Version: $(MAKEFILES_VERSION)"
END-of-smake-1.2.1/RULES/rules.hlp
echo x - smake-1.2.1/RULES/rules.inc
sed 's/^X//' >smake-1.2.1/RULES/rules.inc << 'END-of-smake-1.2.1/RULES/rules.inc'
X#ident @(#)rules.inc	1.9 09/07/26 
X###########################################################################
X# Written 1999 by J. Schilling
X###########################################################################
X#
X# Rules for creating include files (usually found in .../incs/machdir)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X#_EXEEXT=	$(EXEEXT)	# Do not install as xxx.h.exe
X_XEXEEXT=	$(XEXEEXT)
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.obj
X###########################################################################
X
XPTARGET=	$(OINCSDIR)/$(TARGET)
XPTARGETC=	$(ARCHDIR)/$(TARGETC)
XPTARGETCX=	$(ARCHDIR)/$(TARGETC)$(_EXEEXT)
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
X__LD_OUTPUT_OPTION=	$(_UNIQ)$(LD_OUTPUT_OPTION)
X___LD_OUTPUT_OPTION=	$(__LD_OUTPUT_OPTION:$(_UNIQ)=-o $@)
X_LD_OUTPUT_OPTION=	$(___LD_OUTPUT_OPTION:$(_UNIQ)%=%)
X
XLIBS_PATH += $(LIBS_PATH_STATIC)
X
Xall:		$(PTARGETCX) $(PTARGET)
X
X$(PTARGETCX):	$(OFILES) $(SRCLIBS)
X		$(LDCC) $(_LD_OUTPUT_OPTION) $(POFILES) $(LDFLAGS) $(LDLIBS)
X
X$(PTARGET):	$(OINCSDIR) $(PTARGETCX)
X		@echo "	==> GENERATING include file \"$@\""; $(PTARGETC)$(_XEXEEXT) > $@
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dep
X###########################################################################
END-of-smake-1.2.1/RULES/rules.inc
echo x - smake-1.2.1/RULES/rules.ins
sed 's/^X//' >smake-1.2.1/RULES/rules.ins << 'END-of-smake-1.2.1/RULES/rules.ins'
X#ident @(#)rules.ins	1.20 09/01/29 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules for target installation
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS):
X			$(MKDIR) -p $@
X$(SRCROOT)/bins/$(OARCH):
X			$(MKDIR) -p $@
X
X$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT):	$(PTARGET)
X			$(INSTALL) $(INSFLAGS) $(PTARGET) $@
X
X$(SRCROOT)/bins/$(OARCH)/$(TARGET)$(_EXEEXT):	$(PTARGET)
X			$(INSTALL) $(PTARGET) $@
X
XPHARDLINKS=	$(HARDLINKS:%=$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/%$(_EXEEXT))
Xhardlinks:	$(PHARDLINKS)
X
XPSYMLINKS=	$(SYMLINKS:%=$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/%$(_EXEEXT))
Xsymlinks:	$(PSYMLINKS)
X
X_INSMODEINS=	$(_UNIQ)$(INSMODEI)
X__INSMODEINS=	$(_INSMODEINS:$(_UNIQ)=$(INSMODEX))
XINSMODEINS=	$(__INSMODEINS:$(_UNIQ)%=%)
X
Xdummy $(PHARDLINKS):	$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT)
X	@echo "	==> INSTALLING link \"$@\""; $(RM) $(RM_FORCE) $@; $(LN) $(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT) $@
X
Xsymdummy $(PSYMLINKS):	$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT)
X	@echo "	==> INSTALLING symlink \"$@\""; $(RM) $(RM_FORCE) $@; $(SYMLINK) $(TARGET)$(_EXEEXT) $@
X
Xxinstall:
X	@if [ ".$(XMK_FILE)" != . ] ; then				\
X		for XMK_F in $(XMK_FILE) XxZzY-- ; do			\
X			(						\
X			if [ -r ./$$XMK_F ] ; then				\
X				echo "	==> MAKING \"install\" ON SUBCOMPONENT \"$(CURDIR)/$$XMK_F\""; \
X				"$(MAKE)" -f $$XMK_F $(MAKEMACS) XARCH=$(XARCH) install;	\
X			else							\
X				if [ $$XMK_F != XxZzY-- ]; then		\
X					echo "NOTICE: Partial source ($(DIRNAME)/$$XMK_F) missing";\
X				fi					\
X			fi						\
X			);						\
X		done							\
X	fi
X
Xinstall:	all	$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS) \
X			$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT) \
X			hardlinks symlinks \
X			xinstall
X
Xibins:		all	$(SRCROOT)/bins/$(OARCH) \
X			$(SRCROOT)/bins/$(OARCH)/$(TARGET)$(_EXEEXT)
END-of-smake-1.2.1/RULES/rules.ins
echo x - smake-1.2.1/RULES/rules.lib
sed 's/^X//' >smake-1.2.1/RULES/rules.lib << 'END-of-smake-1.2.1/RULES/rules.lib'
X#ident "@(#)rules.lib	1.10 07/05/06 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules for traditional libraries (libxxx.a)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.obj
X###########################################################################
XTARGET=		$(LIB_PREFIX)$(TARGETLIB)$(LIB_SUFFIX)
XTARGET_PATH=	$(OLIBSDIR)
XPTARGET=	$(OLIBSDIR)/$(TARGET)
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
X__AR.o=		$(_UNIQ)$(AR.o)
X___AR.o=	$(__AR.o:$(_UNIQ)=$(AR) $(ARFLAGS) $@)
X_AR.o=		$(___AR.o:$(_UNIQ)%=%)
X
Xall:		$(TARGET_PATH) $(PTARGET)
X
X$(TARGET_PATH):
X		$(MKDIR) -p $@
X
X$(PTARGET):	$(OFILES)
X		$(_AR.o) `$(LORDER) $(POFILES) | $(TSORT)`
X		$(RANLIB) $@
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lnt
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dep
X###########################################################################
END-of-smake-1.2.1/RULES/rules.lib
echo x - smake-1.2.1/RULES/rules.lnt
sed 's/^X//' >smake-1.2.1/RULES/rules.lnt << 'END-of-smake-1.2.1/RULES/rules.lnt'
X#ident @(#)rules.lnt	1.3 06/05/14 
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# Rules for lint
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xlint:		$(CFILES)
X		lint $(LINTFLAGS) $(CPPFLAGS) $^
X
X###########################################################################
END-of-smake-1.2.1/RULES/rules.lnt
echo x - smake-1.2.1/RULES/rules.loc
sed 's/^X//' >smake-1.2.1/RULES/rules.loc << 'END-of-smake-1.2.1/RULES/rules.loc'
X#ident "@(#)rules.loc	1.7 07/05/06 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Rules to localize files
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XPTARGET=	$(ARCHDIR)/$(TARGET)
X###########################################################################
X#
X# We are doing a copy to $(ARCHDIR) to be able to have platform dependent
X# shell files in future.
X#
X###########################################################################
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
Xall:		$(ARCHDIR) $(PTARGET)
X
X$(PTARGET):	$(SRCFILE)
X		$(LOCALIZE) $(SRCFILE) $@
X
X$(ARCHDIR):
X		$(MKDIR) -p $@
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/dummy.dep
X###########################################################################
END-of-smake-1.2.1/RULES/rules.loc
echo x - smake-1.2.1/RULES/rules.man
sed 's/^X//' >smake-1.2.1/RULES/rules.man << 'END-of-smake-1.2.1/RULES/rules.man'
X#ident "@(#)rules.man	1.4 07/05/06 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Manual page building rules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/man-$(MANSTYLE).def
X###########################################################################
X
XINSDIR=		$(MANDIR)/$(MANSECT)
XSUBARCHDIR=	/$(MANDIR)
XTARGET=		$(TARGETMAN).$(MANSUFFIX)
XSRCFILE=	$(MANFILE)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.htm
X
X
X###########################################################################
X# The rest is copied from rules.loc
X###########################################################################
XPTARGET=	$(ARCHDIR)/$(TARGET)
X###########################################################################
X#
X# We are doing a copy to $(ARCHDIR) to be able to have platform dependent
X# shell files in future.
X#
X###########################################################################
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
Xall:		$(ARCHDIR) $(PTARGET)
X
X$(PTARGET):	$(SRCFILE)
X		$(LOCALIZE) $(SRCFILE) $@
X
X$(ARCHDIR):
X		$(MKDIR) -p $@
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/dummy.dep
X###########################################################################
END-of-smake-1.2.1/RULES/rules.man
echo x - smake-1.2.1/RULES/rules.mkd
sed 's/^X//' >smake-1.2.1/RULES/rules.mkd << 'END-of-smake-1.2.1/RULES/rules.mkd'
X#ident "%W% %E% %Q%"
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# make complete path to the architecture subdirectory.
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X$(ARCHDIR):
X		$(MKDIR) -p $@
X
END-of-smake-1.2.1/RULES/rules.mkd
echo x - smake-1.2.1/RULES/rules.mks
sed 's/^X//' >smake-1.2.1/RULES/rules.mks << 'END-of-smake-1.2.1/RULES/rules.mks'
X#ident "@(#)rules.mks	1.13 08/04/19 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules for multiple Makefiles (*.mk) in one subdirectory
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X$(ALLTARGETS):
X	@ for MK in $(MK_FILES) ;					\
X	do								\
X		(							\
X		if [ -r ./$$MK ] ; then					\
X			echo "	==> MAKING \"$@\" ON SUBCOMPONENT \"$(CURDIR)/$$MK\""; "$(MAKE)" -f $$MK $(MAKEMACS) XARCH=$(XARCH) $@;\
X		else							\
X			echo "NOTICE: Partial source ($(CURDIR)/$$MK) missing";\
X		fi							\
X		);							\
X	done
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dyn
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
X###########################################################################
END-of-smake-1.2.1/RULES/rules.mks
echo x - smake-1.2.1/RULES/rules.mod
sed 's/^X//' >smake-1.2.1/RULES/rules.mod << 'END-of-smake-1.2.1/RULES/rules.mod'
X#ident @(#)rules.mod	1.7 07/05/06 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules for loadable streams modules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.obj
X###########################################################################
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEX))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
Xall:		$(PTARGET)
X
X$(PTARGET):	$(OFILES) $(SRCLIBS)
X		$(LD) -r -o $@ $(OFILES) $(SRCLIBS) $(LIBS)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dep
X###########################################################################
END-of-smake-1.2.1/RULES/rules.mod
echo x - smake-1.2.1/RULES/rules.obj
sed 's/^X//' >smake-1.2.1/RULES/rules.obj << 'END-of-smake-1.2.1/RULES/rules.obj'
X#ident @(#)rules.obj	1.4 06/05/14 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Object building rules ... use MAKEPROG specific version
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XPTARGET=	$(ARCHDIR)/$(TARGET)$(_EXEEXT)
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/r-$(MAKEPROG).obj
END-of-smake-1.2.1/RULES/rules.obj
echo x - smake-1.2.1/RULES/rules.prg
sed 's/^X//' >smake-1.2.1/RULES/rules.prg << 'END-of-smake-1.2.1/RULES/rules.prg'
X#ident "@(#)rules.prg	1.18 08/12/26 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Generic rules for program names
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X#
X# This file holds definitions that are common to all architectures.
X# It should be included first and then partially overwritten,
X# if the current architecture requires some changes.
X#
X###########################################################################
X#
X# Use the object file extension from the autoconf run for '$o' (.o).
X# It may be overwritten my the compiler configuration rules cc-*.rul
X#
X###########################################################################
Xo=		$(OBJEXT)
X
XCLEAN_FILES=	core err
X
X#
X# Setting $(SHELL) inside a makefile is a really bad idea.
X# Since we allow "smake" to default SHELL to /bin/bosh in
X# case that /bin/sh is broken but /bin/bosh exists, this
X# must not be defined anymore.
X#
X#SHELL=		/bin/sh
X
XLN=		/bin/ln
XSYMLINK=	/bin/ln -s
XRM=		/bin/rm
XMV=		/bin/mv
XLORDER=		lorder
XTSORT=		tsort
XCTAGS=		vctags
XETAGS=		etags
XUMASK=		umask $(UMASK_VAL)
XUMASK_DEF=	002
X
XRM_FORCE=	-f
XRM_RECURS=	-r
XRM_RF=		$(RM_RECURS) $(RM_FORCE)
X
XRM_F=		$(RM) $(RM_FORCE)
X
XINSMODEF_DEF=	444
XINSMODEX_DEF=	755
XINSUSR_DEF=	root
XINSGRP_DEF=	bin
X
X_DEFUMASK=	$(_UNIQ)$(DEFUMASK)
X__DEFUMASK=	$(_DEFUMASK:$(_UNIQ)=$(UMASK_DEF))
XUMASK_VAL=	$(__DEFUMASK:$(_UNIQ)%=%)
X
X_DEFINSMODEF=	$(_UNIQ)$(DEFINSMODEF)
X__DEFINSMODEF=	$(_DEFINSMODEF:$(_UNIQ)=$(INSMODEF_DEF))
XINSMODEF=	$(__DEFINSMODEF:$(_UNIQ)%=%)
X
X_DEFINSMODEX=	$(_UNIQ)$(DEFINSMODEX)
X__DEFINSMODEX=	$(_DEFINSMODEX:$(_UNIQ)=$(INSMODEX_DEF))
XINSMODEX=	$(__DEFINSMODEX:$(_UNIQ)%=%)
X
X_DEFINSUSR=	$(_UNIQ)$(DEFINSUSR)
X__DEFINSUSR=	$(_DEFINSUSR:$(_UNIQ)=$(INSUSR_DEF))
XINSUSR=		$(__DEFINSUSR:$(_UNIQ)%=%)
X
X_DEFINSGRP=	$(_UNIQ)$(DEFINSGRP)
X__DEFINSGRP=	$(_DEFINSGRP:$(_UNIQ)=$(INSGRP_DEF))
XINSGRP=		$(__DEFINSGRP:$(_UNIQ)%=%)
X
X
XLD=		@echo "	==> LINKING   \"$@\""; ld
XLOCALIZE=	@echo "	==> LOCALIZING \"$@\""; $(RM_F) $@; cp
XINSTALL=	@echo "	==> INSTALLING \"$@\""; sh $(SRCROOT)/conf/install-sh -c -m $(INSMODEINS) -o $(INSUSR) -g $(INSGRP)
XCHMOD=		@echo "	==> SETTING PERMISSIONS ON \"$@\""; chmod
XCHOWN=		@echo "	==> SETTING OWNER ON \"$@\""; chown
XCHGRP=		@echo "	==> SETTING GROUP ON \"$@\""; chgrp
XAR=		@echo "	==> ARCHIVING  \"$@\""; ar
XARFLAGS=	cr
X#YACC=		@echo "	==> YACCING \"$@\""; yacc
X#LEX=		@echo "	==> LEXING \"$@\""; lex
X#AWK=		@echo "	==> AWKING \"$@\""; awk
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; makedepend
XMKDEP_OUT=	-f -
XMKDIR=		@echo "	==> MAKING DIRECTORY \"$@\""; $(UMASK); mkdir
XMKDIR_SH=	@echo "	==> MAKING DIRECTORY \"$@\""; $(UMASK); sh $(SRCROOT)/conf/mkdir-sh
END-of-smake-1.2.1/RULES/rules.prg
echo x - smake-1.2.1/RULES/rules.rdi
sed 's/^X//' >smake-1.2.1/RULES/rules.rdi << 'END-of-smake-1.2.1/RULES/rules.rdi'
X#ident @(#)rules.rdi	1.9 06/05/14 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# DIRS contains the names of all directories where sub make should take place
X# This is a modified version for the prokect's root directory
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xinclude		$(SRCROOT)/$(RULESDIR)/rules1.dir
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
X###########################################################################
X# Due to a serious bug in SunPRO make we cannot include the configuration
X# rules. SunPRO make inconsistsently shortens rules that start with "./"
X# and thus wil not find existing rules for a file to be included.
X# Due to a bug in GNU make dynamic configuration must have been run before
X# C-compiler generated dependency rules are loaded. This is done by running
X# make in the 'conf' directory before any other target is made.
X#
X# include		$(SRCROOT)/$(RULESDIR)/rules.cnf
X###########################################################################
X#config: conf_warn
X
X#conf_warn:
X#	@echo "$@: cannot make due to a SunPRO make bug"
END-of-smake-1.2.1/RULES/rules.rdi
echo x - smake-1.2.1/RULES/rules.rel
sed 's/^X//' >smake-1.2.1/RULES/rules.rel << 'END-of-smake-1.2.1/RULES/rules.rel'
X#ident @(#)rules.rel	1.7 07/06/10 
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# Release building rules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XMAKE_LICENSE=MKGNU2
XREL_SRC_MATCH=cat
XREL_MAKEFILE_MATCH=cat
X
Xrel: $(CFILES:%=release/%) $(HFILES:%=release/%) $(XRELFILES:%=release/%)
X
Xrelease/%.c: %.c
X	rm -f $@
X	-unifdef $(IFDEF) $< | $(REL_SRC_MATCH) >$@
X	-chmod 444 $@
X	-cpmodes $< $@
X	cptime $< $@
X	$(MAKE_LICENSE) $@
X	rm -f $@.bak
X
Xrelease/%.h: %.h
X	rm -f $@
X	-unifdef $(IFDEF) $< | $(REL_SRC_MATCH) >$@
X	-chmod 444 $@
X	-cpmodes $< $@
X	cptime $< $@
X	$(MAKE_LICENSE) $@
X	rm -f $@.bak
X
Xrelease/Makefile%: Makefile%
X	rm -f $@
X	-sed -e '/IFDEF=/,$$d' $< | $(REL_MAKEFILE_MATCH) >$@
X	-chmod 444 $@
X	-cpmodes $< $@
X	cptime $< $@
X	$(MAKE_LICENSE) $@
X	rm -f $@.bak
X
Xrelease/%.mk: %.mk
X	rm -f $@
X	-sed -e '/IFDEF=/,$$d' $< >$@
X	-chmod 444 $@
X	-cpmodes $< $@
X	cptime $< $@
X	$(MAKE_LICENSE) $@
X	rm -f $@.bak
X
Xrelease/%: %
X	rm -f $@
X#	-unifdef $(IFDEF) $< >$@
X	-cat $< >$@
X	-chmod 444 $@
X	-cpmodes $< $@
X	cptime $< $@
X	$(MAKE_LICENSE) $@
X	rm -f $@.bak
END-of-smake-1.2.1/RULES/rules.rel
echo x - smake-1.2.1/RULES/rules.scr
sed 's/^X//' >smake-1.2.1/RULES/rules.scr << 'END-of-smake-1.2.1/RULES/rules.scr'
X#ident "@(#)rules.scr	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Shell script building rules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XSRCFILE=	$(SCRFILE)
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.loc
X###########################################################################
END-of-smake-1.2.1/RULES/rules.scr
echo x - smake-1.2.1/RULES/rules.shl
sed 's/^X//' >smake-1.2.1/RULES/rules.shl << 'END-of-smake-1.2.1/RULES/rules.shl'
X#ident "@(#)rules.shl	1.13 07/05/06 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules for shared (dynamic) libraries
X#
X# SUBARCHDIR must be before any other definitions
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XSUBARCHDIR=		/pic
XCOPTS +=		$(COPTDYN)
XC++OPTS +=		$(C++OPTDYN)
XLDOPTS +=		$(LDOPTDYN)
XLDLIBS +=		$(LDLIBDYN)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.obj
X###########################################################################
XTARGET=		$(LIB_PREFIX)$(TARGETLIB)$(SHL_SUFFIX)
XTARGET_BASE=	$(LIB_PREFIX)$(TARGETLIB)
XTARGET_PATH=	$(OLIBSDIR)
XPTARGET=	$(OLIBSDIR)/$(TARGET)
XPTARGET_BASE=	$(OLIBSDIR)/$(TARGET_BASE)
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
X__DYNLD.o=	$(_UNIQ)$(DYNLD.o)
X___DYNLD.o=	$(__DYNLD.o:$(_UNIQ)=$(DYNLD) -o $@ $(LDFLAGS) `$(LORDER) $(POFILES) | $(TSORT)` $(LDLIBS))
X_DYNLD.o=	$(___DYNLD.o:$(_UNIQ)%=%)
X
Xall:		$(TARGET_PATH) $(PTARGET)
X
X$(TARGET_PATH):
X		$(MKDIR) -p $@
X
X$(PTARGET):	$(OFILES)
X			$(_DYNLD.o)
X			-$(LNDYNLIB)
X
XSYMLINKS +=	$(TARGET_BASE).so
X
X#			@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dep
X###########################################################################
END-of-smake-1.2.1/RULES/rules.shl
echo x - smake-1.2.1/RULES/rules.tag
sed 's/^X//' >smake-1.2.1/RULES/rules.tag << 'END-of-smake-1.2.1/RULES/rules.tag'
X#ident "@(#)rules.tag	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Tag building rules ... use MAKEPROG specific version
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/r-$(MAKEPROG).tag
END-of-smake-1.2.1/RULES/rules.tag
echo x - smake-1.2.1/RULES/rules1.dir
sed 's/^X//' >smake-1.2.1/RULES/rules1.dir << 'END-of-smake-1.2.1/RULES/rules1.dir'
X#ident @(#)rules1.dir	1.15 09/08/14 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# DIRS contains the names of all directories where sub make should take place
X#
X# The code that is shared bwtween rules.dir and rules.rdi
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X$(ALLTARGETS):
X	@list="$(DIRS)";							\
X	if [ -d TARGETS -a -f TARGETS/__slot ]; then				\
X		list=`echo TARGETS/[0123456789][0123456789]* |			\
X			sed -e 's;TARGETS/[0123456789][0123456789];;g' | sed -e 's;!@!;/;g'`;\
X	fi;									\
X	for DIR in $${list} ;							\
X	do									\
X		(								\
X		echo "	==> MAKING \"$@\" ON SUBDIRECTORY \"$(CURDIR)/$$DIR\"";\
X		if [ -d ./$$DIR -a -r ./$$DIR/Makefile ] ; then			\
X			cd ./$$DIR && "$(MAKE)" $(MAKEMACS) XARCH=$(XARCH) DIRNAME=$(CURDIR)/$$DIR $@;		\
X		else								\
X			echo "NOTICE: Partial source ($(CURDIR)/$$DIR) missing";\
X		fi								\
X		);								\
X	done
X
Xtinfo:
X	@[ -d TARGETS -a -f TARGETS/__slot ] && list=`echo TARGETS/[0123456789][0123456789]*`;\
X	for i in $${list};							\
X	do									\
X		(read line < $$i;						\
X		name=`echo $$i | sed -e 's;TARGETS/[0123456789][0123456789];;' | sed -e 's;!@!;/;g'`; \
X		echo "$$name	- $${line}";					\
X		);								\
X	done
X
X###########################################################################
END-of-smake-1.2.1/RULES/rules1.dir
echo x - smake-1.2.1/RULES/rules1.top
sed 's/^X//' >smake-1.2.1/RULES/rules1.top << 'END-of-smake-1.2.1/RULES/rules1.top'
X#ident "@(#)rules1.top	1.42 08/12/27 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules that should be included at top of every Makefile
X# Do not include this file directly; this is the language independent
X# version that may be included in special purpose versions.
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X#
X# Global definitions:
X#
X# Define magic unique cookie
X#
X###########################################################################
X_UNIQ= .XxZzy-
X
X###########################################################################
X#
X# Make sure this becomes the default target
X#
X###########################################################################
Xall:
X
X###########################################################################
X#
X# Build a macro $(SRCROOTSL) that allows to use file name
X# $(SRCROOTSL)incs/Dcc.$(PARCH)$(-O_ARCH) instead of using
X# the file name $(SRCROOT)/incs/Dcc.$(PARCH)$(-O_ARCH) 
X#
X# This is needed because of a serious bug in SunPRO make. We need to do some
X# tricks in order to make code working that depends on including files where
X# the file name is a macro and the file may be built as a result of a make
X# rule.
X#
X# SunPRO make inconsistsently shortens rules that start with "./"
X# and thus will not find existing rules for a file to be included.
X# We use pattern matching macro expansions to consistently shorten the
X# name if it starts with "./".  This allows to use the same textual
X# string for both the rule and the include statement.
X#
X# Note that Thus bug has been reported to Sun in 1998 but Sun seems not
X# interested to fix the bug.
X#
X###########################################################################
X_SRCROOTSL=	$(SRCROOT)/
XSRCROOTSL= 	$(_SRCROOTSL:./%=%)
X
X###########################################################################
X#
X# Global handler for failed inludes
X#
X###########################################################################
X.INCLUDE_FAILED:
X	@echo " ==> AUTOMAKING \"$^\""; sh $(SRCROOTSL)conf/makeinc $^
X
X###########################################################################
X#
X# Legacy support for old smake programs ...
X#
X###########################################################################
X.INCLUDEFAILED:
X	@echo " ==> AUTOMAKING \"$^\""; sh $(SRCROOTSL)conf/makeinc $^
X
X###########################################################################
X#
X# Some global constants or pre-definitions
X#
X###########################################################################
X_LCONFIG=	$(_UNIQ)$(LCONFIG)
X__LCONFIG=	$(_LCONFIG:$(_UNIQ)=ldummy.cnf)
XLOCAL_CNF=	$(__LCONFIG:$(_UNIQ)%=%)
X###########################################################################
X
X###########################################################################
X#
X# Standard (automatic) makeprog identification
X#
X# Each make program should define a macro: MAKE_NAME for identification.
X# MAKE_NAME in this case is a built in macro like MAKE or MAKEFLAGS.
X# Currently only 'smake' implements this feature.
X#
X###########################################################################
X_MAKEPROG=	$(_UNIQ)$(MAKE_NAME)
X__MAKEPROG=	$(_MAKEPROG:$(_UNIQ)=$(MAKEPROG))
X_XMAKEPROG=	$(__MAKEPROG:$(_UNIQ)%=%)
X
X# gmake defines a macro MAKE_COMMAND. If neither MAKE_NAME is defined by 
X# the make program, not MAKEPROG is set, try this to recognize gmake.
X#
X_MAKE_COMMAND=	$(MAKE_COMMAND:%make=gmake)
X
X__XMAKEPROG=	$(_UNIQ)$(_XMAKEPROG)
X___XMAKEPROG=	$(__XMAKEPROG:$(_UNIQ)=$(_MAKE_COMMAND))
XXMAKEPROG=	$(___XMAKEPROG:$(_UNIQ)%=%)
X
Xinclude		$(SRCROOT)/$(RULESDIR)/mk-$(XMAKEPROG).id
X
X###########################################################################
X#
X# Standard (automatic) os identification
X#
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/os-$(OSNAME).id
X
X###########################################################################
X#
X# Global os definitions
X#
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/os-$(O_ARCH).def
X
X###########################################################################
X#
X# Some global project definitions that may be overwritten in 'Defaults'
X#
X###########################################################################
XCWARNOPTS=	$(CWOPTS)
X
X###########################################################################
X#
X# Global project definitions
X#
X###########################################################################
XDEF_ROOT=	$(SRCROOT)
XDEF_DIR=	DEFAULTS
X
X_DEFAULTSROOT=	$(_UNIQ)$(DEFAULTSROOT)
X__DEFAULTSROOT=	$(_DEFAULTSROOT:$(_UNIQ)=$(DEF_ROOT))
XDEFLTSROOT=	$(__DEFAULTSROOT:$(_UNIQ)%=%)
X
X_DEFAULTSDIR=	$(_UNIQ)$(DEFAULTSDIR)
X__DEFAULTSDIR=	$(_DEFAULTSDIR:$(_UNIQ)=$(DEF_DIR))
XDEFLTSDIR=	$(__DEFAULTSDIR:$(_UNIQ)%=%)
X
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/Defaults
X
X###########################################################################
X#
X# Set DEST_DIR
X# We use "DESTDIR" as external visible name to be compatible to other sw.
X#
X###########################################################################
XDEST_DIR=	$(DESTDIR:%/=%)
X
X###########################################################################
X#
X# Set INSBASE
X#
X###########################################################################
XINSBASE=	$(INS_BASE:%/=%)
X
X###########################################################################
X#
X# Get curent directory name
X#
X###########################################################################
X_DIRNAME=	$(_UNIQ)$(DIRNAME)
X__DIRNAME=	$(_DIRNAME:$(_UNIQ)=...)
XCURDIR=		$(__DIRNAME:$(_UNIQ)%=%)
X
X###########################################################################
X#
X# Standard UNIX compiler name for use as architecture name.
X#
X# (this is not necessarily the name the compiler is called by)
X# This is now defined in $(DEFAULTSROOT)/Defaults
X# If not ... use 'cc'
X#
X###########################################################################
XDEFCCOM_DEF=	cc
X
X_DEFCCOM=	$(_UNIQ)$(DEFCCOM)
X__DEFCCOM=	$(_DEFCCOM:$(_UNIQ)=$(DEFCCOM_DEF))
XCCOM_DEF=	$(__DEFCCOM:$(_UNIQ)%=%)
X
X_CCOM=		$(_UNIQ)$(CCOM)
X__CCOM=		$(_CCOM:$(_UNIQ)=$(CCOM_DEF))
XC_ARCH=		$(__CCOM:$(_UNIQ)%=%)
X
X###########################################################################
X#
X# Standard default include directories
X#
X###########################################################################
XDEFINCDIRS_DEF=	$(SRCROOT)/include
X
X_INCDIRS=	$(_UNIQ)$(DEFINCDIRS)
X__INCDIRS=	$(_INCDIRS:$(_UNIQ)=$(DEFINCDIRS_DEF))
XINCDIRS=	$(__INCDIRS:$(_UNIQ)%=%)
X
X###########################################################################
X#
X# Prepare come macros needed to build $(ARCHDIR)
X#
X# Build macros for:
X#	- processor type
X#	- operating system
X#	- compiler identification
X#
X###########################################################################
XKARCH_DEF=	$(K_ARCH)
XMARCH_DEF=	$(M_ARCH)
XPARCH_DEF=	$(P_ARCH)
X
XKARCH=		K_ARCH
X
X_MARCH=		$(_UNIQ)$(ARCH)
X__MARCH=	$(_MARCH:$(_UNIQ)=$(MARCH_DEF))
XMARCH=		$(__MARCH:$(_UNIQ)%=%)
X
X_PARCH=		$(_UNIQ)$(ARCH)
X__PARCH=	$(_PARCH:$(_UNIQ)=$(PARCH_DEF))
XPARCH=		$(__PARCH:$(_UNIQ)%=%)
X
X###########################################################################
X#
X# Now include the file $(SRCROOT)/incs/Dcc.$(PARCH)$(-O_ARCH) 
X# which is needed if the C-complier from the manual default configutration 
X# is not present on the current system. We try to use GCC as fallback
X# in this case.
X#
X# Due to a serious bug in SunPRO make we need to do some tricks to make
X# the following code working.
X#
X# See notes about $(SRCROOT)/ vs. $(SRCROOTSL) above.
X#
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.prg
X
X$(SRCROOTSL)incs:
X	$(MKDIR_SH) -p $@
X
X$(SRCROOTSL)incs/Dnull: $(SRCROOTSL)incs
X		@echo > $@
X
Xinclude		$(SRCROOTSL)incs/Dnull
X
X_DCC=	$(SRCROOTSL)incs/Dcc.$(PARCH)$(-O_ARCH)
X
X$(_DCC):
X	sh $(SRCROOTSL)conf/cc-config.sh $(C_ARCH:%64=%) $(CCOM_DEF) $@
X
Xinclude		$(_DCC)
X
X###########################################################################
X#
X# Build $(ARCHDIR) which occupies a central role in the whole
X# make file system. ARCHDIR is used as a sub directory name to keep
X# platform dependent files on different places.
X#
X# It is built from:
X#	- processor type
X#	- operating system
X#	- compiler identification
X#
X# A possible name could be:
X#	mc68020-sunos4-cc
X#
X###########################################################################
X#OARCH=		$(MARCH)$(-O_ARCH)-$(C_ARCH)
XOARCH=		$(PARCH)$(-O_ARCH)-$(C_ARCH)
XXARCH=		$(K_ARCH)$(-O_ARCH)-$(C_ARCH)
X.print:
X	echo $(XP_ARCH) $(P_ARCH) $(OARCH) $(XARCH)
X
X###########################################################################
X#
X# All generated files are placed directly into this subdirectory.
X# This includes e.g. yacc output (.c & .h files).
X# SUBARCH is used if a object is conditional compiled in multiple ways.
X#
X###########################################################################
XOARCHDIR=	OBJ/$(OARCH)
XARCHDIR=	OBJ/$(OARCH)$(SUBARCHDIR)$(SUBARCH)
X
X###########################################################################
X#
X# See notes about $(SRCROOT)/ vs. $(SRCROOTSL) above.
X#
X###########################################################################
XOLIBSDIR=	$(SRCROOTSL)libs/$(OARCH)$(SUBARCHDIR)$(SUBARCH)$(SHLDIR)
XOLIBSDIR_STATIC=$(SRCROOTSL)libs/$(OARCH)$(SUBARCHDIR)$(SUBARCH)
XOINCSDIR=	$(SRCROOTSL)incs/$(OARCH)
X
X###########################################################################
X# Location for targets:
X#
X# - all						: see appropriate rules
X# - lint					: rules.lnt
X# - clean, clobber, distclean, relink, rmtarget	: rules.clr
X# - rel						: rules.rel
X# - install, ibins				: rules.ins
X# - html, htmlx					: rules.htm & sub.htm
X# - tarpkg tarpkg1 tarpkg2			: rules.sps
X# - depend, rmdep				: rules.dep
X# - config					: rules.cnf
X# - tags, TAGS					: rules.tag
X# - .help					: rules.hlp
X# - .version					: rules.hlp
X# - tinfo					: rules.dir/rules.rdi
X#
X# We do not put '.help', '.version' and 'tinfo' into 'ALLTARGETS' because:
X#
X#	.help	is not recursive
X#	.version is not recursive
X#	tinfo	is handeled separately in rules1.dir
X#
X# If we would add .help and tinfo, we would get multiple defined target
X# messages.
X###########################################################################
XALLTARGETS=	all lint clean clobber distclean ibins depend rmdep \
X		config TAGS tags rmtarget relink rel \
X		$(INSTALLTARGETS) $(MANTARGETS) $(PKGTARGETS)
X
XINSTALLTARGETS=	install
XMANTARGETS=	html htmlx
XPKGTARGETS=	tarpkg tarpkg1 tarpkg2
X
X.PHONY:	$(ALLTARGETS) .help tinfo shell
X
X###########################################################################
X# Allow to start a shell in order to check the environment
X###########################################################################
Xshell:
X	$(SHELL)
X
X###########################################################################
X# Include a target definition for all official targets so calling
X# 'make' with a target that is not defined in the current makefiles
X# will cause the target to be ignored.
X###########################################################################
X$(ALLTARGETS):
X
Xinclude		$(SRCROOT)/$(RULESDIR)/version
END-of-smake-1.2.1/RULES/rules1.top
echo x - smake-1.2.1/RULES/sun3-sunos4-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/sun3-sunos4-cc.rul << 'END-of-smake-1.2.1/RULES/sun3-sunos4-cc.rul'
X#ident "@(#)sun3-sunos4-cc.rul	1.8 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 4.x on Motorola mc 680x0
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sun.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
END-of-smake-1.2.1/RULES/sun3-sunos4-cc.rul
echo x - smake-1.2.1/RULES/sun3-sunos4-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/sun3-sunos4-gcc.rul << 'END-of-smake-1.2.1/RULES/sun3-sunos4-gcc.rul'
X#ident "@(#)sun3-sunos4-gcc.rul	1.11 09/06/06 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 4.x on Motorola mc 680x0 (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
XCWOPTS=		-Wall -Wshadow -Wmissing-prototypes -Wstrict-prototypes
X
XOSDEFS +=
X
XCOPTOPT=	-O2
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
END-of-smake-1.2.1/RULES/sun3-sunos4-gcc.rul
echo x - smake-1.2.1/RULES/sun4-sunos4-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/sun4-sunos4-cc.rul << 'END-of-smake-1.2.1/RULES/sun4-sunos4-cc.rul'
X#ident "@(#)sun4-sunos4-cc.rul	1.8 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 4.x on sparc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sun.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
END-of-smake-1.2.1/RULES/sun4-sunos4-cc.rul
echo x - smake-1.2.1/RULES/sun4-sunos4-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/sun4-sunos4-gcc.rul << 'END-of-smake-1.2.1/RULES/sun4-sunos4-gcc.rul'
X#ident "@(#)sun4-sunos4-gcc.rul	1.8 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 4.x on sparc (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm
X
XLDOPTDYN=
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-smake-1.2.1/RULES/sun4-sunos4-gcc.rul
echo x - smake-1.2.1/RULES/sun4-sunos5-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/sun4-sunos5-cc.rul << 'END-of-smake-1.2.1/RULES/sun4-sunos5-cc.rul'
X#ident "@(#)sun4-sunos5-cc.rul	1.11 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x on sparc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
XLDOPTDYN=	-dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl
X
XARFLAGS=	crs
END-of-smake-1.2.1/RULES/sun4-sunos5-cc.rul
echo x - smake-1.2.1/RULES/sun4-sunos5-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/sun4-sunos5-gcc.rul << 'END-of-smake-1.2.1/RULES/sun4-sunos5-gcc.rul'
X#ident "@(#)sun4-sunos5-gcc.rul	1.13 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x on sparc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
X#
X# We should use -Wl,-ztext here, but gcc does not create fully compliant
X# object files.
X#
XLDOPTDYN=	-dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl
X
XARFLAGS=	crs
END-of-smake-1.2.1/RULES/sun4-sunos5-gcc.rul
echo x - smake-1.2.1/RULES/x86pc-qnx-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/x86pc-qnx-gcc.rul << 'END-of-smake-1.2.1/RULES/x86pc-qnx-gcc.rul'
X###########################################################################
X#ident "@(#)x86pc-qnx-gcc.rul	1.7 07/05/09 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for QNX Neutrino
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	-lsocks -lrpc
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/x86pc-qnx-gcc.rul
echo x - smake-1.2.1/RULES/rules.sps
sed 's/^X//' >smake-1.2.1/RULES/rules.sps << 'END-of-smake-1.2.1/RULES/rules.sps'
X#ident "@(#)rules.sps	1.13 07/05/06 "
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X#
X# Rules for wrapping around other make systems
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XPTARGET=	$(TARGET)
XSRCFILE=	$(TARGET)
X###########################################################################
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
X#all:		$(SRCFILE)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
X#include		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/dummy.dep
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tpk
X###########################################################################
X
Xall: $(ARCHDIR)/config.status $(POSTCONFIG)
X	cd $(ARCHDIR)/; $(MAKE) $(MAKEMACS) $(MAKEOPTS) $@
X
Xinstall: all
X	cd $(ARCHDIR)/; DESTDIR=$(DEST_DIR) $(MAKE) $(MAKEMACS) $(MAKEOPTS) DESTDIR=$(DEST_DIR) $@
X
X#
X# Hack until the <mach>-<os>-*cc.rul files are updated
X#
X_HCC_COM=	$(OARCH:%-gcc=gcc)
XHCC_COM=	$(_HCC_COM:%-cc=cc)
X
X_CC_COM=	$(_UNIQ)$(CC_COM)
X__CC_COM=	$(_CC_COM:$(_UNIQ)=$(HCC_COM))
XXCC_COM=	$(__CC_COM:$(_UNIQ)%=%)
X
X_CONF_SCRIPT=	$(_UNIQ)$(CONF_SCRIPT)
X__CONF_SCRIPT=	$(_CONF_SCRIPT:$(_UNIQ)=configure)
XCONFSCRIPT=	$(__CONF_SCRIPT:$(_UNIQ)%=%)
X
X#
X# Note: $(___CONF_SCR:$(_UNIQ)=:) is not accepted by Sun make
X# because of a parser bug. We thus use "true".
X#
XCOLON=:
X_CONF_SCR=	$(CONFSCRIPT:none=)
X__CONF_SCR=	$(_CONF_SCR:%=../../$(SRC_DIR)/%)
X___CONF_SCR=	$(_UNIQ)$(__CONF_SCR)
X____CONF_SCR=	$(___CONF_SCR:$(_UNIQ)=true)
XPCONFSCRIPT=	$(____CONF_SCR:$(_UNIQ)%=%)
X
X_LNDIR_PRG=	$(_UNIQ)$(LNDIR_PRG)
X__LNDIR_PRG=	$(_LNDIR_PRG:$(_UNIQ)=:)
XLNDIRPRG=	$(__LNDIR_PRG:$(_UNIQ)%=%)
X
X#$(ARCHDIR)/config.status: $(SRC_DIR)/$(CONFSCRIPT)
X
X			# Expands to: $(SRC_DIR)/$(CONFSCRIPT) is non-empty
X$(ARCHDIR)/config.status: $(_CONF_SCR:%=$(SRC_DIR)/%)
X	mkdir -p $(ARCHDIR)/; cd $(ARCHDIR)/; \
X	$(LNDIRPRG) ../../$(SRC_DIR)/; \
X	CC="$(XCC_COM)" CFLAGS="$(CFLAGS)" MAKE="$(MAKE)" $(MAKEMACS) $(PCONFSCRIPT) $(CONF_OPTS) && \
X	( [ ! -f config.status ] && touch config.status || : )
END-of-smake-1.2.1/RULES/rules.sps
echo x - smake-1.2.1/RULES/rules.tpk
sed 's/^X//' >smake-1.2.1/RULES/rules.tpk << 'END-of-smake-1.2.1/RULES/rules.tpk'
X#ident "@(#)rules.tpk	1.7 08/12/27 "
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X#
X# Rules for creating binary tar packages
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X###########################################################################
X# If we are included before rules.dir, this will stop to propagate
X# the targets tarpkg1 & tarpkg to sub makes but handle packaging at this
X# directory bundling level.
X###########################################################################
XPKGTARGETS=
X
XOTARSDIR=	$(SRCROOTSL)tars/$(OARCH)
X$(OTARSDIR):
X		$(MKDIR) -p $@
X
X
X_TARGETAR=	$(TARGET_AR:%=$(OTARSDIR)/%)
X__TARGETAR=	$(_UNIQ)$(_TARGETAR)
X___TARGETAR=	$(__TARGETAR:$(_UNIQ)=tarpkg)
XTARGETAR=	$(___TARGETAR:$(_UNIQ)%=%)
X
X_MCS_PROJECT=	$(_UNIQ)$(PROJECTNAME)
X__MCS_PROJECT=	$(_MCS_PROJECT:$(_UNIQ)=SPS-Generic)
XMCS_PROJECTNAME= $(__MCS_PROJECT:$(_UNIQ)%=%)
X
Xta:
X	echo "'$(TARGETAR)'"
X	echo "'$(TARGETAR).tar'"
X
Xtarpkg: $(OTARSDIR) tarpkg0 tarpkg1 tarpkg2
X
Xtarpkg0:
X	rm -rf tarpkg
X
Xtarpkg1:
X	mkdir -p tarpkg tarpkg/$(INSBASE)/bin tarpkg/$(INSBASE)/sbin tarpkg/$(INSBASE)/etc \
X		tarpkg/$(INSBASE)/lib tarpkg/$(INSBASE)/share/man
X	ln -s share/man tarpkg/$(INSBASE)/man
X	if [ ."$(PRE_INST_CMDS)" != . ]; then cd tarpkg && eval "$(PRE_INST_CMDS)" ; fi
X	$(MAKE) $(MAKE_FILE) $(MAKEMACS) DESTDIR=`pwd`/tarpkg install
X	if [ ."$(POST_INST_CMDS)" != . ]; then cd tarpkg && eval "$(POST_INST_CMDS)" ; fi
X	-if [ ."$(STRIPLIST)" != . ];  then chmod u+w $(STRIPLIST:%=tarpkg/%); strip $(STRIPLIST:%=tarpkg/%); fi
X	-if [ ."$(STRIPXLIST)" != . ]; then chmod u+w $(STRIPXLIST:%=tarpkg/%); strip -x $(STRIPXLIST:%=tarpkg/%); fi
X	-if [ ."$(MCSLIST)" != . ];    then chmod u+w $(MCSLIST:%=tarpkg/%); mcs -d -a "$(MCS_PROJECTNAME)" $(MCSLIST:%=tarpkg/%); fi
X	if [ ."$(POST_STRIP_CMDS)" != . ]; then cd tarpkg && eval "$(POST_STRIP_CMDS)" ; fi
X	find tarpkg -print | sort > /tmp/so.$$$$; diff filelist /tmp/so.$$$$; rm -f /tmp/so.$$$$
X
Xtarpkg2:
X	star -C tarpkg/ pkglist=pkglist -cP > $(TARGETAR).tar
X	bzip2 -9f $(TARGETAR).tar
X	rm -rf tarpkg
END-of-smake-1.2.1/RULES/rules.tpk
echo x - smake-1.2.1/RULES/i86pc-sunos5-cc64.rul
sed 's/^X//' >smake-1.2.1/RULES/i86pc-sunos5-cc64.rul << 'END-of-smake-1.2.1/RULES/i86pc-sunos5-cc64.rul'
X#ident "@(#)i86pc-sunos5-cc64.rul	1.5 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x on PC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sunpro64.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
XLDOPTDYN=	-dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl
X
XARFLAGS=	crs
END-of-smake-1.2.1/RULES/i86pc-sunos5-cc64.rul
echo x - smake-1.2.1/RULES/cc-dec.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-dec.rul << 'END-of-smake-1.2.1/RULES/cc-dec.rul'
X#ident "@(#)cc-dec.rul	1.7 07/05/08 "
X###########################################################################
X# Written 1998-2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Digital UNIX cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(DECCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(DECC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		
XCOPTOPT=	-O
XCOPTDYN=	-fpic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR) -L/usr/ccs/lib
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX) -lrt
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; cc
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M
XMKDEP_OUT=
X
X#CC++ =		@echo "	==> COMPILING \"$@\""; CC
X#LDCC++ =	@echo "	==> LINKING \"$@\""; CC
X#DYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
X#MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM
X#MKC++DEP_OUT=
XCC++ =		@echo "	==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1
XLDCC++ =	@echo "	==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-dec.rul
echo x - smake-1.2.1/RULES/sun4-sunos5-cc64.rul
sed 's/^X//' >smake-1.2.1/RULES/sun4-sunos5-cc64.rul << 'END-of-smake-1.2.1/RULES/sun4-sunos5-cc64.rul'
X#ident "@(#)sun4-sunos5-cc64.rul	1.6 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x on sparc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sunpro64.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
XLDOPTDYN=	-dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl
X
XARFLAGS=	crs
END-of-smake-1.2.1/RULES/sun4-sunos5-cc64.rul
echo x - smake-1.2.1/RULES/i86pc-sunos5-gcc64.rul
sed 's/^X//' >smake-1.2.1/RULES/i86pc-sunos5-gcc64.rul << 'END-of-smake-1.2.1/RULES/i86pc-sunos5-gcc64.rul'
X#ident "@(#)i86pc-sunos5-gcc64.rul	1.7 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x for PC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
X#
X# We should use -Wl,-ztext here, but gcc does not create fully compliant
X# object files.
X#
XLDOPTDYN=	-dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl
X
XARFLAGS=	crs
END-of-smake-1.2.1/RULES/i86pc-sunos5-gcc64.rul
echo x - smake-1.2.1/RULES/os-dragonfly.def
sed 's/^X//' >smake-1.2.1/RULES/os-dragonfly.def << 'END-of-smake-1.2.1/RULES/os-dragonfly.def'
X#ident "@(#)os-dragonfly.def	1.2 06/05/14 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Global os definitions for DragonFly BSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-dragonfly.def
echo x - smake-1.2.1/RULES/os-dragonfly.id
sed 's/^X//' >smake-1.2.1/RULES/os-dragonfly.id << 'END-of-smake-1.2.1/RULES/os-dragonfly.id'
X#ident "@(#)os-dragonfly.id	1.2 06/05/14 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for DragonFly BSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		dragonfly
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-dragonfly.id
echo x - smake-1.2.1/RULES/sun4-sunos5-gcc64.rul
sed 's/^X//' >smake-1.2.1/RULES/sun4-sunos5-gcc64.rul << 'END-of-smake-1.2.1/RULES/sun4-sunos5-gcc64.rul'
X#ident "@(#)sun4-sunos5-gcc64.rul	1.7 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x on sparc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
X#
X# We should use -Wl,-ztext here, but gcc does not create fully compliant
X# object files.
X#
XLDOPTDYN=	-dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl
X
XARFLAGS=	crs
END-of-smake-1.2.1/RULES/sun4-sunos5-gcc64.rul
echo x - smake-1.2.1/RULES/cc-dg.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-dg.rul << 'END-of-smake-1.2.1/RULES/cc-dg.rul'
X#ident "@(#)cc-dg.rul	1.7 07/05/08 "
X###########################################################################
X# Written 1996-2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for DGUX cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(DGCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(DGC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=		-Xa
XCWOPTS=		-v
XCOPTOPT=	-O
XCOPTDYN=	-Kpic
XCOPTGPROF=	-xpg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTDYN=	-dy -G -ztext -h $(TARGET) -ldl
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; cc
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -xM
XMKDEP_OUT=
X
X#CC++ =		@echo "	==> COMPILING \"$@\""; CC
X#LDCC++ =	@echo "	==> LINKING \"$@\""; CC
X#DYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
X#MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM
X#MKC++DEP_OUT=
XCC++ =		@echo "	==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1
XLDCC++ =	@echo "	==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-dg.rul
echo x - smake-1.2.1/RULES/i486-cygwin32_nt-cl.rul
sed 's/^X//' >smake-1.2.1/RULES/i486-cygwin32_nt-cl.rul << 'END-of-smake-1.2.1/RULES/i486-cygwin32_nt-cl.rul'
X#ident "@(#)i486-cygwin32_nt-cl.rul	1.8 09/05/21 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT using MSVC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
X_PLATFORM=	cygwin
Xinclude $(SRCROOT)/$(RULESDIR)/cc-msc.rul
X
X#
X#		Supress useless cl warnings like:
X#		warning C4996: 'strerror' wurde als veraltet deklariert
X#		Consider using strerror_s instead.
X#
XOSDEFS +=	-D_CRT_SECURE_NO_DEPRECATE
X
X#
X#		Supress useless cl warnings like:
X#		warning C4996: 'fdopen' wurde als veraltet deklariert
X#		The POSIX name for this item is deprecated. Instead, use
X#		the ISO C++ conformant name: _fdopen.
X#
XOSDEFS +=	-D_CRT_NONSTDC_NO_DEPRECATE
X
XKDEFINES=
X
XLIB_SOCKET=	Ws2_32.lib
XLIB_MATH=	
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i486-cygwin32_nt-cl.rul
echo x - smake-1.2.1/RULES/os-interix.def
sed 's/^X//' >smake-1.2.1/RULES/os-interix.def << 'END-of-smake-1.2.1/RULES/os-interix.def'
X#ident "@(#)os-interix.def	1.1 06/06/29 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Interix Systems (WIN-NT with SFU)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-smake-1.2.1/RULES/os-interix.def
echo x - smake-1.2.1/RULES/os-interix.id
sed 's/^X//' >smake-1.2.1/RULES/os-interix.id << 'END-of-smake-1.2.1/RULES/os-interix.id'
X#ident "@(#)os-interix.id	1.4 07/05/29 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Interix Systems (WIN-NT with SFU)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		interix
X-O_ARCH=	-$(O_ARCH)
X
X###########################################################################
X#
X# In case we are unable to get the MS-WIN version that
X# runs under Interix, we define NT-4.0 Service Pack 3
X# and use it as a fall-back definition.
X#
X###########################################################################
XWINNTDEFS +=	-D_WIN32_WINNT=0x0403
X
X###########################################################################
X#
X# $(MAKE_HOST_OSREL) is only defined in smake. If the macro in undefined
X# -include allows to fail the "include" and use the fall-back above.
X#
X###########################################################################
X-include	$(SRCROOT)/$(RULESDIR)/os-interix-nt-$(MAKE_HOST_OSREL).id
X
END-of-smake-1.2.1/RULES/os-interix.id
echo x - smake-1.2.1/RULES/x86-interix-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/x86-interix-gcc.rul << 'END-of-smake-1.2.1/RULES/x86-interix-gcc.rul'
X#ident "@(#)x86-interix-gcc.rul	1.5 07/05/09 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Interix Systems (WIN-NT with SFU)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-D_ALL_SOURCE
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/x86-interix-gcc.rul
echo x - smake-1.2.1/RULES/cc-apollo.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-apollo.rul << 'END-of-smake-1.2.1/RULES/cc-apollo.rul'
X#ident "@(#)cc-apollo.rul	1.8 07/05/08 "
X###########################################################################
X# Written 2001-2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for DomainOS (sys5.3, 10.4.1) cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(APOLLOCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(APOLLOC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		-W0,-info,4
XCOPTOPT=	-O
XCOPTDYN=	-fpic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
X#CC_COM=	cc -A systype,bsd4.3
XCC_COM=		/bsd4.3/bin/cc
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XRMDEP=		:
X#MKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); /user/local/com/makedepend
XMKDEP_OUT=
XMKDIR=		$(MKDIR_SH)
X
X#CC++ =		@echo "	==> COMPILING \"$@\""; CC
X#LDCC++ =	@echo "	==> LINKING \"$@\""; CC
X#DYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
X#MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM
X#MKC++DEP_OUT=
XCC++ =		@echo "	==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1
XLDCC++ =	@echo "	==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-apollo.rul
echo x - smake-1.2.1/RULES/cc-bemwcc.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-bemwcc.rul << 'END-of-smake-1.2.1/RULES/cc-bemwcc.rul'
X#ident @(#)cc-bemwcc.rul	1.9 07/05/08 
X###########################################################################
X# Written 1996-2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BeOS mwcc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(BEMWCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(BEMWC++OPTOPT) $(C++OPTX)
X
X
X#
X# XXX Old BeOS needs libroot.so to get [efg]cvt()
X# XXX New BeOS seems to have this in libc and in addition we include
X# XXX strtod.c for floating point conversion on OS without such code.
X# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been
X# XXX removed and printing floating numbers will work with old/new BeOS
X#
X#OSDEFS +=	-DNO_FLOATINGPOINT -DUSE_FLOATINGARGS
X
X#
X# XXX This is used by bemac-beos-cc.rul
X#
XCPPOPTS=	-O4 -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X#
X# XXX This is used by bemac-beos-mwcc.rul
X#
XCPPOPTS=	-relax_pointers -opt all -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X#
X# XXX This is used by powerpc-beos-mwcc.rul
X#
XCPPOPTS=	-relax_pointers -opt global -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=	        -w8
XCOPTOPT=	-opt off
XCOPTDYN=	#-fpic
XCOPTGPROF=	#-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
X#
X# XXX This is used by powerpc-beos-mwcc.rul
X#
XLDOPTS=		-multidefs -sym on -g $(LIBS_PATH) $(LDPATH)
X
XLDOPTS=		-multidefs -msg nodup -sym on -g $(LIBS_PATH) $(LDPATH)
XLDOPTDYN=#	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		mwccppc
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -make
XMKDEP_OUT=
X
X#CC++ =		@echo "	==> COMPILING \"$@\""; CC
X#LDCC++ =	@echo "	==> LINKING \"$@\""; CC
X#DYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
X#MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM
X#MKC++DEP_OUT=
XCC++ =		@echo "	==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1
XLDCC++ =	@echo "	==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-bemwcc.rul
echo x - smake-1.2.1/RULES/cc-dumb.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-dumb.rul << 'END-of-smake-1.2.1/RULES/cc-dumb.rul'
X#ident "@(#)cc-dumb.rul	1.7 07/05/08 "
X###########################################################################
X# Written 1997-2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for unknown systems systems with dumb cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(DUMBCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(DUMBC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		
X#
X# Switch optimizing on if your compiler supports it
X#COPTOPT=	-O
XCOPTOPT=	
XCOPTDYN=	-fpic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; cc
X
XRMDEP=		:
X#MKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "Cannot do -M with unknown cc"; :
XMKDEP_OUT=
X
X#CC++ =		@echo "	==> COMPILING \"$@\""; CC
X#LDCC++ =	@echo "	==> LINKING \"$@\""; CC
X#DYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
X#MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM
X#MKC++DEP_OUT=
XCC++ =		@echo "	==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1
XLDCC++ =	@echo "	==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-dumb.rul
echo x - smake-1.2.1/RULES/cc-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-gcc.rul << 'END-of-smake-1.2.1/RULES/cc-gcc.rul'
X#ident "@(#)cc-gcc.rul	1.9 07/05/09 "
X###########################################################################
X# Written 1996-2006 by J. Schilling
X###########################################################################
X#
X# Platform independent MACROS for GCC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(GCCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(G++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
X#		-Wtraditional now causes more pain than it helps 
XCWOPTS=		-Wall -Wtraditional
XCWOPTS=		-Wall -Wno-unknown-pragmas \
X		-Wshadow -Wmissing-prototypes -Wstrict-prototypes
XCOPTOPT=	-O
XCOPTDYN=	-fpic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	$(CWOPTS)
XC++OPTOPT=	$(COPTOPT)
XC++OPTDYN=	-fpic
XC++OPTGPROF=	-pg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC=		@echo "	==> COMPILING \"$@\""; gcc
XCC++ =		@echo "	==> COMPILING \"$@\""; g++
XLDCC=		@echo "	==> LINKING \"$@\""; gcc
XLDCC++ =	@echo "	==> LINKING \"$@\""; g++
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; gcc
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; g++
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); gcc -M
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); g++ -M
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-gcc.rul
echo x - smake-1.2.1/RULES/cc-gcc64.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-gcc64.rul << 'END-of-smake-1.2.1/RULES/cc-gcc64.rul'
X#ident "@(#)cc-gcc64.rul	1.11 09/11/29 "
X###########################################################################
X# Written 1996-2006 by J. Schilling
X###########################################################################
X#
X# Platform independent MACROS for GCC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XGCC_OPT64=	-m64
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(GCCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(G++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=		$(GCC_OPT64)
X#		-Wtraditional now causes more pain than it helps 
XCWOPTS=		-Wall -Wtraditional
XCWOPTS=		-Wall -Wno-unknown-pragmas \
X		-Wshadow -Wmissing-prototypes -Wstrict-prototypes
XCOPTOPT=	-O
XCOPTDYN=	-fpic
XCOPTGPROF=	-pg
XC++OPTS=	$(GCC_OPT64)
XC++WOPTS=	$(CWOPTS)
XC++OPTOPT=	$(COPTOPT)
XC++OPTDYN=	-fpic
XC++OPTGPROF=	-pg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		gcc
XCC=		@echo "	==> COMPILING \"$@\""; gcc $(GCC_OPT64)
XCC++ =		@echo "	==> COMPILING \"$@\""; g++ $(GCC_OPT64)
XLDCC=		@echo "	==> LINKING \"$@\""; gcc $(GCC_OPT64)
XLDCC++ =	@echo "	==> LINKING \"$@\""; g++ $(GCC_OPT64)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; gcc $(GCC_OPT64)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; g++ $(GCC_OPT64)
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); gcc $(GCC_OPT64) -M
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); g++ $(GCC_OPT64) -M
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-gcc64.rul
echo x - smake-1.2.1/RULES/cc-hp.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-hp.rul << 'END-of-smake-1.2.1/RULES/cc-hp.rul'
X#ident "@(#)cc-hp.rul	1.7 09/01/07 "
X###########################################################################
X# Written 1996-2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for HP/UC cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(HPCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(HPC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X#
X# -Ae	      -> ANSI C (non-bundled C only - bundled C ignores -Ae)
X# +DAportable -> Create Parisc-1.1 code
X#
XHP_CC_ANSI_OPT=	-Ae	# May be overwritten later from $(OINCSDIR)/rules.cnf
XHP_CC_OPT_OPT=	-O	# May be overwritten later from $(OINCSDIR)/rules.cnf
XHP_CC_GPROF_OPT= -G	# May be overwritten later from $(OINCSDIR)/rules.cnf
X
XCOPTS=		$(HP_CC_ANSI_OPT) +DAportable
XCWOPTS=		
XCOPTOPT=	$(HP_CC_OPT_OPT)
XCOPTDYN=	+z
XCOPTGPROF=	$(HP_CC_GPROF_OPT)
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.sl
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-Wl,-soname,$(TARGET)
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; cc
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(SRCROOT)/conf/mkdep-hpux.sh
XMKDEP_OUT=
X
X#CC++ =		@echo "	==> COMPILING \"$@\""; CC
X#LDCC++ =	@echo "	==> LINKING \"$@\""; CC
X#DYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
X#MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM
X#MKC++DEP_OUT=
XCC++ =		@echo "	==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1
XLDCC++ =	@echo "	==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-hp.rul
echo x - smake-1.2.1/RULES/cc-ibm.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-ibm.rul << 'END-of-smake-1.2.1/RULES/cc-ibm.rul'
X#ident "@(#)cc-ibm.rul	1.6 07/05/08 "
X###########################################################################
X# Written 1996-2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for IBM AIX cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(IBMCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(IBMC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		
XCOPTOPT=	-O
XCOPTDYN=	-pic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(SRCROOT)/conf/mkdep-aix.sh
XMKDEP_OUT=
X
X#$RMDEP=		:
X#$#MKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M
X#$MKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "Cannot do -M with IBM'cc"; :
X#$MKDEP_OUT=
X
X#CC++ =		@echo "	==> COMPILING \"$@\""; CC
X#LDCC++ =	@echo "	==> LINKING \"$@\""; CC
X#DYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
X#MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM
X#MKC++DEP_OUT=
XCC++ =		@echo "	==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1
XLDCC++ =	@echo "	==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-ibm.rul
echo x - smake-1.2.1/RULES/cc-msc.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-msc.rul << 'END-of-smake-1.2.1/RULES/cc-msc.rul'
X#ident "@(#)cc-msc.rul	1.18 09/05/21 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT using MSVC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(MSCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(MSC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		-W3
XCOPTOPT=	-O2
XCOPTDYN=
X#COPTGPROF=	-pg
X#
X# /EHs C++-EH aktivieren (ohne SEH-Ausnahmen)
X# /EHa C++-EH aktivieren (mit SEH-Ausnahmen)
X# /EHc nothrow als Standard fr externes "C"
X# MS seems to need -EHsc in order to create useful code with exceptions
X#
XC++OPTS=	-EHsc
XC++WOPTS=	-W3
XC++OPTOPT=	-O2
XC++OPTDYN=
X#C++OPTGPROF=	-pg
X
X
XLIB_PREFIX=
XLIB_SUFFIX=	.lib
XSHL_SUFFIX=	.dll
X
X#LIBS_PATH=	-libpath:$(OLIBSDIR)
X#LIBS_PATH_STATIC= -libpath:$(OLIBSDIR_STATIC) 
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS:-l%=%.lib) $(LIBX:-l%=%.lib)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
X#LDOPTS=		-link $(LIBS_PATH) $(LDPATH)
XLDOPTS=		-link $(LIBS_PATH:-L%=-libpath:%) $(LDPATH:-L%=-libpath:%)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLDOPTDYN=	-dll -def:$(TARGETLIB).def
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cl.exe
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM) -nologo
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC_COM) -nologo
XOUTPUT_OPTION=	-Fo$(O:%=%/)$@
XCC_OUTPUT_FILTER= | tail +2	# Filter cl.exe filename echo
XLD_OUTPUT_OPTION= -Fe$@
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM) -nologo
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC_COM) -nologo
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM) -nologo
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM) -nologo
XDYNLD.o=	$(DYNLD) `$(LORDER) $(POFILES) | $(TSORT)` $(LDFLAGS) -out:$@ $(LDLIBS)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
XAR=		@echo "	==> ARCHIVING  \"$@\""; lib.exe -nologo
XARFLAGS=
XAR.o=		$(AR) $(ARFLAGS) -out:$@
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc.sh
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc.sh
XMKC++DEP_OUT=
X
XVC=7
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from Defaults.*
X# in order to be able to test for the existence of "cl.exe" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
X
XOSDEFS	+=	$(WINNTDEFS)
END-of-smake-1.2.1/RULES/cc-msc.rul
echo x - smake-1.2.1/RULES/cc-sco_os.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-sco_os.rul << 'END-of-smake-1.2.1/RULES/cc-sco_os.rul'
X#ident "@(#)cc-sco_os.rul	1.8 07/05/08 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Platform dependent MACROS for SCO OpenServer 5 cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SCO_OSCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SCO_OSC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=		-belf
XCWOPTS=		-w3
XCOPTOPT=	-O
XCOPTDYN=	-KPIC
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-dy -G $(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; cc
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-sco.sh
XMKDEP_OUT=
XMKDIR=		$(MKDIR_SH)
X
X#CC++ =		@echo "	==> COMPILING \"$@\""; CC
X#LDCC++ =	@echo "	==> LINKING \"$@\""; CC
X#DYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
X#MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM
X#MKC++DEP_OUT=
XCC++ =		@echo "	==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1
XLDCC++ =	@echo "	==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-sco_os.rul
echo x - smake-1.2.1/RULES/cc-sco_uw.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-sco_uw.rul << 'END-of-smake-1.2.1/RULES/cc-sco_uw.rul'
X#ident "@(#)cc-sco_uw.rul	1.7 07/05/08 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Platform dependent MACROS for SCO UnixWare 2.x / 7.x cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SCO_UWCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SCO_UWC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=		
XCWOPTS=		-v
XCOPTOPT=	-O
XCOPTDYN=	-KPIC
X#COPTGPROF=	-pg
XCOPTGPROF=	-p
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-dy -G $(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
X
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; cc
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-sco.sh
XMKDEP_OUT=
X
X#CC++ =		@echo "	==> COMPILING \"$@\""; CC
X#LDCC++ =	@echo "	==> LINKING \"$@\""; CC
X#DYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
X#MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM
X#MKC++DEP_OUT=
XCC++ =		@echo "	==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1
XLDCC++ =	@echo "	==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-sco_uw.rul
echo x - smake-1.2.1/RULES/cc-sgi.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-sgi.rul << 'END-of-smake-1.2.1/RULES/cc-sgi.rul'
X#ident "@(#)cc-sgi.rul	1.7 09/11/29 "
X###########################################################################
X# Written 1996-2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Silicon Graphics cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SGICOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SGIC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		-fullwarn
XCOPTOPT=	-O
XCOPTDYN=	-Kpic
XCOPTGPROF=	-p1
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(LARGEFILE_OPT)
X#LDOPTDYN=	-dy -G -ztext -h $(TARGET) -ldl
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; cc
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M
XMKDEP_OUT=
X
XCC++ =		@echo "	==> COMPILING \"$@\""; CC
XLDCC++ =	@echo "	==> LINKING \"$@\""; CC
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -M
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-sgi.rul
echo x - smake-1.2.1/RULES/cc-sony.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-sony.rul << 'END-of-smake-1.2.1/RULES/cc-sony.rul'
X#ident @(#)cc-sony.rul	1.6 07/05/08 
X# Written 1996-2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Sony cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SONYCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SONYC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		-fullwarn
XCOPTOPT=	-O
XCOPTDYN=	-Kpic
XCOPTGPROF=	-p1
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-dy -G -ztext -h $(TARGET) -ldl
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; cc
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M
XMKDEP_OUT=
X
X#CC++ =		@echo "	==> COMPILING \"$@\""; CC
X#LDCC++ =	@echo "	==> LINKING \"$@\""; CC
X#DYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
X#MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM
X#MKC++DEP_OUT=
XCC++ =		@echo "	==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1
XLDCC++ =	@echo "	==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-sony.rul
echo x - smake-1.2.1/RULES/cc-sun.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-sun.rul << 'END-of-smake-1.2.1/RULES/cc-sun.rul'
X#ident "@(#)cc-sun.rul	1.6 07/05/08 "
X###########################################################################
X# Written 1996-2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Sun cc (SunOS 4.x)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SUNCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SUNC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		
XCOPTOPT=	-O
XCOPTDYN=	-pic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M
XMKDEP_OUT=
X
X#CC++ =		@echo "	==> COMPILING \"$@\""; CC
X#LDCC++ =	@echo "	==> LINKING \"$@\""; CC
X#DYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
X#MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM
X#MKC++DEP_OUT=
XCC++ =		@echo "	==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1
XLDCC++ =	@echo "	==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-sun.rul
echo x - smake-1.2.1/RULES/cc-sunpro.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-sunpro.rul << 'END-of-smake-1.2.1/RULES/cc-sunpro.rul'
X#ident "@(#)cc-sunpro.rul	1.8 07/06/14 "
X###########################################################################
X# Written 1996-2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunPro (Studio) cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SUNPROCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SUNPROC++OPTOPT) $(C++OPTX)
X
X
XLINTFLAGS=	-Nlevel=4 
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=		-Xa
XCWOPTS=		-v
XCOPTOPT=	-O
XCOPTDYN=	-Kpic
XCOPTGPROF=	-xpg
XC++OPTS=
XC++WOPTS=	
XC++OPTOPT=	-O
XC++OPTDYN=	-Kpic
XC++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTDYN=	-dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XCC++ =		@echo "	==> COMPILING \"$@\""; CC
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; CC
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -xM
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-sunpro.rul
echo x - smake-1.2.1/RULES/cc-sunpro64.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-sunpro64.rul << 'END-of-smake-1.2.1/RULES/cc-sunpro64.rul'
X#ident "@(#)cc-sunpro64.rul	1.11 09/01/06 "
X###########################################################################
X# Written 1996-2009 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunPro (Studio) cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SUNPROCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SUNPROC++OPTOPT) $(C++OPTX)
X
XLINTFLAGS=	-Nlevel=4 
X
X_SUNPROCOPT64=	$(_UNIQ)$(SUN_CC64_OPT)
X__SUNPROCOPT64=	$(_SUNPROCOPT64:$(_UNIQ)=-xarch=generic64)
XSUNPROCOPT64=	$(__SUNPROCOPT64:$(_UNIQ)%=%)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=		-Xa $(SUNPROCOPT64)
XCWOPTS=		-v
XCOPTOPT=	-O
XCOPTDYN=	-Kpic
XCOPTGPROF=	-xpg
XC++OPTS=	$(SUNPROCOPT64)
XC++WOPTS=	
XC++OPTOPT=	-O
XC++OPTDYN=	-Kpic
XC++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTDYN=	-dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM) $(SUNPROCOPT64)
XCC++ =		@echo "	==> COMPILING \"$@\""; CC $(SUNPROCOPT64)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM) $(SUNPROCOPT64)
XLDCC++ =	@echo "	==> LINKING \"$@\""; CC $(SUNPROCOPT64)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM) $(SUNPROCOPT64)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC $(SUNPROCOPT64)
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -xM $(SUNPROCOPT64)
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM $(SUNPROCOPT64)
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-sunpro64.rul
echo x - smake-1.2.1/RULES/dynamic.lnk
sed 's/^X//' >smake-1.2.1/RULES/dynamic.lnk << 'END-of-smake-1.2.1/RULES/dynamic.lnk'
X#ident @(#)dynamic.lnk	1.1 06/07/20 
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Rules for commands that are links dynamically against internal libs
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XSHLDIR=		/pic
XNO_SHL=
END-of-smake-1.2.1/RULES/dynamic.lnk
echo x - smake-1.2.1/RULES/static.lnk
sed 's/^X//' >smake-1.2.1/RULES/static.lnk << 'END-of-smake-1.2.1/RULES/static.lnk'
X#ident @(#)static.lnk	1.1 06/07/20 
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Rules for commands that are links statically against internal libs
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XSHLDIR=
XNO_SHL=		no
END-of-smake-1.2.1/RULES/static.lnk
echo x - smake-1.2.1/RULES/rules.dyn
sed 's/^X//' >smake-1.2.1/RULES/rules.dyn << 'END-of-smake-1.2.1/RULES/rules.dyn'
X#ident @(#)rules.dyn	1.1 06/07/20 
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Rules for dynamic vs. static linking against internal libs
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X_DEFLNKMODE=	$(_UNIQ)$(DEFLINKMODE)
X__DEFLNKMODE=	$(_DEFLNKMODE:$(_UNIQ)=static)
XDEFLNKMODE=	$(__DEFLNKMODE:$(_UNIQ)%=%)
X_LNKMODE=	$(_UNIQ)$(LINKMODE)
X__LNKMODE=	$(_LNKMODE:$(_UNIQ)=$(DEFLNKMODE))
XLNKMODE=	$(__LNKMODE:$(_UNIQ)%=%)
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/$(LNKMODE).lnk
END-of-smake-1.2.1/RULES/rules.dyn
echo x - smake-1.2.1/RULES/rules.cpl
sed 's/^X//' >smake-1.2.1/RULES/rules.cpl << 'END-of-smake-1.2.1/RULES/rules.cpl'
X#ident "@(#)rules.cpl	1.1 06/07/21 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Rules for C++ projects
X#
X# Cannot use the file name rules.c++ on some OS.
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XLDCC=	$(LDCC++)
XDYNLD=  $(DYNLDC++)
END-of-smake-1.2.1/RULES/rules.cpl
echo x - smake-1.2.1/RULES/rules.htm
sed 's/^X//' >smake-1.2.1/RULES/rules.htm << 'END-of-smake-1.2.1/RULES/rules.htm'
X#ident "@(#)rules.htm	1.3 07/05/06 "
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Manual page to html converting rules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xhtml:	$(MANFILE)
X	soelim $(MANFILE) | tbl | nroff -u1 -Tlp -man - | col -x | \
X		man2html  -cgiurl '$$title.$$section.html' -compress -nodepage \
X		> $(MANFILE).html
X
Xhtmlx:	$(MANFILE)
X	soelim $(MANFILE) | tbl | nroff -u1 -Tlp -man - | col -x | \
X			(sed -e 's/XXX/$(MANFILE)/g' $(SRCROOT)/conf/pre.html; \
X			man2html  -cgiurl '$$title.$$section.html' -compress -nodepage; \
X			cat $(SRCROOT)/conf/post.html) | \
X			egrep -v 'HTML|BODY'> $(MANFILE).html
END-of-smake-1.2.1/RULES/rules.htm
echo x - smake-1.2.1/RULES/os-cygwin_nt-5.2.id
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin_nt-5.2.id << 'END-of-smake-1.2.1/RULES/os-cygwin_nt-5.2.id'
X#ident "@(#)os-cygwin_nt-5.2.id	1.4 07/05/29 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-5.2 (Server 2003)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0502
END-of-smake-1.2.1/RULES/os-cygwin_nt-5.2.id
echo x - smake-1.2.1/RULES/x86-interix-cl.rul
sed 's/^X//' >smake-1.2.1/RULES/x86-interix-cl.rul << 'END-of-smake-1.2.1/RULES/x86-interix-cl.rul'
X#ident "@(#)x86-interix-cl.rul	1.5 09/05/21 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT using MSVC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
X_PLATFORM=	interix
Xinclude $(SRCROOT)/$(RULESDIR)/cc-msc.rul
X
X#
X#		Supress useless cl warnings like:
X#		warning C4996: 'strerror' wurde als veraltet deklariert
X#		Consider using strerror_s instead.
X#
XOSDEFS +=	-D_CRT_SECURE_NO_DEPRECATE
X
X#
X#		Supress useless cl warnings like:
X#		warning C4996: 'fdopen' wurde als veraltet deklariert
X#		The POSIX name for this item is deprecated. Instead, use
X#		the ISO C++ conformant name: _fdopen.
X#
XOSDEFS +=	-D_CRT_NONSTDC_NO_DEPRECATE
X
XKDEFINES=
X
XLIB_SOCKET=	Ws2_32.lib
XLIB_MATH=	
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
X
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc-interix.sh
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc-interix.sh
XMKC++DEP_OUT=
X
END-of-smake-1.2.1/RULES/x86-interix-cl.rul
echo x - smake-1.2.1/RULES/cc-msposix.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-msposix.rul << 'END-of-smake-1.2.1/RULES/cc-msposix.rul'
X#ident "@(#)cc-msposix.rul	1.18 07/05/08 "
X###########################################################################
X# Written 2006-2007 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for INTERIX using MSVC in POSIX c89 mode
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(MSCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(MSC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		
XCOPTOPT=	-O2
XCOPTDYN=
X#COPTGPROF=	-pg
X#
X# /EHs C++-EH aktivieren (ohne SEH-Ausnahmen)
X# /EHa C++-EH aktivieren (mit SEH-Ausnahmen)
X# /EHc nothrow als Standard fr externes "C"
X# MS seems to need -EHsc in order to create useful code with exceptions
X#
XC++OPTS=	-EHsc
XC++WOPTS=	-W3
XC++OPTOPT=	-O2
XC++OPTDYN=
X#C++OPTGPROF=	-pg
X
X
XLIB_PREFIX=
XLIB_SUFFIX=	.lib
XSHL_SUFFIX=	.dll
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS:-l%=%.lib) $(LIBX:-l%=%.lib)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLDOPTDYN=	-dll -def:$(TARGETLIB).def
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC_COM)
X#OUTPUT_OPTION=	-Fo$(O:%=%/)$@
X#LD_OUTPUT_OPTION= -Fe$@
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM) -nologo
XDYNLD.o=	$(DYNLD) `$(LORDER) $(POFILES) | $(TSORT)` $(LDFLAGS) -out:$@ $(LDLIBS)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
XAR=		@echo "	==> ARCHIVING  \"$@\""; lib.exe -nologo
XARFLAGS=
XAR.o=		$(AR) $(ARFLAGS) -out:$@
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc.sh
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc.sh
XMKC++DEP_OUT=
X
XVC=7
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from Defaults.*
X# in order to be able to test for the existence of "/bin/cc" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
END-of-smake-1.2.1/RULES/cc-msposix.rul
echo x - smake-1.2.1/RULES/x86-interix-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/x86-interix-cc.rul << 'END-of-smake-1.2.1/RULES/x86-interix-cc.rul'
X#ident @(#)x86-interix-cc.rul	1.1 07/05/08 
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT using MSVC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
X_PLATFORM=	interix
Xinclude $(SRCROOT)/$(RULESDIR)/cc-msposix.rul
X
X#
X#		Supress useless cl warnings like:
X#		warning C4996: 'strerror' wurde als veraltet deklariert
X#		Consider using strerror_s instead.
X#
X#OSDEFS +=	-D_CRT_SECURE_NO_DEPRECATE
X
XKDEFINES=
X
X#LIB_SOCKET=	Ws2_32.lib
XLIB_MATH=	
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
X
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc-interix.sh
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc-interix.sh
XMKC++DEP_OUT=
X
END-of-smake-1.2.1/RULES/x86-interix-cc.rul
echo x - smake-1.2.1/RULES/rules.csw
sed 's/^X//' >smake-1.2.1/RULES/rules.csw << 'END-of-smake-1.2.1/RULES/rules.csw'
X#ident "@(#)rules.csw	1.4 09/05/14 "
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X#
X# Rules for creating Blastwave SVr4 packages
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XPKG	:sh=	sed -n 's/^PKG=//p' pkginfo
X#VERSION	:sh=	sed -n 's/^VERSION=//p' pkginfo
XVERSION	:sh=	sed -n 's/^VERSION=\([^,]*\).*/\1/p' pkginfo
XNAME	:sh=	sed -n 's/^NAME=//p' pkginfo|awk '{print $1}'
XOS_NAME :sh=	uname -s
XDATE	:sh=	date '+REV=%Y.%m.%d'
X
XVENDOR=		-CSW
XPROTOTYPE=	prototype
X
X$(SRCROOT)/packages/$(OARCH):
X		$(MKDIR) -p $@
X
Xall: $(SRCROOT)/packages/$(OARCH)
X	if [ .$(PKG_RELOC) = .no ]; then		\
X		pkgmk -o -r `pwd`/$(SRCROOT)/$(PROTODIR) -d $(SRCROOT)/packages/$(OARCH) -a $(P_ARCH) \
X						-v $(VERSION),$(DATE) -f $(PROTOTYPE)_r		\
X						$(EMAIL:%=EMAIL=%) $(HOTLINE:%=HOTLINE=%);	\
X	else					\
X		pkgmk -o -b `pwd`/$(SRCROOT)/$(PROTODIR)/$(INSBASE) -d $(SRCROOT)/packages/$(OARCH) -a $(P_ARCH) \
X						-v $(VERSION),$(DATE) -f $(PROTOTYPE) BASEDIR=$(INSBASE)	\
X						$(EMAIL:%=EMAIL=%) $(HOTLINE:%=HOTLINE=%);	\
X	fi
X	pkgtrans -s $(SRCROOT)/packages/$(OARCH) $(NAME)-$(VERSION),$(DATE)-$(OS_NAME)$(OSREL)-$(P_ARCH)$(VENDOR).pkg $(PKG)
X	gzip -9f $(SRCROOT)/packages/$(OARCH)/$(NAME)-$(VERSION),$(DATE)-$(OS_NAME)$(OSREL)-$(P_ARCH)$(VENDOR).pkg
END-of-smake-1.2.1/RULES/rules.csw
echo x - smake-1.2.1/RULES/os-interix-nt-4.0.id
sed 's/^X//' >smake-1.2.1/RULES/os-interix-nt-4.0.id << 'END-of-smake-1.2.1/RULES/os-interix-nt-4.0.id'
X#ident "@(#)os-interix-nt-4.0.id	1.3 07/05/29 "
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Interix Systems (SFU) MS Windows NT-4.0 (NT-4.0)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XWINNTDEFS +=	-D_WIN32_WINNT=0x0400
END-of-smake-1.2.1/RULES/os-interix-nt-4.0.id
echo x - smake-1.2.1/RULES/os-interix-nt-5.0.id
sed 's/^X//' >smake-1.2.1/RULES/os-interix-nt-5.0.id << 'END-of-smake-1.2.1/RULES/os-interix-nt-5.0.id'
X#ident "@(#)os-interix-nt-5.0.id	1.3 07/05/29 "
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Interix Systems (SFU) MS Windows NT-5.0 (WIN2000)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XWINNTDEFS +=	-D_WIN32_WINNT=0x0500
END-of-smake-1.2.1/RULES/os-interix-nt-5.0.id
echo x - smake-1.2.1/RULES/os-interix-nt-5.1.id
sed 's/^X//' >smake-1.2.1/RULES/os-interix-nt-5.1.id << 'END-of-smake-1.2.1/RULES/os-interix-nt-5.1.id'
X#ident "@(#)os-interix-nt-5.1.id	1.3 07/05/29 "
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Interix Systems (SFU) MS Windows NT-5.1 (XP)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XWINNTDEFS +=	-D_WIN32_WINNT=0x0501
END-of-smake-1.2.1/RULES/os-interix-nt-5.1.id
echo x - smake-1.2.1/RULES/os-interix-nt-5.2.id
sed 's/^X//' >smake-1.2.1/RULES/os-interix-nt-5.2.id << 'END-of-smake-1.2.1/RULES/os-interix-nt-5.2.id'
X#ident "@(#)os-interix-nt-5.2.id	1.3 07/05/29 "
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Interix Systems (SFU) MS Windows NT-5.2 (Server 2003)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XWINNTDEFS +=	-D_WIN32_WINNT=0x0502
END-of-smake-1.2.1/RULES/os-interix-nt-5.2.id
echo x - smake-1.2.1/RULES/i586-linux-suncc.rul
sed 's/^X//' >smake-1.2.1/RULES/i586-linux-suncc.rul << 'END-of-smake-1.2.1/RULES/i586-linux-suncc.rul'
X#ident "@(#)i586-linux-suncc.rul	1.3 08/11/15 "
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Linux using Sun Studio
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul
XCC_COM=		suncc
X
X#
X# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux
X#
XINCDIRSX +=	$(LINUX_SRC_INCLUDE)
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
X#
X# Uncomment the next line in case you are on an old Linux version that
X# does not support the -R linker flag.
X#
X#LDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLDOPTDYN=	-dy -G -Wl,-shared -Wl,-soname,$(TARGET)
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i586-linux-suncc.rul
echo x - smake-1.2.1/RULES/rules.pkg
sed 's/^X//' >smake-1.2.1/RULES/rules.pkg << 'END-of-smake-1.2.1/RULES/rules.pkg'
X#ident "@(#)rules.pkg	1.5 08/12/27 "
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X#
X# Rules for creating binary tar packages
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X###########################################################################
X# If we are included before rules.dir, this will stop to propagate
X# the targets "pkg1" & "pkg" to sub makes but handle packaging at this
X# directory bundling level.
X###########################################################################
XPKGTARGETS=
X
XPROTODIR=	proto/$(OARCH)
X$(PROTODIR):
X		$(MKDIR) -p $@
X
X_TARGETAR=	$(TARGET_AR:%=$(OTARSDIR)/%)
X__TARGETAR=	$(_UNIQ)$(_TARGETAR)
X___TARGETAR=	$(__TARGETAR:$(_UNIQ)=$(PROTODIR))
XTARGETAR=	$(___TARGETAR:$(_UNIQ)%=%)
X
X_MCS_PROJECT=	$(_UNIQ)$(PROJECTNAME)
X__MCS_PROJECT=	$(_MCS_PROJECT:$(_UNIQ)=SPS-Generic)
XMCS_PROJECTNAME= $(__MCS_PROJECT:$(_UNIQ)%=%)
X
Xta:
X	echo "'$(TARGETAR)'"
X	echo "'$(TARGETAR).tar'"
X
Xpkg: $(PROTODIR) pkg1 package
X
Xpkg1:
X	rm -rf $(PROTODIR)
X	mkdir -p $(PROTODIR) $(PROTODIR)/$(INSBASE)/bin $(PROTODIR)/$(INSBASE)/sbin $(PROTODIR)/$(INSBASE)/etc \
X		$(PROTODIR)/$(INSBASE)/lib $(PROTODIR)/$(INSBASE)/share/man
X	ln -s share/man $(PROTODIR)/$(INSBASE)/man
X	if [ ."$(PRE_INST_CMDS)" != . ]; then cd $(PROTODIR) && eval "$(PRE_INST_CMDS)" ; fi
X	$(MAKE) $(MAKE_FILE) DESTDIR=`pwd`/$(PROTODIR) install
X	if [ ."$(POST_INST_CMDS)" != . ]; then cd $(PROTODIR) && eval "$(POST_INST_CMDS)" ; fi
X	-if [ ."$(STRIPLIST)" != . ];  then chmod u+w $(STRIPLIST:%=$(PROTODIR)/%); strip $(STRIPLIST:%=$(PROTODIR)/%); fi
X	-if [ ."$(STRIPXLIST)" != . ]; then chmod u+w $(STRIPXLIST:%=$(PROTODIR)/%); strip -x $(STRIPXLIST:%=$(PROTODIR)/%); fi
X	-if [ ."$(MCSLIST)" != . ];    then chmod u+w $(MCSLIST:%=$(PROTODIR)/%); mcs -d -a "$(MCS_PROJECTNAME)" $(MCSLIST:%=$(PROTODIR)/%); fi
X	if [ ."$(POST_STRIP_CMDS)" != . ]; then cd $(PROTODIR) && eval "$(POST_STRIP_CMDS)" ; fi
X	##find $(PROTODIR) -print | sort > /tmp/so.$$; diff filelist /tmp/so.$$; rm -f /tmp/so.$$
X	#echo 'i pkginfo'	>  SV-pkglist
X	#echo 'i depend'		>> SV-pkglist
X	#echo 'i copyright'	>> SV-pkglist
X
X	#cd $(PROTODIR); find . -print | sort | pkgproto | sed 's/joerg bs/root bin/' >> ../../SV-pkglist
X
X_PKGDEF_DIR=	$(_UNIQ)$(PKGTYPE)
X__PKGDEF_DIR=	$(_PKGDEF_DIR:$(_UNIQ)=default)
XPKGDEF_DIR=	$(__PKGDEF_DIR:$(_UNIQ)%=%)
X
Xpackage:
X	echo PKGDEF_DIR $(PKGDEF_DIR)
X	echo DIRNAME: $(DIRNAME) CURDIR: $(CURDIR)
X	#pkgmk -o -b `pwd`/$(PROTODIR)/ -d `pwd`/PKGS -f SV-pkglist
X	#star -C $(PROTODIR)/ pkglist=pkglist -cP > $(TARGETAR).tar
X	#bzip2 -9f $(TARGETAR).tar
X	#rm -rf $(PROTODIR)
X
X	@list="";								\
X	if [ -d $(SRCROOT)/pkgdefs/$(PKGDEF_DIR) ]; then			\
X		list=`echo $(SRCROOT)/pkgdefs/$(PKGDEF_DIR)/*` ;		\
X	fi;									\
X	for DIR in $${list} ;							\
X	do									\
X		(								\
X		echo "	==> MAKING \"$@\" ON SUBDIRECTORY \"$(CURDIR)/$$DIR\"";\
X		if [ -d ./$$DIR -a -r ./$$DIR/Makefile ] ; then			\
X			cd ./$$DIR && "$(MAKE)" $(MAKEMACS) XARCH=$(XARCH) DIRNAME=$(CURDIR)/$$DIR all;		\
X		else								\
X			echo "NOTICE: Partial source ($(CURDIR)/$$DIR) missing";\
X		fi								\
X		);								\
X	done
END-of-smake-1.2.1/RULES/rules.pkg
echo x - smake-1.2.1/RULES/i586-linux-suncc64.rul
sed 's/^X//' >smake-1.2.1/RULES/i586-linux-suncc64.rul << 'END-of-smake-1.2.1/RULES/i586-linux-suncc64.rul'
X#ident "@(#)i586-linux-suncc64.rul	1.4 08/11/15 "
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Linux using Sun Studio
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sunpro64.rul
XCC_COM=		suncc
X
X#
X# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux
X#
XINCDIRSX +=	$(LINUX_SRC_INCLUDE)
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
X#
X# Uncomment the next line in case you are on an old Linux version that
X# does not support the -R linker flag.
X#
X#LDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLDOPTDYN=	-dy -G -Wl,-shared -Wl,-soname,$(TARGET)
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i586-linux-suncc64.rul
echo x - smake-1.2.1/RULES/atarist-freemint-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/atarist-freemint-gcc.rul << 'END-of-smake-1.2.1/RULES/atarist-freemint-gcc.rul'
X#ident @(#)atarist-freemint-gcc.rul	1.4 08/11/14 
X###########################################################################
X# Written 2008 by Y. Doyeux
X###########################################################################
X#
X# Platform dependent MACROS for FreeMiNT on ATARI computers
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-DNO_USER_XCVT
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
X#SHL_SUFFIX=	.so.1.0
XSHL_SUFFIX=
X
XLIB_SOCKET=	-lsocket
XLIB_MATH=	-lm
XLIB_KVM=	
X
X_STACKSIZE=	$(_UNIQ)$(STACKSIZE)
X__STACKSIZE=	$(_STACKSIZE:$(_UNIQ)=0x10000)			# Default stack size 64kB
XSTACK_SIZE=	$(__STACKSIZE:$(_UNIQ)%=%)
X
XLDLIBS=		$(LIBS) $(LIBX) && stack -S $(STACK_SIZE) $@	# Hack to set stack size
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLDOPTDYN=
XLNDYNLIB=
X
X#
X# ranlib does not work and is not needed
X#
X#RANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
XLORDER=		echo
END-of-smake-1.2.1/RULES/atarist-freemint-gcc.rul
echo x - smake-1.2.1/RULES/os-freemint.def
sed 's/^X//' >smake-1.2.1/RULES/os-freemint.def << 'END-of-smake-1.2.1/RULES/os-freemint.def'
X#ident @(#)os-freemint.def	1.1 08/11/08 
X###########################################################################
X# Written 2008 by Y. Doyeux
X###########################################################################
X#
X# Global os definitions for FreeMiNT on ATARI computers
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-freemint.def
echo x - smake-1.2.1/RULES/os-freemint.id
sed 's/^X//' >smake-1.2.1/RULES/os-freemint.id << 'END-of-smake-1.2.1/RULES/os-freemint.id'
X#ident @(#)os-freemint.id	1.1 08/11/08 
X###########################################################################
X# Written 2008 by Y. Doyeux
X###########################################################################
X#
X# OS specific MACRO definitions for FreeMiNT on ATARI computers
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=	freemint
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-freemint.id
echo x - smake-1.2.1/RULES/i586-syllable-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/i586-syllable-cc.rul << 'END-of-smake-1.2.1/RULES/i586-syllable-cc.rul'
X#ident "@(#)i586-syllable-cc.rul	1.3 09/02/02 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Syllable
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
X#
X# Uncomment the next line in case you are on an old Linker version that
X# does not support the -R linker flag.
X#
X#LDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
X#
X# The current developement system has these files in /bin
X#
X#LN=		/usr/indexes/bin/ln
X#SYMLINK=	/usr/indexes/bin/ln -s
X#RM=		/usr/indexes/bin/rm
X#MV=		/usr/indexes/bin/mv
END-of-smake-1.2.1/RULES/i586-syllable-cc.rul
echo x - smake-1.2.1/RULES/i586-syllable-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/i586-syllable-gcc.rul << 'END-of-smake-1.2.1/RULES/i586-syllable-gcc.rul'
X#ident "@(#)i586-syllable-gcc.rul	1.3 09/02/02 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Syllable
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
X#
X# Uncomment the next line in case you are on an old Linker version that
X# does not support the -R linker flag.
X#
X#LDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
X#
X# The current developement system has these files in /bin
X#
X#LN=		/usr/indexes/bin/ln
X#SYMLINK=	/usr/indexes/bin/ln -s
X#RM=		/usr/indexes/bin/rm
X#MV=		/usr/indexes/bin/mv
END-of-smake-1.2.1/RULES/i586-syllable-gcc.rul
echo x - smake-1.2.1/RULES/os-haiku.id
sed 's/^X//' >smake-1.2.1/RULES/os-haiku.id << 'END-of-smake-1.2.1/RULES/os-haiku.id'
X#ident "@(#)os-haiku.id	1.1 09/02/03 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Haiku, a BeOS like OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		haiku
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-haiku.id
echo x - smake-1.2.1/RULES/os-syllable.def
sed 's/^X//' >smake-1.2.1/RULES/os-syllable.def << 'END-of-smake-1.2.1/RULES/os-syllable.def'
X#ident "@(#)os-syllable.def	1.1 09/02/01 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Syllable
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-syllable.def
echo x - smake-1.2.1/RULES/os-syllable.id
sed 's/^X//' >smake-1.2.1/RULES/os-syllable.id << 'END-of-smake-1.2.1/RULES/os-syllable.id'
X#ident "@(#)os-syllable.id	1.1 09/02/01 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Syllable
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		syllable
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-syllable.id
echo x - smake-1.2.1/RULES/bepc-haiku-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/bepc-haiku-cc.rul << 'END-of-smake-1.2.1/RULES/bepc-haiku-cc.rul'
X#ident "@(#)bepc-haiku-cc.rul	1.3 09/02/05 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Haiku, a BeOS like OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X#
X# XXX Old BeOS needs libroot.so to get [efg]cvt()
X# XXX New BeOS seems to have this in libc and in addition we include
X# XXX strtod.c for floating point conversion on OS without such code.
X# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been
X# XXX removed and printing floating numbers will work with old/new BeOS
X#
X#OSDEFS +=	-DNO_FLOATINGPOINT -DUSE_FLOATINGARGS
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#CONFFLAGS=	i586
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so
X
X#LIB_SOCKET=	-lsocket -lbind
XLIB_SOCKET=	-lnetwork
XLIB_MATH=
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XLN=             /bin/ln -s
END-of-smake-1.2.1/RULES/bepc-haiku-cc.rul
echo x - smake-1.2.1/RULES/bepc-haiku-gcc.rul
sed 's/^X//' >smake-1.2.1/RULES/bepc-haiku-gcc.rul << 'END-of-smake-1.2.1/RULES/bepc-haiku-gcc.rul'
X#ident "@(#)bepc-haiku-gcc.rul	1.3 09/02/05 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Haiku, a BeOS like OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X#
X# XXX Old BeOS needs libroot.so to get [efg]cvt()
X# XXX New BeOS seems to have this in libc and in addition we include
X# XXX strtod.c for floating point conversion on OS without such code.
X# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been
X# XXX removed and printing floating numbers will work with old/new BeOS
X#
X#OSDEFS +=	-DNO_FLOATINGPOINT -DUSE_FLOATINGARGS
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#CONFFLAGS=	i586
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so
X
X#LIB_SOCKET=	-lsocket -lbind
XLIB_SOCKET=	-lnetwork
XLIB_MATH=
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XLN=             /bin/ln -s
END-of-smake-1.2.1/RULES/bepc-haiku-gcc.rul
echo x - smake-1.2.1/RULES/os-haiku.def
sed 's/^X//' >smake-1.2.1/RULES/os-haiku.def << 'END-of-smake-1.2.1/RULES/os-haiku.def'
X#ident "@(#)os-haiku.def	1.1 09/02/03 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Haiku, a BeOS like OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-haiku.def
echo x - smake-1.2.1/RULES/cc-msc64.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-msc64.rul << 'END-of-smake-1.2.1/RULES/cc-msc64.rul'
X#ident "@(#)cc-msc64.rul	1.18 09/05/17 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT using MSVC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xinclude $(SRCROOT)/$(RULESDIR)/cc-msc.rul
X
XMSCOPT64=	-machine:X64
X
XVC=7_64
END-of-smake-1.2.1/RULES/cc-msc64.rul
echo x - smake-1.2.1/RULES/os-cygwin_nt-6.0.id
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin_nt-6.0.id << 'END-of-smake-1.2.1/RULES/os-cygwin_nt-6.0.id'
X#ident "@(#)os-cygwin_nt-6.0.id	1.5 09/04/08 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.0 (Win Vista)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0600
END-of-smake-1.2.1/RULES/os-cygwin_nt-6.0.id
echo x - smake-1.2.1/RULES/os-cygwin_nt-6.1.id
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin_nt-6.1.id << 'END-of-smake-1.2.1/RULES/os-cygwin_nt-6.1.id'
X#ident "@(#)os-cygwin_nt-6.1.id	1.5 09/04/08 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.1 (Win 7)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0601
END-of-smake-1.2.1/RULES/os-cygwin_nt-6.1.id
echo x - smake-1.2.1/RULES/os-cygwin32_wow64.def
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin32_wow64.def << 'END-of-smake-1.2.1/RULES/os-cygwin32_wow64.def'
X#ident "@(#)os-cygwin32_wow64.def	1.3 09/04/11 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for CYGWIN32_WOW64
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
X
END-of-smake-1.2.1/RULES/os-cygwin32_wow64.def
echo x - smake-1.2.1/RULES/os-cygwin32_wow64.id
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin32_wow64.id << 'END-of-smake-1.2.1/RULES/os-cygwin32_wow64.id'
X#ident "@(#)os-cygwin32_wow64.id	1.6 09/04/11 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		cygwin32_wow64
X-O_ARCH=	-$(O_ARCH)
X
X#WINNTDEFS +=	-D_WIN32_WINNT=0x0400
END-of-smake-1.2.1/RULES/os-cygwin32_wow64.id
echo x - smake-1.2.1/RULES/os-cygwin_nt-5.2-wow64.id
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin_nt-5.2-wow64.id << 'END-of-smake-1.2.1/RULES/os-cygwin_nt-5.2-wow64.id'
X#ident "@(#)os-cygwin_nt-5.2-wow64.id	1.5 09/04/11 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-5.2 (Server 2003)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow64.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0502
END-of-smake-1.2.1/RULES/os-cygwin_nt-5.2-wow64.id
echo x - smake-1.2.1/RULES/i686-cygwin32_wow64-cl64.rul
sed 's/^X//' >smake-1.2.1/RULES/i686-cygwin32_wow64-cl64.rul << 'END-of-smake-1.2.1/RULES/i686-cygwin32_wow64-cl64.rul'
X#ident "@(#)i686-cygwin32_wow64-cl64.rul	1.8 09/05/17 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_WOW64 using MSVC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
X_PLATFORM=	cygwin
Xinclude $(SRCROOT)/$(RULESDIR)/cc-msc64.rul
X
X#
X#		Supress useless cl warnings like:
X#		warning C4996: 'strerror' wurde als veraltet deklariert
X#		Consider using strerror_s instead.
X#
XOSDEFS +=	-D_CRT_SECURE_NO_DEPRECATE
X
XKDEFINES=
X
XLIB_SOCKET=	Ws2_32.lib
XLIB_MATH=	
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i686-cygwin32_wow64-cl64.rul
echo x - smake-1.2.1/RULES/power-macintosh-darwin-cc64.rul
sed 's/^X//' >smake-1.2.1/RULES/power-macintosh-darwin-cc64.rul << 'END-of-smake-1.2.1/RULES/power-macintosh-darwin-cc64.rul'
X#ident "@(#)power-macintosh-darwin-cc64.rul	1.3 09/07/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Darwin-1.2 ff. (Apple MacOS X) PPC (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XCOPTDYN=	-fPIC
XC++OPTDYN=	-fPIC
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dylib
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation
XLDOPTDYN=	-install_name $(INSBASE)/lib/$(TARGET)
XLDLIBDYN=	-lgcc
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
X#
X# lorder seems not to work on some versions because Apple installed
X# a broken /bin/sh that is not POSIX cimpliant an will not
X# be able to run the /usr/bin/lorder script. The error messages are:
X#	type: not found
X#	type: not found
X#	lorder: nm: not found
X# ... disable it
X#
XLORDER=		echo
XTSORT=		cat
X
X####
X# XXX Better use something like CC=cc
X####
XCC=		@echo "	==> COMPILING \"$@\""; cc -m64
XLDCC=		@echo "	==> LINKING \"$@\""; cc -m64
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -m64 -M
END-of-smake-1.2.1/RULES/power-macintosh-darwin-cc64.rul
echo x - smake-1.2.1/RULES/power-macintosh-darwin-gcc64.rul
sed 's/^X//' >smake-1.2.1/RULES/power-macintosh-darwin-gcc64.rul << 'END-of-smake-1.2.1/RULES/power-macintosh-darwin-gcc64.rul'
X#ident "@(#)power-macintosh-darwin-gcc64.rul	1.3 09/07/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Darwin-1.2 ff. (Apple MacOS X) PPC (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XCOPTDYN=	-fPIC
XC++OPTDYN=	-fPIC
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dylib
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation
XLDOPTDYN=	-install_name $(INSBASE)/lib/$(TARGET)
XLDLIBDYN=	-lgcc
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
X#
X# lorder seems not to work on some versions because Apple installed
X# a broken /bin/sh that is not POSIX cimpliant an will not
X# be able to run the /usr/bin/lorder script. The error messages are:
X#	type: not found
X#	type: not found
X#	lorder: nm: not found
X# ... disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/power-macintosh-darwin-gcc64.rul
echo x - smake-1.2.1/RULES/os-cygwin_nt-6.0-wow64.id
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin_nt-6.0-wow64.id << 'END-of-smake-1.2.1/RULES/os-cygwin_nt-6.0-wow64.id'
X#ident "@(#)os-cygwin_nt-6.0-wow64.id	1.1 09/07/26 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.0 (Vista)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow64.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0600
END-of-smake-1.2.1/RULES/os-cygwin_nt-6.0-wow64.id
echo x - smake-1.2.1/RULES/os-cygwin_nt-6.1-wow64.id
sed 's/^X//' >smake-1.2.1/RULES/os-cygwin_nt-6.1-wow64.id << 'END-of-smake-1.2.1/RULES/os-cygwin_nt-6.1-wow64.id'
X#ident "@(#)os-cygwin_nt-6.1-wow64.id	1.1 09/07/26 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.1 (Win 7)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow64.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0601
END-of-smake-1.2.1/RULES/os-cygwin_nt-6.1-wow64.id
echo x - smake-1.2.1/RULES/i486-cygwin32_nt-cc64.rul
sed 's/^X//' >smake-1.2.1/RULES/i486-cygwin32_nt-cc64.rul << 'END-of-smake-1.2.1/RULES/i486-cygwin32_nt-cc64.rul'
X#ident "@(#)i486-cygwin32_nt-cc64.rul	1.1 09/07/27 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul
X
XOSDEFS +=	-mwin32
X
XKDEFINES=
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dll
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLDOPTDYN=
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLNDYNLIB=
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i486-cygwin32_nt-cc64.rul
echo x - smake-1.2.1/RULES/rules.nul
sed 's/^X//' >smake-1.2.1/RULES/rules.nul << 'END-of-smake-1.2.1/RULES/rules.nul'
X#ident "@(#)rules.nul	1.1 09/08/12 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# NUL dummy rule
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
END-of-smake-1.2.1/RULES/rules.nul
echo x - smake-1.2.1/RULES/i486-cygwin32_nt-gcc64.rul
sed 's/^X//' >smake-1.2.1/RULES/i486-cygwin32_nt-gcc64.rul << 'END-of-smake-1.2.1/RULES/i486-cygwin32_nt-gcc64.rul'
X#ident "@(#)i486-cygwin32_nt-gcc64.rul	1.1 09/07/27 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul
X
XOSDEFS +=	-mwin32
X
XKDEFINES=
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dll
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLDOPTDYN=
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLNDYNLIB=
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/i486-cygwin32_nt-gcc64.rul
echo x - smake-1.2.1/RULES/rules.env
sed 's/^X//' >smake-1.2.1/RULES/rules.env << 'END-of-smake-1.2.1/RULES/rules.env'
X#ident "@(#)rules.env	1.2 09/08/15 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# Rules for setting the locale environment to the default "C"
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X#
X# acgeneral.m4 claims that SCO Unix may have problems with setting LANG=C
X# so we are careful not to set LANG unless it was already set by someone else
X#
X###########################################################################
X
X_LANG=		$(_UNIQ)$(LANG)
X__LANG=		$(_LANG:$(_UNIQ)=NO_LANG)
X___LANG=	$(__LANG:$(_UNIQ)%=LANG)
X
X$(___LANG)=C
XLC_ALL=C
XLC_COLLATE=C
XLC_CTYPE=C
XLC_MESSAGES=C
XLC_MONETARY=C
XLC_NUMERIC=C
XLC_TIME=C
X
Xexport $(___LANG)
Xexport LC_ALL
Xexport LC_COLLATE
Xexport LC_CTYPE
Xexport LC_MESSAGES
Xexport LC_MONETARY
Xexport LC_NUMERIC
Xexport LC_TIME
END-of-smake-1.2.1/RULES/rules.env
echo x - smake-1.2.1/RULES/9000-725-hp-ux-cc64.rul
sed 's/^X//' >smake-1.2.1/RULES/9000-725-hp-ux-cc64.rul << 'END-of-smake-1.2.1/RULES/9000-725-hp-ux-cc64.rul'
X#ident "@(#)9000-725-hp-ux-cc64.rul	1.14 09/10/10 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for HP/UX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-hp64.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/9000-725-hp-ux-cc64.rul
echo x - smake-1.2.1/RULES/cc-hp64.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-hp64.rul << 'END-of-smake-1.2.1/RULES/cc-hp64.rul'
X#ident "@(#)cc-hp64.rul	1.9 09/10/12 "
X###########################################################################
X# Written 1996-2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for HP/UC cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(HPCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(HPC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X#
X# -Ae	      -> ANSI C (non-bundled C only - bundled C ignores -Ae)
X# +DAportable -> Create Parisc-1.1 code
X#
XHP_CC_ANSI_OPT=	-Ae	# May be overwritten later from $(OINCSDIR)/rules.cnf
XHP_CC_OPT_OPT=	-O	# May be overwritten later from $(OINCSDIR)/rules.cnf
XHP_CC_GPROF_OPT= -G	# May be overwritten later from $(OINCSDIR)/rules.cnf
X
XCOPTS=		$(HP_CC_ANSI_OPT) +DD64
X#COPTS=		$(HP_CC_ANSI_OPT) +DAportable +DD64
XCWOPTS=		
XCOPTOPT=	$(HP_CC_OPT_OPT)
XCOPTDYN=	+z
XCOPTGPROF=	$(HP_CC_GPROF_OPT)
XC++OPTS=	+DD64
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.sl
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-Wl,-soname,$(TARGET)
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC=		@echo "	==> COMPILING \"$@\""; cc +DD64
XLDCC=		@echo "	==> LINKING \"$@\""; cc +DD64
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; cc +DD64
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(SRCROOT)/conf/mkdep-hpux.sh
XMKDEP_OUT=
X
X#CC++ =		@echo "	==> COMPILING \"$@\""; CC
X#LDCC++ =	@echo "	==> LINKING \"$@\""; CC
X#DYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
X#MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM
X#MKC++DEP_OUT=
XCC++ =		@echo "	==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1
XLDCC++ =	@echo "	==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-hp64.rul
echo x - smake-1.2.1/RULES/os-openvms.def
sed 's/^X//' >smake-1.2.1/RULES/os-openvms.def << 'END-of-smake-1.2.1/RULES/os-openvms.def'
X#ident "@(#)os-openvms.def	1.1 09/10/29 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# Global definitions for OpenVMS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-smake-1.2.1/RULES/os-openvms.def
echo x - smake-1.2.1/RULES/os-openvms.id
sed 's/^X//' >smake-1.2.1/RULES/os-openvms.id << 'END-of-smake-1.2.1/RULES/os-openvms.id'
X#ident "@(#)os-openvms.id	1.1 09/10/29 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for OpenVMS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		openvms
X-O_ARCH=	-$(O_ARCH)
END-of-smake-1.2.1/RULES/os-openvms.id
echo x - smake-1.2.1/RULES/cc-openvms.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-openvms.rul << 'END-of-smake-1.2.1/RULES/cc-openvms.rul'
X#ident "@(#)cc-openvms.rul	1.3 09/11/05 "
X###########################################################################
X# Written 1998-2009 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for GNV OpenVMS cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(DECCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(DECC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		-verbose
XCOPTOPT=	-O
XCOPTDYN=	-fpic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	
XLIB_SUFFIX=	.olb
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR) -L/usr/ccs/lib
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; cc
X
XRMDEP=		:
X# cc -M t.c creates a file t.mms wich t.obj : /EISNER$DRA3/decuserve_user/schilling/t.c lines
X#MKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "Cannot yet do -M with OpenVMS cc"; :
XMKDEP_OUT=
X
X#CC++ =		@echo "	==> COMPILING \"$@\""; CC
X#LDCC++ =	@echo "	==> LINKING \"$@\""; CC
X#DYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
X#MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM
X#MKC++DEP_OUT=
XCC++ =		@echo "	==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1
XLDCC++ =	@echo "	==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-openvms.rul
echo x - smake-1.2.1/RULES/alpha-openvms-cc.rul
sed 's/^X//' >smake-1.2.1/RULES/alpha-openvms-cc.rul << 'END-of-smake-1.2.1/RULES/alpha-openvms-cc.rul'
X#ident "@(#)alpha-openvms-cc.rul	1.1 09/10/31 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for OpenVMS using GNV
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-openvms.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/alpha-openvms-cc.rul
echo x - smake-1.2.1/RULES/ip22-irix-cc64.rul
sed 's/^X//' >smake-1.2.1/RULES/ip22-irix-cc64.rul << 'END-of-smake-1.2.1/RULES/ip22-irix-cc64.rul'
X#ident "@(#)ip22-irix-cc64.rul	1.10 09/11/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Silicon Graphics IRIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sgi64.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4 $(LARGEFILE_OPT)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XARFLAGS=	crs
X#
X# lorder seems not to work on some machines, disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/ip22-irix-cc64.rul
echo x - smake-1.2.1/RULES/ip22-irix-gcc64.rul
sed 's/^X//' >smake-1.2.1/RULES/ip22-irix-gcc64.rul << 'END-of-smake-1.2.1/RULES/ip22-irix-gcc64.rul'
X#ident "@(#)ip22-irix-gcc64.rul	1.13 09/11/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Silicon Graphics IRIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul
XGCC_OPT64=	-mabi=64
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XARFLAGS=	crs
X#
X# lorder seems not to work on some machines, disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/RULES/ip22-irix-gcc64.rul
echo x - smake-1.2.1/RULES/cc-sgi64.rul
sed 's/^X//' >smake-1.2.1/RULES/cc-sgi64.rul << 'END-of-smake-1.2.1/RULES/cc-sgi64.rul'
X#ident "@(#)cc-sgi64.rul	1.7 09/11/29 "
X###########################################################################
X# Written 1996-2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Silicon Graphics cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SGICOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SGIC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=		-64
XCWOPTS=		-fullwarn
XCOPTOPT=	-O
XCOPTDYN=	-Kpic
XCOPTGPROF=	-p1
XC++OPTS=	-64
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(LARGEFILE_OPT)
X#LDOPTDYN=	-dy -G -ztext -h $(TARGET) -ldl
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC=		@echo "	==> COMPILING \"$@\""; cc -64
XLDCC=		@echo "	==> LINKING \"$@\""; cc -64
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; cc -64
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -64 -M
XMKDEP_OUT=
X
XCC++ =		@echo "	==> COMPILING \"$@\""; CC -64
XLDCC++ =	@echo "	==> LINKING \"$@\""; CC -64
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC -64
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -64 -M
XMKC++DEP_OUT=
END-of-smake-1.2.1/RULES/cc-sgi64.rul
echo c - smake-1.2.1/DEFAULTS
mkdir -p smake-1.2.1/DEFAULTS > /dev/null 2>&1
echo x - smake-1.2.1/DEFAULTS/Defaults.mingw32_nt
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.mingw32_nt << 'END-of-smake-1.2.1/DEFAULTS/Defaults.mingw32_nt'
X#ident "@(#)Defaults.mingw32_nt	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for Win32/Mingw32 systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
XLDPATH=
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.mingw32_nt
echo x - smake-1.2.1/DEFAULTS/Defaults
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults << 'END-of-smake-1.2.1/DEFAULTS/Defaults'
X#ident "%W% %E% %Q%"
X###########################################################################
X#
X# global definitions: include system specific file
X#
X###########################################################################
X
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH)
END-of-smake-1.2.1/DEFAULTS/Defaults
echo x - smake-1.2.1/DEFAULTS/Defaults.aix
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.aix << 'END-of-smake-1.2.1/DEFAULTS/Defaults.aix'
X#ident "@(#)Defaults.aix	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for IBM AIX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.aix
echo x - smake-1.2.1/DEFAULTS/Defaults.dgux
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.dgux << 'END-of-smake-1.2.1/DEFAULTS/Defaults.dgux'
X#ident "@(#)Defaults.dgux	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Data General DGUX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.dgux
echo x - smake-1.2.1/DEFAULTS/Defaults.dgux3
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.dgux3 << 'END-of-smake-1.2.1/DEFAULTS/Defaults.dgux3'
X#ident "@(#)Defaults.dgux3	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Data General DGUX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.dgux3
echo x - smake-1.2.1/DEFAULTS/Defaults.dgux4
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.dgux4 << 'END-of-smake-1.2.1/DEFAULTS/Defaults.dgux4'
X#ident "@(#)Defaults.dgux4	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Data General DGUX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.dgux4
echo x - smake-1.2.1/DEFAULTS/Defaults.freebsd
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.freebsd << 'END-of-smake-1.2.1/DEFAULTS/Defaults.freebsd'
X#ident "@(#)Defaults.freebsd	1.5 08/12/26 "
X###########################################################################
X#
X# global definitions for FreeBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /usr/local/include
XLDPATH=		-L/opt/schily/lib -L/usr/local/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.freebsd
echo x - smake-1.2.1/DEFAULTS/Defaults.hp-ux
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.hp-ux << 'END-of-smake-1.2.1/DEFAULTS/Defaults.hp-ux'
X#ident "@(#)Defaults.hp-ux	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for HP/UX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.hp-ux
echo x - smake-1.2.1/DEFAULTS/Defaults.irix
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.irix << 'END-of-smake-1.2.1/DEFAULTS/Defaults.irix'
X#ident "@(#)Defaults.irix	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Silicon Graphics Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.irix
echo x - smake-1.2.1/DEFAULTS/Defaults.linux
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.linux << 'END-of-smake-1.2.1/DEFAULTS/Defaults.linux'
X#ident "@(#)Defaults.linux	1.7 09/06/04 "
X###########################################################################
X#
X# global definitions for Linux Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
X###########################################################################
X#
X# Unhide POSIX extensions from /usr/include/
X#
X###########################################################################
XOSDEFS +=	-D_GNU_SOURCE
X
X###########################################################################
X#
X# LINUX_SRC_INCLUDE is used in RULES/*-linux-*cc*.rul
X#
X###########################################################################
XLINUX_INCL_PATH=	/usr/src/linux/include
X
X_LINUX_SRC_INCLUDE=	$(_UNIQ)$(MAY_LINUX_SRC_INCLUDE)
X__LINUX_SRC_INCLUDE=	$(_LINUX_SRC_INCLUDE:$(_UNIQ)=$(LINUX_INCL_PATH))
XLINUX_SRC_INCLUDE=      $(__LINUX_SRC_INCLUDE:$(_UNIQ)no%=%)
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.linux
echo x - smake-1.2.1/DEFAULTS/Defaults.sunos4
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.sunos4 << 'END-of-smake-1.2.1/DEFAULTS/Defaults.sunos4'
X#ident "@(#)Defaults.sunos4	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for SunOS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will not work on SunOS
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.sunos4
echo x - smake-1.2.1/DEFAULTS/Defaults.sunos5
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.sunos5 << 'END-of-smake-1.2.1/DEFAULTS/Defaults.sunos5'
X#ident "@(#)Defaults.sunos5	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Solaris Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.sunos5
echo x - smake-1.2.1/DEFAULTS/Defaults.netbsd
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.netbsd << 'END-of-smake-1.2.1/DEFAULTS/Defaults.netbsd'
X#ident "@(#)Defaults.netbsd	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for NetBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.netbsd
echo x - smake-1.2.1/DEFAULTS/Defaults.openbsd
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.openbsd << 'END-of-smake-1.2.1/DEFAULTS/Defaults.openbsd'
X#ident "@(#)Defaults.openbsd	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for OpenBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.openbsd
echo x - smake-1.2.1/DEFAULTS/Defaults.cygwin32_nt
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.cygwin32_nt << 'END-of-smake-1.2.1/DEFAULTS/Defaults.cygwin32_nt'
X#ident "@(#)Defaults.cygwin32_nt	1.5 08/12/26 "
X###########################################################################
X#
X# global definitions for Cygnus GCC for WINNT Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
XLDPATH=
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	root
X
X#
X# This is not the correct place for doing this, 
X# the correct place is RULES/cc-msc.rul.
X# We do it here because otherwise cc-config would not work.
X# This kind of hack may not work for other platforms.
X#
X_PLATFORM=	cygwin
XVC=7
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-msc.rul
X# in order to be able to test for the existence of "cl.exe" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
END-of-smake-1.2.1/DEFAULTS/Defaults.cygwin32_nt
echo x - smake-1.2.1/DEFAULTS/MKLINKS
sed 's/^X//' >smake-1.2.1/DEFAULTS/MKLINKS << 'END-of-smake-1.2.1/DEFAULTS/MKLINKS'
X#!/bin/sh
X#
Xln -s	Defaults.dgux	Defaults.dgux3
Xln -s	Defaults.dgux	Defaults.dgux4
END-of-smake-1.2.1/DEFAULTS/MKLINKS
echo x - smake-1.2.1/DEFAULTS/Defaults.bsd-os
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.bsd-os << 'END-of-smake-1.2.1/DEFAULTS/Defaults.bsd-os'
X#ident "@(#)Defaults.bsd-os	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for BSD/OS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.bsd-os
echo x - smake-1.2.1/DEFAULTS/Defaults.osf1
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.osf1 << 'END-of-smake-1.2.1/DEFAULTS/Defaults.osf1'
X#ident "@(#)Defaults.osf1	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Digital UNIX (OSF1) Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.osf1
echo x - smake-1.2.1/DEFAULTS/Defaults.nextstep
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.nextstep << 'END-of-smake-1.2.1/DEFAULTS/Defaults.nextstep'
X#ident "@(#)Defaults.nextstep	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for NeXT Step Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.nextstep
echo x - smake-1.2.1/DEFAULTS/vc7-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS/vc7-setup << 'END-of-smake-1.2.1/DEFAULTS/vc7-setup'
X# @(#)vc7-setup	1.5 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS/vc7-setup
echo x - smake-1.2.1/DEFAULTS/Defaults.rhapsody
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.rhapsody << 'END-of-smake-1.2.1/DEFAULTS/Defaults.rhapsody'
X#ident "@(#)Defaults.rhapsody	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for NeXT Step (Apple Rhapsody) Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		#-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	wheel
END-of-smake-1.2.1/DEFAULTS/Defaults.rhapsody
echo x - smake-1.2.1/DEFAULTS/Defaults.newsos6
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.newsos6 << 'END-of-smake-1.2.1/DEFAULTS/Defaults.newsos6'
X#ident "@(#)Defaults.newsos6	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Sony NEWS-OS 6.x
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.newsos6
echo x - smake-1.2.1/DEFAULTS/Defaults.beos
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.beos << 'END-of-smake-1.2.1/DEFAULTS/Defaults.beos'
X#ident "@(#)Defaults.beos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for BeOS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.beos
echo x - smake-1.2.1/DEFAULTS/Defaults.os2
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.os2 << 'END-of-smake-1.2.1/DEFAULTS/Defaults.os2'
X#ident "@(#)Defaults.os2	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for OS/2 Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.os2
echo x - smake-1.2.1/DEFAULTS/Defaults.qnx
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.qnx << 'END-of-smake-1.2.1/DEFAULTS/Defaults.qnx'
X#ident "@(#)Defaults.qnx	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for QNX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X# When QNX support started in december 1999, there was only the watcom
X# C-compler (cc). Now, in novemver 2001 we switch to gcc.
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.qnx
echo x - smake-1.2.1/DEFAULTS/Defaults.openserver
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.openserver << 'END-of-smake-1.2.1/DEFAULTS/Defaults.openserver'
X#ident "@(#)Defaults.openserver	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for SCO OpenServer 5 Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		
XRUNPATH=	
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/usr/local
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.openserver
echo x - smake-1.2.1/DEFAULTS/Defaults.unixware
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.unixware << 'END-of-smake-1.2.1/DEFAULTS/Defaults.unixware'
X#ident "@(#)Defaults.unixware	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for SCO UnixWare Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		
XRUNPATH=	
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/usr/local
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.unixware
echo x - smake-1.2.1/DEFAULTS/Defaults.mac-os10
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.mac-os10 << 'END-of-smake-1.2.1/DEFAULTS/Defaults.mac-os10'
X#ident "@(#)Defaults.mac-os10	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for Mac OS X Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		#-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	wheel
END-of-smake-1.2.1/DEFAULTS/Defaults.mac-os10
echo x - smake-1.2.1/DEFAULTS/Defaults.darwin
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.darwin << 'END-of-smake-1.2.1/DEFAULTS/Defaults.darwin'
X#ident "@(#)Defaults.darwin	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for Mac OS X Darwin Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		#-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	wheel
END-of-smake-1.2.1/DEFAULTS/Defaults.darwin
echo x - smake-1.2.1/DEFAULTS/Defaults.domainos
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.domainos << 'END-of-smake-1.2.1/DEFAULTS/Defaults.domainos'
X#ident "@(#)Defaults.domainos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Apollo Domain/OS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=	-W0,-info,0
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.domainos
echo x - smake-1.2.1/DEFAULTS/Defaults.amigaos
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.amigaos << 'END-of-smake-1.2.1/DEFAULTS/Defaults.amigaos'
X#ident "@(#)Defaults.amigaos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for AmigaOS Systems using CC=gcc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.amigaos
echo x - smake-1.2.1/DEFAULTS/Defaults.gnu
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.gnu << 'END-of-smake-1.2.1/DEFAULTS/Defaults.gnu'
X#ident "@(#)Defaults.gnu	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for GNU (hurd) Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /usr/src/linux/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.gnu
echo x - smake-1.2.1/DEFAULTS/Defaults.bsd-os3
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.bsd-os3 << 'END-of-smake-1.2.1/DEFAULTS/Defaults.bsd-os3'
X#ident "@(#)Defaults.bsd-os3	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for BSD/OS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.bsd-os3
echo x - smake-1.2.1/DEFAULTS/Defaults.ms-dos
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.ms-dos << 'END-of-smake-1.2.1/DEFAULTS/Defaults.ms-dos'
X#ident "@(#)Defaults.ms-dos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for  MSDOS/DJGPP v2 Systems using CC=gcc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.ms-dos
echo x - smake-1.2.1/DEFAULTS/Defaults.interix
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.interix << 'END-of-smake-1.2.1/DEFAULTS/Defaults.interix'
X#ident "@(#)Defaults.interix	1.6 09/06/04 "
X###########################################################################
X#
X# global definitions for Interix Systems (WIN-NT with SFU) using CC=gcc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Avoid to have something like "Intel_x86_Family15_Model4_Stepping1"
X# in $(OARCH), we rather use $(K_ARCH) which is e.g. "x86".
X# XXX If this is changed, both files in DEFAULTS/ and DEFAULTS_ENG as
X# XXX well as the file conf/oarch.sh need to be changed.
X#
X###########################################################################
XP_ARCH=		$(K_ARCH)
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	--rpath $(INS_BASE)/lib --rpath /opt/schily/lib --rpath $(OLIBSDIR)
XRUNPATH=	--rpath $(INS_BASE)/lib --rpath /opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
X
X#
X# This is not the correct place for doing this, 
X# the correct place is RULES/cc-ms*.rul.
X# We do it here because otherwise cc-config would not work.
X# This kind of hack may not work for other platforms.
X#
X_PLATFORM=	interix
XVC=7
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-ms*.rul
X# in order to be able to test for the existence of "cl.exe" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
END-of-smake-1.2.1/DEFAULTS/Defaults.interix
echo x - smake-1.2.1/DEFAULTS/dummy-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS/dummy-setup << 'END-of-smake-1.2.1/DEFAULTS/dummy-setup'
END-of-smake-1.2.1/DEFAULTS/dummy-setup
echo x - smake-1.2.1/DEFAULTS/vc6-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS/vc6-setup << 'END-of-smake-1.2.1/DEFAULTS/vc6-setup'
X# @(#)vc6-setup	1.4 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc6-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
XVSCommonDir=C:\Programme\Microsoft Visual Studio\Common
XVSCommonPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common
Xexport	VSCommonDir
X
XMSDevDir=C:\Programme\Microsoft Visual Studio\Common\msdev98
XMSDevPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common/msdev98
Xexport	MSDevDir
X
XMSVCDir=C:\Programme\Microsoft Visual Studio\VC98
XMSVCPath=/cygdrive/c/Programme/Microsoft Visual Studio/VC98
Xexport	MSVCDir
X
XVcOsDir=WIN95
XVcOsDir=WINNT
Xexport	VcOsDir
X
XPATH	:=${MSDevPath}\BIN:${MSVCPath}\BIN:${VSCommonPath}\TOOLS\${VcOsDir}:${VSCommonPath}\TOOLS:${PATH}
Xexport	PATH
X
XINCLUDE	:=${MSVCDir}\ATL\INCLUDE;${MSVCDir}\INCLUDE;${MSVCDir}\\MFC\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB	:=${MSVCDir}\LIB;${MSVCDir}\MFC\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS/vc6-setup
echo x - smake-1.2.1/DEFAULTS/vc6-cygwin-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS/vc6-cygwin-setup << 'END-of-smake-1.2.1/DEFAULTS/vc6-cygwin-setup'
X# @(#)vc6-cygwin-setup	1.4 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc6-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
XVSCommonDir=C:\Programme\Microsoft Visual Studio\Common
XVSCommonPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common
Xexport	VSCommonDir
X
XMSDevDir=C:\Programme\Microsoft Visual Studio\Common\msdev98
XMSDevPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common/msdev98
Xexport	MSDevDir
X
XMSVCDir=C:\Programme\Microsoft Visual Studio\VC98
XMSVCPath=/cygdrive/c/Programme/Microsoft Visual Studio/VC98
Xexport	MSVCDir
X
XVcOsDir=WIN95
XVcOsDir=WINNT
Xexport	VcOsDir
X
XPATH	:=${MSDevPath}\BIN:${MSVCPath}\BIN:${VSCommonPath}\TOOLS\${VcOsDir}:${VSCommonPath}\TOOLS:${PATH}
Xexport	PATH
X
XINCLUDE	:=${MSVCDir}\ATL\INCLUDE;${MSVCDir}\INCLUDE;${MSVCDir}\\MFC\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB	:=${MSVCDir}\LIB;${MSVCDir}\MFC\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS/vc6-cygwin-setup
echo x - smake-1.2.1/DEFAULTS/vc6-interix-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS/vc6-interix-setup << 'END-of-smake-1.2.1/DEFAULTS/vc6-interix-setup'
X# @(#)vc6-interix-setup	1.4 07/04/20 Copyright 2006 J. Schilling
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
XVSCommonDir=C:\Programme\Microsoft Visual Studio\Common
XVSCommonPath=/dev/fs/C/Programme/Microsoft Visual Studio/Common
Xexport	VSCommonDir
X
XMSDevDir=C:\Programme\Microsoft Visual Studio\Common\msdev98
XMSDevPath=/dev/fs/C/Programme/Microsoft Visual Studio/Common/msdev98
Xexport	MSDevDir
X
XMSVCDir=C:\Programme\Microsoft Visual Studio\VC98
XMSVCPath=/dev/fs/C/Programme/Microsoft Visual Studio/VC98
Xexport	MSVCDir
X
XVcOsDir=WIN95
XVcOsDir=WINNT
Xexport	VcOsDir
X
XPATH	:=${MSDevPath}\BIN:${MSVCPath}\BIN:${VSCommonPath}\TOOLS\${VcOsDir}:${VSCommonPath}\TOOLS:${PATH}
Xexport	PATH
X
XINCLUDE	:=${MSVCDir}\ATL\INCLUDE;${MSVCDir}\INCLUDE;${MSVCDir}\\MFC\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB	:=${MSVCDir}\LIB;${MSVCDir}\MFC\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS/vc6-interix-setup
echo x - smake-1.2.1/DEFAULTS/vc9-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS/vc9-setup << 'END-of-smake-1.2.1/DEFAULTS/vc9-setup'
X# @(#)vc7-setup	1.5 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc9-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 9.0
XVSINS=/cygdrive/c/Programme/Microsoft Visual Studio 9.0
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files(x86)\Microsoft Visual Studio 9.0
XVSINS=/cygdrive/c/Program Files(x86)/Microsoft Visual Studio 9.0
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\lib;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS/vc9-setup
echo x - smake-1.2.1/DEFAULTS/vc7-cygwin-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS/vc7-cygwin-setup << 'END-of-smake-1.2.1/DEFAULTS/vc7-cygwin-setup'
X# @(#)vc7-cygwin-setup	1.5 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS/vc7-cygwin-setup
echo x - smake-1.2.1/DEFAULTS/vc7-interix-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS/vc7-interix-setup << 'END-of-smake-1.2.1/DEFAULTS/vc7-interix-setup'
X# @(#)vc7-interix-setup	1.7 07/04/24 Copyright 2006 J. Schilling
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
XVSINS=/dev/fs/C/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
XVSINS=/dev/fs/C/Program Files/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\Include;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS/vc7-interix-setup
echo x - smake-1.2.1/DEFAULTS/Defaults.dragonfly
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.dragonfly << 'END-of-smake-1.2.1/DEFAULTS/Defaults.dragonfly'
X#ident "@(#)Defaults.dragonfly	1.5 08/12/26 "
X###########################################################################
X#
X# global definitions for FreeBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /usr/local/include
XLDPATH=		-L/opt/schily/lib -L/usr/local/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.dragonfly
echo x - smake-1.2.1/DEFAULTS/Defaults.freemint
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.freemint << 'END-of-smake-1.2.1/DEFAULTS/Defaults.freemint'
X#ident @(#)Defaults.freemint	1.3 08/12/26 
X###########################################################################
X#
X# global definitions for FreeMiNT on ATARI computers
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.freemint
echo x - smake-1.2.1/DEFAULTS/Defaults.syllable
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.syllable << 'END-of-smake-1.2.1/DEFAULTS/Defaults.syllable'
X#ident "@(#)Defaults.syllable	1.2 09/06/04 "
X###########################################################################
X#
X# global definitions for Syllable Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /ainc
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.syllable
echo x - smake-1.2.1/DEFAULTS/Defaults.haiku
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.haiku << 'END-of-smake-1.2.1/DEFAULTS/Defaults.haiku'
X#ident "@(#)Defaults.haiku	1.3 09/07/25 "
X###########################################################################
X#
X# global definitions for Haiku Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/boot/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.haiku
echo x - smake-1.2.1/DEFAULTS/vc7_64-cygwin-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS/vc7_64-cygwin-setup << 'END-of-smake-1.2.1/DEFAULTS/vc7_64-cygwin-setup'
X# @(#)vc7_64-cygwin-setup	1.1 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7_64-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
X#VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
X#VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation on an English Windows XP 64 Bit host
X#
XVSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN/amd64:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB\amd64;${VCINSTALLDIR}\PlatformSDK\LIB\amd64;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS/vc7_64-cygwin-setup
echo x - smake-1.2.1/DEFAULTS/vc7_64-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS/vc7_64-setup << 'END-of-smake-1.2.1/DEFAULTS/vc7_64-setup'
X# @(#)vc7_64-setup	1.1 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7_64-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation on a German Windows (32Bit) host, to be used
X# for cross compiling stuff (no autoconf run)
X#
X#VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
X#VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation on an English Windows XP 64 Bit host
X#
XVSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN/amd64:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB\amd64;${VCINSTALLDIR}\PlatformSDK\LIB\amd64;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS/vc7_64-setup
echo x - smake-1.2.1/DEFAULTS/Defaults.cygwin32_wow64
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.cygwin32_wow64 << 'END-of-smake-1.2.1/DEFAULTS/Defaults.cygwin32_wow64'
X#ident "%W% %E% %Q%"
X###########################################################################
X#
X# global definitions for Cygnus GCC for WINNT Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
XLDPATH=
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	root
X
X#
X# This is not the correct place for doing this, 
X# the correct place is RULES/cc-msc.rul.
X# We do it here because otherwise cc-config would not work.
X# This kind of hack may not work for other platforms.
X#
X_PLATFORM=	cygwin
XVC=7
XVC=9
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-msc.rul
X# in order to be able to test for the existence of "cl.exe" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
END-of-smake-1.2.1/DEFAULTS/Defaults.cygwin32_wow64
echo x - smake-1.2.1/DEFAULTS/vc9-cygwin-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS/vc9-cygwin-setup << 'END-of-smake-1.2.1/DEFAULTS/vc9-cygwin-setup'
X# @(#)vc7-setup	1.5 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc9-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 9.0
XVSINS=/cygdrive/c/Programme/Microsoft Visual Studio 9.0
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files(x86)\Microsoft Visual Studio 9.0
XVSINS=/cygdrive/c/Program Files(x86)/Microsoft Visual Studio 9.0
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\lib;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS/vc9-cygwin-setup
echo x - smake-1.2.1/DEFAULTS/Defaults.openvms
sed 's/^X//' >smake-1.2.1/DEFAULTS/Defaults.openvms << 'END-of-smake-1.2.1/DEFAULTS/Defaults.openvms'
X#ident "@(#)Defaults.openvms	1.1 09/10/31 "
X###########################################################################
X#
X# global definitions for OpenVMS
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS/Defaults.openvms
echo c - smake-1.2.1/DEFAULTS_ENG
mkdir -p smake-1.2.1/DEFAULTS_ENG > /dev/null 2>&1
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.mingw32_nt
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.mingw32_nt << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.mingw32_nt'
X#ident "@(#)Defaults.mingw32_nt	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for Win32/Mingw32 systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
XLDPATH=
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.mingw32_nt
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults'
X#ident "%W% %E% %Q%"
X###########################################################################
X#
X# global definitions: include system specific file
X#
X###########################################################################
X
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH)
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.aix
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.aix << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.aix'
X#ident "@(#)Defaults.aix	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for IBM AIX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.aix
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.dgux
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.dgux << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.dgux'
X#ident "@(#)Defaults.dgux	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Data General DGUX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.dgux
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.dgux3
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.dgux3 << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.dgux3'
X#ident "@(#)Defaults.dgux3	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Data General DGUX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.dgux3
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.dgux4
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.dgux4 << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.dgux4'
X#ident "@(#)Defaults.dgux4	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Data General DGUX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.dgux4
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.freebsd
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.freebsd << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.freebsd'
X#ident "@(#)Defaults.freebsd	1.5 08/12/26 "
X###########################################################################
X#
X# global definitions for FreeBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /usr/local/include
XLDPATH=		-L/opt/schily/lib -L/usr/local/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.freebsd
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.hp-ux
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.hp-ux << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.hp-ux'
X#ident "@(#)Defaults.hp-ux	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for HP/UX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.hp-ux
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.irix
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.irix << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.irix'
X#ident "@(#)Defaults.irix	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Silicon Graphics Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.irix
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.linux
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.linux << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.linux'
X#ident "@(#)Defaults.linux	1.7 09/06/04 "
X###########################################################################
X#
X# global definitions for Linux Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
X###########################################################################
X#
X# LINUX_SRC_INCLUDE is used in RULES/*-linux-*cc*.rul
X#
X###########################################################################
XLINUX_INCL_PATH=	/usr/src/linux/include
X
X_LINUX_SRC_INCLUDE=	$(_UNIQ)$(MAY_LINUX_SRC_INCLUDE)
X__LINUX_SRC_INCLUDE=	$(_LINUX_SRC_INCLUDE:$(_UNIQ)=$(LINUX_INCL_PATH))
XLINUX_SRC_INCLUDE=      $(__LINUX_SRC_INCLUDE:$(_UNIQ)no%=%)
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Unhide POSIX extensions from /usr/include/
X#
X###########################################################################
XOSDEFS +=	-D_GNU_SOURCE
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.linux
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.sunos4
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.sunos4 << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.sunos4'
X#ident "@(#)Defaults.sunos4	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for SunOS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will not work on SunOS
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.sunos4
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.sunos5
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.sunos5 << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.sunos5'
X#ident "@(#)Defaults.sunos5	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Solaris Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.sunos5
echo x - smake-1.2.1/DEFAULTS_ENG/README
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/README << 'END-of-smake-1.2.1/DEFAULTS_ENG/README'
XThis directory contains engineering defaults
END-of-smake-1.2.1/DEFAULTS_ENG/README
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.netbsd
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.netbsd << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.netbsd'
X#ident "@(#)Defaults.netbsd	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for NetBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.netbsd
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.openbsd
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.openbsd << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.openbsd'
X#ident "@(#)Defaults.openbsd	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for OpenBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.openbsd
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.bsd-os
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.bsd-os << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.bsd-os'
X#ident "@(#)Defaults.bsd-os	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for BSD/OS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.bsd-os
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.cygwin32_nt
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.cygwin32_nt << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.cygwin32_nt'
X#ident "@(#)Defaults.cygwin32_nt	1.5 08/12/26 "
X###########################################################################
X#
X# global definitions for Cygnus GCC for WINNT Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
XLDPATH=
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	root
X
X#
X# This is not the correct place for doing this, 
X# the correct place is RULES/cc-msc.rul.
X# We do it here because otherwise cc-config would not work.
X# This kind of hack may not work for other platforms.
X#
X_PLATFORM=	cygwin
XVC=7
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-msc.rul
X# in order to be able to test for the existence of "cl.exe" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.cygwin32_nt
echo x - smake-1.2.1/DEFAULTS_ENG/MKLINKS
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/MKLINKS << 'END-of-smake-1.2.1/DEFAULTS_ENG/MKLINKS'
X#!/bin/sh
X#
Xln -s	Defaults.dgux	Defaults.dgux3
Xln -s	Defaults.dgux	Defaults.dgux4
END-of-smake-1.2.1/DEFAULTS_ENG/MKLINKS
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.osf1
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.osf1 << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.osf1'
X#ident "@(#)Defaults.osf1	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Digital UNIX (OSF1) Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.osf1
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.nextstep
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.nextstep << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.nextstep'
X#ident "@(#)Defaults.nextstep	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for NeXT Step Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.nextstep
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.rhapsody
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.rhapsody << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.rhapsody'
X#ident "@(#)Defaults.rhapsody	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for NeXT Step (Apple Rhapsody) Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		#-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	wheel
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.rhapsody
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.newsos6
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.newsos6 << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.newsos6'
X#ident "@(#)Defaults.newsos6	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Sony NEWS-OS 6.x
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.newsos6
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.beos
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.beos << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.beos'
X#ident "@(#)Defaults.beos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for BeOS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.beos
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.os2
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.os2 << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.os2'
X#ident "@(#)Defaults.os2	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for OS/2 Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.os2
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.qnx
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.qnx << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.qnx'
X#ident "@(#)Defaults.qnx	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for QNX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X# When QNX support started in december 1999, there was only the watcom
X# C-compler (cc). Now, in novemver 2001 we switch to gcc.
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.qnx
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.openserver
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.openserver << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.openserver'
X#ident "@(#)Defaults.openserver	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for SCO OpenServer 5 Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		
XRUNPATH=	
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/usr/local
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.openserver
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.unixware
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.unixware << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.unixware'
X#ident "@(#)Defaults.unixware	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for SCO UnixWare Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		
XRUNPATH=	
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/usr/local
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.unixware
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.mac-os10
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.mac-os10 << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.mac-os10'
X#ident "@(#)Defaults.mac-os10	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for Mac OS X Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		#-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	wheel
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.mac-os10
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.darwin
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.darwin << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.darwin'
X#ident "@(#)Defaults.darwin	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for Mac OS X Darwin Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		#-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	wheel
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.darwin
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.domainos
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.domainos << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.domainos'
X#ident "@(#)Defaults.domainos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Apollo Domain/OS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.domainos
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.amigaos
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.amigaos << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.amigaos'
X#ident "@(#)Defaults.amigaos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for AmigaOS Systems using CC=gcc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.amigaos
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.gnu
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.gnu << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.gnu'
X#ident "@(#)Defaults.gnu	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for GNU (hurd) Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /usr/src/linux/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.gnu
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.bsd-os3
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.bsd-os3 << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.bsd-os3'
X#ident "@(#)Defaults.bsd-os3	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for BSD/OS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.bsd-os3
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.ms-dos
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.ms-dos << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.ms-dos'
X#ident "@(#)Defaults.ms-dos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for  MSDOS/DJGPP v2 Systems using CC=gcc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.ms-dos
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.interix
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.interix << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.interix'
X#ident "@(#)Defaults.interix	1.6 09/06/04 "
X###########################################################################
X#
X# global definitions for Interix Systems (WIN-NT with SFU) using CC=gcc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Avoid to have something like "Intel_x86_Family15_Model4_Stepping1"
X# in $(OARCH), we rather use $(K_ARCH) which is e.g. "x86".
X# XXX If this is changed, both files in DEFAULTS/ and DEFAULTS_ENG as
X# XXX well as the file conf/oarch.sh need to be changed.
X#
X###########################################################################
XP_ARCH=		$(K_ARCH)
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	--rpath $(INS_BASE)/lib --rpath /opt/schily/lib --rpath $(OLIBSDIR)
XRUNPATH=	--rpath $(INS_BASE)/lib --rpath /opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
X
X#
X# This is not the correct place for doing this, 
X# the correct place is RULES/cc-ms*.rul.
X# We do it here because otherwise cc-config would not work.
X# This kind of hack may not work for other platforms.
X#
X_PLATFORM=	interix
XVC=7
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-ms*.rul
X# in order to be able to test for the existence of "cl.exe" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.interix
echo x - smake-1.2.1/DEFAULTS_ENG/vc7-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/vc7-setup << 'END-of-smake-1.2.1/DEFAULTS_ENG/vc7-setup'
X# @(#)vc7-setup	1.5 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS_ENG/vc7-setup
echo x - smake-1.2.1/DEFAULTS_ENG/dummy-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/dummy-setup << 'END-of-smake-1.2.1/DEFAULTS_ENG/dummy-setup'
END-of-smake-1.2.1/DEFAULTS_ENG/dummy-setup
echo x - smake-1.2.1/DEFAULTS_ENG/vc6-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/vc6-setup << 'END-of-smake-1.2.1/DEFAULTS_ENG/vc6-setup'
X# @(#)vc6-setup	1.4 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc6-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
XVSCommonDir=C:\Programme\Microsoft Visual Studio\Common
XVSCommonPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common
Xexport	VSCommonDir
X
XMSDevDir=C:\Programme\Microsoft Visual Studio\Common\msdev98
XMSDevPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common/msdev98
Xexport	MSDevDir
X
XMSVCDir=C:\Programme\Microsoft Visual Studio\VC98
XMSVCPath=/cygdrive/c/Programme/Microsoft Visual Studio/VC98
Xexport	MSVCDir
X
XVcOsDir=WIN95
XVcOsDir=WINNT
Xexport	VcOsDir
X
XPATH	:=${MSDevPath}\BIN:${MSVCPath}\BIN:${VSCommonPath}\TOOLS\${VcOsDir}:${VSCommonPath}\TOOLS:${PATH}
Xexport	PATH
X
XINCLUDE	:=${MSVCDir}\ATL\INCLUDE;${MSVCDir}\INCLUDE;${MSVCDir}\\MFC\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB	:=${MSVCDir}\LIB;${MSVCDir}\MFC\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS_ENG/vc6-setup
echo x - smake-1.2.1/DEFAULTS_ENG/vc6-cygwin-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/vc6-cygwin-setup << 'END-of-smake-1.2.1/DEFAULTS_ENG/vc6-cygwin-setup'
X# @(#)vc6-cygwin-setup	1.4 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc6-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
XVSCommonDir=C:\Programme\Microsoft Visual Studio\Common
XVSCommonPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common
Xexport	VSCommonDir
X
XMSDevDir=C:\Programme\Microsoft Visual Studio\Common\msdev98
XMSDevPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common/msdev98
Xexport	MSDevDir
X
XMSVCDir=C:\Programme\Microsoft Visual Studio\VC98
XMSVCPath=/cygdrive/c/Programme/Microsoft Visual Studio/VC98
Xexport	MSVCDir
X
XVcOsDir=WIN95
XVcOsDir=WINNT
Xexport	VcOsDir
X
XPATH	:=${MSDevPath}\BIN:${MSVCPath}\BIN:${VSCommonPath}\TOOLS\${VcOsDir}:${VSCommonPath}\TOOLS:${PATH}
Xexport	PATH
X
XINCLUDE	:=${MSVCDir}\ATL\INCLUDE;${MSVCDir}\INCLUDE;${MSVCDir}\\MFC\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB	:=${MSVCDir}\LIB;${MSVCDir}\MFC\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS_ENG/vc6-cygwin-setup
echo x - smake-1.2.1/DEFAULTS_ENG/vc6-interix-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/vc6-interix-setup << 'END-of-smake-1.2.1/DEFAULTS_ENG/vc6-interix-setup'
X# @(#)vc6-interix-setup	1.4 07/04/20 Copyright 2006 J. Schilling
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
XVSCommonDir=C:\Programme\Microsoft Visual Studio\Common
XVSCommonPath=/dev/fs/C/Programme/Microsoft Visual Studio/Common
Xexport	VSCommonDir
X
XMSDevDir=C:\Programme\Microsoft Visual Studio\Common\msdev98
XMSDevPath=/dev/fs/C/Programme/Microsoft Visual Studio/Common/msdev98
Xexport	MSDevDir
X
XMSVCDir=C:\Programme\Microsoft Visual Studio\VC98
XMSVCPath=/dev/fs/C/Programme/Microsoft Visual Studio/VC98
Xexport	MSVCDir
X
XVcOsDir=WIN95
XVcOsDir=WINNT
Xexport	VcOsDir
X
XPATH	:=${MSDevPath}\BIN:${MSVCPath}\BIN:${VSCommonPath}\TOOLS\${VcOsDir}:${VSCommonPath}\TOOLS:${PATH}
Xexport	PATH
X
XINCLUDE	:=${MSVCDir}\ATL\INCLUDE;${MSVCDir}\INCLUDE;${MSVCDir}\\MFC\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB	:=${MSVCDir}\LIB;${MSVCDir}\MFC\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS_ENG/vc6-interix-setup
echo x - smake-1.2.1/DEFAULTS_ENG/vc7-cygwin-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/vc7-cygwin-setup << 'END-of-smake-1.2.1/DEFAULTS_ENG/vc7-cygwin-setup'
X# @(#)vc7-cygwin-setup	1.5 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS_ENG/vc7-cygwin-setup
echo x - smake-1.2.1/DEFAULTS_ENG/vc7-interix-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/vc7-interix-setup << 'END-of-smake-1.2.1/DEFAULTS_ENG/vc7-interix-setup'
X# @(#)vc7-interix-setup	1.7 07/04/24 Copyright 2006 J. Schilling
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
XVSINS=/dev/fs/C/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
XVSINS=/dev/fs/C/Program Files/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\Include;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS_ENG/vc7-interix-setup
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.dragonfly
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.dragonfly << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.dragonfly'
X#ident "@(#)Defaults.dragonfly	1.5 08/12/26 "
X###########################################################################
X#
X# global definitions for FreeBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /usr/local/include
XLDPATH=		-L/opt/schily/lib -L/usr/local/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.dragonfly
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.freemint
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.freemint << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.freemint'
X#ident @(#)Defaults.freemint	1.3 08/12/26 
X###########################################################################
X#
X# global definitions for FreeMiNT on ATARI computers
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.freemint
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.syllable
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.syllable << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.syllable'
X#ident "@(#)Defaults.syllable	1.2 09/06/04 "
X###########################################################################
X#
X# global definitions for Syllable Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /ainc
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.syllable
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.haiku
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.haiku << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.haiku'
X#ident "@(#)Defaults.haiku	1.2 09/06/04 "
X###########################################################################
X#
X# global definitions for Haiku Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.haiku
echo x - smake-1.2.1/DEFAULTS_ENG/vc7_64-cygwin-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/vc7_64-cygwin-setup << 'END-of-smake-1.2.1/DEFAULTS_ENG/vc7_64-cygwin-setup'
X# @(#)vc7_64-cygwin-setup	1.1 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7_64-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
X#VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
X#VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation on an English Windows XP 64 Bit host
X#
XVSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN/amd64:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB\amd64;${VCINSTALLDIR}\PlatformSDK\LIB\amd64;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS_ENG/vc7_64-cygwin-setup
echo x - smake-1.2.1/DEFAULTS_ENG/vc7_64-setup
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/vc7_64-setup << 'END-of-smake-1.2.1/DEFAULTS_ENG/vc7_64-setup'
X# @(#)vc7_64-setup	1.1 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7_64-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation on a German Windows (32Bit) host, to be used
X# for cross compiling stuff (no autoconf run)
X#
X#VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
X#VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation on an English Windows XP 64 Bit host
X#
XVSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN/amd64:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB\amd64;${VCINSTALLDIR}\PlatformSDK\LIB\amd64;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-smake-1.2.1/DEFAULTS_ENG/vc7_64-setup
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.cygwin32_wow64
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.cygwin32_wow64 << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.cygwin32_wow64'
X#ident "@(#)Defaults.cygwin32_wow64	1.5 08/12/26 "
X###########################################################################
X#
X# global definitions for Cygnus GCC for WINNT Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
XLDPATH=
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	root
X
X#
X# This is not the correct place for doing this, 
X# the correct place is RULES/cc-msc.rul.
X# We do it here because otherwise cc-config would not work.
X# This kind of hack may not work for other platforms.
X#
X_PLATFORM=	cygwin
XVC=7
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-msc.rul
X# in order to be able to test for the existence of "cl.exe" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.cygwin32_wow64
echo x - smake-1.2.1/DEFAULTS_ENG/Defaults.openvms
sed 's/^X//' >smake-1.2.1/DEFAULTS_ENG/Defaults.openvms << 'END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.openvms'
X#ident "@(#)Defaults.openvms	1.1 09/10/31 "
X###########################################################################
X#
X# global definitions for OpenVMS
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-smake-1.2.1/DEFAULTS_ENG/Defaults.openvms
echo c - smake-1.2.1/smake
mkdir -p smake-1.2.1/smake > /dev/null 2>&1
echo x - smake-1.2.1/smake/Makefile
sed 's/^X//' >smake-1.2.1/smake/Makefile << 'END-of-smake-1.2.1/smake/Makefile'
X#ident @(#)Makefile	1.15 07/02/03 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		bin
XTARGET=		smake
XCPPOPTS +=	-DUSE_LARGEFILES
XCPPOPTS +=	-DNO_COMPAT '-DDEFAULTS_PATH="$(INS_BASE)/lib/defaults.smk"'
XCPPOPTS +=	-DSCHILY_PRINT
XCFILES=		make.c archconf.c readfile.c parse.c update.c rules.c memory.c
XHFILES=		make.h
XLIBS=		-lschily
XXMK_FILE=	Makefile.def Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cmd
X###########################################################################
Xcount:	$(CFILES) $(HFILES)
X	count $r1
X
END-of-smake-1.2.1/smake/Makefile
echo x - smake-1.2.1/smake/make.c
sed 's/^X//' >smake-1.2.1/smake/make.c << 'END-of-smake-1.2.1/smake/make.c'
X/* @(#)make.c	1.179 10/03/19 Copyright 1985, 87, 88, 91, 1995-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)make.c	1.179 10/03/19 Copyright 1985, 87, 88, 91, 1995-2010 J. Schilling";
X#endif
X/*
X *	Make program
X *
X *	Copyright (c) 1985, 87, 88, 91, 1995-2010 by J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/getargs.h>
X#include <schily/errno.h>
X#include <schily/stdlib.h>
X#include <schily/string.h>
X#include <schily/unistd.h>
X#include <schily/time.h>
X#include <schily/wait.h>
X#include <schily/signal.h>
X
X#include <schily/dirent.h>
X#include <schily/maxpath.h>
X#include <schily/getcwd.h>
X#include <schily/schily.h>
X#include <schily/libport.h>
X#include <schily/utime.h>
X#define	VMS_VFORK_OK
X#include <schily/vfork.h>
X
X#include "make.h"
X
Xchar	make_version[] = "1.2.1";
X
X#ifdef	NO_DEFAULTS_PATH
X#undef	DEFAULTS_PATH
X#define	DEFAULTS_PATH_SEARCH_FIRST
X#endif
X
X#ifdef	_FASCII
XLOCAL	void	setup_env	__PR((void));
X#endif
XEXPORT	void	usage		__PR((int exitcode));
XLOCAL	void	initmakefiles	__PR((void));
XLOCAL	int	addmakefile	__PR((char *name));
XLOCAL	void	read_defs	__PR((void));
XLOCAL	void	read_makefiles	__PR((void));
XEXPORT	void	setup_dotvars	__PR((void));
XLOCAL	void	setup_vars	__PR((void));
XLOCAL	void	setup_xvars	__PR((void));
XLOCAL	void	setup_SHELL	__PR((void));
XLOCAL	void	setup_MAKE	__PR((char *name));
XEXPORT	char	*searchtype	__PR((int mode));
XLOCAL	void	printdirs	__PR((void));
XLOCAL	int	addcommandline	__PR((char *  name));
XLOCAL	void	read_cmdline	__PR((void));
XEXPORT	void	doexport	__PR((char *));
XEXPORT	void	dounexport	__PR((char *));
XLOCAL	void	read_environ	__PR((void));
XEXPORT	int	main		__PR((int ac, char ** av));
XLOCAL	void	check_old_makefiles __PR((void));
XLOCAL	void	getmakeflags	__PR((void));
XLOCAL	void	read_makemacs	__PR((void));
XLOCAL	char	*nextmakemac	__PR((char *s));
XLOCAL	BOOL	read_mac	__PR((char *mf));
XLOCAL	void	setmakeflags	__PR((void));
XLOCAL	char	*stripmacros	__PR((char *macbase, char *new));
XLOCAL	void	setmakeenv	__PR((char *envbase, char *envp));
XEXPORT	int	docmd		__PR((char * cmd, obj_t * obj));
XEXPORT	BOOL	move_tgt	__PR((obj_t * from));
XLOCAL	int	copy_file	__PR((char * from, char * objname));
XEXPORT	BOOL	touch_file	__PR((char * name));
XLOCAL	date_t	gcurtime	__PR((void));
XLOCAL	date_t	gnewtime	__PR((void));
XEXPORT	date_t	gftime		__PR((char * file));
XLOCAL	BOOL	isdir		__PR((char * file));
XEXPORT	Llong	gfileid		__PR((char * file));
XEXPORT	char	*prtime		__PR((date_t  date));
XLOCAL	void	handler		__PR((int signo));
XLOCAL	void	exhandler	__PR((int excode, void *arg));
XEXPORT	char	*curwdir	__PR((void));
XLOCAL	char	*getdefaultsfile	__PR((void));
XLOCAL	char	*searchfileinpath	__PR((char *name));
XLOCAL	char	*searchonefile	__PR((char *name, char *nbuf, char *np, char *ep));
XLOCAL	int	put_env		__PR((char *new));
XLOCAL	int	unset_env	__PR((char *name));
X#ifndef	HAVE_PUTENV
XEXPORT	int	putenv		__PR((const char *new));
X#endif
X#if defined(__DJGPP__)
XLOCAL	char 	*strbs2s	__PR((char *s));
X#endif
X#ifndef	HAVE_UNSETENV
XEXPORT	int	unsetenv	__PR((const char *name));
X#endif
XLOCAL	void	ovstrcpy	__PR((char *p2, char *p1));
X
XBOOL	posixmode	= FALSE;	/* We found a .POSIX target	*/
XBOOL	Eflag		= FALSE;	/* -e Environment overrides vars*/
XBOOL	Iflag		= FALSE;	/* -i Ignore command errors	*/
XBOOL	Kflag		= FALSE;	/* -k Continue on unrelated tgts */
XBOOL	Stopflag	= FALSE;	/* -S Stop on make errors 	*/
XBOOL	NSflag		= FALSE;	/* -N Ignore no Source on dep.	*/
XBOOL	Nflag		= FALSE;	/* -n Only show what to do	*/
XBOOL	Qflag		= FALSE;	/* -q If up to date exit (0)	*/
XBOOL	Rflag		= FALSE;	/* -r Turn off internal rules	*/
XBOOL	Sflag		= FALSE;	/* -s Be silent			*/
XBOOL	Tflag		= FALSE;	/* -t Touch objects		*/
Xint	Mlevel		= 0;		/* MAKE_LEVEL from environment	*/
Xint	Debug		= 0;		/* -d Print reason for rebuild	*/
Xint	XDebug		= 0;		/* -xd Print extended debug info*/
XBOOL	Prdep		= FALSE;	/* -xM Print include dependency	*/
XBOOL	Pr_obj		= FALSE;	/* -probj   Print object tree	*/
XBOOL	Print		= FALSE;	/* -p Print macro/target definitions*/
Xint	Dmake		= 0;		/* -D Display makefile		*/
XBOOL	help		= FALSE;	/* -help    Show Usage		*/
XBOOL	pversion	= FALSE;	/* -version Show version string	*/
XBOOL	No_Warn		= FALSE;	/* -w No warnings		*/
XBOOL	Do_Warn		= FALSE;	/* -W Print extra warnings	*/
Xchar	Makeflags[]	= "MAKEFLAGS";
Xchar	Make_Flags[]	= "MAKE_FLAGS";
Xchar	Make_Macs[]	= "MAKE_MACS";
Xchar	Make_Level[]	= "MAKE_LEVEL";
Xchar	Envdefs[]	= "Environment defs";
Xchar	Makedefs[]	= "Internal Makefile";
Xchar	Ldefaults[]	= "defaults.smk";
X#ifdef	SVR4
Xchar	Defaults[]	= "/opt/schily/lib/defaults.smk";
X#else
Xchar	Defaults[]	= "/usr/bert/lib/defaults.smk";
X#endif
X#define	MAKEFILECOUNT	32		/* Max number of Makefiles	*/
Xchar	SMakefile[]	= "SMakefile";	/* smake's default Makefile	*/
Xchar	Makefile[]	= "Makefile";	/* Primary default Makefile	*/
Xchar	_makefile[]	= "makefile";	/* Secondary default Makefile	*/
Xchar   **MakeFileNames;			/* To hold all Makefilenames	*/
Xint	Mfileindex;			/* Current Makefile index	*/
Xint	Mfilesize;			/* Size of Makefile array	*/
Xint	Mfilecount;			/* Number of Makefiles found+2	*/
Xchar	CmdLMac[]	= "Command Line Macro"; /* Makefile Name for ..	*/
Xchar	**CmdLDefs;			/* To hold all Cmdline Macros	*/
Xint	Cmdlinecount;			/* Number of Cmdline Macros	*/
Xint	Cmdlinesize;			/* Size of Cmdline Macro array	*/
Xchar	*MFCmdline;			/* Pointer to Cmdl. Macs fr. env*/
X
Xint	Mflags;
X
Xchar	*ObjDir;		/* .OBJDIR: pathname Target destination dir */
Xint	ObjDirlen;		/* strlen(.OBJDIR)			    */
Xint	ObjSearch	= SALL;	/* .OBJSEARCH: searchtype for explicit rules*/
Xlist_t	*SearchList;		/* .SEARCHLIST: list of src/obj dir pairs   */
Xlist_t	*Suffixes;		/* .SUFFIXES: list of suffixes (POSIX)	    */
XBOOL	SSuffrules;
Xobj_t	*Init;			/* .INIT: command to execute at startup	    */
Xobj_t	*Done;			/* .DONE: command do execute on success	    */
Xobj_t	*Failed;		/* .FAILED: command to execute on failure   */
Xobj_t	*IncludeFailed;		/* .INCLUDE_FAILED: cmd to exec if missing  */
Xobj_t	*Deflt;			/* .DEFAULT: command to execute if no rule  */
Xobj_t	*Precious;		/* .PRECIOUS: list of targets not to remove */
Xobj_t	*Phony;			/* .PHONY: list of false targets, no check  */
Xobj_t	*curtarget;		/* current target of actually running cmd   */
Xdate_t	curtime;		/* Current time				    */
Xdate_t	newtime;		/* Special time newer than all		    */
X
X/*
X * Older POSIX versions requiere commands to be executed via 'sh -c command'
X * which is wrong as it causes make not to stop on errors if called with
X * complex commands (e.g. commands that contain loops or a ';').
X * Fortunately, POSIX.1-2008 changed this back to 'sh -ce command'.
X *
X * We used to call /bin/sh -ce 'cmd' in former times which was correct,
X * but we got (unfortunately undocumented) problems on QNX and we changed
X * it to sh -c 'cmd' on 00/11/19. In hope that newer versions of QNX have
X * no problems with sh -ce, we changed it back on May 9th 2004.
X *
X * The solution to implement old POSIX compatibility without making smake
X * unusable is to also set "MAKE_SHELL_FLAG=-ce" in the makefile together
X * with .POSIX:
X */
X#ifdef	OLD_POSIX
X#define	POSIX_SHELL_CEFLAG	"-c"	/* Does not work correctly	*/
X#else
X#define	POSIX_SHELL_CEFLAG	"-ce"	/* New correct behavior		*/
X#endif
X#define	SHELL_CEFLAG		"-ce"	/* Needed for correct behavior	*/
X#define	SHELL_CFLAG		"-c"	/* Used with make -i		*/
X
XLOCAL	char	pceflag[] = POSIX_SHELL_CEFLAG; /* Cmds in posix mode	*/
XLOCAL	char	ceflag[] = SHELL_CEFLAG; /* Used by default for cmds	*/
XLOCAL	char	cflag[]  = SHELL_CFLAG;	/* Used with make -i		*/
X
X#define	MINSECS		60
X#define	HOURSECS	(MINSECS*60)
X#define	DAYSECS		(HOURSECS*24)
X#define	MONTHSECS	(DAYSECS*30)
X#define	YEARSECS	(DAYSECS*365)
X
Xchar	Nullstr[]	= "";
Xchar	slash[]		= PATH_DELIM_STR;
Xint	slashlen	= sizeof (PATH_DELIM_STR) -1;	/* strlen(slash) */
X
XLOCAL	BOOL	xpatrules;	/* Have non local pattern rules	in Makefile */
XEXPORT	int	xssrules;	/* Have non local simple suffix rules	    */
X
X#ifdef	_FASCII				/* Mark Williams C		*/
Xchar	*_stksize	= (char *) 8192;
X
X/*
X * Old and probably outdated setup that was needed in 1986 to make
X * 'smake' run on a ATARI ST using the Marc Williams C development tools.
X */
XLOCAL void
Xsetup_env()
X{
X	register char	*ep;
X	extern	 char	*getenv();
X
X	if ((ep = getenv("PATH")) == (char *) NULL || *ep == '\0')
X		putenv("PATH=.bin,,\\bin,\\lib");
X
X	if ((ep = getenv("SUFF")) == (char *) NULL || *ep == '\0')
X		putenv("SUFF=,.prg,.tos,.ttp");
X
X	if ((ep = getenv("LIBPATH")) == (char *) NULL || *ep == '\0')
X		putenv("LIBPATH=\\lib,\\bin");
X
X	if ((ep = getenv("TMPDIR")) == (char *) NULL || *ep == '\0')
X		putenv("TMPDIR=\\tmp");
X
X	if ((ep = getenv("INCDIR")) == (char *) NULL || *ep == '\0')
X		putenv("INCDIR=\\include");
X}
X#endif
X
XEXPORT void
Xusage(exitcode)
X	int	exitcode;
X{
X	error("Usage:	smake [options] [target...] [macro=value...]\n");
X	error("Options:\n");
X	error("	-e	Environment overrides variables in Makefile.\n");
X	error("	-i	Ignore errors from commands.\n");
X	error("	-k	Ignore target errors, continue on unrelated targets.\n");
X	error("	-N	Continue if no source for nonexistent dependencies found.\n");
X	error("	-n	Don't make - only say what to do.\n");
X	error("	-p	Print all macro and target definitions.\n");
X	error("	-q	Question mode. Exit code is 0 if target is up to date.\n");
X	error("	-r	Turn off internal rules.\n");
X	error("	-s	Be silent.\n");
X	error("	-t	Touch Objects instead of executing defined commands.\n");
X	error("	-w	Don't print warning Messages.\n");
X	error("	-W	Print extra (debug) warning Messages.\n");
X	error("	-D	Display Makefiles as read in.\n");
X	error("	-DD	Display Makefiles/Rules as read in.\n");
X	error("	-d	Print reason why a target has to be rebuilt.\n");
X	error("	-dd	Debug dependency check.\n");
X	error("	-xM	Print include dependency.\n");
X	error("	-xd	Print extended debug info.\n");
X	error("	-probj	Print object tree.\n");
X	error("	-help	Print this help.\n");
X	error("	-version Print version number.\n");
X	error("	-posix	Force POSIX behaviour.\n");
X	error("	-C dir	Change directory to 'dir' before starting work.\n");
X	error("	mf=makefilename | -f makefilename\n");
X	error("More than -f makefile option may be specified.\n");
X	exit(exitcode);
X}
X
XLOCAL void
Xinitmakefiles()
X{
X	/*
X	 * Mfilecount	als Index fuer MakeFileNames[] bei addmakefile()
X	 * Mfileindex	als globale Index Variable fuer den Parser
X	 *
X	 * This code needs to be kept in sync with the MF_IDX_* #defines
X	 * in make.h
X	 */
X	Mfilecount = 0;
X	addmakefile(Makedefs);		/* Implicit rules		*/
X	addmakefile(Envdefs);		/* Environment strings		*/
X	addmakefile(Makefile);		/* Default make file		*/
X	Mfilecount--;			/* -f name overwrites Makefile	*/
X}
X
X/*
X * Add a new makefile to the list of makefiles.
X * Called by getargs() if a -f option was found.
X */
XLOCAL int
Xaddmakefile(name)
X	char	*name;
X{
X	if (MakeFileNames == NULL) {
X		/*
X		 * Use a default size of 4 as we usually have 4 Makefiles.
X		 */
X		Mfilesize = 4;
X		MakeFileNames = malloc(Mfilesize * sizeof (char *));
X	} else if (Mfilesize <= (Mfilecount+1)) { /* One spare for CmdLMac */
X		Mfilesize += 4;
X		MakeFileNames = realloc(MakeFileNames, Mfilesize * sizeof (char *));
X	}
X	if (MakeFileNames == NULL)
X		comerr("No memory for Makefiles.\n");
X
X	MakeFileNames[Mfilecount++] = name;
X
X	return (1);
X}
X
X/*
X * Read the default rules - either compiled in or from file.
X */
XLOCAL void
Xread_defs()
X{
X		int	MFsave = Mfileindex;
X		char	*deflts;
X	extern	char	implicit_rules[]; /* Default rules compiled into make */
X
X	Dmake--;
X	Mfileindex = MF_IDX_IMPLICIT;	/* Index 0 Implicit Rules */
X
X	if (gftime(Ldefaults) != 0) {
X		MakeFileNames[0] = Ldefaults;
X		readfile(Ldefaults, TRUE);
X#ifdef	DEFAULTS_PATH_SEARCH_FIRST
X	} else if ((deflts = getdefaultsfile()) != NULL) {
X		MakeFileNames[0] = deflts;
X		readfile(deflts, TRUE);
X#endif
X#ifdef	DEFAULTS_PATH				/* This is the install path */
X	} else if (gftime(DEFAULTS_PATH) != 0) {
X		MakeFileNames[0] = DEFAULTS_PATH;
X		readfile(DEFAULTS_PATH, TRUE);
X#endif
X	} else if (gftime(Defaults) != 0) {
X		MakeFileNames[0] = Defaults;
X		readfile(Defaults, TRUE);
X#ifndef	DEFAULTS_PATH_SEARCH_FIRST
X	} else if ((deflts = getdefaultsfile()) != NULL) {
X		MakeFileNames[0] = deflts;
X		readfile(deflts, TRUE);
X#endif
X	} else {
X		readstring(implicit_rules, Makedefs);
X	}
X	Dmake++;
X	Mfileindex = MFsave;
X}
X
X/*
X * Read in all external makefiles. Use either the names from command line
X * or look for the default names "Makefile" and "makefile".
X */
XLOCAL void
Xread_makefiles()
X{
X	int	MFsave = Mfileindex;
X	patr_t	*oPatrules = Patrules;
X	patr_t	**opattail = pattail;
X
X	Patrules = 0;
X	pattail = &Patrules;
X	xssrules = 0;
X
X	Mfileindex = MF_IDX_MAKEFILE;	/* Index 2 Default Makefile */
X	if (Mfilecount == MF_IDX_MAKEFILE) {
X		if (posixmode) {
X			/*
X			 * First look for "makefile"
X			 * then for "Makefile", then for "SMakefile".
X			 */
X			if (gftime(_makefile) != 0) {		/* "makefile" */
X				Mfilecount++;
X				MakeFileNames[2] = _makefile;
X			} else if (gftime(Makefile) != 0) {	/* "Makefile" */
X				Mfilecount++;
X				MakeFileNames[2] = Makefile;
X			} else if (gftime(SMakefile) != 0) {	/* "SMakefile" */
X				Mfilecount++;
X				MakeFileNames[2] = SMakefile;
X			}
X		} else
X		/*
X		 * First look for "SMakefile",
X		 * then for "Makefile", then for "makefile"
X		 */
X		if (gftime(SMakefile) != 0) {		/* "SMakefile" */
X			Mfilecount++;
X			MakeFileNames[2] = SMakefile;
X		} else if (gftime(Makefile) != 0) {	/* "Makefile" */
X			Mfilecount++;
X			MakeFileNames[2] = Makefile;
X		} else if (gftime(_makefile) != 0) {	/* "makefile" */
X			Mfilecount++;
X			MakeFileNames[2] = _makefile;
X		}
X	}
X	while (Mfileindex < Mfilecount) {
X		readfile(MakeFileNames[Mfileindex], TRUE);
X		Mfileindex++;
X	}
X
X	/*
X	 * Check for external pattern rule definitions.
X	 */
X	xpatrules = Patrules != NULL;
X	/*
X	 * The pattern rules which are defined in the external makefiles
X	 * must superseede the pattern rules from the internal rules.
X	 * Concat the pattern rules found in internal rules to the end of
X	 * the patern rules list from external makefiles.
X	 */
X	*pattail = oPatrules;
X	pattail = opattail;
X
X	Mfileindex = MFsave;
X}
X
X/*
X * Setup special variables.
X *
X * NOTE: Must be reentrant because it may be called more than once
X *	 if the "include" directive is used.
X *	 As there is (currently) no way to delete an object
X *	 it is OK not to do anything special if objlook() returns NULL.
X */
XEXPORT void
Xsetup_dotvars()
X{
X	obj_t	*obj;
X	list_t	*l;
X	char	*name;
X
X	obj = objlook(".OBJDIR", FALSE);
X	if (obj != NULL && obj->o_type != ':')	/* Must be a special target */
X		obj = NULL;
X
X	if (obj != NULL) {
X		if (obj->o_list && (ObjDir = obj->o_list->l_obj->o_name)) {
X			if (gfileid(ObjDir) == gfileid(".")) {
X				/*
X				 * Do not allow moving targets to themselves.
X				 */
X				ObjDir = NULL;
X				ObjDirlen = 0;
X			} else {
X				ObjDirlen = strlen(ObjDir);
X			}
X		}
X	}
X#ifdef	no_longer_needed	/* Has been moved to dynmac expansion */
X	/*
X	 * XXX We cannot do this here as we are called more than once and
X	 * XXX we like to allow $O to be overwritten from Makefiles that
X	 * XXX do not know about smake's special features.
X	 */
X	/*
X	 * Create special variable $O -> ObjDir
X	 */
X	define_var("O", ObjDir ? ObjDir : ".");
X}
X#endif
X
X	obj = objlook(".OBJSEARCH", FALSE);
X	if (obj != NULL && obj->o_type != ':')	/* Must be a special target */
X		obj = NULL;
X	if (obj != NULL) {
X		if ((l = obj->o_list) != NULL) {
X			name = l->l_obj->o_name;
X			if (streql("src", name)) {
X				ObjSearch = SSRC;
X			} else if (streql("obj", name)) {
X				ObjSearch = SOBJ;
X			} else if (streql("all", name)) {
X				ObjSearch = SALL;
X			} else {
X				/*
X				 * This is the default.
X				 */
X				ObjSearch = SALL;
X			}
X		}
X	}
X
X	obj = objlook(".SEARCHLIST", FALSE);
X	if (obj != NULL && obj->o_type != ':')	/* Must be a special target */
X		obj = NULL;
X	if (obj != NULL) {
X		SearchList = obj->o_list;
X	} else if ((obj = objlook("VPATH", FALSE)) != NULL && obj->o_type == '=') {
X		SearchList = cvtvpath(obj->o_list);
X	}
X
X	obj = objlook(".IGNORE", FALSE);
X	if (obj != NULL && obj->o_type != ':')	/* Must be a special target */
X		obj = NULL;
X	if (obj != NULL && obj->o_list == NULL)
X		Iflag = TRUE;
X
X	obj = objlook(".SILENT", FALSE);
X	if (obj != NULL && obj->o_type != ':')	/* Must be a special target */
X		obj = NULL;
X	if (obj != NULL && obj->o_list == NULL)
X		Sflag = TRUE;
X
X	Init = objlook(".INIT", FALSE);
X	Done = objlook(".DONE", FALSE);
X	Failed = objlook(".FAILED", FALSE);
X	IncludeFailed = objlook(".INCLUDE_FAILED", FALSE);
X	if (IncludeFailed != NULL && IncludeFailed->o_cmd == NULL)
X		IncludeFailed = NULL;
X	Deflt = objlook(".DEFAULT", FALSE);
X	Precious = objlook(".PRECIOUS", FALSE);
X	Phony = objlook(".PHONY", FALSE);
X
X	if (objlook(".POSIX", FALSE))
X		posixmode = TRUE;
X	obj = objlook(".SUFFIXES", FALSE);
X	if (obj != NULL && obj->o_type != ':')	/* Must be a special target */
X		obj = NULL;
X	if (obj != NULL)
X		Suffixes = obj->o_list;
X	if (Debug > 1 && Suffixes != (list_t *) NULL) {
X		register list_t *p;
X
X		error(".SUFFIXES :\t");
X		for (p = Suffixes; p; p = p->l_next)
X			error("%s ", p->l_obj->o_name);
X		error("\n");
X	}
X	SSuffrules = check_ssufftab();
X}
X
X/*
X * Set up some known special macros.
X */
XLOCAL void
Xsetup_vars()
X{
X	int	i;
X	char	make_level[64];
X	char	*p;
X
X	define_var("$", "$");			/* Really needed ? */
X	define_var("NUMBER_SIGN", "#");		/* Allow to use '#' */
X	define_var("MAKE_NAME", "smake");	/* Needed to identify syntax */
X	define_var("MAKE_VERSION", make_version); /* Version dependant files? */
X	if ((p = getenv(Make_Level)) != NULL) {
X		p = astoi(p, &i);
X		if (*p == '\0')
X			Mlevel = i;
X	}
X	snprintf(make_level, sizeof (make_level), "%d", Mlevel+1);
X	define_var(Make_Level, make_level);
X	doexport(Make_Level);
X}
X
X/*
X * Set up some nice to have extended macros.
X */
XLOCAL void
Xsetup_xvars()
X{
X	char	*val;
X
X	val = get_var("MAKE_SHELL_FLAG");
X	if (val == NULL || *val == '\0') {
X		if (posixmode)
X			define_var("MAKE_SHELL_FLAG", pceflag);
X		else
X			define_var("MAKE_SHELL_FLAG", ceflag);	/* Used for make */
X	}
X
X	val = get_var("MAKE_SHELL_IFLAG");
X	if (val == NULL || *val == '\0')
X		define_var("MAKE_SHELL_IFLAG", cflag);	/* Used for make -i */
X}
X
X/*
X * Set up the special macro $(SHELL).
X *
X * On Operating Systems that use "bash" for /bin/sh, we have a real problem.
X * Bash does not stop on failed commands and as bash prevents nested jobs
X * from receiving signals.
X * If /bin/sh is a shell that does not work correctly and if a working
X * Bourne Shell is available as /bin/bosh, we prefer /bin/bosh over /bin/sh.
X *
X * On DJGPP, there is no /bin/sh. We need to find the path for "sh.exe".
X */
XLOCAL void
Xsetup_SHELL()
X{
X	char	*shell = NULL;
X#ifdef	__DJGPP__
X	char	*shellname;
X#endif
X
X#ifdef	BIN_SHELL_BOSH
X#define	BOSH_PATH	"/bin/bosh"
X#else
X#ifdef	OPT_SCHILY_BIN_SHELL_BOSH
X#define	BOSH_PATH	"/opt/schily/bin/bosh"
X#endif
X#endif
X#ifdef	NO_BOSH
X#undef	BOSH_PATH
X#endif
X
X#if (defined(BIN_SHELL_CE_IS_BROKEN) || defined(SHELL_CE_IS_BROKEN)) && \
X	defined(BOSH_PATH)
X	shell = BOSH_PATH;			/* Broken sh but bosh present */
X#else	/* !SHELL_CE_IS_BROKEN */
X#ifdef	__DJGPP__
X	/*
X	 * exec '/bin/sh' does not work under DJGPP.
X	 * Strings like 'c:\djgpp\bin\sh.exe' or '/dev/c/djgpp/bin/sh.exe'
X	 * must be used instead.
X	 *
X	 * Notes: c:/djgpp/share/config.site defines 'SHELL' with the required string.
X	 *
X	 * Using system("sh -ce 'cmd'") and spawn("command.com /c sh -ce 'cmd'")
X	 * cause GPF's (not enough memmory?)
X	 *
X	 * Temporary solution: Use DJGPP_SH envp. var. (must be set manually)
X	 */
X	shellname = get_var("SHELL");		/* On DJGPP too? */
X	if (shellname != NULL && *shellname == '\0')
X		shellname = NULL;
X	if (shellname == NULL)
X		shellname = getenv("DJGPP_SH");	/* Backward compat */
X	if (shellname == NULL)
X		shellname = searchfileinpath("bin/sh.exe"); /* alloc() */
X	if (shellname == NULL)
X		shellname = searchfileinpath("sh.exe");	/* alloc() */
X	if (shellname != NULL)
X		shell = shellname;
X#endif	/* !__DJGPP__ */
X#endif	/* !SHELL_CE_IS_BROKEN */
X
X	if (shell == NULL)
X		shell = "/bin/sh";		/* Standard UNIX/POSIX case */
X	define_var("SHELL", shell);		/* Needed for POSIX */
X}
X
X/*
X * Set up the special macro $(MAKE).
X * If we were called with an absolute PATH or without any '/', use argv[0],
X * else compute the absolute PATH by prepending working dir to argv[0].
X */
XLOCAL void
Xsetup_MAKE(name)
X	char	*name;
X{
X	char	wd[MAXPATHNAME + 1];
X	int	len;
X
X	/*
X	 * If argv[0] starts with a slash or contains no slash,
X	 * or on DOS like OS starts with MS-DOS drive letter,
X	 * it is useful as $(MAKE).
X	 */
X#ifdef HAVE_DOS_DRIVELETTER
X	if (name[0] == SLASH || strchr(name, SLASH) == NULL || name[1] == ':') {
X#else
X	if (name[0] == SLASH || strchr(name, SLASH) == NULL) {
X#endif
X		define_var("MAKE", name);
X	} else {
X		/*
X		 * Compute abs pathname for $(MAKE)
X		 */
X		strncpy(wd, curwdir(), sizeof (wd));
X		wd[sizeof (wd)-1] = '\0';
X		len = strlen(wd);
X		if ((strlen(name) + len + 2) < sizeof (wd)) {
X			strcat(wd, PATH_DELIM_STR);
X			strcat(wd, name);
X		}
X		define_var("MAKE", wd);
X	}
X}
X
X/*
X * Transfer object search types into human readable names.
X */
XEXPORT char *
Xsearchtype(mode)
X	int	mode;
X{
X	if (mode == SSRC)
X		return ("src");
X	if (mode == SOBJ)
X		return ("obj");
X	if (mode == SALL)
X		return ("all");
X	return ("invalid Object search mode");
X}
X
X/*
X * Print some 'smake' special macros:
X * .OBJDIR, .SEARCHLIST and .OBJSEARCH
X */
XLOCAL void
Xprintdirs()
X{
X	if (ObjDir != NULL)
X		error(".OBJDIR :\t%s\n", ObjDir);
X
X	error(".OBJSEARCH :\t%s\n", searchtype(ObjSearch));
X
X	if (SearchList != (list_t *) NULL) {
X		register list_t *p;
X			error(".SEARCHLIST :\t");
X		for (p = SearchList; p; p = p->l_next)
X			error("%s ", p->l_obj->o_name);
X		error("\n");
X	}
X}
X
X/*
X * Add a command line macro to our list.
X * This is called by getargs().
X */
XLOCAL int
Xaddcommandline(name)
X	char	*name;
X{
X	if (Debug > 1)
X		error("got_it: %s\n", name);
X
X/* UNIX make: ":;=$\n\t"	*/
X
X	if (!strchr(name, '='))
X		return (NOTAFILE); /* Tell getargs that this may be a flag */
X	if (CmdLDefs == NULL) {
X		Cmdlinesize = 8;
X		CmdLDefs = malloc(Cmdlinesize * sizeof (char *));
X	} else if (Cmdlinesize <= Cmdlinecount) {
X		Cmdlinesize += 8;
X		CmdLDefs = realloc(CmdLDefs, Cmdlinesize * sizeof (char *));
X	}
X	if (CmdLDefs == NULL)
X		comerr("No memory for Commandline Macros.\n");
X
X	CmdLDefs[Cmdlinecount++] = name;
X	return (1);
X}
X
X/*
X * Read in and parse all command line macro definitions from list.
X */
XLOCAL void
Xread_cmdline()
X{
X		int	MFsave = Mfileindex;
X	register int	i;
X
X	if (Cmdlinecount == 0)
X		return;
X
X	/*
X	 * Register the command line macros past the last makefile
X	 */
X	Mfileindex = Mfilecount;
X	if (Mfileindex == MF_IDX_MAKEFILE)
X		Mfileindex = MF_IDX_MAKEFILE + 1;
X	MakeFileNames[Mfileindex] = CmdLMac;
X
X	Mflags |= F_READONLY;
X	for (i = 0; i < Cmdlinecount; i++) {
X		readstring(CmdLDefs[i], CmdLMac);
X		put_env(CmdLDefs[i]);
X	}
X	Mflags &= ~F_READONLY;
X	Mfileindex = MFsave;
X}
X
X/*
X * Export a macro into the environment.
X * This is mainly done by the "export" directive inside a makefile.
X */
XEXPORT void
Xdoexport(oname)
X	char	*oname;
X{
X	obj_t	*obj;
X	list_t	*l;
X	char	*name;
X	int	len;
X
X	obj = objlook(oname, FALSE);
X	if (obj != NULL && basetype(obj->o_type) != '=') /* Must be a macro type target */
X		obj = NULL;
X	if (obj != NULL) {
X		if ((l = obj->o_list) != NULL) {
X			char	*xname;
X
X			len = strlen(oname)+1;	/* Env name + '=' */
X			while (l && l->l_obj->o_name) {
X				xname = l->l_obj->o_name;
X				if (gbuf != NULL)
X					xname = substitute(xname,
X								NullObj, 0, 0);
X				len += strlen(xname)+1;
X				l = l->l_next;
X			}
X			name = malloc(len);
X			if (name == NULL)
X				comerr("Cannot alloc memory for env.\n");
X			name[0] = '\0';
X			l = obj->o_list;
X			strcat(name, oname);
X			strcat(name, "=");
X			while (l && l->l_obj->o_name) {
X				xname = l->l_obj->o_name;
X				if (gbuf != NULL)
X					xname = substitute(xname,
X								NullObj, 0, 0);
X				strcat(name, xname);
X				if (l->l_next == NULL)
X					break;
X				strcat(name, " ");
X				l = l->l_next;
X			}
X			put_env(name);
X		}
X	}
X}
X
X/*
X * Unexport a macro from the environment.
X * This is mainly done by the "unexport" directive inside a makefile.
X */
XEXPORT void
Xdounexport(oname)
X	char	*oname;
X{
X	unset_env(oname);
X}
X
X
X/*
X * Read in and parse all environment vars to make them make macros.
X */
XLOCAL void
Xread_environ()
X{
X		int	MFsave = Mfileindex;
X	register char	**env;
X	extern	char	**environ;
X	char *ev;
X	char *p;
X
X	Dmake -= 2;
X	Mfileindex = MF_IDX_ENVIRON;	/* Index 1 Environment vars */
X
X	if (Eflag)
X		Mflags |= F_READONLY;
X	mfname = Envdefs;
X	for (env = environ; *env; env++) {
X		ev = *env;
X		p = strchr(ev, EQUAL);
X		if (p == NULL)
X			continue;
X		if (strncmp(ev, "SHELL=", 6) == 0)
X			continue;	/* Never import SHELL */
X		*p = '\0';
X		define_var(ev, &p[1]);
X		*p = EQUAL;
X	}
X	mfname = NULL;
X	Mflags &= ~F_READONLY;
X
X	Dmake += 2;
X	Mfileindex = MFsave;
X}
X
X
XEXPORT int
Xmain(ac, av)
X	int	ac;
X	char	*av[];
X{
X		int	failures = 0;
X		int	i;
X		int	cac = ac;
X		char	* const *cav = av;
X		char	*newdir = NULL;
X	static	char	options[] = "help,version,posix,e,i,k,n,N,p,q,r,s,S,t,w,W,d+,D+,xM,xd+,probj,C*,mf&,f&,&";
X
X	save_args(ac, av);
X
X#ifdef	__DJGPP__
X	set_progname("smake");	/* We may have strange av[0] on DJGPP */
X#endif
X
X#ifdef	HAVE_GETPID
X	getpid();		/* Give some info for truss(1) users */
X#endif
X#ifdef	HAVE_GETPGRP
X	getpgrp();		/* Give some info for truss(1) users */
X#endif
X
X#ifdef	_FASCII			/* Mark Williams C	  */
X	stderr->_ff &= ~_FSTBUF; /* setbuf was called ??? */
X
X	setup_env();
X#endif
X	getmakeflags();		/* Default options from MAKEFLAGS=	*/
X	initmakefiles();	/* Set up MakeFileNames[] array		*/
X
X	cac--; cav++;
X	if (getallargs(&cac, &cav, options, &help, &pversion, &posixmode,
X			&Eflag, &Iflag, &Kflag, &Nflag, &NSflag, &Print,
X			&Qflag, &Rflag, &Sflag, &Stopflag, &Tflag,
X			&No_Warn, &Do_Warn,
X			&Debug, &Dmake, &Prdep, &XDebug, &Pr_obj, &newdir,
X			addmakefile, NULL,
X			addmakefile, NULL,
X			addcommandline, NULL) < 0) {
X		errmsgno(EX_BAD, "Bad flag: %s.\n", cav[0]);
X		usage(EX_BAD);
X	}
X	if (help)
X		usage(0);
X	if (pversion) {
X		printf("Smake release %s (%s-%s-%s) Copyright (C) 1985, 87, 88, 91, 1995-2010 Jörg Schilling\n",
X				make_version,
X				HOST_CPU, HOST_VENDOR, HOST_OS);
X		exit(0);
X	}
X	if (newdir) {
X		if (chdir(newdir) < 0)
X			comerr("Cannot change diretory to '%s'\n", newdir);
X	}
X	/*
X	 * XXX Is this the right place to set the options and cmd line macros
X	 * XXX to the exported environment?
X	 * XXX Later in read_makemacs() we may find that MAKEFLAGS= may contain
X	 * XXX garbage that has been propagated to MFCmdline.
X	 * For this reason, we call read_makemacs() before, let it parse only
X	 * and kill any unwanted content from MFCmdline.
X	 */
X	if (NullObj == 0)	/* First make sure we may expand vars	*/
X		NullObj = objlook(Nullstr, TRUE);
X
X	read_makemacs();	/* With gbuf == NULL, this is parse only */
X	setmakeflags();
X	if (Qflag) {
X		Sflag = TRUE;
X		Nflag = TRUE;
X	}
X	if (Stopflag) {
X		Kflag = FALSE;
X	}
X	if (Debug > 0)
X		error("MAKEFLAGS value: '%s'\n", getenv(Makeflags));
X
X	/*
X	 * XXX Reihenfolge bei UNIX make beachten!!!
X	 */
X	if (signal(SIGINT, SIG_IGN) != SIG_IGN)
X		signal(SIGINT, handler);
X#ifdef	SIGQUIT
X	if (signal(SIGQUIT, SIG_IGN) != SIG_IGN)
X		signal(SIGQUIT, handler);
X#endif
X#ifdef	SIGHUP
X	if (signal(SIGHUP, SIG_IGN) != SIG_IGN)
X		signal(SIGHUP, handler);
X#endif
X	if (signal(SIGTERM, SIG_IGN) != SIG_IGN)
X		signal(SIGTERM, handler);
X	curtime = gcurtime();
X	newtime = gnewtime();
X	NullObj->o_date = newtime;	/* Make NullObj "up to date"    */
X
X	initchars();
X	initgbuf(NAMEMAX);	/* Now the Makefile parser becomes usable */
X
X	/*
X	 * The functions read_cmdline() and read_makemacs() are setting
X	 * the F_READONLY flag in all objects. The function read_environ()
X	 * sets F_READONLY if the -e option was specified.
X	 * This differs from the description in POSIX for 'make' but it
X	 * is the only way to allow 'include' directives to work as expected.
X	 * For the same reason, we are reading the macros in the opposite
X	 * order as described in POSIX.
X	 */
X	read_cmdline();		/* First read cmd line macros		*/
X	read_makemacs();	/* then the inherited cmd line macros	*/
X	if (!Rflag)
X		read_defs();	/* read "defaults.smk"			*/
X	setup_MAKE(av[0]);	/* Set up $(MAKE)			*/
X	setup_SHELL();		/* Set up $(SHELL)			*/
X	setup_vars();		/* Set up some known special macros	*/
X	setup_arch();		/* Set up arch specific macros		*/
X	read_environ();		/* Sets F_READONLY if -e flag is present*/
X
X	if (Debug > 0 && Mlevel > 0)
X		error("Starting '%s'[%d] in directory   '%s'\n",
X			av[0], Mlevel, curwdir());
X
X	/*
X	 * Clear default target, then look again in makefiles
X	 */
X	default_tgt = NULL;
X	read_makefiles();
X
X	/*
X	 * Let all objects created later seem to bee in
X	 * last Makefile or in implicit rules if no
X	 * Makefile is present.
X	 */
X	Mfileindex = Mfilecount - 1;
X	if (Mfileindex < MF_IDX_MAKEFILE)
X		Mfileindex = MF_IDX_IMPLICIT;
X
X	setup_dotvars();
X	setup_xvars();		/* Set up compat vars like MAKE_SHELL_FLAG */
X	if (!Rflag)
X		check_old_makefiles();
X
X	if (Pr_obj)		/* -probj Flag				*/
X		printtree();
X	if (Print) {		/* -p Flag				*/
X		prtree();
X		exit(0);	/* XXX Really exit() here for make -p -f /dev/null ??? */
X				/* XXX Posix requires make -p -f /dev/null 2>/dev/null */
X				/* XXX to print the internal macros	*/
X	}
X	on_comerr(exhandler, av[0]);
X	if (Debug > 0)
X		printdirs();	/* .OBJDIR .OBJSEARCH .SEARCHLIST	*/
X
X	makeincs();		/* Re-make included files */
X	omake(Init, TRUE);	/* Make .INIT target	  */
X	cac = ac;
X	cav = av;
X	cac--; cav++;
X	for (i = 0; getfiles(&cac, &cav, options); cac--, cav++, i++)
X		if (!domake(cav[0]))	/* Make targets from command line */
X			failures++;
X
X	if (i == 0 && !domake((char *) NULL))	/* Make default target */
X		failures++;
X	if (failures && Failed) {
X		omake(Failed, TRUE);	/* Make .FAILED target */
X	} else {
X		omake(Done, TRUE);	/* Make .DONE target */
X	}
X#ifdef	DEBUG
X	prmem();
X#endif
X	if (failures > 0)
X		comexit(1);
X	comexit(0);
X	return (0);		/* keep lint happy :-) */
X}
X
X/*
X * Check for old makefile systems without patten matching rules.
X *
X * Old makefile systems only define simple suffix rules. Now that newer smake
X * releases support POSIX suffix rules, the makefile system will only work
X * if the makefile system uses pattern matching rules.
X * We may remove this function in 2005.
X */
XLOCAL void
Xcheck_old_makefiles()
X{
X	obj_t	*o;
X
X	if (Suffixes == NULL)	/* No/Empty .SUFFIXES, no compat probelems */
X		return;
X	if (xssrules == 0)	/* Makefile did not define simple suff rule*/
X		return;
X	if (xpatrules)		/* New makefiles define pattern rules	   */
X		return;
X
X	/*
X	 * All makefiles from the Schily (SING) makefile system define
X	 * _UNIQ=.XxZzy-
X	 */
X	if ((o = objlook("_UNIQ", FALSE)) == NULL)
X		return;
X	if (!streql(".XxZzy-", o->o_list->l_obj->o_name))
X		return;
X
X	errmsgno(EX_BAD, "WARNING: this project uses an old version of the makefile system.\n");
X	comerrno(EX_BAD, "Update the makefiles or call 'smake -r'.\n");
X}
X
X/*
X * Read in and parse the makeflags we got from the MAKEFLAGS= environment var.
X * MAKEFLAGS= may be:
X *
X * -	"et..."			Only option letters.
X *				No space and no macro definitions.
X * -	"NAME=value..."		Only a list of macro definitions (like a
X *				make command line).
X * -	"-et..."		Options as they appear on the command line.
X *				Space and multiple '-' are allowed.
X *	"-et -- NAME=value..."	A complete make command line (except
X *				-f filename options).
X */
XLOCAL void
Xgetmakeflags()
X{
X	int	MFsave = Mfileindex;
X	char	*mf = getenv(Makeflags);
X
X	if (!mf || *mf == '\0')	/* No MAKEFLAGS= or empty MAKEFLAGS=	*/
X		return;
X
X	Mfileindex = MF_IDX_ENVIRON;	/* Index 1 Environment vars */
X	if (*mf != '-') {	/* Only macros if does not start with '-'*/
X		char *p = nextmakemac(mf);	/* Next unescaped ' '    */
X		char *eql = strchr(mf, '=');
X
X		/*
X		 * Be gracious to non POSIX make programs like 'GNUmake' which
X		 * may have "e -- MAKE=smake" in the MAKEFLAGS environment.
X		 * The correct string would rather be "-e -- MAKE=smake".
X		 */
X		if (eql != NULL && (p == NULL || eql < p)) {
X			/*
X			 * No options at all, only cmdline macros.
X			 */
X			MFCmdline = mf;
X			goto out;	/* Allow debug prints */
X		}
X	}
X
X	while (*mf) {
X		switch (*mf) {
X
X		case ' ':
X			break;		/* Ignore blanks */
X
X		case '-':		/* look for " -- " separator */
X			if (mf[1] == '-') {
X				if (mf[2] != ' ') {
X					char *p = nextmakemac(mf);
X
X					errmsgno(EX_BAD,
X					"Found illegal option '%s' in MAKEFLAGS.\n",
X						mf);
X					if (p != NULL) {
X						size_t	d = p - mf;
X						if (d > 50)
X							d = 50;
X						errmsgno(EX_BAD,
X						"Skipping illegal option '%.*s'.\n",
X							(int)d, mf);
X						mf = p;
X						break;
X					} else {
X						errmsgno(EX_BAD,
X						"Ignoring illegal option '%s'.\n",
X							mf);
X					}
X					goto out; /* Allow debug prints */
X				}
X				MFCmdline = &mf[3];
X				goto out;	/* Allow debug prints */
X			}
X			break;		/* Ignore single '-' */
X
X		case 'D':		/* Display makefile */
X			Dmake++;
X			break;
X
X		case 'd':		/* Debug */
X			Debug++;
X			break;
X
X		case 'X':		/* XDebug */
X			XDebug++;
X			break;
X
X		case 'e':		/* Environment overrides vars */
X			Eflag = TRUE;
X			break;
X
X		case 'i':		/* Ignore errors from cmds */
X			Iflag = TRUE;
X			break;
X
X		case 'k':		/* Ignore target errors */
X			Kflag = TRUE;
X			break;
X
X		case 'N':		/* Ignore no Source on dep. */
X			NSflag = TRUE;
X			break;
X
X		case 'n':		/* Do not exec any commands */
X			Nflag = TRUE;
X			break;
X
X		case 'P':		/* POSIX mode */
X			posixmode = TRUE;
X			break;
X
X		case 'p':		/* Print macros/targets */
X			Print = TRUE;
X			break;
X
X		case 'q':		/* Question */
X			Qflag = TRUE;
X			break;
X
X		case 'r':		/* Turn off internal Rules */
X			Rflag = TRUE;
X			break;
X
X		case 's':		/* Silent */
X			Sflag = TRUE;
X			break;
X
X		case 'S':		/* Stop on error (opposite of -k) */
X			Stopflag = TRUE;
X			break;
X
X		case 't':		/* Touch */
X			Tflag = TRUE;
X			break;
X
X		case 'W':		/* Extra Warnings */
X			Do_Warn = TRUE;
X			break;
X
X		case 'w':		/* No Warnings */
X			No_Warn = TRUE;
X			break;
X
X		case 'Z':		/* Print includes */
X			Prdep = TRUE;
X			break;
X		}
X		mf++;
X	}
Xout:
X	/*
X	 * As this is called before we call getargs(), Debug may only be true
X	 * if the 'd' option is present in the MAKEFLAGS environment.
X	 */
X	if (Debug > 0)
X		error("Read MAKEFLAGS:  '%s'\n", getenv(Makeflags));
X
X	Mfileindex = MFsave;
X}
X
X/*
X * Parse a list of macro=value command line macros from the
X * MAKEFLAGS= environment and set up the macro in the make tree.
X * If gbuf is NULL, read_mac() is parse only.
X */
XLOCAL void
Xread_makemacs()
X{
X	register char	*mf = MFCmdline;
X	register char	*p;
X		int	MFsave = Mfileindex;
X
X	if (mf == NULL)
X		return;
X
X	Mfileindex = MF_IDX_ENVIRON;	/* Index 1 Environment vars */
X	while (*mf) {
X		p = nextmakemac(mf);
X		if (p == NULL) {	/* No other macro def follows */
X			if (!read_mac(mf))
X				*mf = '\0';
X			break;
X		} else {		/* Need to temporarily null terminate */
X			*p = '\0';
X			if (!read_mac(mf)) {
X				ovstrcpy(mf, &p[1]);
X			} else {
X				*p = ' ';
X				mf = &p[1];
X			}
X		}
X	}
X	Mfileindex = MFsave;
X}
X
X/*
X * Find next un-escaped blank (' ') which is a separator
X * for a list of macro=value items.
X */
XLOCAL char *
Xnextmakemac(s)
X	char	*s;
X{
X	while (*s) {
X		if (*s == '\\') {	/* escaped character	*/
X			if (*++s == '\0')
X				return (NULL);
X		} else if (*s == ' ') {	/* un-escaped space	*/
X			return (s);
X		}
X		s++;
X	}
X	return (NULL);
X}
X
X/*
X * Remove the escapes that have been introduced before the name=value
X * lists are put together into the MAKEFLAGS= environment.
X * Then parse the result as a string.
X * If gbuf is NULL, read_mac() is parse only.
X */
XLOCAL BOOL
Xread_mac(mf)
X	char	*mf;
X{
X	char	macdef[NAMEMAX*2+1];
X	char	*p;
X
X	p = macdef;
X	while (*mf) {
X		if (p >= &macdef[NAMEMAX*2])
X			break;
X		/*
X		 * Only remove those escape sequences, that we created.
X		 * This is "\\" and "\ ".
X		 */
X		if (mf[0] == '\\' && (mf[1] == '\\' || mf[1] == ' '))
X			mf++;
X		*p++ = *mf++;
X	}
X	*p = '\0';
X
X	if (macdef[0] == '\0')			/* Ignore empty definition */
X		return (TRUE);
X	if (strchr(macdef, '=') == NULL) {	/* Check if it is a macro def*/
X		errmsgno(EX_BAD,
X			"Found illegal macro definition '%s' in MAKEFLAGS.\n",
X			macdef);
X		return (FALSE);
X	}
X
X	if (gbuf == NULL)			/* Parse only and kill	   */
X		return (TRUE);			/* unwanted content	   */
X
X	Mflags |= F_READONLY;
X	readstring(macdef, Makeflags);
X	Mflags &= ~F_READONLY;
X	return (TRUE);
X}
X
X/*
X * Prepare the MAKEFLAGS= environment for export.
X */
XLOCAL void
Xsetmakeflags()
X{
X		/*
X		 * MAKEFLAGS=-	12 bytes incl '\0'
X		 * 3 x 8 bytes=	24 bytes
X		 * 15 flags	15 bytes
X		 * '-- '	 3 bytes
X		 * =====================
X		 *		54 bytes
X		 */
X#define	MAKEENV_SIZE_STATIC	64
Xstatic	char	makeenv[MAKEENV_SIZE_STATIC];
X	char	*p;
X	int	i;
X
X	p = strcatl(makeenv, Makeflags, (char *)NULL);
X	*p++ = '=';
X	*p++ = '-';		/* Posix make includes '-'	*/
X				/* "MAKEFLAGS=-" 12 incl. '\0'	*/
X
X	i = Dmake;		/* Display makefile */
X	if (i > 8)
X		i = 8;
X	while (--i >= 0)
X		*p++ = 'D';
X
X	i = Debug;		/* Debug */
X	if (i > 8)
X		i = 8;
X	while (--i >= 0)
X		*p++ = 'd';
X
X	i = XDebug;		/* XDebug */
X	if (i > 8)
X		i = 8;
X	while (--i >= 0)
X		*p++ = 'X';
X
X	if (Eflag)		/* Environment overrides vars */
X		*p++ = 'e';
X	if (Iflag)		/* Ignore errors from cmds */
X		*p++ = 'i';
X	if (Kflag)		/* Ignore target errors */
X		*p++ = 'k';
X	if (NSflag)		/* Ignore no Source on dep. */
X		*p++ = 'N';
X	if (Nflag)		/* Do not exec any commands */
X		*p++ = 'n';
X	if (posixmode)		/* POSIX mode */
X		*p++ = 'P';
X	if (Print)		/* Print macros/targets */
X		*p++ = 'p';
X	if (Qflag)		/* Question */
X		*p++ = 'q';
X	if (Rflag)		/* Turn off internal Rules */
X		*p++ = 'r';
X	if (Sflag)		/* Silent */
X		*p++ = 's';
X	if (Stopflag)		/* Stop on error (opposite of -k) */
X		*p++ = 'S';
X	if (Tflag)		/* Touch */
X		*p++ = 't';
X	if (Do_Warn)		/* Extra Warnings */
X		*p++ = 'W';
X	if (No_Warn)		/* No Warnings */
X		*p++ = 'w';
X	if (Prdep)		/* Print includes */
X		*p++ = 'Z';
X
X	if (p - makeenv == 11)	/* Empty flags, remove '-' */
X		--p;
X	*p = '\0';
X	define_var(Make_Flags, &makeenv[10]);	/* MAKE_FLAGS= ... */
X	doexport(Make_Flags);
X	setmakeenv(makeenv, p);			/* Add cmdline macs */
X}
X
X/*
X * Strip out macro defs inherited from MAKELAGS, that will be overwritten
X * by command line macro defs.
X * Return new write poiner at end of string.
X */
XLOCAL char *
Xstripmacros(macbase, new)
X	char	*macbase;
X	char	*new;
X{
X	char	*p = strchr(new, '=');
X	char	*p2;
X
X	if (p == NULL)				/* Paranoia */
X		return (macbase + strlen(macbase));
X
X	do {
X		p2 = nextmakemac(macbase);	/* Find next macro delim */
X
X		if (strncmp(macbase, new, p - new) == 0) {
X			/*
X			 * Got a match, need to remove this entry.
X			 */
X			if (p2 == NULL) {	/* This is the only, zap out */
X				*macbase = '\0';
X			} else {		/* Copy rest over current */
X				ovstrcpy(macbase, &p2[1]);
X			}
X		} else if (p2) {		/* Continue with next extry */
X			macbase = &p2[1];
X		}
X	} while (p2);
X	return (macbase + strlen(macbase));
X}
X
X/*
X * Add the actual command line macro definitions to the MAKEFLAGS= string
X * and then putenv() the result.
X */
XLOCAL void
Xsetmakeenv(envbase, envp)
X	char	*envbase;
X	char	*envp;
X{
X	register int	i;
X	register int	l;
X	register int	len = 0;
X	register char	*p;
X	register char	*macbase;
X
X	if (Cmdlinecount == 0 && (MFCmdline == 0 || *MFCmdline == '\0')) {
X		/*
X		 * No command line macros and no inherited command line
X		 * macros from MAKEFLAGS, so just call putenv() and return.
X		 */
X		put_env(envbase);
X		return;
X	}
X
X	if ((envp - envbase) > 10) {	/* envbase[] is currently not empty */
X		strcpy(envp, " -- ");	/* we need a separator to the flags */
X
X		envp += 4;
X		*envp = '\0';
X	}
X	if (MFCmdline)			/* Add one for '\0' or ' ' at end */
X		len = strlen(MFCmdline) + 1;
X
X	for (i = 0; i < Cmdlinecount; i++) {
X		p = CmdLDefs[i];
X		while (*p) {
X			if (*p == '\\' || *p == ' ')
X				len++;
X			len++;
X			p++;
X		}
X		len += 1;		/* Add one for '\0' or ' ' at end */
X	}
X
X	l = strlen(envbase) + len + 1;	/* Add one (see stripmacro comment) */
X	if (l > MAKEENV_SIZE_STATIC) {
X		p = malloc(l);
X		strcpy(p, envbase);
X		envp = p + (envp - envbase);
X		envbase = p;
X	}
X
X	macbase = envp;
X	if (MFCmdline) {
X		for (p = MFCmdline; *p; )
X			*envp++ = *p++;
X		*envp++ = ' ';
X	}
X	*envp = '\0';
X
X	for (i = 0; i < Cmdlinecount; i++) {
X		p = CmdLDefs[i];
X		envp = stripmacros(macbase, p);
X		while (*p) {
X			if (*p == '\\' || *p == ' ')
X				*envp++ = '\\';
X			*envp++ = *p++;
X		}
X		*envp++ = ' ';
X		*envp = '\0';	/* Needed for stripmacros */
X	}			/* But overshoots by one  */
X	*--envp = '\0';
X	put_env(envbase);
X	define_var(Make_Macs, macbase);		/* MAKE_MACS= ... */
X	doexport(Make_Macs);
X}
X
X#define	iswhite(c)	((c) == ' ' || (c) == '\t')
X
X#if	defined(__linux__) || defined(__linux) || \
X	defined(SHELL_IS_BASH) || defined(BIN_SHELL_IS_BASH)
X/*
X * Needed to handle the Linux bash signal bug.
X */
Xint	lpid;
X#endif
X
X/*
X * Execute or print a command line.
X * Return exit code from command line.
X */
XEXPORT int
Xdocmd(cmd, obj)
X	register char	*cmd;
X	obj_t		*obj;
X{
X	int	code;
X	int	pid = 0;
X	int	retries;
X	int	Exit;
X	int	Silent = Sflag;
X	int	NoError = Iflag;
X	int	NoExec = Nflag;
X	BOOL	foundplus = FALSE;
X	obj_t	*shello;
X	char	*shell = NULL;
X	char	*shellflag;
X
X	while (iswhite(*cmd))
X		cmd++;
X/*
X * '-' Ignore error, '@' Silent, '+' Always execute
X * '?' No command dependency checking, '!' Force command dependency checking
X */
X	for (code = 0; code < 5 &&
X	    (*cmd == '@' || *cmd == '-' || *cmd == '+' ||
X			*cmd == '?' || *cmd == '!');
X							code++, cmd++) {
X		if (*cmd == '@')
X			Silent = TRUE;
X		if (*cmd == '-')
X			NoError = TRUE;
X		if (*cmd == '+') {
X			NoExec = FALSE;
X			foundplus = TRUE;
X		}
X		if (*cmd == '?') {
X			/* EMPTY */ ;		/* XXX To be defined !!! */
X		}
X		if (*cmd == '!') {
X			/* EMPTY */ ;		/* XXX To be defined !!! */
X		}
X	}
X	if (foundplus)
X		Silent = FALSE;
X	else if (!Silent && is_inlist(".SILENT", obj->o_name))
X		Silent = TRUE;
X	if (!NoError && is_inlist(".IGNORE", obj->o_name))
X		NoError = TRUE;
X
X	if (!Silent || NoExec || Debug > 0) {
X/*		error("...%s\n", cmd);*/
X		printf("%s%s\n", posixmode?"\t":"...", cmd);	/* POSIX !!! */
X	}
X	if (NoExec && !found_make)
X		return (0);
X
X	curtarget = obj;
X
X	shellflag = get_var(NoError ? "MAKE_SHELL_IFLAG":"MAKE_SHELL_FLAG");
X	if (shellflag == NULL || *shellflag == '\0') {
X		if (posixmode)
X			shellflag = pceflag;
X		else
X			shellflag = NoError ? cflag:ceflag;
X	}
X
X	shello = objlook("SHELL", FALSE);
X	shell = get_var("SHELL");
X	if (shell == NULL || *shell == '\0') {
X		shello = NULL;
X		shell = "/bin/sh";
X	}
X
X#if	!defined(USE_SYSTEM) &&			/* XXX else system() ??? */ \
X	(((defined(HAVE_FORK) || defined(HAVE_VFORK)) && \
X		defined HAVE_EXECL) || defined(JOS))
X
X#if defined(__EMX__) || defined(__DJGPP__)
X#ifdef	__EMX__
X	pid = spawnl(P_NOWAIT, shell, filename(shell), shellflag,
X							cmd, (char *)NULL);
X	if (pid < 0)
X		comerr("Can't spawn %s.\n", shell);
X#else
X	if (shello == NULL)
X		comerr("Can't find sh.exe.\n");		/* DJGPP setup problem */
X
X	Exit = spawnl(P_WAIT, shell, filename(shell), shellflag,
X							cmd, (char *)NULL);
X	if (Exit) {
X		/* TODO: DOS error code to UNIX error code */
X		Exit = 0xFF<<8;
X	}
X#endif
X#else
X	/*
X	 *  Do several tries to fork child to allow working on loaded systems.
X	 */
X	for (retries = 0; retries < 10; retries++) {
X		pid = vfork();
X		if (pid >= 0)
X			break;
X		sleep(1L);		/* Wait for resources to become free.*/
X	}
X	if (pid < 0)
X#ifdef	vfork
X		comerr("Can't fork.\n");
X#else
X		comerr("Can't vfork.\n");
X#endif
X
X	if (pid == 0) {		/* Child process: do the work. */
X		/*
X		 * Standard UNIX/POSIX case.
X		 * We used to call /bin/sh -ce 'cmd' but we get problems on QNX
X		 * and UNIX-98 requests that the command shall be called as in
X		 * system() which means /bin/sh -c 'cmd'. As /bin/sh -c 'cmd'
X		 * does not work correctly for complex commands, we now support
X		 * MAKE_SHELL_IFLAG/MAKE_SHELL_FLAG which by default behaves
X		 * like UNIX with /bin/sh -ce 'cmd'.
X		 */
X		execl(shell, filename(shell), shellflag,
X							cmd, (char *)NULL);
X		comerr("Can't exec %s.\n", shell);
X	}
X#endif	/* __EMX__ || __DJGPP__ */
X
X#if	defined(__linux__) || defined(__linux) || \
X	defined(SHELL_IS_BASH) || defined(BIN_SHELL_IS_BASH)
X	/*
X	 * Needed to handle the Linux bash signal bug.
X	 */
X	lpid = pid;
X#endif
X
X	/* Parent process: wait for child. */
X#ifndef	__DJGPP__
X	if ((code = wait((WAIT_T *)&Exit)) != pid)
X		comerrno(Exit, "code %d waiting for %s.\n", geterrno(), shell);
X#endif
X#else	/* Use system() */
X	Exit = system(cmd);
X#endif
X	if (Exit) {
X		errmsgno(Exit>>8, "*** Code %d from command line for target '%s'%s.\n",
X			Exit>>8,
X			obj->o_name,
X			NoError?" (ignored)":"");
X		if (Silent && Debug <= 0) {
X			errmsgno(EX_BAD, "The following command caused the error:\n");
X			error("%s\n", cmd);
X		}
X	}
X	curtarget = (obj_t *)NULL;
X
X	if (NoError)
X		return (0);
X	return (Exit);
X}
X
X#ifdef	__needed__
X/*
X * Check for Shell meta characters
X */
XLOCAL BOOL
Xhas_meta(s)
X	register char	*s;
X{
X	register char	c;
X	register char	*smeta = "#|=^();&<>*?[]:$`'\"\\\n";
X
X	while ((c = *s++) != '\0') {
X		if (strchr(smeta, c)) {
X			return (TRUE);
X		}
X	}
X	return (FALSE);
X}
X#endif
X
X#ifdef	tos
X#		include "osbind.h"
X#endif
X
X/*
X * Move a target file to ObjDir.
X */
XEXPORT BOOL
Xmove_tgt(from)
X	register obj_t	*from;
X{
X	date_t	fromtime;
X	int	code;
X	char	_objname[TYPICAL_NAMEMAX];
X	char	*objname = NULL;
X	BOOL	ret = TRUE;
X
X	/*
X	 * Move only if:
X	 *	objdir to corresponding srcdir exists
X	 *	target is known in Makefile
X	 */
X	if ((ObjDir == NULL && from->o_level == OBJLEVEL) ||
X						from->o_level < OBJLEVEL)
X		return (TRUE);
X
X	fromtime = gftime(from->o_name);
X	if (fromtime == 0)		/* Nothing to move found */
X		return (TRUE);
X
X	if (strchr(from->o_name, SLASH)) /* Only move from current directory */
X		return (TRUE);
X
X	if (Debug > 3) error("move: from->o_level: %d\n", from->o_level);
X	if ((objname = build_path(from->o_level, from->o_name, from->o_namelen,
X					_objname, sizeof (_objname))) == NULL)
X		return (FALSE);
X	if (!Sflag || Nflag)
X		printf("%smove %s %s\n", posixmode?"\t":"...", from->o_name, objname);
X	if (Nflag) {
X		ret = TRUE;
X		goto out;
X	}
X
X	if ((from->o_name == objname) ||
X	    (gfileid(from->o_name) == gfileid(objname))) {
X		errmsgno(EX_BAD, "Will not move '%s' to itself.\n",
X							from->o_name);
X		ret = TRUE;
X		goto out;
X	}
X#	ifdef	tos
X	unlink(objname);
X	if ((code = Frename(0, from->o_name, objname)) < 0) {
X		if (code == EXDEV) {
X			code = copy_file(from->o_name, objname);
X			if (unlink(from->o_name) < 0)
X				errmsg("Can't remove old name '%s'.\n",
X								from->o_name);
X		} else {
X			errmsgno(-code, "Can't rename '%s' to '%s'.\n",
X						from->o_name, objname);
X		}
X	}
X	if (code < 0) {
X		ret = FALSE;
X		goto out;
X	}
X#	else
X	if ((code = rename(from->o_name, objname)) < 0) {
X		if (geterrno() == EXDEV) {
X			if (rmdir(objname) < 0 && geterrno() == ENOTDIR)
X				unlink(objname);
X			code = copy_file(from->o_name, objname);
X			if (unlink(from->o_name) < 0)
X				errmsg("Can't remove old name '%s'.\n",
X							from->o_name);
X		} else {
X			errmsg("Can't rename '%s' to '%s'.\n",
X						from->o_name, objname);
X		}
X	}
X	if (code < 0) {
X		ret = FALSE;
X		goto out;
X	}
X#endif	/* tos */
Xout:
X	if (objname != NULL && objname != from->o_name && objname != _objname)
X		free(objname);
X	return (ret);
X}
X
X/*
X * Copy File if we cannot rename the file.
X */
X#ifdef	tos
XLOCAL int
Xcopy_file(from, objname)
X	char	*from;
X	char	*objname;
X{
X	int	fin;
X	int	fout;
X	int	cnt = -1;
X
X	if ((fin = open(from, 0)) < 0)
X		errmsg("Can't open '%s'.\n", from);
X	else {
X		if ((fout = creat(objname, 0666)) < 0)
X			errmsg("Can't create '%s'.\n", objname);
X		else {
X			while ((cnt = read(fin, gbuf, gbufsize)) > 0)
X				if (write(fout, gbuf, cnt) != cnt) {
X					errmsg("Write error on '%s'.\n",
X								objname);
X					cnt = -1;
X					break;
X				}
X			close(fout);
X		}
X		close(fin);
X	}
X	return (cnt);
X}
X#else
XLOCAL int
Xcopy_file(from, objname)
X	char	*from;
X	char	*objname;
X{
X	FILE	*fin;
X	FILE	*fout;
X	int	cnt = -1;
X
X	if ((fin = fileopen(from, "rub")) == 0)
X		errmsg("Can't open '%s'.\n", from);
X	else {
X		if ((fout = fileopen(objname, "wtcub")) == 0)
X			errmsg("Can't create '%s'.\n", objname);
X		else {
X			while ((cnt = fileread(fin, gbuf, gbufsize)) > 0)
X				filewrite(fout, gbuf, cnt);
X			fclose(fout);
X		}
X		fclose(fin);
X	}
X	return (cnt);
X}
X#endif
X
X/*
X * This function behaves similar to the UNIX 'touch' command.
X */
XEXPORT BOOL
Xtouch_file(name)
X	char	*name;
X{
X	FILE	*f;
X	char	_objname[TYPICAL_NAMEMAX];
X	char	*objname = _objname;
X	size_t	objlen = sizeof (_objname);
X	char	*np = NULL;
X#ifndef	HAVE_UTIME
X	char	c;
X#endif
X
Xagain:
X	if (ObjDir == NULL)
X		objname = name;
X	else if (snprintf(objname, objlen, "%s%s%s", ObjDir,
X				slash, filename(name)) >= objlen) {
X		objlen = strlen(filename(name)) + ObjDirlen + slashlen + 1;
X		objname = np = ___realloc(np, objlen, "touch path");
X		goto again;
X	}
X#ifdef	__is_this_ok__
X	if (!gftime(objname))
X		snprintf(_objname, sizeof (_objname), name);
X#endif
X	if (!Sflag)
X		printf("%stouch %s\n", posixmode?"\t":"...", objname);
X	if (Nflag)
X		return (TRUE);
X	if ((f = fileopen(objname, "rwcub")) != (FILE *)NULL) {
X#ifdef	HAVE_UTIME
X		utime(objname, NULL);
X#else
X		c = getc(f);
X		fileseek(f, (off_t)0);
X		putc(c, f);
X#endif
X		fclose(f);
X		if (np)
X			free(np);
X		return (TRUE);
X	}
X	if (np)
X		free(np);
X	return (FALSE);
X}
X
X#	include <schily/stat.h>
X#	define	STATBUF		struct stat
X
X/*
X * Get current time.
X */
XLOCAL date_t
Xgcurtime()
X{
X	return ((date_t) time((time_t *) 0));
X}
X
X/*
X * Get a time that is in the future (as far as possible).
X */
XLOCAL date_t
Xgnewtime()
X{
X	time_t	t = curtime;
X	time_t	a = YEARSECS;
X	int	i = 0;
X
X	while ((a * 2) > a) {
X		a *= 2;
X		if (++i > 100)
X			break;
X	}
X	i = 0;
X	while (a > 0) {
X		while ((t + a) > t) {
X			t += a;
X			if (++i > 100)
X				break;
X		}
X		if (i > 1000)
X			break;
X		a /= 2;
X	}
X	while (t == NOTIME || t == BADTIME ||
X			t == RECURSETIME || t == PHONYTIME) {
X		t--;
X	}
X/*printf("i: %d, %lu, %lx, %s\n", i, t, t, prtime(-3));*/
X	return (t);
X}
X
X/*
X * Get the time of last modification for a file.
X * Cannot call it gmtime()
X */
XEXPORT date_t
Xgftime(file)
X	char	*file;
X{
X	STATBUF	stbuf;
X	char	this_time[32];
X	char	cur_time[32];
X
X	stbuf.st_mtime = NOTIME;
X	if (stat(file, &stbuf) < 0) {
X		/*
X		 * GNU libc.6 destroys st_mtime
X		 */
X		stbuf.st_mtime = NOTIME;
X	} else {
X		register time_t	t;
X		/*
X		 * Make sure that the time for an existing file is not
X		 * in the list of special time stamps.
X		 */
X		t = stbuf.st_mtime;
X		while (t == NOTIME || t == BADTIME ||
X		    t == RECURSETIME || t == MAKETIME || t == PHONYTIME) {
X			t++;
X		}
X		stbuf.st_mtime = t;
X	}
X
X	if (Debug > 3)
X		error("gftime(%s) = %s\n", file, prtime(stbuf.st_mtime));
X
X	if (stbuf.st_mtime > (curtime +5)) {
X		date_t	xcurtime;
X
X		xcurtime = gcurtime();
X		if (stbuf.st_mtime <= (xcurtime +5)) {
X			curtime = xcurtime;
X			return (stbuf.st_mtime);
X		}
X		strncpy(this_time, prtime(stbuf.st_mtime), sizeof (this_time));
X		this_time[sizeof (this_time)-1] = '\0';
X		strncpy(cur_time, prtime(curtime), sizeof (cur_time));
X		cur_time[sizeof (cur_time)-1] = '\0';
X		errmsgno(EX_BAD,
X			"WARNING: '%s' has modification time in the future (%s > %s).\n",
X			file, this_time, cur_time);
X	}
X	return (stbuf.st_mtime);
X}
X
X/*
X * Check if file is a directory.
X */
XLOCAL BOOL
Xisdir(file)
X	char	*file;
X{
X	STATBUF	stbuf;
X
X	if (stat(file, &stbuf) < 0)
X		return (TRUE);
X	if ((stbuf.st_mode&S_IFMT) == S_IFDIR)
X		return (TRUE);
X	return (FALSE);
X}
X
X/*
X * Get a unique number for a file to prevent moving targets to themselves.
X * XXX inode number is now long !!!
X */
XEXPORT Llong
Xgfileid(file)
X	char	*file;
X{
X	STATBUF stbuf;
X	Llong	result;
X
X	/*
X	 * Setup a unique default. In case stat() will fail.
X	 */
X	stbuf.st_ino = (ino_t) (long) file;
X	stbuf.st_dev = 0;
X	if (stat(file, &stbuf) < 0) {
X		/*
X		 * GNU libc.6 destroys st_mtime
X		 * Paranoia .... we fall back here too.
X		 */
X		stbuf.st_ino = (ino_t) (long) file;
X		stbuf.st_dev = 0;
X	}
X#if	SIZEOF_LLONG > 4
X	result = stbuf.st_dev;
X	result <<= 32;
X	result |= stbuf.st_ino;
X#else
X	result = stbuf.st_dev;
X	result <<= 16;
X	result |= stbuf.st_ino;
X#endif
X	if (Debug > 3)
X		error("gfileid: %s %lld\n", file, result);
X	return (result);
X}
X
X/*
X * Transfer UNIX time stamps into human readable names.
X * Take care of our "special timestamps".
X */
XEXPORT char *
Xprtime(date)
X	date_t	date;
X{
X	char	*s;
X
X	if (date == (date_t)0)
X		return ("File does not exist");
X	if (date == BADTIME)
X		return ("File could not be made");
X	if (date == RECURSETIME)
X		return ("Recursive dependencies");
X	if (date == MAKETIME)
X		return ("File is currently being made");
X	if (date == PHONYTIME)
X		return ("File is phony");
X	if (date == newtime)
X		return ("Younger than any file");
X
X	s = ctime((const time_t *)&date);
X	s[strlen(s)-1] = '\0';
X	return (s);
X}
X
X/*
X * Our general signal handler. Does some needed clean up and includes
X * workarounds for buggy OS like Linux.
X */
XLOCAL void
Xhandler(signo)
X	int	signo;
X{
X	char	*name;
X
X	signal(signo, handler);
X	errmsgno(EX_BAD, "Got signal %d\n", signo);
X	if (!curtarget)
X		goto out;
X
X	errmsgno(EX_BAD, "Current target is: %s precious: %d phony: %d\n",
X			curtarget->o_name,
X			isprecious(curtarget),
X			isprecious(curtarget));
X
X/*	while(wait(0) >= 0) */
X/*		;*/
X	/*
X	 * Keine Bibliotheken
X	 * Kein -t, -q etc.
X	 */
X	if (Tflag || Print || Qflag || Nflag)
X		goto out;
X	if (isprecious(curtarget))
X		goto out;
X	if (isphony(curtarget))
X		goto out;
X
X	name = curtarget->o_name;
X
X	if (isdir(name)) {
X		error("*** %s not removed.\n", name);
X		goto out;
X	}
X	if (unlink(name) >= 0) {
X		error("*** %s removed.\n", name);
X	} else {
X		errmsg("*** %s could not be removed.\n", name);
X	}
X	/*
X	 * Test ob ObjDir/name existiert und neuer als vorher ist.
X	 */
X
Xout:
X
X#if	defined(__linux__) || defined(__linux) || \
X	defined(SHELL_IS_BASH) || defined(BIN_SHELL_IS_BASH)
X#if	defined(HAVE_SIGNAL) && defined(HAVE_KILL) && \
X			defined(SIG_IGN) && defined(SIGKILL)
X	/*
X	 * Linux signal handling is broken. This is caused by a bug in 'bash'.
X	 * Bash does jobcontrol even if called as "sh -ce 'command'".
X	 * This is illegal. Only the foregound (make) process and with some
X	 * bash versions the descendant 'make' processes are killed.
X	 * The following code tries to kill the others too.
X	 */
X	signal(signo, SIG_IGN);		/* Make us immune to death ;-)	*/
X
X	/*
X	 * First shoot everyone into the foot.
X	 */
X	kill(lpid, signo);		/* Kill bash that is our child	*/
X	kill(-lpid, signo);		/* Kill possible bash children	*/
X	kill(-getpgrp(), signo);	/* Kill our process group	*/
X
X	/*
X	 * Now shoot everyone into the head.
X	 */
X	kill(lpid, SIGKILL);		/* Kill bash that is our child	*/
X	kill(-lpid, SIGKILL);		/* Kill possible bash children	*/
X	kill(-getpgrp(), SIGKILL);	/* Kill our process group	*/
X#endif
X#endif
X	comexit(signo);
X}
X
XLOCAL void
Xexhandler(excode, arg)
X	int	excode;
X	void	*arg;
X{
X	/*
X	 * Ausgabe wenn:
X	 *
X	 *	-	excode != 0 && Mlevel > 0
X	 *	-	Debug > 0   && Mlevel > 0
X	 */
X	if ((Debug <= 1 && excode == 0) || Mlevel <= 0)
X		return;
X
X	errmsgno(EX_BAD, "Leaving  '%s'[%d] from directory '%s'\n",
X			(char *)arg, Mlevel, curwdir());
X	if (default_tgt != NULL)
X		errmsgno(EX_BAD,
X			"Default commandline target: '%s'\n", default_tgt->o_name);
X	errmsgno(EX_BAD, "Doing                       exit(%d)\n", excode);
X}
X
X/*
X * Return current working directory in an allocated string.
X */
XEXPORT	char *
Xcurwdir()
X{
X	static	char	*wdir;
X		char	wd[MAXPATHNAME + 1];
X
X	if (wdir != NULL)
X		return (wdir);
X
X	if (getcwd(wd, MAXPATHNAME) == NULL) {
X		wd[0] = '/';
X		wd[1] = '\0';
X	}
X	wdir = malloc(strlen(wd)+1);
X	if (wdir == NULL)
X		comerr("Cannot malloc working dir.\n");
X	strcpy(wdir, wd);
X	return (wdir);
X}
X
X/*
X * Search for the defaults.smk file in the PATH of the user.
X * Assume that the file is ... bin/../lib/defaults.smk
X */
XLOCAL char *
Xgetdefaultsfile()
X{
X	return (searchfileinpath("lib/defaults.smk"));
X}
X
XLOCAL char *
Xsearchfileinpath(name)
X	char	*name;
X{
X	char	*path = getenv("PATH");
X	char	pbuf[NAMEMAX];
X	char	*nbuf = pbuf;
X	char	*np;
X	int	nlen = strlen(name);
X#ifdef	HAVE_GETEXECNAME
X	char	*pn = (char *)getexecname();
X#else
X	char	*pn = get_progname();
X#endif
X
X	if (strchr(pn, '/') != NULL) {
X		strncpy(nbuf, pn, sizeof (pbuf));
X		nbuf[sizeof (pbuf) - 1] = '\0';
X		np = nbuf + strlen(nbuf);
X
X		while (np > nbuf && np[-1] != '/')
X			*--np = '\0';
X		pn = &nbuf[sizeof (pbuf) - 1];
X		if ((np = searchonefile(name, nbuf, np, pn)) != NULL)
X			return (np);
X	}
X
X	if (path == NULL)
X		return (NULL);
X
X
X#ifdef __DJGPP__
X	strbs2s(path);	/* PATH under DJGPP can contain both slashes */
X#endif
X
X	pn = &nbuf[sizeof (pbuf) - 1];
X	for (;;) {
X		np = nbuf;
X		while (*path != PATH_ENV_DELIM && *path != '\0' &&
X		    np < &nbuf[sizeof (pbuf) - nlen])
X				*np++ = *path++;
X		*np = '\0';
X		if ((np = searchonefile(name, nbuf, np, pn)) != NULL)
X			return (np);
X
X		if (*path == '\0')
X			break;
X		path++;
X	}
X	return (NULL);
X}
X
XLOCAL char *
Xsearchonefile(name, nbuf, np, ep)
X	register char	*name;
X	register char	*nbuf;
X	register char	*np;
X	register char	*ep;
X{
X	while (np > nbuf && np[-1] == '/')
X		*--np = '\0';
X	if (np >= &nbuf[4] && streql(&np[-4], "/bin"))
X		np = &np[-4];
X	*np++ = '/';
X	*np   = '\0';
X	strncpy(np, name, ep - np);
X	*ep = '\0';
X
X	if (gftime(nbuf)) {
X		np = malloc(strlen(nbuf)+1);
X		if (np == NULL)
X			return (NULL);
X		strcpy(np, nbuf);
X		return (np);
X	}
X	return (NULL);
X}
X
XLOCAL int
Xput_env(new)
X	char	*new;
X{
X	if (strncmp(new, "SHELL=", 6) == 0)
X		return (0);		/* Never export SHELL */
X
X	return (putenv(new));
X}
X
XLOCAL int
Xunset_env(name)
X	char	*name;
X{
X	if (strcmp(name, "SHELL") == 0)
X		return (0);		/* Never unexport SHELL */
X
X	unsetenv(name);			/* OpenBSD deviates and returns void */
X	return (0);
X}
X
X#ifdef __DJGPP__
XLOCAL char *
Xstrbs2s(s)
X	char	*s;
X{
X	char	*tmp = s;
X
X	if (tmp) {
X		while (*tmp) {
X			if (*tmp == '\\')
X				*tmp = '/';
X			tmp++;
X		}
X	}
X	return (s);
X}
X#endif
X
X#ifndef	HAVE_PUTENV
X
XEXPORT	int	putenv		__PR((const char *new));
XLOCAL	int	ev_find		__PR((const char *s));
X
XLOCAL	BOOL	ealloc = FALSE;	/* TRUE if environ is already allocated */
X
X/*
X * Our local putenv implementation for systems that don't have it.
X */
XEXPORT int
Xputenv(new)
X	const char	*new;
X{
X	char 		**newenv;
X	register int	idx;
X
X	if ((idx = ev_find(new)) >= 0) {
X		/*
X		 * An old entry with the same name exists, replace it.
X		 */
X		environ[idx] = (char *)new;
X	} else {
X		/*
X		 * If idx is < 0, we need to expand environ for the new entry.
X		 * In this case -idx is the inverted size of the old environ.
X		 */
X		idx = -idx + 1;		/* Add space for new entry */
X		if (ealloc) {
X			/*
X			 * environ is allocated, expand with realloc
X			 */
X			newenv = (char **)realloc(environ, idx*sizeof (char *));
X			if (newenv == NULL)
X				return (-1);
X		} else {
X			/*
X			 * environ is orig space, copy to malloc'ed space
X			 */
X			ealloc = TRUE;
X			newenv = (char **)malloc(idx*sizeof (char *));
X			if (newenv == NULL)
X				return (-1);
X			(void) movebytes((char *)environ, (char *)newenv,
X						(int)(idx*sizeof (char *)));
X		}
X		environ = newenv;
X		environ[idx-2] = (char *)new;
X		environ[idx-1] = NULL;
X	}
X	return (0);
X}
X
X/*
X * Check if arg of form name=value is part of environ.
X * Return index on success and -environ_size if not.
X */
XLOCAL int
Xev_find(s)
X	register const char	*s;
X{
X	register int		i = 0;
X	register const char	*ep;
X	register const char	*s2;
X
X	for (i = 0; environ[i] != NULL; i++) {
X		/*
X		 * Find string in environment entry.
X		 */
X		for (ep = environ[i], s2 = s; *ep == *s2++; ep++) {
X			if (*ep == '=')
X				return (i);
X		}
X	}
X	return (-(++i));
X}
X#endif	/* HAVE_PUTENV */
X
X#ifndef	HAVE_UNSETENV
X
XEXPORT	int	unsetenv		__PR((const char *name));
X
X/*
X * Our local unsetenv implementation for systems that don't have it.
X */
XEXPORT int
Xunsetenv(name)
X	const char	*name;
X{
X	register int		i = 0;
X	register const char	*ep;
X	register const char	*s2;
X
X	if (name == NULL || name[0] == '\0')
X		return (0);
X
X	for (i = 0; environ[i] != NULL; i++) {
X		/*
X		 * Find string in environment entry.
X		 */
X		for (ep = environ[i], s2 = name; *ep++ == *s2++; )
X			;
X		if (*--ep == '=' && *--s2 == '\0')
X			goto found;
X	}
X	return (0);
Xfound:
X	for (; environ[i] != NULL; i++)
X		environ[i] = environ[i+1];
X	return (0);
X}
X#endif	/* HAVE_UNSETENV */
X
X/*
X * A strcpy() that works with overlapping buffers
X */
XLOCAL void
Xovstrcpy(p2, p1)
X	register char	*p2;
X	register char	*p1;
X{
X	while ((*p2++ = *p1++) != '\0')
X		;
X}
X
END-of-smake-1.2.1/smake/make.c
echo x - smake-1.2.1/smake/make.h
sed 's/^X//' >smake-1.2.1/smake/make.h << 'END-of-smake-1.2.1/smake/make.h'
X/* @(#)make.h	1.90 09/11/25 Copyright 1985, 87, 91, 1995-2009 J. Schilling */
X/*
X *	Definitions for make.
X *	Copyright (c) 1985, 87, 91, 1995-2009 by J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_UTYPES_H
X#include <schily/utypes.h>	/* Includes sys/types.h	*/
X#endif
X#ifndef	_SCHILY_STANDARD_H
X#include <schily/standard.h>	/* #defines BOOL	*/
X#endif
X
X/*
X * XXX if sizeof(date_t) is < sizeof(time_t) there may be problems
X */
Xtypedef unsigned long	date_t;
X
X/*
X * XXX It may be a good idea to make "newtime" > RECURSETIME as
X * XXX the date of unknown targets is set to RECURSETIME before
X * XXX it is made.
X *
X * If we add new entries here, we need to also add a related entry
X * to the function prtime().
X */
X#define	NOTIME		((date_t)0)	/* Obj not (yet) found   */
X#define	BADTIME		((date_t)-1)	/* Obj could not be made */
X#define	RECURSETIME	((date_t)-2)	/* Obj depends on itself */
X#define	MAKETIME	((date_t)-3)	/* Obj is currently made */
X#define	PHONYTIME	((date_t)-4)	/* Obj is Phony		 */
X
X/*
X * We may need to check whether PHONYTIME is a "valid" time...
X */
X#define	VALIDTIME(t)	((t) > NOTIME && \
X			(t) < PHONYTIME)
X
X					/* NOTE: MAXLEVEL must be odd */
X#define	MAXLEVEL	255		/* Obj is not yet searched for */
X#define	WDLEVEL		0		/* Obj is in working dir (".") */
X#define	OBJLEVEL	1		/* Obj is in .OBJDIR */
X
X#define	SSRC		1		/* Search in source directories	*/
X#define	SOBJ		2		/* Search in obj directories */
X#define	SALL		(SSRC | SOBJ)	/* Search in source/obj directories */
X
X#ifdef	pdp11
X#define	NAMEMAX		512		/* Max size of a name	*/
X#else
X#define	NAMEMAX		4096		/* Max size of a name POSIX linelen */
X#endif
X#define	TYPICAL_NAMEMAX	128		/* Namelen that avoids malloc() */
X
X/*
X * one unique element is used for each target or member in a dependency list
X * also used for macros and macro definition lists
X */
Xtypedef struct obj {
X	struct	obj	*o_left;	/* Left next node in binary tree    */
X	struct	obj	*o_right;	/* Right next node in binary tree   */
X	struct	list	*o_list;	/* List of dependencies for target  */
X	struct	cmd	*o_cmd;		/* List of commands for this target */
X		char	*o_name;	/* Name of this target		    */
X	struct	obj	*o_node;	/* Auxilliary node pointer	    */
X		date_t	o_date;		/* Current date for this target	    */
X		size_t	o_namelen;	/* strlen(o_name)		    */
X		short	o_type;		/* Type of node			    */
X		short	o_flags;	/* Flags for this node		    */
X		short	o_level;	/* Obj level this target was found  */
X		short	o_fileindex;	/* Makefile idx for this definition */
X} obj_t;
X
X#define	F_READONLY	1		/* Prevents overwriting the value   */
X#define	F_CMDLINE	2		/* From commandline		    */
X#define	F_EXPORT	4		/* Export to environment	    */
X#define	F_MULTITARGET	8		/* Multiple targets for one rule    */
X#define	F_DCOLON	16		/* Intermediate :: object	    */
X#define	F_TERM		32		/* Object is source of a TERM rule  */
X#define	F_PERCENT	64		/* o_name has % in pattern dep list */
X#define	F_PATRULE	128		/* Pattern rule pointer in o_node   */
X
X/*
X * list element, used to build dependency lists from unique obj elements
X */
Xtypedef struct list {
X	struct	list	*l_next;	/* Next entry in dependency list    */
X	struct	obj	*l_obj;		/* Obj structure for this entry	    */
X} list_t;
X
X/*
X * element for commands that are used to update a target
X * one allocated for each command line
X */
Xtypedef struct cmd {
X	struct	cmd	*c_next;	/* Next command for this target	    */
X		char	*c_line;	/* Command line for this element    */
X} cmd_t;
X
X/*
X * Element used to describe pattern rules (rules that contain a '%' sign)
X * format is:
X *	target: source	(a%b: [ c%d ...])
X *		cmdlist
X */
Xtypedef struct patrule {
X	struct	patrule	*p_next;	/* Next pattern rule		    */
X	struct	cmd	*p_cmd;		/* List of commands for this rule   */
X	struct	obj	*p_name;	/* Node for complete target name    */
X	struct	list	*p_list;	/* List of dependencies for rule    */
X	int		p_flags;	/* Flags related to this rule	    */
X#ifdef	xxx
X	struct	obj	*p_tgt_prefix;	/*				    */
X	struct	obj	*p_tgt_suffix;	/*				    */
X	struct	obj	*p_src_prefix;	/*				    */
X	struct	obj	*p_src_suffix;	/*				    */
X#else
X	char		*p_tgt_prefix;	/* "a" (the string before the '%')  */
X	char		*p_tgt_suffix;	/* "b" (the string after the '%')   */
X	char		*p_src_prefix;	/* "c" (the string before the '%')  */
X	char		*p_src_suffix;	/* "d" (the string after the '%')   */
X	size_t		p_tgt_pfxlen;
X	size_t		p_tgt_suflen;
X	size_t		p_src_pfxlen;
X	size_t		p_src_suflen;
X#endif
X} patr_t;
X
X/*
X * Definitions for Patrule Flags
X */
X#define	PF_TERM	0x01			/* This is a terminator rule	    */
X
X
X#define	EQUAL	'='
X#define	COLON	':'
X#define	SEMI	';'
X#define	ADDMAC	('=' | ('+'<<8)) /* +=	 */
X#define	ASSIGN	('=' | (':'<<8)) /* :=	 */
X#define	DCOLON	(':' | (':'<<8)) /* ::	 */
X#define	SHVAR	0x1001		 /* :sh= */
X
X#define	basetype(x)	((x) & 0xFF)
X
X/*
X * make.c
X */
Xextern	void	usage		__PR((int exitcode));
Xextern	void	setup_dotvars	__PR((void));
Xextern	char	*searchtype	__PR((int mode));
Xextern	void	doexport	__PR((char *));
Xextern	void	dounexport	__PR((char *));
Xextern	int	docmd		__PR((char * cmd, obj_t * obj));
Xextern	BOOL	move_tgt	__PR((obj_t * from));
Xextern	BOOL	touch_file	__PR((char * name));
Xextern	date_t	gftime		__PR((char * file));
Xextern	Llong	gfileid		__PR((char * file));
Xextern	char	*prtime		__PR((date_t  date));
Xextern	char	*curwdir	__PR((void));
X
X/*
X * archconf.c
X */
Xextern	void	setup_arch	__PR((void));
X
X/*
X * readfile.c
X */
Xextern	char	*peekrdbuf	__PR((void));
Xextern	char	*getrdbuf	__PR((void));
Xextern	int	getrdbufsize	__PR((void));
Xextern	void	setincmd	__PR((BOOL isincmd));
Xextern	void	getch		__PR((void));
Xextern	int	peekch		__PR((void));
Xextern	void	skipline	__PR((void));
Xextern	void	readstring	__PR((char * str, char * strname));
Xextern	void	readfile	__PR((char * name, BOOL  must_exist));
Xextern	void	doinclude	__PR((char * name, BOOL  must_exist));
Xextern	void	makeincs	__PR((void));
X
X/*
X * parse.c
X */
Xextern	void	parsefile	__PR((void));
Xextern	char	*get_var	__PR((char *name));
Xextern	void	define_var	__PR((char *name, char *val));
Xextern	list_t	*cvtvpath	__PR((list_t *l));
Xextern	BOOL	is_inlist	__PR((char *objname, char *name));
Xextern	BOOL	nowarn		__PR((char *name));
Xextern	obj_t	*objlook	__PR((char * name, BOOL  create));
Xextern	list_t	*objlist	__PR((char * name));
Xextern	obj_t	*ssufflook	__PR((char * name, BOOL  create));
Xextern	BOOL	check_ssufftab	__PR((void));
Xextern	void	printtree	__PR((void));
X#ifdef	EOF
Xextern	void	probj		__PR((FILE *f, obj_t * o, int type, int dosuff));
X#endif
Xextern	void	prtree		__PR((void));
X
X/*
X * update.c
X */
Xextern	void	initchars	__PR((void));
Xextern	char	*filename	__PR((char * name));
Xextern	BOOL	isprecious	__PR((obj_t * obj));
Xextern	BOOL	isphony		__PR((obj_t * obj));
Xextern	list_t	*list_nth	__PR((list_t * list, int n));
Xextern	char	*build_path	__PR((int level, char * ename, size_t namelen,
X						char * path, size_t psize));
Xextern	char	*substitute	__PR((char * cmd, obj_t * obj, obj_t * source,
X							char *suffix));
Xextern	char	*shout		__PR((char * cmd));
Xextern	BOOL	domake		__PR((char * name));
Xextern	BOOL	omake		__PR((obj_t * obj, BOOL  must_exist));
Xextern	BOOL	xmake		__PR((char * name, BOOL  must_exist));
X
X/*
X * memory.c
X */
X#undef	___realloc
Xextern	void	*___realloc	__PR((void *ptr, size_t size, char *msg));
X#ifdef	DEBUG
Xextern	void	prmem		__PR((void));
X#endif
Xextern	char	*fastalloc	__PR((unsigned int size));
Xextern	void	fastfree	__PR((char *p, unsigned int size));
Xextern	void	freelist	__PR((list_t *l));
Xextern	char	*strsave		__PR((char *p));
Xextern	char	*initgbuf	__PR((int size));
Xextern	char	*growgbuf	__PR((char *p));
X
X
X/*
X * Command line options.
X */
Xextern	BOOL	Kflag;		/* Continue on unrelated targets	*/
Xextern	BOOL	NSflag;		/* Ignore no Source on dependency	*/
Xextern	BOOL	Sflag;		/* Do not print command lines on exec.	*/
Xextern	BOOL	Tflag;		/* Touch files instead of make.		*/
Xextern	BOOL	Qflag;		/* If up to date exit (0)		*/
Xextern	int	Debug;		/* Print reson for rebuild		*/
Xextern	int	XDebug;		/* Print extended debug info		*/
Xextern	int	Dmake;		/* Display makefile			*/
Xextern	BOOL	Prdep;		/* Print include dependendy		*/
Xextern	BOOL	No_Warn;	/* Don't print warning Messages.	*/
Xextern	BOOL	Do_Warn;	/* Print extra warnings			*/
Xextern	char   **MakeFileNames;	/* List of pathnames of the Makefiles.	*/
Xextern	int	Mfileindex;	/* Current index in MakeFileNames.	*/
X
X/*
X * Various common variables.
X */
Xextern	BOOL	posixmode;	/* We found a .POSIX target		    */
Xextern	int	Mflags;
Xextern	char	*ObjDir;	/* .OBJDIR: pathname Target destination dir */
Xextern	int	ObjDirlen;	/* strlen(.OBJDIR)			    */
Xextern	int	ObjSearch;	/* .OBJSEARCH: searchtype for explicit rules */
Xextern	list_t	*SearchList;	/* .SEARCHLIST: list of src/obj dir pairs   */
Xextern	list_t	*Suffixes;	/* .SUFFIXES: list of suffixes (POSIX)	    */
Xextern	BOOL	SSuffrules;	/* Found any simple suffix rules	    */
Xextern	obj_t	*Init;		/* .INIT: command to execute at startup	    */
Xextern	obj_t	*Done;		/* .DONE: command do execute on success	    */
Xextern	obj_t	*Failed;	/* .FAILED: command to execute on failure   */
Xextern	obj_t	*IncludeFailed;	/* .INCLUDE_FAILED: cmd to execute if missing */
Xextern	obj_t	*Deflt;		/* .DEFAULT: command to execute if no rule  */
Xextern	obj_t	*Precious;	/* .PRECIOUS: list of targets not to remove */
Xextern	obj_t	*Phony;		/* .PHONY: list of false targets, no check  */
Xextern	obj_t	*default_tgt;	/* Current or Default target		    */
Xextern	date_t	curtime;	/* current fime				    */
Xextern	date_t	newtime;	/* Special time newer than all	XXX	    */
Xextern	char	*gbuf;		/* Global growable buffer		    */
Xextern	char	*gbufend;	/* Current end of growable buffer	    */
Xextern	int	gbufsize;	/* Current size of buffer (bufend - buf)    */
Xextern	BOOL	found_make;	/* Did we expand the $(MAKE) macro?	    */
X
Xextern	int	lastc;		/* last input character			    */
Xextern	int	firstc;		/* first character in line		    */
Xextern	char	*mfname;	/* name of current make file		    */
Xextern	int	lineno;		/* current line number			    */
Xextern	int	col;		/* current column			    */
X
Xextern	char	Nullstr[];	/* global empty string			    */
Xextern	obj_t	*NullObj;	/* global empty string obj		    */
Xextern	char	slash[];	/* string holding path delimiter	    */
Xextern	int	slashlen;	/* strlen(slash)			    */
X#define	SLASH	PATH_DELIM
X
Xextern	patr_t	*Patrules;
Xextern	patr_t	**pattail;
X
Xextern	char	chartype[256];
X
X/*
X * Definitiond for chartype[] bits:
X */
X#define	DYNCHAR	0x01
X#define	NUMBER	0x02
X
X/*
X * Definitions for Makefile Index values
X * The values need to be kept in sync with initmakefiles() in make.c
X */
X#define	MF_IDX_IMPLICIT	0		/* Implicit rules		*/
X#define	MF_IDX_ENVIRON	1		/* Environment strings		*/
X#define	MF_IDX_MAKEFILE	2		/* Default make file		*/
X#define	MF_IDX_BASE	MF_IDX_MAKEFILE	/* The base for -f makefiles	*/
END-of-smake-1.2.1/smake/make.h
echo x - smake-1.2.1/smake/archconf.c
sed 's/^X//' >smake-1.2.1/smake/archconf.c << 'END-of-smake-1.2.1/smake/archconf.c'
X/* @(#)archconf.c	1.27 09/10/31 Copyright 1996-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)archconf.c	1.27 09/10/31 Copyright 1996-2009 J. Schilling";
X#endif
X/*
X *	Make program
X *	Architecture autoconfiguration support
X *
X *	Copyright (c) 1996-2009 by J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/unistd.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include "make.h"
X
X#ifdef	NO_SYSINFO
X#	ifdef	HAVE_SYS_SYSTEMINFO_H
X#		undef	HAVE_SYS_SYSTEMINFO_H
X#	endif
X#endif
X
XEXPORT	void	setup_arch	__PR((void));
XLOCAL	BOOL	do_uname	__PR((void));
XLOCAL	BOOL	do_sysinfo	__PR((void));
XLOCAL	BOOL	do_sysctl	__PR((void));
XLOCAL	void	do_gethostname	__PR((void));
XLOCAL	void	do_defs		__PR((void));
XLOCAL	void	do_archheuristics __PR((void));
XLOCAL	void	archcvt		__PR((char *));
X#if defined(HAVE_SYS_SYSTEMINFO_H) || defined(HAVE_SYS_SYSCTL_H)
XLOCAL	void	unblank		__PR((char *));
X#endif
X
X/*
X * External interface to archconf.c. The code tries its best to get the
X * architecture definitions by calling sysinfo(), uname() or by heuristic.
X */
XEXPORT void
Xsetup_arch()
X{
X	if (!do_sysinfo() &&		/* Call sysinfo(2): preferred	*/
X			!do_uname()) {	/* Call uname(2): still OK	*/
X		/*
X		 * If nothing else helps, at least try to set up $(MAKE_HOST)
X		 * and some other macros that may be retrieved from
X		 * CPP definitions.
X		 */
X		do_gethostname();	/* Try to get host name		*/
X		do_defs();		/* Evaluate CPP definitions	*/
X	}
X	do_sysctl();
X
X	do_archheuristics();
X}
X
X#ifdef	HAVE_UNAME		/* NeXT Step has sys/utsname but not uname() */
X#include <schily/utsname.h>
X
X/*
X * This is the interface to the syscall uname(2).
X * Note that the system call is done directly and not by calling the uname
X * shell command. If your system returns wrong information with the uname(2)
X * call, you need to fix it here.
X */
XLOCAL BOOL
Xdo_uname()
X{
X	struct	utsname	un;
X
X	if (uname(&un) < 0) {
X		errmsg("Cannot get host arch (uname).\n");
X		return (FALSE);
X	}
X#ifdef	__comment__
X	printf("sysname: %s nodename: %s release: %s version: %s machine: %s\n",
X	un.sysname,
X	un.nodename,
X	un.release,
X	un.version,
X	un.machine);
X#endif
X	archcvt(un.sysname);
X	archcvt(un.release);
X	archcvt(un.version);
X	archcvt(un.machine);
X
X	define_var("MAKE_OS", un.sysname);		/* uname -s */
X	define_var("MAKE_HOST", un.nodename);		/* uname -n */
X	define_var("MAKE_OSREL", un.release);		/* uname -r */
X	define_var("MAKE_OSVERSION", un.version);	/* uname -v */
X	define_var("MAKE_MACH", un.machine);		/* uname -m */
X
X#ifdef	HAVE_UTSNAME_PROCESSOR
X	archcvt(un.processor);
X	define_var("MAKE_ARCH", un.processor);		/* uname -p */
X#else
X#ifdef	HAVE_UTSNAME_ARCH				/* OpenVMS */
X	archcvt(un.arch);
X	define_var("MAKE_ARCH", un.arch);		/* uname -p */
X#endif
X#endif
X#ifdef	HAVE_UTSNAME_SYSNAME_HOST
X	archcvt(un.sysname_host);
X	define_var("MAKE_HOST_OS", un.sysname_host);	/* uname -Hs */
X#endif
X#ifdef	HAVE_UTSNAME_RELEASE_HOST
X	archcvt(un.release_host);
X	define_var("MAKE_HOST_OSREL", un.release_host);	/* uname -Hr */
X#endif
X#ifdef	HAVE_UTSNAME_VERSION_HOST
X	archcvt(un.version_host);
X	define_var("MAKE_HOST_OSVERSION", un.version_host); /* uname -Hv */
X#endif
X
X	return (TRUE);
X}
X#else
X
X/*
X * Dummy for platforms that don't implement uname(2).
X */
XLOCAL BOOL
Xdo_uname()
X{
X	return (FALSE);
X}
X#endif
X
X#ifdef	HAVE_SYS_SYSTEMINFO_H
X#include <schily/systeminfo.h>
X
X/*
X * sysinfo(2) is the preferred way to request architecture information.
X * Unfortunately, it is only present on SVr4 compliant systems.
X */
XLOCAL BOOL
Xdo_sysinfo()
X{
X	char	nbuf[NAMEMAX];
X	BOOL	ret = TRUE;
X
X#ifdef	SI_SYSNAME
X	if (sysinfo(SI_SYSNAME, nbuf, sizeof (nbuf)) < 0) {
X		ret = FALSE;
X	} else {
X		archcvt(nbuf);
X		define_var("MAKE_OS", nbuf);		/* uname -s */
X	}
X#else
X	ret = FALSE;
X#endif
X
X#ifdef	SI_HOSTNAME
X	if (sysinfo(SI_HOSTNAME, nbuf, sizeof (nbuf)) < 0) {
X		ret = FALSE;
X	} else {
X		define_var("MAKE_HOST", nbuf);		/* uname -n */
X	}
X#else
X	ret = FALSE;
X#endif
X
X#ifdef	SI_RELEASE
X	if (sysinfo(SI_RELEASE, nbuf, sizeof (nbuf)) < 0) {
X		ret = FALSE;
X	} else {
X		archcvt(nbuf);
X		define_var("MAKE_OSREL", nbuf);		/* uname -r */
X	}
X#else
X	ret = FALSE;
X#endif
X
X#ifdef	SI_VERSION
X	if (sysinfo(SI_VERSION, nbuf, sizeof (nbuf)) < 0) {
X		ret = FALSE;
X	} else {
X		archcvt(nbuf);
X		define_var("MAKE_OSVERSION", nbuf);	/* uname -v */
X	}
X#else
X	ret = FALSE;
X#endif
X
X#ifdef	SI_MACHINE
X	if (sysinfo(SI_MACHINE, nbuf, sizeof (nbuf)) < 0) {
X		ret = FALSE;
X	} else {
X		archcvt(nbuf);
X		define_var("MAKE_MACH", nbuf);		/* uname -m */
X	}
X#else
X	ret = FALSE;
X#endif
X
X#ifdef	SI_ARCHITECTURE
X	if (sysinfo(SI_ARCHITECTURE, nbuf, sizeof (nbuf)) >= 0) {
X		archcvt(nbuf);
X		define_var("MAKE_ARCH", nbuf);		/* uname -p */
X	}
X#endif
X
X#ifdef	SI_PLATFORM
X	if (sysinfo(SI_PLATFORM, nbuf, sizeof (nbuf)) >= 0) {
X		unblank(nbuf);
X		define_var("MAKE_MODEL", nbuf);		/* uname -i */
X	}
X#endif
X
X#ifdef	SI_HW_PROVIDER
X	if (sysinfo(SI_HW_PROVIDER, nbuf, sizeof (nbuf)) >= 0) {
X		unblank(nbuf);
X/*		archcvt(nbuf);*/
X		define_var("MAKE_BRAND", nbuf);
X	}
X#endif
X
X#ifdef  SI_HW_SERIAL
X	if (sysinfo(SI_HW_SERIAL, nbuf, sizeof (nbuf)) >= 0) {
X/*		archcvt(nbuf);*/
X		define_var("MAKE_HWSERIAL", nbuf);
X	}
X#endif
X
X#ifdef  SI_SRPC_DOMAIN
X	if (sysinfo(SI_SRPC_DOMAIN, nbuf, sizeof (nbuf)) >= 0) {
X		define_var("MAKE_DOMAIN", nbuf);
X	}
X#endif
X
X#ifdef  SI_ISALIST
X	if (sysinfo(SI_ISALIST, nbuf, sizeof (nbuf)) >= 0) {
X		define_var("MAKE_ISALIST", nbuf);
X	}
X#endif
X
X	return (ret);
X}
X#else
X
X/*
X * Dummy for platforms that don't implement sysinfo(2).
X */
XLOCAL BOOL
Xdo_sysinfo()
X{
X	return (FALSE);
X}
X#endif
X
X#ifdef	HAVE_SYS_SYSCTL_H
X#include <schily/types.h>
X#include <schily/param.h>
X#include <sys/sysctl.h>
X
X#ifdef	HAVE_MACH_MACHINE_H
X#include <mach/machine.h>
X#endif
X#ifdef	IS_MACOS_X
X#include <mach-o/arch.h>
X#endif
X
X/*
X * See #ifdef statement below in unblank()
X */
XLOCAL BOOL
Xdo_sysctl()
X{
X#if	defined(HW_MODEL) || defined(HW_MACHINE_ARCH)
X	obj_t	*o;
X	char	nbuf[NAMEMAX];
X	size_t	len;
X	int	mib[2];
X#endif
X
X#if	defined(HW_MODEL)
X	o = objlook("MAKE_MODEL", FALSE);
X	if (o == NULL) {
X		mib[0] = CTL_HW;
X		mib[1] = HW_MODEL;
X		len = sizeof (nbuf);
X		if (sysctl(mib, 2, nbuf, &len, 0, 0) >= 0) {
X			unblank(nbuf);
X			define_var("MAKE_MODEL", nbuf);
X		}
X	}
X#endif	/* defined(HW_MODEL) */
X
X#if	defined(HW_MACHINE_ARCH)
X	o = objlook("MAKE_ARCH", FALSE);
X	if (o == NULL) {
X		mib[0] = CTL_HW;
X		mib[1] = HW_MACHINE_ARCH;
X		len = sizeof (nbuf);
X		if (sysctl(mib, 2, nbuf, &len, 0, 0) >= 0) {
X			archcvt(nbuf);
X			define_var("MAKE_ARCH", nbuf);
X		}
X#ifdef	IS_MACOS_X
X		/*
X		 * Mac OS X fails with HW_MACHINE_ARCH
X		 */
X		else {
X			char			*name = NULL;
X			cpu_type_t		cputype = 0;
X			NXArchInfo const	*ai;
X
X			len = sizeof (cputype);
X			if (sysctlbyname("hw.cputype", &cputype, &len,
X								NULL, 0) == 0 &&
X			    (ai = NXGetArchInfoFromCpuType(cputype,
X					    CPU_SUBTYPE_MULTIPLE)) != NULL) {
X				strlcpy(nbuf, (char *)ai->name, sizeof (nbuf));
X				archcvt(nbuf);
X				name = nbuf;
X			}
X			if (cputype == CPU_TYPE_POWERPC &&
X			    name != NULL && strncmp(name, "ppc", 3) == 0) {
X				name = "powerpc";
X			}
X			if (name != NULL)
X				define_var("MAKE_ARCH", name);
X		}
X#endif	/* IS_MACOS_X */
X	}
X#endif	/* defined(HW_MACHINE_ARCH) */
X	return (TRUE);
X}
X#else
X/*
X * Dummy for platforms that don't implement sysctl().
X */
XLOCAL BOOL
Xdo_sysctl()
X{
X	return (FALSE);
X}
X#endif
X
X#ifdef	HAVE_GETHOSTNAME
X
X/*
X * Don't care for systems that implement a similar functionality in
X * sysinfo(2) or uname(2). This function is only called if
X * sysinfo(2) or uname(2) do not exists.
X */
XLOCAL void
Xdo_gethostname()
X{
X	char	nbuf[NAMEMAX];
X
X	if (gethostname(nbuf, sizeof (nbuf)) < 0)
X		return;
X
X	define_var("MAKE_HOST", nbuf);
X}
X#else
X
X/*
X * Dummy for platforms that don't implement gethostname(2).
X */
XLOCAL void
Xdo_gethostname()
X{
X}
X#endif
X
X/*
X * Try to retrieve some information from CPP definitions.
X */
XLOCAL void
Xdo_defs()
X{
X#ifdef	IS_MSDOS
X	define_var("MAKE_OS", "msdos");
X#define	FOUND_OS
X#endif
X#ifdef	IS_TOS
X	define_var("MAKE_OS", "tos");
X#define	FOUND_OS
X#endif
X#ifdef	IS_MAC
X	define_var("MAKE_OS", "macos");
X#define	FOUND_OS
X#endif
X#ifdef	__NeXT__
X	define_var("MAKE_OS", "nextstep");
X#define	FOUND_OS
X	define_var("MAKE_OSREL", "3.0");
X	define_var("MAKE_OSVERSION", "1");
X#ifdef	__ARCHITECTURE__
X	define_var("MAKE_MACH", __ARCHITECTURE__);
X#define	FOUND_MACH
X#endif
X#endif	/* __NeXT__ */
X#ifdef	__MINGW32__
X	define_var("MAKE_OS", "mingw32_nt");
X#define	FOUND_OS
X#endif
X
X/*
X * We need MAKE_OS to allow compilation with the Schily Makefile System
X */
X#if !defined(FOUND_OS)
X	define_var("MAKE_OS", "unknown");
X#define	FOUND_OS
X#endif
X
X#if !defined(FOUND_MACH) && defined(__mc68010)
X	define_var("MAKE_MACH", "mc68010");
X#define	FOUND_MACH
X#endif
X#if !defined(FOUND_MACH) && defined(__mc68000)
X	define_var("MAKE_MACH", "mc68000");
X#define	FOUND_MACH
X#endif
X#if !defined(FOUND_MACH) && defined(__i386)
X	define_var("MAKE_MACH", "i386");
X#define	FOUND_MACH
X#endif
X#if !defined(FOUND_MACH) && defined(__sparc)
X	define_var("MAKE_MACH", "sparc");
X#define	FOUND_MACH
X#endif
X}
X
X/*
X * Do some additional heuristic for systems that are already known
X * but may need some more macro definitions for completion.
X */
XLOCAL void
Xdo_archheuristics()
X{
X	list_t	*l;
X	char	*name;
X
X	/*
X	 * Try to define global processor architecture
X	 */
X	l = objlist("MAKE_ARCH");
X	if (l == NULL) {
X		l = objlist("MAKE_MACH");
X		if (l != NULL) {
X			name = l->l_obj->o_name;
X			if (strstr(name, "sun3"))
X				define_var("MAKE_ARCH", "mc68020");
X			if (strstr(name, "sun4"))
X				define_var("MAKE_ARCH", "sparc");
X			if (strstr(name, "i86pc"))
X				define_var("MAKE_ARCH", "i386");
X		}
X	}
X
X	/*
X	 * Try to define global machine architecture
X	 */
X	l = objlist("MAKE_MACH");
X	if (l != NULL) {
X		name = l->l_obj->o_name;
X
X		if (strstr(name, "sun3"))
X			define_var("MAKE_M_ARCH", "sun3");
X		if (strstr(name, "sun4"))
X			define_var("MAKE_M_ARCH", "sun4");
X		if (strstr(name, "i86pc"))
X			define_var("MAKE_M_ARCH", "i86pc");
X	}
X
X	l = objlist("MAKE_OS");
X	if (l != NULL &&
X/*				streql(l->l_obj->o_name, "SunOS")) {*/
X				streql(l->l_obj->o_name, "sunos")) {
X		l = objlist("MAKE_OSREL");
X		if (l != NULL && l->l_obj->o_name[0] >= '5')
X/*			define_lvar("MAKE_OSDEFS", "-D__SOL2 -D__SVR4");*/
X			define_var("MAKE_OSDEFS", "-D__SVR4");
X	}
X}
X
X/*
X * Alle Namen in Kleinbuchstaben wandeln,
X * '/' in '-' wandeln.
X * '\\' in '-' wandeln.
X * ' ' in '-' wandeln.
X */
X#include <schily/ctype.h>
X
XLOCAL void
Xarchcvt(p)
X	register char	*p;
X{
X	register Uchar	c;
X
X	while ((c = (Uchar)*p) != '\0') {
X		if (c == '/')
X			*p = '-';
X		if (c == '\\')
X			*p = '-';
X		if (c == ' ')
X			*p = '-';
X		if (isupper(c))
X			*p = tolower(c);
X		p++;
X	}
X}
X
X#if defined(HAVE_SYS_SYSTEMINFO_H) || \
X	(defined(HAVE_SYS_SYSCTL_H) && defined(HW_MODEL))	/* See do_sysctl() */
XLOCAL void
Xunblank(p)
X	register char	*p;
X{
X	register char	c;
X
X	while ((c = *p) != '\0') {
X		if (c == ' ')
X			*p = '-';
X		p++;
X	}
X}
X#endif
END-of-smake-1.2.1/smake/archconf.c
echo x - smake-1.2.1/smake/memory.c
sed 's/^X//' >smake-1.2.1/smake/memory.c << 'END-of-smake-1.2.1/smake/memory.c'
X/* @(#)memory.c	1.21 09/10/16 Copyright 1985-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)memory.c	1.21 09/10/16 Copyright 1985-2009 J. Schilling";
X#endif
X/*
X *	Make program
X *	Memory allocation routines
X *
X *	Copyright (c) 1985-2009 by J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/standard.h>
X#include <schily/types.h>
X#include <schily/stdlib.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include "make.h"
X
XEXPORT	char	*gbuf;
XEXPORT	char	*gbufend;
XEXPORT	int	gbufsize;
X
XEXPORT	void	*___realloc	__PR((void *ptr, size_t size, char *msg));
XLOCAL	char	*checkalloc	__PR((unsigned int size));
X#ifdef	DEBUG
XEXPORT	void	prmem		__PR((void));
X#endif
XEXPORT	char	*fastalloc	__PR((unsigned int size));
XEXPORT	void	freelist	__PR((list_t *l));
XEXPORT	char	*strsave	__PR((char *p));
XEXPORT	char	*initgbuf	__PR((int size));
XEXPORT	char	*growgbuf	__PR((char *p));
X
X#ifdef	DEBUG
Xchar	*heapanfang;
Xchar	*heapende;
Xint	sumfastfree;
Xint	countfastfree;
X#endif
X
XEXPORT void *
X___realloc(ptr, size, msg)
X	void	*ptr;
X	size_t	size;
X	char	*msg;
X{
X	void	*ret;
X
X	if (ptr == NULL)
X		ret = malloc(size);
X	else
X		ret = realloc(ptr, size);
X	if (ret == NULL) {
X		comerr("Cannot realloc memory for %s.\n", msg);
X		/* NOTREACHED */
X	}
X#ifdef	DEBUG
X	if (heapanfang == 0)
X		heapanfang = ret;
X	if (heapende < (ret + size))
X		heapende = ret + size;
X#endif
X	return (ret);
X}
X
X/*
X * Memory allocation with error handling
X */
XLOCAL char *
Xcheckalloc(size)
X	unsigned	size;
X{
X	char	*result;
X
X	if ((result = malloc(size)) == NULL)
X		comerr("No memory\n");
X#ifdef	DEBUG
X	if (heapanfang == 0)
X		heapanfang = result;
X	if (heapende < (result + size))
X		heapende = result + size;
X#endif
X	return (result);
X}
X
X
XLOCAL	char	**ffstack;
X
X#ifdef	DEBUG
X/*
X * Print memory usage. Used to debug 'smake' size at end of execution.
X */
XEXPORT void
Xprmem()
X{
X	int	i = 0;
X	char	**p = ffstack;
X
X	while (p) {
X		i++;
X		p = (char **)*p;
X	}
X	printf("start: %lX end: %lX size: %d freed: %d, freecnt: %d, faststacksize: %d\n",
X		(long)heapanfang, (long)heapende, heapende - heapanfang,
X		sumfastfree, countfastfree, i);
X	printf("gbufsize: %d\n", gbufsize);
X}
X#endif
X
X
X/*
X * malloc() needs 16 bytes for each allocated chunk.
X * We need to allocate 8 bytes in most cases (hundereds or thousands of
X * times) and therefore try to optimize things.
X */
XEXPORT char *
Xfastalloc(size)
X	unsigned	size;
X{
X	static	char	*spc	= NULL;
X	static	char	*spcend = NULL;
X	register char	*result	= spc;
X
X	/*
X	 * Round things up to sizeof (ptr)
X	 * XXX This may not work for double * or 64 Bit architectures.
X	 * XXX Should rather include schily/align.h and use the right
X	 * XXX macros.
X	 */
X/*#define	round_up(x)		((x) + (4 - ((x) & 3)))*/
X#define	ALIGN_PTR		(sizeof (char *))
X#define	ALIGN_PMASK		(sizeof (char *)-1)
X/*#define	round_up(x)		((x) + (ALIGN_PTR - ((x) & ALIGN_PMASK)))*/
X#define	round_up(x)		((x) + (ALIGN_PTR - 1 - (((x)-1) & ALIGN_PMASK)))
X
X	size = round_up(size);
X
X	if (ffstack && size == sizeof (list_t)) {
X		result = (char *)ffstack;
X		ffstack = (char **)*ffstack;
X		return (result);
X	}
X
X	if (result + size > spcend) {
X
X		if (size >= 4*sizeof (long))
X			return (checkalloc(size)); /* keep rest of space */
X
X		spc =    result = checkalloc(512);
X		spcend = result + 512;
X	}
X	spc += size;
X	return (result);
X}
X
X/*
X * Return a chunk of storage to the fast allocation stack for re-usage
X * by fastalloc().
X */
XEXPORT void
Xfastfree(p, size)
X	char	*p;
X	unsigned int size;
X{
X	char	**pp;
X
X	if (size != sizeof (list_t))
X		comerrno(EX_BAD, "Panic: fastfree size.\n");
X#ifdef	DEBUG
X	sumfastfree += size;
X	countfastfree++;
X#endif
X	pp = (char **)p;
X	*pp = (char *)ffstack;
X	ffstack = pp;
X}
X
X/*
X * Free a list chain. Don't free the objects behind as they might
X * be still in use.
X */
XEXPORT void
Xfreelist(l)
X	register list_t	*l;
X{
X	register list_t	*next;
X
X	while (l) {
X		next = l->l_next;
X		fastfree((char *)l, sizeof (*l));
X		l = next;
X	}
X}
X
X/*
X * Copy a string into allocated memory and return a pointer to the allocated
X * memory.
X */
XEXPORT char *
Xstrsave(p)
X	char	*p;
X{
X	unsigned i	= strlen(p) + 1;
X	char	 *res	= fastalloc(i);
X
X	if (i > 16) {
X		movebytes(p, res, (int) i);
X	} else {
X		char	*p2 = res;
X
X		while ((*p2++ = *p++) != '\0') {
X			;
X			/* LINTED */
X		}
X	}
X	return (res);
X}
X
X/*
X * Create growable general purpose buffer.
X */
XEXPORT char *
Xinitgbuf(size)
X	int	size;
X{
X	if (gbuf) {
X		if (size <= gbufsize)
X			return (gbuf);
X		free(gbuf);
X	}
X	gbuf = checkalloc((unsigned) (gbufsize = size));
X	gbufend = gbuf + size;
X	return (gbuf);
X}
X
X/*
X * INCR_GSIZE must be a multiple of INIT_GSIZE and INCR_GSIZE/INIT_GSIZE
X * must be a value that is a power of two.
X */
X#define	INIT_GSIZE	512	/* Initial size of the gbuf		*/
X#define	INCR_GSIZE	8192	/* Size to grow gbuf in incrementals	*/
X
X#ifdef	GROWTEST
X#define	INIT_GSIZE	4	/* Initial size of the gbuf		*/
X#define	INCR_GSIZE	4	/* Size to grow gbuf in incrementals	*/
X#endif
X
X/*
X * Grow growable general purpose buffer.
X */
XEXPORT char *
Xgrowgbuf(p)
X	char	*p;
X{
X	register char	*new;
X	register int	newsize = gbufsize;
X
X	if (gbufsize == 0)
X		return (initgbuf(INIT_GSIZE));
X	if (newsize < INCR_GSIZE)
X		newsize *= 2;
X	else
X		newsize += INCR_GSIZE;
X
X	new = checkalloc((unsigned)newsize);
X	movebytes(gbuf, new, gbufsize);
X	free(gbuf);
X	p += new - gbuf;	/* Re-adjust pointer into callers buffer. */
X	gbuf = new;
X	gbufend = new + newsize;
X	gbufsize = newsize;
X	return (p);
X}
END-of-smake-1.2.1/smake/memory.c
echo x - smake-1.2.1/smake/parse.c
sed 's/^X//' >smake-1.2.1/smake/parse.c << 'END-of-smake-1.2.1/smake/parse.c'
X/* @(#)parse.c	1.105 09/12/23 Copyright 1985-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)parse.c	1.105 09/12/23 Copyright 1985-2009 J. Schilling";
X#endif
X/*
X *	Make program
X *	Parsing routines
X *
X *	Copyright (c) 1985-2009 by J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/varargs.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>	/* include sys/types.h for schily/schily.h */
X#include <schily/string.h>
X#include <schily/schily.h>
X#include <schily/ccomdefs.h>
X#include "make.h"
X
X#ifdef	pdp11
X#define	MAXOBJS		64	/* Max # of targets in target list. */
X#else
X#define	MAXOBJS		512	/* Max # of targets in target list. */
X#endif
X
X
XEXPORT	void	parsefile	__PR((void));
XLOCAL	void	define_obj	__PR((obj_t * obj, int n, int objcnt, int type, list_t * dep, cmd_t * cmd));
XLOCAL	obj_t	*define_dcolon	__PR((obj_t *obj));
XLOCAL	void	listappend	__PR((obj_t *obj, list_t *dep));
XLOCAL	void	define_patrule	__PR((obj_t * obj, list_t * dep, cmd_t * cmd, int type));
XLOCAL	void	print_patrules	__PR((FILE *f));
XLOCAL	obj_t	*check_ssuffrule __PR((obj_t *obj, list_t *dep));
XEXPORT	char	*get_var	__PR((char *name));
XEXPORT	void	define_var	__PR((char *name, char *val));
XLOCAL	int	getobjname	__PR((void));
XLOCAL	obj_t	*getobj		__PR((void));
XLOCAL	int	getname		__PR((int type));
XLOCAL	obj_t	*getnam		__PR((int type));
XLOCAL	int	getln		__PR((void));
XLOCAL	list_t	**listcat	__PR((obj_t * obj, list_t ** tail));
XLOCAL	list_t	**mklist	__PR((char *line, list_t ** tail, BOOL doexpand));
XLOCAL	list_t	*cplist		__PR((list_t * l));
XLOCAL	list_t	**exp_list	__PR((obj_t * o, list_t ** tail));
XLOCAL	list_t	*getlist	__PR((int *typep));
XLOCAL	BOOL	is_shvar	__PR((obj_t ** op, int *typep, list_t *** tailp));
XLOCAL	list_t	*getshvar	__PR((int *typep));
XLOCAL	cmd_t	*getcmd		__PR((void));
XLOCAL	int	exp_ovec	__PR((obj_t ** ovec, int objcnt));
XLOCAL	int	read_ovec	__PR((obj_t ** ovec, int *typep));
XEXPORT	list_t	*cvtvpath	__PR((list_t *l));
XEXPORT	BOOL	is_inlist	__PR((char *objname, char *name));
XEXPORT	BOOL	nowarn		__PR((char *name));
XLOCAL	void	warn		__PR((char *, ...)) __printflike__(1, 2);
XLOCAL	void	exerror		__PR((char *, ...)) __printflike__(1, 2);
XLOCAL	obj_t	*_objlook	__PR((obj_t *table[], char *name, BOOL create));
XEXPORT	obj_t	*objlook	__PR((char *name, BOOL create));
XEXPORT	list_t	*objlist	__PR((char *name));
XEXPORT	obj_t	*ssufflook	__PR((char *name, BOOL create));
XEXPORT	BOOL	check_ssufftab	__PR((void));
XLOCAL	void	clear_ssufftab	__PR((void));
XLOCAL	BOOL	is_suffix_rule	__PR((obj_t *obj));
XLOCAL	void	prvar		__PR((obj_t * p));
XLOCAL	void	ptree		__PR((obj_t * p, int n));
XEXPORT	void	printtree	__PR((void));
XEXPORT	void	probj		__PR((FILE *f, obj_t * o, int type, int dosuff));
XEXPORT	void	prtree		__PR((void));
XLOCAL	char	*typestr	__PR((int type));
XLOCAL	void	printobj	__PR((FILE *f, obj_t ** ovec, int objcnt, int type, list_t * deplist, cmd_t * cmdlist));
X
X/*
X *	parse the dependency file
X *
X *	<obj1> {<obj2> ...} : <dependency list>
X *	{	<cmdlist>}
X *
X *	<macro>= <macro value>
X *
X *	<macro> += <macro value>
X *
X *	<macro> :sh= <shell command>
X */
XEXPORT void
Xparsefile()
X{
X	int	i, objcnt;
X	int	type = 0;	/* init to make GCC quiet */
X	obj_t	*ovec[MAXOBJS];
X	list_t	*deplist;
X	cmd_t	*cmdlist;
X
X	if (Do_Warn)
X		error("Parsing file '%s'\n", mfname);
X
X	if (Dmake > 0)
X		error(">>>>>>>>>>>>>>>> Reading makefile '%s'\n", mfname);
X
X	lineno = 1;
X	col = 0;
X	getch();
X	while (lastc != EOF) {
X		if (lastc == '\t') {
X			/*
X			 * Skip leading white space that follows a TAB.
X			 */
X			while (lastc != EOF && (lastc == ' ' || lastc == '\t'))
X				getch();
X			/*
X			 * Abort if such a line is not empty or contains more
X			 * than only a comment. This has the side effect that
X			 * '^<TAB> include' will not work anymore.
X			 */
X			if (lastc != '\n') {
X				exerror(
X				"Unexpected <TAB> character followed by nonblank '%c' <%o>",
X					lastc, lastc);
X			}
X			getch();	/* Eat up new line character */
X			continue;	/* Continue with next line */
X		}
X		type = 0;
X		if ((objcnt = read_ovec(ovec, &type)) == 0) {
X			if (type != COLON && type != DCOLON)
X				continue;
X		}
X
X		if (objcnt < 0) {
X			errmsgno(EX_BAD, "Objcount: %d Objects: ", -objcnt);
X			for (i = 0; i < -objcnt; i++)
X				error("'%s' ", ovec[i]->o_name);
X			error("\n");
X			exerror("Too many target items");
X		}
X
X#ifdef	XXX	/* Begin new code for include */
Xprintf("objcnt: %d ovec[0]: %s lastc: '%c'\n", objcnt, ovec[0]->o_name, lastc);
Xfor (i = 0; i < objcnt; i++)
X	printf("name[%d] = %s ", i, ovec[i]->o_name);
Xprintf("\n");
X#endif
X		if (lastc == '\n') {
X			if (streql(ovec[0]->o_name, "include") ||
X				streql(ovec[0]->o_name, "-include")) {
X				for (i = 1; i < objcnt; i++) {
X					doinclude(ovec[i]->o_name,
X						ovec[0]->o_name[0] != '-');
X				}
X				/* XXX freeobj ??? */
X				continue;
X			}
X			if (streql(ovec[0]->o_name, "export")) {
X				for (i = 1; i < objcnt; i++) {
X					doexport(ovec[i]->o_name);
X				}
X				/* XXX freeobj ??? */
X				continue;
X			}
X			if (streql(ovec[0]->o_name, "unexport")) {
X				for (i = 1; i < objcnt; i++) {
X					dounexport(ovec[i]->o_name);
X				}
X				/* XXX freeobj ??? */
X				continue;
X			}
X			if (streql(ovec[0]->o_name, "readonly")) {
X				for (i = 1; i < objcnt; i++) {
X					ovec[i]->o_flags |= F_READONLY;
X				}
X				/* XXX freeobj ??? */
X				continue;
X			}
X			/*
X			 * Any other word on the beginning of a line
X			 * that is not followed by a ':' or a '=' is an error.
X			 */
X		} /* end new code for include */
X
X		if (lastc != ':' && lastc != '=') {
X			errmsgno(EX_BAD, "Objcount: %d Objects: ", objcnt);
X			for (i = 0; i < objcnt; i++)
X				error("'%s' ", ovec[i]->o_name);
X			error("\n");
X			exerror("Missing : or =, got '%c' <%o>", lastc, lastc);
X		}
X		getch();
X		deplist = getlist(&type);
X		if (type == SHVAR)
X			deplist = getshvar(&type);
X
X		if (lastc == ';') {
X			lastc = '\t';
X			firstc = '\t';
X		}
X
X		/*
X		 * We should test for type == COLON only but unfortunately,
X		 * the makefilesystem contained some simple pattern rule
X		 * definitions that are written as: tgt_suff = list.
X		 * We only allow what has been used in the makefilesystem.
X		 * This changed in late 1999, we should keep support
X		 * for it for at least 5 years.
X		 */
X/*		if (basetype(type) == COLON) {*/
X		if (basetype(type) == COLON ||
X		    (basetype(type) == EQUAL && deplist &&
X					ovec[0]->o_name[0] == '.')) {
X			cmdlist = getcmd();
X		} else {
X			cmdlist = NULL;
X		}
X		while (lastc == '\n')
X			getch();
X		for (i = 0; i < objcnt; i++)
X			define_obj(ovec[i], i, objcnt, type, deplist, cmdlist);
X
X		if (Dmake > 0)
X			printobj(stderr, ovec, objcnt, type, deplist, cmdlist);
X	}
X	if (Dmake > 0)
X		error(">>>>>>>>>>>>>>>> End of  makefile '%s'\n", mfname);
X}
X
X/*
X * Add dependency and command lists to a node in the object tree.
X * Allow definitions to be overridden if the new definition in in
X * a different file.
X */
XLOCAL void
Xdefine_obj(obj, n, objcnt, type, dep, cmd)
X	register obj_t	*obj;
X		int	n;
X		int	objcnt;
X		int	type;
X	register list_t	*dep;
X		cmd_t	*cmd;
X{
X	/*
X	 * If we have a list of targets with the same dependency list,
X	 * we copy the list structure to be able to separately
X	 * append new elements to each of the targets.
X	 */
X	if (n > 0)
X		dep = cplist(dep);
X
X	if (objcnt == 1) {
X		if (basetype(type) == COLON &&
X		    strchr(obj->o_name, '%') != NULL) {
X			define_patrule(obj, dep, cmd, type);
X			return;
X		}
X		/*
X		 * We should test for type == COLON too but unfortunately,
X		 * the makefilesystem contained some simple pattern rule
X		 * definitions that are written as: tgt_suff = list.
X		 * This changed in late 1999, we should keep support
X		 * for it for at least 5 years.
X		 */
X/*		if (type == COLON && && dep != NULL && cmd != NULL) {*/
X		if (dep != NULL && cmd != NULL) {
X			obj = check_ssuffrule(obj, dep);
X		}
X	} else {
X		obj->o_flags |= F_MULTITARGET;
X	}
X	if (obj->o_type == 0)
X		obj->o_type = type;
X
X	/*
X	 * Save first target that does not start with
X	 * a dot in case no arguments have been supplied
X	 * to make.
X	 */
X	if (n == 0 && !default_tgt && basetype(type) == COLON &&
X	    (obj->o_name[0] != '.' || obj->o_name[1] == SLASH ||
X	    (obj->o_name[1] == '.' && obj->o_name[2] == SLASH)))
X		default_tgt = obj;
X
X	if (type == DCOLON)
X		obj = define_dcolon(obj);
X
X	/*
X	 * XXX Probleme gibt es mit der Gleichbehandlung von ':' und '=' typen.
X	 * XXX So definiert 'smake' MAKE_NAME= smake und später kommt evt.
X	 * XXX smake: $(OBJLIST)
X	 */
X
X
X	if (obj->o_flags & F_READONLY)		/* Check for "read only" */
X		return;
X	obj->o_flags |= Mflags;			/* Add current global flags */
X
X	/*
X	 * Definition in new Makefile overrides existing definitions
X	 */
X	if ((obj->o_fileindex < MF_IDX_MAKEFILE || obj->o_type == EQUAL) &&
X/*	if (((obj->o_fileindex != Mfileindex) || (obj->o_type == EQUAL)) &&*/
X	    (type != ADDMAC) &&
X	    !streql(obj->o_name, ".SUFFIXES")) {
X
X		if (Do_Warn)
X			warn("'%s' RE-defined", obj->o_name);
X		if (obj->o_fileindex == MF_IDX_ENVIRON) {
X			obj->o_fileindex = Mfileindex;
X			obj->o_type = type;
X		}
X		obj->o_list = dep;
X		obj->o_cmd = cmd;
X		return;
X	}
X
X	/*
X	 * Add new definitions to list.
X	 * Ignore definitions already in list.
X	 */
X	listappend(obj, dep);
X
X	if (obj->o_cmd != (cmd_t *) NULL) {
X		if (cmd != (cmd_t *) NULL) {
X			warn("Multiple commands defined for '%s'", obj->o_name);
X			/* XXX freelist()/freecmd() ??? */
X		}
X	} else {
X		obj->o_cmd = cmd;
X	}
X}
X
X/*
X * Define an intermediate target for Double Colon :: Rules
X *
X * a:: b
X *	cmd_b
X * a:: c
X *	cmd_c
X *
X * results in:
X * 	a::	::1@a ::2@a
X * and
X *	::1@a: b
X *		cmd_b
X *	::2@a: c
X *		cmd_c
X */
XLOCAL obj_t *
Xdefine_dcolon(obj)
X	register obj_t	*obj;
X{
Xstatic	int	serial = 0;
X	obj_t	*o;
X	list_t	*l;
X	list_t	*lo;
X	char	_name[TYPICAL_NAMEMAX];
X	char	*name = _name;
X	size_t	namelen = sizeof (_name);
X	char	*np = NULL;
X
X	if (obj->o_namelen + 16 >= namelen) {
X		namelen = obj->o_namelen + 16;
X		name = np = ___realloc(np, namelen, "dcolon target");
X	}
X	snprintf(name, namelen, "::%d@%s", ++serial, obj->o_name);
X	o = objlook(name, TRUE);
X	if (np)
X		free(np);
X	o->o_type = ':';
X	o->o_flags |= F_DCOLON;		/* Mark as intermediate :: object */
X	l = obj->o_list;
X	lo = (list_t *) fastalloc(sizeof (list_t));
X	lo->l_next = NULL;
X	lo->l_obj = o;
X
X	listappend(obj, lo);		/* Append this intermediate to list */
X
X	o->o_node = obj;		/* Make this inter. obj aux to orig */
X	return (o);			/* Return intermediate object */
X}
X
X/*
X * Append new definitions to dependencies in o_list, but
X * ignore them if they are already in the list.
X */
XLOCAL void
Xlistappend(obj, dep)
X	register obj_t	*obj;
X	register list_t	*dep;
X{
X	if (streql(obj->o_name, ".SSUFFIX_RULES") && dep == NULL)
X		clear_ssufftab();
X	if (obj->o_list != (list_t *) NULL) {
X		register list_t *l = obj->o_list;
X
X		if (dep == NULL) {
X			/*
X			 * Allow to clear special targets.
X			 */
X			if (streql(obj->o_name, ".SUFFIXES") ||
X			    streql(obj->o_name, ".SSUFFIX_RULES") ||
X			    streql(obj->o_name, ".DEFAULT") ||
X			    streql(obj->o_name, ".NO_WARN") ||
X			    streql(obj->o_name, ".SCCS_GET") ||
X			    streql(obj->o_name, ".SPACE_IN_NAMES"))
X				obj->o_list = NULL;
X			return;
X		}
X
X		if (Do_Warn)
X			warn("'%s' ADD-defined", obj->o_name);
X		/*
X		 * if not already head of list, try to append ...
X		 */
X		if (l != dep) {
X			while (l->l_next && l->l_next != dep)
X				l = l->l_next;
X			if (l->l_next == (list_t *) NULL)
X				l->l_next = dep;
X		}
X	} else {
X		obj->o_list = dep;
X	}
X}
X
Xpatr_t	*Patrules;
Xpatr_t	**pattail = &Patrules;
X
X/*
X * Parse a pattern rule definition. This is a special type of implicit rules.
X */
XLOCAL void
Xdefine_patrule(obj, dep, cmd, type)
X	obj_t	*obj;
X	list_t	*dep;
X	cmd_t	*cmd;
X	int	type;
X{
X	patr_t	*p;
X	char	*s;
X	register list_t *l;
X
X	p = (patr_t *) fastalloc(sizeof (*p));
X
X	p->p_name = obj;
X	p->p_list = dep;
X	p->p_cmd = cmd;
X	s = strchr(obj->o_name, '%');
X	if (s != NULL) {
X		*s = '\0';
X		p->p_tgt_prefix = strsave(obj->o_name);
X		p->p_tgt_suffix = strsave(&s[1]);
X		*s = '%';
X	} else {		/* This can never happen! */
X		p->p_tgt_prefix = strsave(Nullstr);
X		p->p_tgt_suffix = strsave(obj->o_name);
X	}
X	p->p_tgt_pfxlen = strlen(p->p_tgt_prefix);
X	p->p_tgt_suflen = strlen(p->p_tgt_suffix);
X
X	for (l = dep; l; l = l->l_next) {
X		if (strchr(l->l_obj->o_name, '%'))
X			l->l_obj->o_flags |= F_PERCENT;
X	}
X	if (dep == NULL) {
X		p->p_src_prefix = 0;
X		p->p_src_suffix = 0;
X		p->p_src_pfxlen = 0;
X		p->p_src_suflen = 0;
X	} else {
X		s = strchr(dep->l_obj->o_name, '%');
X		if (s != NULL) {
X			*s = '\0';
X			p->p_src_prefix = strsave(dep->l_obj->o_name);
X			p->p_src_suffix = strsave(&s[1]);
X			*s = '%';
X		} else {
X			p->p_src_prefix = strsave(Nullstr);
X			p->p_src_suffix = strsave(dep->l_obj->o_name);
X		}
X		p->p_src_pfxlen = strlen(p->p_src_prefix);
X		p->p_src_suflen = strlen(p->p_src_suffix);
X	}
X	p->p_flags = 0;
X	if (type == DCOLON)
X		p->p_flags |= PF_TERM;	/* Make it a termiator rule */
X	*pattail = p;
X	pattail = &p->p_next;
X	p->p_next = 0;
X}
X
X/*
X * Print the complete list of pattern rules.
X */
XLOCAL void
Xprint_patrules(f)
X	FILE	*f;
X{
X	patr_t	*p = Patrules;
X	cmd_t	*c;
X
X	while (p) {
X		register list_t *l;
X
X		fprintf(f, "%s%%%s:%s",
X		p->p_tgt_prefix, p->p_tgt_suffix,
X		(p->p_flags & PF_TERM) ? ":":"");
X
X		for (l = p->p_list; l; l = l->l_next) {
X			fprintf(f, " %s", l->l_obj->o_name);
X		}
X		printf("\n");
X
X		for (c = p->p_cmd; c; c = c->c_next)
X			fprintf(f, "\t%s\n", c->c_line);
X		p = p->p_next;
X	}
X}
X
X/*
X * Check for a simple suffix rule definition.
X * In case we found a simple suffix rule definition, return a new obj_t *.
X */
XLOCAL obj_t *
Xcheck_ssuffrule(obj, dep)
X	obj_t	*obj;
X	list_t	*dep;
X{
X	register char	*name = obj->o_name;
X	register list_t	*l;
X	extern	 int	xssrules;
X
X	/*
X	 * Check if the first charater of the target is a '.' or
X	 * if the target name equals "", but make sure this is
X	 * not a vanilla target that just starts with "./".
X	 */
X	if ((name[0] == '.' && strchr(name, SLASH) == NULL) ||
X	    (name[0] == '"' && name[1] == '"' && name[2] == '\0')) {
X
X		/*
X		 * All dependency names must start with a '.'
X		 * and may not contain a SLASH.
X		 */
X		for (l = dep; l; l = l->l_next) {
X			if (l->l_obj->o_name[0] != '.')
X				return (obj);
X			if (strchr(l->l_obj->o_name, SLASH) != NULL)
X				return (obj);
X		}
X		obj = ssufflook(obj->o_name, TRUE);
X		xssrules++;
X	}
X	return (obj);
X}
X
X/*
X * Get the macro value as in the form macro=value.
X */
XEXPORT char *
Xget_var(name)
X	char	*name;
X{
X	obj_t	*o = objlook(name, FALSE);
X
X	if (o == (obj_t *)NULL)
X		return ((char *)NULL);
X
X	if (basetype(o->o_type) == EQUAL && o->o_list != NULL)
X		return (o->o_list->l_obj->o_name);
X	return ((char *)NULL);
X}
X
X/*
X * Define a macro as in the form macro=value.
X * Value may only be one word.
X */
XEXPORT void
Xdefine_var(name, val)
X	char	*name;
X	char	*val;
X{
X	obj_t	*o;
X	obj_t	*ov;
X	list_t	*list;
X	list_t	**tail = &list;
X
X	o = objlook(name, TRUE);
X	if (o->o_flags & F_READONLY)		/* Check for "read only" */
X		return;
X	o->o_flags |= Mflags;			/* Add current global flags */
X	if (*val) {				/* Only if not empty */
X		ov = objlook(val, TRUE);
X		tail = listcat(ov, tail);
X	}
X	*tail = (list_t *) NULL;
X	o->o_list = list;
X	o->o_type = EQUAL;
X}
X
X#ifdef	NEEDED
X/*
X * Define a macro as in the form macro=vallist.
X * Vallist may be a list of words that is white space separated in one string.
X */
XEXPORT void
Xdefine_lvar(name, vallist)
X	char	*name;
X	char	*vallist;
X{
X	obj_t	*o;
X	obj_t	*ov;
X	list_t	*list;
X	list_t	**tail = &list;
X
X	o = objlook(name, TRUE);
X	if (o->o_flags & F_READONLY)		/* Check for "read only" */
X		return;
X	o->o_flags |= Mflags;			/* Add current global flags */
X	tail = mklist(vallist, tail, FALSE);
X	*tail = (list_t *) NULL;
X	o->o_list = list;
X	o->o_type = EQUAL;
X}
X
X/*
X * Return a list_t pointer to the nth word in a macro value list.
X */
Xlist_t *
Xvarvaln(name, n)
X	char	*name;
X	int	n;
X{
X	obj_t	*o = objlook(name, FALSE);
X
X	if (o)
X		return (list_nth(o->o_list, n));
X	return ((list_t *)0);
X}
X#endif	/* NEEDED */
X
X#define	white(c)	(c == ' ' || c == '\t')
X
X/*
X * Read a space separated word from current Makefile.
X * Used for target list. Stop at space, ':' '=' and ','.
X * Returns the length of the word.
X */
XLOCAL int
Xgetobjname()
X{
X	register int	n = 0;
X	register char	*p = gbuf;
X	register int	beg = 0;
X	register int	end = 0;
X	register int	nestlevel = 0;
X
X	while (white(lastc))
X		getch();			/* Skip white space. */
X	if (lastc == '$') {
X		switch (beg = peekch()) {
X
X		case '(': end = ')'; break;
X		case '{': end = '}'; break;
X
X		default:
X			beg = end = -1;
X		}
X	}
X	while (lastc != EOF && (' ' < lastc || nestlevel > 0)) {
X		if (lastc == beg)
X			nestlevel++;
X		else if (lastc == end)
X			nestlevel--;
X		if (nestlevel <= 0) {
X			if (lastc == ':' || lastc == '=' || lastc == ',')
X				break;
X		}
X#ifdef	__CHECK_NAMEMAX_IN_GETOBJNAME__
X		if (n >= NAMEMAX - 2)
X			exerror("Name more than %d chars long", NAMEMAX - 2);
X#endif	/*  __CHECK_NAMEMAX_IN_GETOBJNAME__ */
X		if (p >= gbufend)
X			p = growgbuf(p);
X		*p++ = lastc;
X		if (nestlevel <= 0 && lastc == '\\') {
X			if (white(peekch()) && objlist(".SPACE_IN_NAMES")) {
X				getch();
X				p--;
X				*p++ = lastc;
X			}
X		}
X		n++;
X		getch();
X	}
X	*p = '\0';				/* Terminate with null char */
X	return (n);
X}
X
X/*
X * Read a target file name.
X */
XLOCAL obj_t
X*getobj()
X{
X	return (getobjname() ? objlook(gbuf, TRUE) : (obj_t *) NULL);
X}
X
X/*
X * Read a space separated word from current Makefile.
X * General purpose version for dependency list.
X * Returns the length of the word.
X */
XLOCAL int
Xgetname(type)
X	int	type;
X{
X	register int	n = 0;
X	register char	*p = gbuf;
X	register int	beg = 0;
X	register int	end = 0;
X	register int	nestlevel = 0;
X
X	if (type == ':')
X		type = ';';
X	else
X		type = '\0';
X
X	while (white(lastc))
X		getch();			/* Skip white space. */
X	if (lastc == '$') {
X		switch (beg = peekch()) {
X
X		case '(': end = ')'; break;
X		case '{': end = '}'; break;
X
X		default:
X			beg = end = -1;
X		}
X	}
X	while (lastc != EOF && (' ' < lastc || nestlevel > 0)) {
X		if (lastc == beg)
X			nestlevel++;
X		else if (lastc == end)
X			nestlevel--;
X		if (nestlevel <= 0) {
X			if (lastc == type)
X				break;
X		}
X#ifdef	__CHECK_NAMEMAX_IN_GETNAME__
X		if (n >= NAMEMAX - 2)
X			exerror("Name more than %d chars long", NAMEMAX - 2);
X#endif	/* __CHECK_NAMEMAX_IN_GETNAME__ */
X		if (p >= gbufend)
X			p = growgbuf(p);
X		*p++ = lastc;
X		if (nestlevel <= 0 && lastc == '\\') {
X			if (white(peekch()) && objlist(".SPACE_IN_NAMES")) {
X				getch();
X				p--;
X				*p++ = lastc;
X			}
X		}
X		n++;
X		getch();
X	}
X	*p = '\0';				/* Terminate with null char */
X	return (n);
X}
X
X/*
X * Read a dependency file name.
X */
XLOCAL obj_t *
Xgetnam(type)
X	int	type;
X{
X	return (getname(type) ? objlook(gbuf, TRUE) : (obj_t *) NULL);
X}
X
X/*
X * Reads a line from current Makefile.
X * Returns the length of the string.
X */
XLOCAL int
Xgetln()
X{
X	register int	n = 0;
X	register char	*p = gbuf;
X
X	while (white(lastc))
X		getch();			/* Skip white space. */
X	while (lastc != EOF && lastc != '\n') {
X#ifdef	__CHECK_NAMEMAX_IN_GETLN__
X		if (n >= NAMEMAX - 2) {
X			exerror("Line more than %d chars long", NAMEMAX - 2);
X		}
X#endif /* __CHECK_NAMEMAX_IN_GETLN__ */
X		if (p >= gbufend)
X			p = growgbuf(p);
X		*p++ = lastc;
X		n++;
X		getch();
X	}
X	*p = '\0';				/* Terminate with null char */
X	return (n);
X}
X
X/*
X * Add one new object to the end of a list of objects.
X */
XLOCAL list_t **
Xlistcat(obj, tail)
X	obj_t	*obj;
X	list_t	**tail;
X{
X	list_t	*item;
X
X	*tail = item = (list_t *) fastalloc(sizeof (list_t));
X	item->l_obj = obj;
X	tail = &item->l_next;
X	return (tail);
X}
X
X/*
X * Make a list of objects by parsing a line
X * and cutting it at whitespaces.
X */
XLOCAL list_t **
Xmklist(line, tail, doexpand)
X	register char	*line;
X	register list_t	**tail;
X		BOOL	doexpand;
X{
X	register obj_t	*o;
X	register char	*p;
X
X/*printf("Line: '%s'\n", line);*/
X
X	for (p = line; *p; ) {
X		while (*p && white(*p))
X			p++;
X		line = p;
X		while (*p) {
X			if (white(*p)) {
X				*p++ = '\0';
X				if (*line)
X					break;
X			}
X			p++;
X		}
X/*printf("line: '%s'\n", line);*/
X		/*
X		 * If the list ends with white space, we will see
X		 * an empty string at the end of the list unless
X		 * we apply this test.
X		 */
X		if (*line == '\0')
X			break;
X		o = objlook(line, TRUE);
X		if (doexpand)
X			tail = exp_list(o, tail);
X		else
X			tail = listcat(o, tail);
X	}
X	return (tail);
X}
X
X/*
X * Copy a list.
X * Generate new list pointers and re-use the old obj pointers.
X */
XLOCAL list_t *
Xcplist(l)
X	list_t	*l;
X{
X		list_t	*list;
X	register list_t	**tail = &list;
X
X	while (l) {
X		tail = listcat(l->l_obj, tail);
X		l = l->l_next;
X	}
X	*tail = (list_t *) NULL;
X	return (list);
X}
X
X/*
X * Expand one object name using make macro definitions.
X * Add the new objects to the end of a list of objects.
X */
XLOCAL list_t **
Xexp_list(o, tail)
X	obj_t	*o;
X	list_t	**tail;
X{
X	char	*name;
X	char	*xname;
X
X	name = o->o_name;
X	if (strchr(name, '$')) {
X		xname = substitute(name, NullObj, 0, 0);
X		if (streql(name, xname)) {
X			printf("eql: %s\n", name);
X			tail = listcat(o, tail);
X		} else {
X/*printf("Sxname: %s <- %s\n", xname, name);*/
X			tail = mklist(xname, tail, FALSE);
X		}
X	} else {
X		tail = listcat(o, tail);
X	}
X	*tail = (list_t *) NULL;
X	return (tail);
X}
X
X#ifdef	NEEDED
X/*
X * Expand a list of object names using make macro definitions.
X * Add the new objects to the end of a list of objects.
X */
XLOCAL list_t *
Xexp_olist(l)
X	list_t	*l;
X{
X	list_t	*list;
X	list_t	**tail = &list;
X
X	while (l) {
X		tail = exp_list(l->l_obj, tail);
X		l = l->l_next;
X	}
X	*tail = (list_t *) NULL;
X	return (list);
X}
X#endif	/* NEEDED */
X
X/*
X * Read a list of dependency file names.
X */
XLOCAL list_t *
Xgetlist(typep)
X	int	*typep;
X{
X	list_t	*list;
X	list_t	**tail = &list;
X	obj_t	*o;
X	int	type = basetype(*typep);
X	BOOL	first = TRUE;
X
X	if (type == '=') {
X		int n;
X#ifdef	nono
X		char *p;
X#endif
X
X		n = getln();
X
X#ifdef	nono	/* Do not kill trailing whitespace !!! */
X
X		p = &gbuf[n-1];
X		while (white(*p))
X			p--;
X		*++p = '\0';
X#endif
X		/*
X		 * Only add to list if right hand side is not completely white.
X		 */
X		if (n) {
X			o = objlook(gbuf, TRUE);
X			if (*typep == ASSIGN)
X				tail = exp_list(o, tail);
X			else
X				tail = listcat(o, tail);
X		}
X	} else while ((o = getnam(type)) != (obj_t *) NULL) {
X		if (type == '=') {
X			tail = listcat(o, tail);
X		} else {
X			if (first) {
X				first = FALSE;
X				if (is_shvar(&o, typep, &tail))
X					break;
X			}
X			tail = exp_list(o, tail);
X		}
X	}
X	*tail = (list_t *) NULL;
X	return (list);
X}
X
X/*
X * Check if a definition for immediate shell expansion follows.
X */
XLOCAL BOOL
Xis_shvar(op, typep, tailp)
X	obj_t	**op;
X	int	*typep;
X	list_t	***tailp;
X{
X	obj_t	*o = *op;
X
X	if (streql(o->o_name, "sh=")) {
X		*typep = SHVAR;
X		return (TRUE);
X	}
X	if (streql(o->o_name, "sh")) {
X		if ((o = getnam(*typep)) == (obj_t *)NULL) {
X			return (FALSE);
X		}
X		if (streql(o->o_name, "=")) {
X			*typep = SHVAR;
X			return (TRUE);
X		} else {
X			*tailp = exp_list(*op, *tailp);
X			*op = o;
X		}
X	}
X	return (FALSE);
X}
X
X/*
X * read a line and expand by shell
X */
XLOCAL list_t *
Xgetshvar(typep)
X	int	*typep;
X{
X		list_t	*list;
X	register list_t	**tail = &list;
X		char	*p;
X
X	*typep = '=';
X	getln();
X	p = shout(gbuf);
X
X	tail = mklist(p, tail, FALSE);
X	*tail = (list_t *) NULL;
X	return (list);
X}
X
X/*
X * Read a list of command lines that follow a dependency list.
X */
XLOCAL cmd_t *
Xgetcmd()
X{
X		cmd_t	*list;
X	register cmd_t	*item, **tail = &list;
X	register char	*p;
X
X	setincmd(TRUE);			/* Switch reader to command mode */
X	if (lastc == '\n')		/* Not a ';' command type	 */
X		getch();
X
X	while (lastc != EOF && (firstc == '\t' || firstc == '#')) {
X		/*
X		 * We handle comment in command lines as in old UNIX 'make' and
X		 * not as required by POSIX. A command line that starts with
X		 * a '#' (the following code) is handled as usual.
X		 * A '#' inside a command line and escaped newlines are
X		 * forwarded to the shell. This is needed to allow something
X		 * like cc -# with SunPRO C.
X		 */
X		if (firstc == '#') {
X			skipline();	/* Skip commented out line	*/
X			getch();	/* Skip newline character.	*/
X			continue;
X		}
X		while (white(lastc))
X			getch();	/* Skip white space. */
X
X		for (p = gbuf; lastc != EOF; getch()) {
X			if (lastc == '\n' && (p == gbuf || p[-1] != '\\'))
X				break;
X			if (p >= gbufend)
X				p = growgbuf(p);
X			*p++ = lastc;
X		}
X		*p = '\0';
X		*tail = item = (cmd_t *) fastalloc(sizeof (cmd_t));
X		item->c_line = strsave(gbuf);
X		tail = &item->c_next;
X
X		if (lastc == '\n')	/* Skip newline character. */
X			getch();
X	}
X/*printf("getcmd: lastc: %c %CX '%.20s'\n", lastc, lastc, readbufp);*/
X	setincmd(FALSE);
X	*tail = (cmd_t *) NULL;
X	return (list);
X}
X
X/*
X * Expand a list of target names using make macro definitions.
X */
XLOCAL int
Xexp_ovec(ovec, objcnt)
X	obj_t	*ovec[];
X	int	objcnt;
X{
X		list_t	*list;
X		list_t	*l;
X	register list_t	**tail = &list;
X	int	i;
X
X	if (objcnt == 0)
X		return (0);
X	/*
X	 * Catch easy case.
X	 */
X	if (objcnt == 1 && (strchr(ovec[0]->o_name, '$') == NULL))
X		return (objcnt);
X
X	for (i = 0; i < objcnt; i++) {
X		tail = exp_list(ovec[i], tail);
X		*tail = (list_t *) NULL;
X	}
X
X	for (i = 0; list; i++) {
X		if (i >= MAXOBJS) {
X			warn("Too many expanded target items");
X			return (-i);
X		}
X		ovec[i] = list->l_obj;
X		l = list;
X		list = list->l_next;
X		fastfree((char *)l, sizeof (*l));
X	}
X	return (i);
X}
X
X/*
X * Read a list of target names.
X */
XLOCAL int
Xread_ovec(ovec, typep)
X	obj_t	*ovec[];
X	int	*typep;
X{
X	obj_t	*o;
X	int	objcnt;
X	char	*p;
X	int	c;
X
X/*printf("read_ovec\n");*/
X	for (objcnt = 0; lastc != EOF; ) {
X		o = getobj();
X		c = lastc;
X		while (white(lastc))
X			getch();
X/*printf("lastc: '%c'", lastc); if (o) printf(" nameL %s\n", o->o_name);*/
X		if (o != (obj_t *) NULL) {
X			p = o->o_name;
X			if (p[0] == '+' && p[1] == '\0' && c == '=') {
X				*typep = ADDMAC;
X				break;
X			}
X			if (objcnt >= MAXOBJS) {
X				warn("Too many target items");
X				return (-objcnt);
X			}
X			ovec[objcnt++] = o;
X		} else {
X			if (lastc == '\n') {
X				getch();
X				continue;
X			}
X			if (lastc == EOF && objcnt == 0)
X				break;
X			/*
X			 * Empty variable name or target.
X			 * The POSIX standard says that this is always illegal.
X			 * There are makefiles that include $(EMPTY): something
X			 * and we like to support them, so allow empty targets
X			 * with ':' and '::', but abort with '=', '+=' or ':='
X			 */
X			if (lastc != ':' || peekch() == '=')
X				exerror("Missing object name");
X			if (!nowarn(":"))
X				warn("Missing object name");
X		}
X		/*
X		 * end of definition:
X		 * colon, equal or end of line
X		 */
X		if (lastc == ':' && peekch() == ':') {
X			getch();
X			*typep = DCOLON;
X			break;
X		}
X		if (lastc == ':' && peekch() == '=') {
X			getch();
X			*typep = ASSIGN;
X			if (!nowarn(":=")) {
X				warn(
X				"Nonportable ':=' assignement found for macro '%s'.\n",
X				o->o_name);
X			}
X			break;
X		}
X		if (lastc == ':' || lastc == '=' || lastc == '\n') {
X			*typep = lastc;
X			break;
X		}
X		if (lastc == ',')
X			getch();
X	}
X	/*
X	 * XXX Achtung: UNIX make expandiert alles was links und rechts von ':'
X	 * steht, sowie Variablennamen (links von '=').
X	 */
X	objcnt = exp_ovec(ovec, objcnt);
X
X	return (objcnt);
X}
X
X/*
X *
X */
XEXPORT list_t *
Xcvtvpath(l)
X	list_t	*l;
X{
X	list_t	*lsave;
X	list_t	*list = (list_t *)0;
X	list_t	**tail = &list;
X	char	vpath[NAMEMAX];
X	char	*p1, *p2;
X
X	if (l != NULL) {
X		for (p1 = l->l_obj->o_name, p2 = vpath; *p1; p2++) {
X			if ((*p2 = *p1++) == ':')
X				*p2 = ' ';
X		}
X		*p2 = '\0';
X		tail = mklist(vpath, tail, TRUE);
X		*tail = (list_t *) NULL;
X		lsave = l = list;
X
X		tail = &list;
X
X		for (; l; l = l->l_next) {
X			tail = listcat(l->l_obj, tail);
X			tail = listcat(l->l_obj, tail);
X		}
X		*tail = (list_t *) NULL;
X		freelist(lsave);
X	}
X	if (Do_Warn)
X		error("VPATH but no .SEARCHLIST\n");
X	return (list);
X}
X
X
XEXPORT BOOL
Xis_inlist(objname, name)
X	char	*objname;
X	char	*name;
X{
X	list_t	*l;
X
X	for (l = objlist(objname); l != NULL; l = l->l_next) {
X		if (streql(l->l_obj->o_name, name))
X			return (TRUE);
X	}
X	return (FALSE);
X}
X
XEXPORT BOOL
Xnowarn(name)
X	char	*name;
X{
X	return (is_inlist(".NO_WARN", name));
X}
X
X/*
X * NOTE: as long as warn() and exerror() use the global vars
X * lineno, col and Mfileindex,
X * we cannot use them at any other time than parse time.
X */
X
X/*
X * Print a warning with text, line number, column and filename.
X */
X
X/* VARARGS1 */
X#ifdef	PROTOTYPES
XLOCAL void
Xwarn(char *msg, ...)
X#else
XLOCAL void
Xwarn(msg, va_alist)
X	char	*msg;
X	va_dcl
X#endif
X{
X	va_list	args;
X
X#ifdef	PROTOTYPES
X	va_start(args, msg);
X#else
X	va_start(args);
X#endif
X	if (!No_Warn)
X		errmsgno(EX_BAD,
X			"WARNING: %r in line %d col %d of '%s'\n", msg, args,
X				lineno, col, mfname);
X	va_end(args);
X}
X
X/*
X * Print an error message with text, line number, column and filename, then exit.
X */
X
X/* VARARGS1 */
X#ifdef	PROTOTYPES
XLOCAL void
Xexerror(char *msg, ...)
X#else
XLOCAL void
Xexerror(msg, va_alist)
X	char	*msg;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	len;
X
X#ifdef	PROTOTYPES
X	va_start(args, msg);
X#else
X	va_start(args);
X#endif
X	errmsgno(EX_BAD, "%r in line %d col %d of '%s'\n", msg, args,
X			lineno, col, mfname);
X	va_end(args);
X
X	len = getrdbufsize();
X	if (len > 80)
X		len = 80;
X	if (Debug > 0)
X		errmsgno(EX_BAD, "Current read buffer is: '%.*s'\n", len, getrdbuf());
X	comerrno(EX_BAD, "Bad syntax in '%s'.\n", mfname);
X}
X
X
X#define	MyObjTabSize	128	/* # of Hash table entries (power of two) .*/
X
X#define	ObjHash(name) (name[0] & (MyObjTabSize - 1))
X
XLOCAL	obj_t	*ObjTab[MyObjTabSize];
XLOCAL	obj_t	*SuffTab[MyObjTabSize];
XEXPORT	obj_t	*NullObj;
X
X/*
X * Look up name in 'table'.
X * First look up in hash table then do binary search.
X */
XLOCAL obj_t *
X_objlook(table, name, create)
X	obj_t	*table[];
X	char	*name;
X	BOOL	create;
X{
X	register obj_t	**pp;
X	register obj_t	*p;
X	register char	*new;
X	register char	*old;
X
X	for (pp = &table[ObjHash(name)]; (p = *pp) != NULL; ) {
X		for (new = name, old = p->o_name; *new++ == *old; ) {
X			if (*old++ == '\0')	/* Found 'name' */
X				return (p);
X		}
X		if (*--new < *old)
X			pp = &p->o_left;
X		else
X			pp = &p->o_right;
X	}
X	if (!create)
X		return ((obj_t *) NULL);
X
X	/*
X	 * Add new entry to ObjTab.
X	 */
X	*pp = p = (obj_t *) fastalloc(sizeof (obj_t));	/* insert into list */
X	p->o_left = p->o_right = (obj_t *) NULL;	/* old 'p' was NULL */
X	p->o_cmd = (cmd_t *) NULL;
X	p->o_list = (list_t *) NULL;
X	p->o_date = NOTIME;
X	p->o_level = MAXLEVEL;
X	p->o_type = 0;
X	p->o_flags = 0;
X	p->o_fileindex = Mfileindex;
X	p->o_name = strsave(name);
X	p->o_namelen = strlen(name);
X	p->o_node = NULL;
X	return (p);
X}
X
X/*
X * Look up name in ObjTab.
X */
XEXPORT obj_t *
Xobjlook(name, create)
X	char	*name;
X	BOOL	create;
X{
X	return (_objlook(ObjTab, name, create));
X}
X
XEXPORT list_t *
Xobjlist(name)
X	char	*name;
X{
X	obj_t	*o;
X
X	if ((o = objlook(name, FALSE)) == NULL)
X		return ((list_t *)NULL);
X	return (o->o_list);
X}
X
X/*
X * Look up name in SuffTab.
X */
XEXPORT obj_t *
Xssufflook(name, create)
X	char	*name;
X	BOOL	create;
X{
X	return (_objlook(SuffTab, name, create));
X}
X
X/*
X * Check is SuffTab contains any entry.
X */
XEXPORT BOOL
Xcheck_ssufftab()
X{
X	int	i;
X
X	for (i = 0; i < MyObjTabSize; i++)
X		if (SuffTab[i])
X			return (TRUE);
X	return (FALSE);
X}
X
X/*
X * Clear all entries in SuffTab.
X */
XLOCAL void
Xclear_ssufftab()
X{
X	int	i;
X
X	for (i = 0; i < MyObjTabSize; i++)
X		SuffTab[i] = NULL;
X	SSuffrules = FALSE;
X}
X
X/*
X * Check whether obj->o_name is a Suffix Rule.
X * Name must either be identical to one of the .SUFFIXES (Single Suffix Rule)
X * or a concatenation of two .SUFFIXES.
X */
XLOCAL BOOL
Xis_suffix_rule(obj)
X	register obj_t	*obj;
X{
X	list_t	*l;
X	list_t	*l2;
X	char	*suffix;
X	char	*rp;
X	int	rlen;
X
X	if (Suffixes == NULL)
X		return (FALSE);
X
X	for (l = Suffixes; l; l = l->l_next) {
X		suffix = l->l_obj->o_name;
X		rlen = strlen(suffix);
X		if (strncmp(obj->o_name, suffix, rlen) == 0)	{ 
X			rp = &obj->o_name[rlen];
X
X			if (*rp == '\0')	/* Single Suffix Rule */
X				return (TRUE);
X
X			for (l2 = Suffixes; l2; l2 = l2->l_next) {
X				if (streql(rp, l2->l_obj->o_name))
X					return (TRUE);
X			}
X		}
X	}
X	return (FALSE);
X}
X
X/*
X * Used by ptree() to print one single object.
X */
XLOCAL void
Xprvar(p)
X	register obj_t	*p;
X{
X	register list_t	*q;
X	register cmd_t	*c;
X
X	if (!p)
X		return;
X
X	error("%s:", p->o_name);
X	for (q = p->o_list; q; q = q->l_next)
X		error(" %s", q->l_obj->o_name);
X	putc('\n', stderr);
X	for (c = p->o_cmd; c; c = c->c_next)
X		error("\t...%s\n", c->c_line);
X}
X
X/*
X * Currently only used by printtree() to implement the -probj option.
X */
XLOCAL void
Xptree(p, n)
X	register obj_t	*p;
X		int	n;
X{
X	register int	i;
X
X	for (; p; p = p->o_right) {
X		ptree(p->o_left, ++n);
X		for (i = 1; i < n; i++)
X			putc(' ', stderr);
X		prvar(p);
X	}
X}
X
X/*
X * Used by -probj Flag
X */
XEXPORT void
Xprinttree()
X{
X	int	i;
X
X	print_patrules(stderr);
X	for (i = 0; i < MyObjTabSize; i++)
X		ptree(ObjTab[i], 0);
X}
X
X/*
X * Currently only used by prtree() to implement the -p option.
X */
X#define	SUFF_ONLY	1	/* Print only Suffix Rules	*/
X#define	SUFF_SPECIAL	2	/* Print only special targets	*/
X#define	SUFF_NONE	0	/* Print only plain target rules */
X#define	SUFF_ANY	-1	/* Print without filtering	*/
XEXPORT void
Xprobj(f, o, type, dosuff)
X	FILE	*f;
X	obj_t	*o;
X	int	type;
X	int	dosuff;
X{
X	for (; o; o = o->o_right) {
X		probj(f, o->o_left, type, dosuff);
X		if (type >= 0 && type != o->o_type)
X			continue;
X		if (type < 0 && (o->o_type == ':' || o->o_type == '='))
X			continue;
X		if (Debug <= 0 && o->o_type == 0)
X			continue;	/* Ommit target only strings */
X
X		if (dosuff >= 0) {
X			if (dosuff == SUFF_ONLY && !is_suffix_rule(o))
X				continue;
X			else if (dosuff == SUFF_NONE && (is_suffix_rule(o) ||
X			    !(o->o_name[0] != '.' || o->o_name[1] == SLASH ||
X			    (o->o_name[1] == '.' && o->o_name[2] == SLASH))))
X				continue;
X			else if (dosuff == SUFF_SPECIAL && (is_suffix_rule(o) ||
X			    (o->o_name[0] != '.' || o->o_name[1] == SLASH ||
X			    (o->o_name[1] == '.' && o->o_name[2] == SLASH))))
X				continue;
X
X		}
X
X		printobj(f, &o, 1, o->o_type, o->o_list, o->o_cmd);
X	}
X}
X
X/*
X * Used by -p Flag, called from main().
X */
XEXPORT void
Xprtree()
X{
X	int	i;
X
X	printf("# Implicit Pattern Rules:\n");
X	print_patrules(stdout);
X	printf("# Implicit Suffix Rules:\n");
X	for (i = 0; i < MyObjTabSize; i++) {
X		probj(stdout, ObjTab[i], ':', SUFF_ONLY);
X	}
X	printf("# Simple Suffix Rules:\n");
X	for (i = 0; i < MyObjTabSize; i++) {
X		probj(stdout, SuffTab[i], ':', SUFF_ANY);
X	}
X	printf("# Special Targets:\n");
X	for (i = 0; i < MyObjTabSize; i++) {
X		probj(stdout, ObjTab[i], ':',  SUFF_SPECIAL);
X	}
X	printf("# Target Rules:\n");
X	for (i = 0; i < MyObjTabSize; i++) {
X		probj(stdout, ObjTab[i], ':',  SUFF_NONE);
X	}
X	printf("# Macro definitions:\n");
X	for (i = 0; i < MyObjTabSize; i++) {
X		probj(stdout, ObjTab[i], '=', SUFF_ANY);
X	}
X	printf("# Various other definitions:\n");
X	for (i = 0; i < MyObjTabSize; i++) {
X		probj(stdout, ObjTab[i], -1, SUFF_ANY);
X	}
X}
X
X/*
X * Convert the object type into a human readable string.
X */
XLOCAL char *
Xtypestr(type)
X	int	type;
X{
X	if (type == 0)
X		return ("(%)");
X	if (type == EQUAL)
X		return ("=");
X	if (type == COLON)
X		return (":");
X	if (type == DCOLON)
X		return ("::");
X	if (type == SEMI)
X		return (";");
X	if (type == ADDMAC)
X		return ("+=");
X	if (type == ASSIGN)
X		return (":=");
X	if (type == SHVAR)
X		return (":sh=");
X	return ("UNKNOWN TYPE");
X}
X
X/*
X * This is the central routine to print an object.
X */
XLOCAL void
Xprintobj(f, ovec, objcnt, type, deplist, cmdlist)
X	FILE	*f;
X	obj_t	*ovec[];
X	int	objcnt;
X	int	type;
X	list_t	*deplist;
X	cmd_t	*cmdlist;
X{
X	register	list_t	*l;
X	register	cmd_t	*c;
X	register	int	i;
X
X	for (i = 0; i < objcnt; i++)
X		fprintf(f, "%s ", ovec[i]->o_name);
X	fprintf(f, "%2s\t", typestr(type));
X
X	for (l = deplist; l; l = l->l_next)
X		fprintf(f, "%s ", l->l_obj->o_name);
X	fprintf(f, "\n");
X
X	for (c = cmdlist; c; c = c->c_next)
X		fprintf(f, "\t%s\n", c->c_line);
X	fflush(f);
X}
END-of-smake-1.2.1/smake/parse.c
echo x - smake-1.2.1/smake/readfile.c
sed 's/^X//' >smake-1.2.1/smake/readfile.c << 'END-of-smake-1.2.1/smake/readfile.c'
X/* @(#)readfile.c	1.59 09/10/22 Copyright 1985-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)readfile.c	1.59 09/10/22 Copyright 1985-2009 J. Schilling";
X#endif
X/*
X *	Make program
X *	File/string reading routines
X *
X *	Copyright (c) 1985 by J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/types.h>
X#include <schily/standard.h>
X#include <schily/stdlib.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include "make.h"
X
XLOCAL	int	fillrdbuf	__PR((void));
XEXPORT	char	*peekrdbuf	__PR((void));
XEXPORT	char	*getrdbuf	__PR((void));
XEXPORT	int	getrdbufsize	__PR((void));
XEXPORT	void	setincmd	__PR((BOOL isincmd));
XEXPORT	void	getch		__PR((void));
XEXPORT	int	peekch		__PR((void));
XEXPORT	void	skipline	__PR((void));
XEXPORT	void	readstring	__PR((char *str, char *strname));
XEXPORT	void	readfile	__PR((char *name, BOOL must_exist));
XEXPORT	void	doinclude	__PR((char *name, BOOL must_exist));
XEXPORT	void	makeincs	__PR((void));
X
X#if	defined(unix) || defined(IS_UNIX)
X#	define	RDBUF_SIZE	1024
X#else
X#	define	RDBUF_SIZE	512
X#endif
X
X/*
X * Several variables needed for reading with look ahead
X * to allow easy parsing of make files.
X */
XEXPORT	int	lastc		= 0;		/* last input character	    */
XEXPORT	int	firstc		= 0;		/* first character in line  */
XLOCAL	FILE	*mfp		= (FILE *)NULL;	/* currently open make file */
XEXPORT	char	*mfname 	= NULL;		/* name of current make file */
XLOCAL	int	olineno		= 1;		/* old line number (include) */
XEXPORT	int	lineno		= 1;		/* current line number	    */
XEXPORT	int	col		= 0;		/* current column	    */
XLOCAL	BOOL	incmd		= FALSE;	/* cmd list line starts \n\t */
XLOCAL	char	*readbfp;			/* current read buf pointer  */
XLOCAL	char	*readbfstart;			/* start of current read buf */
XLOCAL	char	*readbfend;			/* end of current read buf  */
XLOCAL	char	rdbuf[RDBUF_SIZE];		/* the real read buffer	    */
XLOCAL	char	*rd_buffer	= rdbuf;	/* a pointer to start of buf */
X
X/*
X * Get or peek a character from current Makefile.
X */
X#define	mygetc()	((readbfp >= readbfend) ? fillrdbuf() : *readbfp++)
X#define	mypeekc()	((readbfp >= readbfend) ? (fillrdbuf() == EOF ?	\
X						EOF:*--readbfp) : *readbfp)
X
X/*
X * Fill or refill the read buffer that is used by the mygetc() CPP macro.
X */
XLOCAL int
Xfillrdbuf()
X{
X	if (mfp == (FILE *) NULL)	/* EOF while reading from a string. */
X		return (EOF);
X	readbfp = rd_buffer;
X	readbfstart = rd_buffer;	/* used for better error reporting */
X	readbfend = rd_buffer + fileread(mfp, rd_buffer, RDBUF_SIZE);
X	if (readbfp >= readbfend)
X		return (EOF);
X	return ((int) *readbfp++);
X}
X
XEXPORT char *
Xpeekrdbuf()
X{
X	return (readbfp);
X}
X
XEXPORT char *
Xgetrdbuf()
X{
X	return (readbfstart);
X}
X
XEXPORT int
Xgetrdbufsize()
X{
X	return (readbfend - readbfstart);
X}
X
X/*
X * Switch the bahaviour of the reader for parsing commandlines/others.
X */
XEXPORT void
Xsetincmd(isincmd)
X	BOOL	isincmd;
X{
X	incmd = isincmd ? TRUE:FALSE;
X}
X
X/*
X * Get a character.
X * Handle backslash-newline combinations and special conditions
X * for comment and command lines.
X * Count lines for error messages.
X */
XEXPORT void
Xgetch()
X{
X	col++;
X	lastc = mygetc();
X	if (lastc == EOF)
X		return;
X	if (lastc == '\n') {
X		firstc = mypeekc();
X		lineno++;
X		col = 0;
X		return;
X	} else if (lastc == '\\' && !incmd && mypeekc() == '\n') {
X		lastc = mygetc();
X		firstc = mypeekc();
X		lineno++;
X		col = 0;
X		for (;;) {		/* Skip white space at start of line */
X			register int	c;
X
X			c = mypeekc();
X			if (c != ' ' && c != '\t') {
X				lastc = ' ';
X				return;
X			}
X			mygetc();
X			col++;
X		}
X	}
X
X	if (lastc == '#' && !incmd) {
X		if (mfp == (FILE *) NULL)	/* Do not skip past # when */
X			return;			/* reading from string.	   */
X		skipline();
X	}
X}
X
XEXPORT int
Xpeekch()
X{
X	return (mypeekc());
X}
X
X/*
X * Fast method to skip to the end of a commented out line.
X * Always use the POSIX method (skip to next un-escaped new line).
X */
XEXPORT void
Xskipline()
X{
X	register int	c = lastc;
X
X	if (c == '\n')
X		return;
X
X	while (c != EOF) {
X		c = mygetc();
X		if (c == '\n') {
X			lineno++;
X			col = 0;
X			lastc = c;
X			firstc = mypeekc();
X			return;
X		} else if (c == '\\' && mypeekc() == '\n') {
X			lineno++;
X			col = 0;
X			c = mygetc();
X		}
X	}
X	firstc = lastc = c;
X}
X
X/*
X * Parse input from a string.
X */
XEXPORT void
Xreadstring(str, strname)
X	char	*str;
X	char	*strname;
X{
X	mfname = strname;
X	readbfp = str;
X	readbfstart = str;	/* used for better error reporting */
X	readbfend = str + strlen(str);
X	firstc = *str;
X	incmd = FALSE;
X	parsefile();
X	mfname = NULL;
X}
X
X/*
X * Parse input from the current Makefile.
X */
XEXPORT void
Xreadfile(name, must_exist)
X	char	*name;
X	BOOL	must_exist;
X{
X	/*
X	 * Diese Meldung ist noch falsch (Rekursion/Makefiles)
X	 */
X	if (Do_Warn)
X		error("Reading file '%s' in line %d of '%s'\n", name,
X			olineno, mfname);
X
X	if (streql(name, "-")) {
X		mfp = stdin;
X		name = "Standard in";
X	} else {
X		if ((mfp = fileopen(name, "ru")) == (FILE *)NULL && must_exist)
X			comerr("Can not open '%s'.\n", name);
X	}
X	mfname = name;
X	readbfp = readbfend;		/* Force immediate call of fillrdbuf.*/
X	firstc = mypeekc();
X	incmd = FALSE;
X	if (mfp) {
X		parsefile();
X		fclose(mfp);
X	}
X	mfp = (FILE *) NULL;
X	mfname = NULL;
X	col = 0;
X}
X
Xlist_t	*Incs;
Xlist_t	**inctail = &Incs;
X
X/*
X * Handle the "include" directive in makefiles.
X * If an include file does not exists, first try to find a rule to make it.
X * If this does not help, try to call include failure exception handling.
X * This exception handling enables some automake features of smake in allowing
X * the to call a shell script that will create the missing (may be architecture
X * dependant) include file on the fly with something that will at least allow
X * smake to continue on this platform.
X */
XEXPORT void
Xdoinclude(name, must_exist)
X	char	*name;
X	BOOL	must_exist;
X{
X	int	slc = lastc;
X	int	sfc = firstc;
X	FILE	*smf = mfp;
X	char	*smfn = mfname;
X	int	slineno = lineno;
X	int	scol = col;
X	char	*srbp = readbfp;
X	char	*srbs = readbfstart;
X	char	*srbe = readbfend;
X	char	*srbf = rd_buffer;
X	char	include_buf[RDBUF_SIZE];
X	obj_t	*st = default_tgt;
X	obj_t	*o;
X	list_t	*lp;
X
X	olineno = lineno-1;
X	lastc	= 0;
X	firstc	= 0;
X	lineno	= 1;
X	col	= 0;
X	rd_buffer = include_buf;
X
X	setup_dotvars();
X	name = substitute(name, NullObj, 0, 0);
X	name = strsave(name);
X
X	xmake(name, FALSE);
X	default_tgt = st;
X
X	o = objlook(name, TRUE);
X
X	/*
X	 * In order to work around a gmake bug, we need to write Makefiles that
X	 * make an included file to depend on a previously included file in
X	 * order to make gmake believe that a rule exists to make the included
X	 * file. This is otherwise nonsense but it is in conflict with our
X	 * strategy to reset o->o_date after the file has been included in
X	 * order to force to re-evaluate the complete set of rules after
X	 * everything has been read. In this special case, it looks as if the
X	 * file could not be made as it depends on a "nonexistent" target.
X	 * A solution is to fetch the time again before we decide how to go on.
X	 */
X	if (o->o_date == 0) {
X		o->o_date = gftime(name);	/* Check if file is present */
X	}
X
X	if (Debug > 1)
X		error("doinclude(%s, %d)= date: %s level: %d\n",
X			name, must_exist, prtime(o->o_date), o->o_level);
X
X	if (must_exist && o->o_date == 0 && IncludeFailed) {
X		list_t	l;
X
X		o->o_date = newtime;		/* Force to be out of date  */
X		l.l_next = (list_t *)0;		/* Only one element:	    */
X		l.l_obj = o;			/* The file to be included  */
X		IncludeFailed->o_list = &l;	/* Make it $^		    */
X		IncludeFailed->o_date = (date_t)0;
X		omake(IncludeFailed, FALSE);	/* Try to apply rules	    */
X		o->o_date = gftime(name);	/* Check if file is present */
X	}
X
X	if (must_exist || o->o_date != 0) {
X		char	includename[TYPICAL_NAMEMAX];
X		char	*iname;
X
X		if (Prdep)
X			error("Reading file '%s' from '%s'\n", name, mfname);
X
X		/*
X		 * Zurücksetzen des Datums bewirkt Neuauswertung
X		 * der Abhängigkeitsliste.
X		 * XXX Das kann Probleme bei make depend geben.
X		 */
X		o->o_date = 0;
X		/*
X		 * Now add this object to the list of objects that must be
X		 * remade to force integrity of uour lists before we start
X		 * to make the real targets.
X		 */
X		lp = (list_t *) fastalloc(sizeof (*lp));
X		lp->l_obj = o;
X		*inctail = lp;
X		inctail = &lp->l_next;
X		lp->l_next = 0;
X
X		iname = build_path(o->o_level, o->o_name, o->o_namelen,
X					includename, sizeof (includename));
X/*error("include '%s' -> '%s' %s\n", o->o_name, iname, prtime(o->o_date));*/
X		if (iname != NULL) {
X			readfile(iname, must_exist);
X			if (iname != o->o_name && iname != includename)
X				free(iname);
X		} else {
X			comerrno(EX_BAD,
X				"Cannot build path for 'include %s'.\n",
X				o->o_name);
X		}
X	}
X
X	lastc = slc;
X	firstc = sfc;
X	mfp = smf;
X	mfname = smfn;
X	lineno = slineno;
X	col = scol;
X	readbfp = srbp;
X	readbfstart = srbs;
X	readbfend = srbe;
X	rd_buffer = srbf;
X}
X
X/*
X * Re-make the included files.
X * This must be done because after they have been made the first time,
X * the dependency list may have changed. If we don't remake the included
X * files, the xxx.d dependency files will not be remade after we touch a file
X * that is not in the primary source list.
X */
XEXPORT void
Xmakeincs()
X{
X	list_t	*l;
X
X	for (l = Incs; l != 0; l = l->l_next) {
X/*		printf("inc(%s)\n", l->l_obj->o_name);*/
X		omake(l->l_obj, TRUE);
X	}
X}
END-of-smake-1.2.1/smake/readfile.c
echo x - smake-1.2.1/smake/rules.c
sed 's/^X//' >smake-1.2.1/smake/rules.c << 'END-of-smake-1.2.1/smake/rules.c'
X/* @(#)rules.c	1.19 09/08/28 Copyright 1987-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)rules.c	1.19 09/08/28 Copyright 1987-2009 J. Schilling";
X#endif
X/*
X *	Copyright (c) 1987-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include "make.h"
X
X/*
X * Default rules complied into make.
X *
X * Should rather read in a setup file...
X */
Xchar implicit_rules[] =
X
X
X#if	defined(unix) || defined(IS_UNIX) || defined(IS_GCC_WIN32) || \
X	defined(__EMX__) || defined(__BEOS__) || defined(__HAIKU__) || \
X	defined(__DJGPP__)
X#	define _OS_
X
X"\
XFC=	f77\n\
XRC=	f77\n\
XPC=	pc\n\
XAS=	as\n\
XCC=	cc\n\
XLD=	ld\n\
XLEX= 	lex\n\
XMAKE=	smake\n\
XYACCR=	yacc -r\n\
XYACC=	yacc\n\
XROFF=	nroff\n\
XASFLAGS=\n\
XFFLAGS=\n\
XLDFLAGS=\n\
XRFLAGS=	-ms\n\
XYFLAGS=\n\
X.o: .c .s .l\n\
X	$(CC) -c $(CFLAGS) $(CPPFLAGS) $<\n\
X	$(AS) -o $*.o $(ASFLAGS) $<\n\
X	$(LEX) $(LFLAGS) $<;$(CC) -c $(CFLAGS) lex.yy.c;rm lex.yy.c;mv lex.yy.o $@\n\
X.c: .y\n\
X	$(YACC) $(YFLAGS) $<;mv y.tab.c $@\n\
X\"\": .o .sc\n\
X	$(CC) -o $* $<\n\
X	$(ROFF) $(RFLAGS) $< > $@\n";
X#endif
X
X#ifdef	tos
X#	define _OS_
X
X"\
XFC=	f77\n\
XRC=	f77\n\
XPC=	pc\n\
XAS=	as\n\
XCC=	cc\n\
XLD=	ld\n\
XLEX= 	lex\n\
XMAKE=	smake\n\
XYACCR=	yacc -r\n\
XYACC=	yacc\n\
XROFF=	nroff\n\
XASFLAGS=\n\
XFFLAGS=\n\
XLDFLAGS=\n\
XRFLAGS=	-ms\n\
X.o: .c .s .l\n\
X	$(CC) -c $(CFLAGS) $(CPPFLAGS) $<\n\
X	$(AS) -o $*.o $(ASFLAGS) $<\n\
X	$(LEX) $(LFLAGS) $<;$(CC) -c $(CFLAGS) lexyy.c;rm lexyy.c;mv lexyy.o $@\n\
X.c: .y\n\
X	$(YACC) $(YFLAGS) $<;mv ytab.c $@\n\
X\"\": .sc\n\
X	$(ROFF) $(RFLAGS) $< > $@\n\
X.prg .tos .ttp: .o\n\
X	$(CC) -o $* $<\n";
X#endif
X
X#ifndef _OS_
X"";
X#endif
END-of-smake-1.2.1/smake/rules.c
echo x - smake-1.2.1/smake/update.c
sed 's/^X//' >smake-1.2.1/smake/update.c << 'END-of-smake-1.2.1/smake/update.c'
X/* @(#)update.c	1.119 09/12/03 Copyright 1985, 88, 91, 1995-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)update.c	1.119 09/12/03 Copyright 1985, 88, 91, 1995-2009 J. Schilling";
X#endif
X/*
X *	Make program
X *	Macro handling / Dependency Update
X *
X *	Copyright (c) 1985, 88, 91, 1995-2009 by J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/types.h>
X#include <schily/standard.h>
X#include <schily/stdlib.h>		/* for free() */
X#include <schily/string.h>
X#include <schily/unistd.h>
X#include <schily/schily.h>
X#include <schily/libport.h>
X#include "make.h"
X
XEXPORT obj_t	*default_tgt;		/* Current 'make' arg or default tgt */
XEXPORT BOOL	found_make;		/* Did we expand the $(MAKE) macro?  */
X
X#define	RTYPE_NONE	-1		/* Undefined type (used to init)    */
X#define	RTYPE_DEFAULT	0		/* Rule from .DEFAULT: target	    */
X#define	RTYPE_SSUFFIX	1		/* Simple suffix rule		    */
X#define	RTYPE_SUFFIX	2		/* Single suffix rule		    */
X#define	RTYPE_DSUFFIX	3		/* Double suffix rule		    */
X#define	RTYPE_PATTERN	4		/* Pattern matching rule	    */
X
X#define	RTYPE_NEEDFREE	0x1000		/* cmd_t * list needs to be free'd  */
X
X#define	rule_type(t)	((t) & ~RTYPE_NEEDFREE)
X
XEXPORT	void	initchars	__PR((void));
XEXPORT	char	*filename	__PR((char * name));
XLOCAL	void	copy_dir	__PR((char * name, char *dir, size_t dsize));
XLOCAL	char	*get_suffix	__PR((char *name, char *suffix));
XLOCAL	void	copy_base	__PR((char *name, char *dir, size_t dsize, char *suffix));
XEXPORT	BOOL	isprecious	__PR((obj_t * obj));
XEXPORT	BOOL	isphony		__PR((obj_t * obj));
XLOCAL	patr_t	*_pattern_rule	__PR((patr_t * prule, char *name));
XLOCAL	obj_t	*pattern_rule	__PR((obj_t * obj));
XLOCAL	obj_t	*suffix_rule	__PR((obj_t * obj, int *rtypep));
XLOCAL	void	suffix_warn	__PR((obj_t * obj));
XLOCAL	obj_t	*ssuffix_rule	__PR((obj_t * obj));
XLOCAL	obj_t	*default_rule	__PR((obj_t * obj, int *rtypep));
XEXPORT	list_t	*list_nth	__PR((list_t * list, int n));
XEXPORT	char	*build_path	__PR((int level, char *name, size_t namelen,
X						char *path, size_t psize));
XLOCAL	void	etoolong	__PR((char *topic, char *name));
XLOCAL	void	grant_gbuf	__PR((int size));
XLOCAL	void	sub_put		__PR((char *chunk, int size));
XLOCAL	void	sub_c_put	__PR((int c));
XLOCAL	void	sub_s_put	__PR((char *chunk));
XLOCAL	BOOL	sub_arg		__PR((int n, list_t * depends, obj_t * target));
XEXPORT	char	*substitute	__PR((char *cmd, obj_t * obj, obj_t * source, char *suffix));
XLOCAL	char	*subst		__PR((char *cmd, obj_t * obj, obj_t * source, char *suffix, list_t * depends));
XLOCAL	char	*dynmac		__PR((char *cmd, obj_t * obj, obj_t * source, char *suffix, list_t * depends, BOOL  domod));
XLOCAL	void	warn_implicit	__PR((obj_t *obj, char *mac, char *exp));
XLOCAL	void	extr_filenames	__PR((char *names));
XLOCAL	void	extr_dirnames	__PR((char *names));
XLOCAL	char	*exp_var	__PR((char end, char *cmd, obj_t * obj, obj_t * source, char *suffix, list_t *depends));
XLOCAL	char	*rstr		__PR((char * s1, char * s2));
XLOCAL	BOOL	patsub		__PR((char *name, char *f1, char *f2, char *t1, char *t2));
XLOCAL	void	patmsub		__PR((char *name, char *f1, char *f2, char *t1, char *t2));
XLOCAL	void	parsepat	__PR((char *pat, char **fp1, char **fp2, char **tp1, char **tp2));
XEXPORT	char	*shout		__PR((char *cmd));
XLOCAL	char	*shsub		__PR((list_t * l, obj_t * obj, obj_t * source, char *suffix, list_t * depends));
XLOCAL	void	exp_name	__PR((char * name, obj_t * obj, obj_t * source, char *suffix, list_t * depends, char *));
XLOCAL	void	dcolon_time	__PR((obj_t *obj));
XLOCAL	date_t	searchobj	__PR((obj_t * obj, int maxlevel, int mode));
XLOCAL	obj_t	*patr_src	__PR((char *name, patr_t * prule, int *rtypep, char ** suffixp, cmd_t ** pcmd, int dlev));
XLOCAL	obj_t	*suff_src	__PR((char *name, obj_t * rule, int *rtypep, char ** suffixp, cmd_t ** pcmd, int dlev));
XLOCAL	obj_t	*one_suff_src	__PR((char *name, char *suffix, cmd_t **pcmd, int dlev));
XLOCAL	obj_t	*ssuff_src	__PR((char *name, obj_t * rule, int *rtypep, char ** suffixp, cmd_t ** pcmd, int dlev));
XLOCAL	obj_t	*findsrc	__PR((obj_t *obj, obj_t * rule, int *rtypep, char ** suffixp, cmd_t ** pcmd, int dlev));
XLOCAL	date_t	default_cmd	__PR((obj_t * obj, char *depname, date_t  deptime, int deplevel, BOOL  must_exist, int dlev));
XLOCAL	date_t	make		__PR((obj_t * obj, BOOL must_exist, int dlev));
XEXPORT	BOOL	domake		__PR((char *name));
XEXPORT	BOOL	omake		__PR((obj_t * obj, BOOL  must_exist));
XEXPORT	BOOL	xmake		__PR((char *name, BOOL  must_exist));
X
Xchar	chartype[256];
X
X/*
X * Optimise character classification
X */
XEXPORT void
Xinitchars()
X{
X	char	*p;
X	int	c;
X
X	p = "@*<0123456789r^?";
X
X	while ((c = *p++) != '\0') {
X		chartype[c] |= DYNCHAR;
X	}
X
X	p = "0123456789";
X
X	while ((c = *p++) != '\0') {
X		chartype[c] |= NUMBER;
X	}
X}
X
X/*
X * Return last pathname component.
X */
XEXPORT char *
Xfilename(name)
X	register char	*name;
X{
X	register char	*fname;
X
X	for (fname = name; *name; )
X		if (*name++ == SLASH)
X			fname = name;
X	return (fname);
X}
X
X/*
X * Copy directory component of pathname.
X */
XLOCAL void
Xcopy_dir(name, dir, dsize)
X	register char	*name;
X	register char	*dir;
X	register size_t	dsize;
X{
X	register char	*p = filename(name);
X		char	*ns = name;
X
X	if (XDebug > 0)
X		error("copy_dir(name:'%s', dir:'%s', dsize: %zd) fn: '%s' \n",
X				name, dir, dsize, p);
X	*dir = '\0';
X	if (p == name) {
X		if (dsize < 2)
X			etoolong("copy directory name", ns);
X		*dir++ = '.';
X		*dir = '\0';
X	} else {
X		if (++dsize == 0) {	/* unsigned overflow */
X			dsize--;
X			while (name < p && dsize-- > 0)
X				*dir++ = *name++;
X			dsize++;
X		} else {
X			while (name < p && --dsize > 0)
X				*dir++ = *name++;
X		}
X		if (dsize == 0)
X			etoolong("copy directory name", ns);
X
X		*--dir = '\0';		/* POSIX wants the '/' to be removed */
X					/* This will make dir(/filename)    */
X					/* not usable...		    */
X		*dir = '\0';
X	}
X}
X
X/*
X * Return part after '.' of last pathname component.
X */
XLOCAL char *
Xget_suffix(name, suffix)
X	char	*name;
X	char	*suffix;
X{
X	register char	*p;
X	register char	*suff = (char *)NULL;
X
X	if (suffix != NULL) {
X		p = filename(name);
X		suff = rstr(p, suffix);
X		if (suff == (char *)NULL) /* No suffix: return end of string */
X			suff = &p[strlen(p)];
X		return (suff);
X	}
X
X	for (p = filename(name); *p; p++)
X		if (*p == '.')
X			suff = p;
X	if (suff == (char *)NULL)	/* No suffix: return end of string */
X		suff = p;
X	return (suff);
X}
X
X/*
X * Copy namebase (everything before '.').
X */
XLOCAL void
Xcopy_base(name, dir, dsize, suffix)
X	register char	*name;
X	register char	*dir;
X	register size_t	dsize;
X		char	*suffix;
X{
X	register char	*p = get_suffix(name, suffix);
X		char	*ns = name;
X
X	if (++dsize == 0) {	/* unsigned overflow */
X		dsize--;
X		while (name < p && dsize-- > 0)
X			*dir++ = *name++;
X		dsize++;
X	} else {
X		while (name < p && --dsize > 0)
X			*dir++ = *name++;
X	}
X	if (dsize == 0)
X		etoolong("copy base name", ns);
X
X	*dir = '\0';
X}
X
X/*
X * Return TRUE if 'obj' is in the list of targets that should not be removed
X * or of the list of dependencies for .PRECIOUS is empty.
X */
XEXPORT BOOL
Xisprecious(obj)
X	obj_t	*obj;
X{
X	list_t	*l;
X
X	if (Precious == (obj_t *)NULL)
X		return (FALSE);
X
X	if (Precious->o_list == NULL)
X		return (TRUE);
X
X	for (l = Precious->o_list; l; l = l->l_next)
X		if (obj == l->l_obj)
X			return (TRUE);
X	return (FALSE);
X}
X
X/*
X * Return TRUE if 'obj' is in the list of targets that should not be checked
X * aginst existing files. A .PHONY target is asumed to be never up to date,
X * it is not removed in case a signal is received.
X */
XEXPORT BOOL
Xisphony(obj)
X	obj_t	*obj;
X{
X	list_t	*l;
X
X	if (Phony == (obj_t *)NULL)
X		return (FALSE);
X
X	for (l = Phony->o_list; l; l = l->l_next)
X		if (obj == l->l_obj)
X			return (TRUE);
X	return (FALSE);
X}
X
X/*
X * Find pattern rule for 'name' starting at 'prule' in rules list.
X */
XLOCAL patr_t *
X_pattern_rule(prule, name)
X	register patr_t	*prule;
X	register char	*name;
X{
X	register char	*p;
X
X	if (prule == NULL)
X		return ((patr_t *)0);
X
X	if (Debug > 1)
X		printf("Searching pattern rule for: %s \n", name);
X
X	for (; prule != NULL; prule = prule->p_next) {
X		register char	*np;
X
X		/*
X		 * XXX NeXT Step has a buggy strstr(); returns NULL if p == ""
X		 */
X		p = (char *)prule->p_tgt_prefix;
X
X		if (*p != '\0' && strstr(name, p) != name)
X			continue;		/* no matching prefix */
X
X		np = name + prule->p_tgt_pfxlen; /* strip matching prefix */
X
X		if ((p = rstr(np, (char *)prule->p_tgt_suffix)) == NULL)
X			continue;
X
X#ifdef	DEBUG
X		if (Debug > 1) {
X			register cmd_t	*cmd;
X			register list_t	*l;
X
X			printf("name: %s (%s %% %s):%s ", name,
X				prule->p_tgt_prefix, prule->p_tgt_suffix,
X				(prule->p_flags & PF_TERM) ? ":":"");
X
X			for (l = prule->p_list; l; l = l->l_next)
X				printf(" %s", l->l_obj->o_name);
X			printf("\n");
X
X			for (cmd = prule->p_cmd; cmd; cmd = cmd->c_next) {
X				printf("\t%s\n", cmd->c_line);
X			}
X		}
X#endif
X		break;
X	}
X	return (prule);
X}
X
X/*
X * Find pattern rule for 'obj' ... not yet ready.
X */
XLOCAL obj_t *
Xpattern_rule(obj)
X	obj_t	*obj;
X{
X	/*
X	 * XXX Hack for now (cast to obj_t *), should return prule.
X	 */
X	return ((obj_t *)_pattern_rule(Patrules, obj->o_name));
X}
X
X/*
X * Find a POSIX suffix rule.
X *
X * Check if obj has a file name with a default dependency for the
X * corresponding source and a rule to compile it.
X */
XLOCAL obj_t *
Xsuffix_rule(obj, rtypep)
X	register obj_t	*obj;
X		int	*rtypep;
X{
X	list_t	*l;
X	list_t	*l2;
X	obj_t	*o;
X	char	*suffix;
X	char	rulename[TYPICAL_NAMEMAX];	/* Space for two suffixes */
X	char	*rule = rulename;
X	char	*rp = NULL;
X	int	rlen = sizeof (rulename);
X	BOOL	found_suffix = FALSE;
X
X	if (Suffixes == NULL)
X		return ((obj_t *)0);
X
X	if (Debug > 1)
X		printf("Searching double suffix rule for: %s \n", obj->o_name);
X
X	for (l = Suffixes; l; l = l->l_next) {
X		suffix = l->l_obj->o_name;
X		if (rstr(obj->o_name, suffix)) {	/* may be a suffix */
X
X			found_suffix = TRUE;
X
X			for (l2 = Suffixes; l2; l2 = l2->l_next) {
X			again:
X				if (snprintf(rule, rlen, "%s%s",
X						l2->l_obj->o_name,
X							suffix) >= rlen) {
X					/*
X					 * Expand rule name space.
X					 */
X					rlen = strlen(suffix) +
X						l2->l_obj->o_namelen + 16;
X					rule = rp = ___realloc(rp, rlen,
X							"suffix rule name");
X					goto again;
X				}
X				if ((o = objlook(rule, FALSE)) != NULL && o->o_type == COLON) {
X					*rtypep = RTYPE_DSUFFIX;
X					if (rp)
X						free(rp);
X					return (o);
X				}
X			}
X		}
X	}
X	if (rp)
X		free(rp);
X	if (found_suffix)
X		return ((obj_t *) 0);
X
X	if (Debug > 1)
X		printf("Searching single suffix rule for: %s \n", obj->o_name);
X
X	for (l2 = Suffixes; l2; l2 = l2->l_next) {
X		rule = l2->l_obj->o_name;
X		if ((o = objlook(rule, FALSE)) != NULL && o->o_type == COLON) {
X			*rtypep = RTYPE_SUFFIX;
X			return (o);
X		}
X	}
X	return ((obj_t *) 0);
X}
X
XLOCAL void
Xsuffix_warn(obj)
X	obj_t	*obj;
X{
X	list_t	*l;
X
X	if (obj->o_list == NULL)
X		return;
X
X	errmsgno(EX_BAD,
X		"WARNING: suffix rule '%s' has superfluous dependency: '",
X		obj->o_name);
X
X	for (l = obj->o_list; l; l = l->l_next) {
X		error("%s%s",
X			l->l_obj->o_name,
X			l->l_next?" ":"");
X	}
X	error("'.\n");
X}
X
X/*
X * Find a simple suffix rule.
X *
X * Check if obj has a file name with a default dependency for the
X * corresponding source and a rule to compile it.
X */
XLOCAL obj_t *
Xssuffix_rule(obj)
X	register obj_t	*obj;
X{
X	register obj_t *rule;
X		char	*ext;
X
X	if (!SSuffrules)
X		return ((obj_t *)0);
X
X	if (Debug > 1)
X		printf("Searching simple-suffix rule for: %s \n", obj->o_name);
X
X	ext = get_suffix(obj->o_name, (char *)0); /* Use '.' (dot) suffix only*/
X
X	if (ext[0] == '\0') {
X		if (obj->o_list == (list_t *)NULL) {
X			ext = "\"\"";		/* obj has no suffix: use "" */
X		} else {
X			return ((obj_t *)NULL);	/* obj has dependency list   */
X		}
X	}
X	rule = ssufflook(ext, FALSE);
X	if (rule == (obj_t *)NULL ||		/* no default rules known   */
X	    rule->o_list == (list_t *)NULL ||	/* no source suffix list    */
X	    rule->o_cmd == (cmd_t *)NULL)	/* no commands defined	    */
X		return ((obj_t *)NULL);
X	return (rule);
X}
X
X/*
X * Check if a default rules exists for the target.
X */
XLOCAL obj_t *
Xdefault_rule(obj, rtypep)
X	obj_t	*obj;
X	int	*rtypep;
X{
X	obj_t *rule;
X
X#ifdef	NO_SLASH_IMPLICIT
X	if (strchr(obj->o_name, SLASH) != NULL) {
X		if (Debug > 3)
X			error("%s has slash, no implicit dependency searched.\n",
X							obj->o_name);
X		/*
X		 * XXX We need to check if this is a good idea.
X		 */
X		rule = (obj_t *)NULL;
X	}
X#endif
X	rule = pattern_rule(obj);
X	if (rule) {
X		*rtypep = RTYPE_PATTERN;
X		return (rule);
X	}
X
X	rule = suffix_rule(obj, rtypep);
X	if (rule) {
X		return (rule);
X	}
X
X	rule = ssuffix_rule(obj);
X	if (rule) {
X		*rtypep = RTYPE_SSUFFIX;
X		return (rule);
X	}
X
X	/*
X	 * XXX Must exits wichtig ??
X	 */
X	*rtypep = RTYPE_DEFAULT;
X	rule = Deflt;	/* .DEFAULT:	*/
X
X	if (rule == (obj_t *)NULL || rule->o_cmd == (cmd_t *)NULL)
X		return ((obj_t *)NULL);
X	return ((obj_t *)rule->o_cmd);	/* XXX Hack for now, should return drule */
X}
X
X/*
X * Return the nth element of a list.
X */
XEXPORT list_t *
Xlist_nth(list, n)
X	register list_t *list;
X		int	n;
X{
X	for (; list; list = list->l_next)
X		if (--n < 0)
X			return (list);
X	return ((list_t *)NULL);
X}
X
X/*
X * Create a new file name from name and the n'th directory in SearchList.
X * SearchList lists sourcedirs before objdirs, starting with
X * n = 0 for '.' and n = 1 for ObjDir.
X *
X * Returns:
X *		NULL	No search path at "level"
X *		name	level points to empty dirname
X *		path	New path in space provided py "path"
X *		other	Allocated new path
X */
XEXPORT char *
Xbuild_path(level, name, namelen, path, psize)
X	int	level;
X	char	*name;
X	size_t	namelen;
X	char	*path;
X	size_t	psize;
X{
X	list_t *lp;
X	char	*dirname = (char *)NULL;
X	register int n = level;
X
X	if (n <= 1) {
X		if (level == OBJLEVEL) {
X			dirname = ObjDir;
X			namelen += slashlen + ObjDirlen;
X		}
X	} else if (level != MAXLEVEL) {
X		if ((lp = list_nth(SearchList, n - 2)) == (list_t *)NULL)
X			return ((char *)NULL);
X		dirname = lp->l_obj->o_name;
X		namelen += slashlen + lp->l_obj->o_namelen;
X	}
X	if (dirname == (char *)NULL)
X		return (name);
X
X	if (namelen >= psize) {
X		psize = namelen + 1;
X		path = ___realloc(NULL, psize, "build path name");
X	}
X	n = snprintf(path, psize, "%s%s%s", dirname, slash, name);
X	if (n >= psize)
X		etoolong("build path name", name);
X
X	return (path);
X}
X
XLOCAL void
Xetoolong(topic, name)
X	char	*topic;
X	char	*name;
X{
X	comerrno(EX_BAD, "String too long, could not %s for '%s'.\n",
X			topic, name);
X	/* NOTREACHED */
X}
X
X/*
X * The growable buffer (gbuf) defines a string with the following layout
X *      "xxxxxxxxxxxxxxxCxxxxxxxxxxxxxxx________"
X *      ^               ^               ^               ^
X *      |               |               |               |
X *      gbuf            textp           sub_ptr         gbufend
X *      textp points to a string that is currently been worked on,
X *	sub_ptr is the write pointer.
X */
Xstatic char *sub_ptr = (char *)NULL;
X
X/*
X * Check whether a pointer is inside the growable buffer (gbuf)
X *
X *	ison_gbuf(p)	depends on the global variables "gbuf" and "gbufend"
X *	wason_gbuf(p)	depens on local copies in "sb" and "sbe" that hold
X *			old values.
X */
X#define	ison_gbuf(p)	((p) >= gbuf && (p) < gbufend)
X#define	wason_gbuf(p)	((p) >= sb && (p) < sbe)
X
XLOCAL void
Xgrant_gbuf(size)
X	int	size;
X{
X	/*
X	 * In order to simplify code we add the space needed for the null byte.
X	 */
X	size++;
X
X	while (sub_ptr + size >= gbufend)
X		sub_ptr = growgbuf(sub_ptr);
X}
X
X/*
X * Put a string bounded by size into the growable buffer.
X */
XLOCAL void
Xsub_put(chunk, size)
X	char	*chunk;
X	int	size;
X{
X	char	*sb = gbuf;
X	char	*sbe = gbufend;
X
X	grant_gbuf(size);
X	if (sb != gbuf && wason_gbuf(chunk)) {
X		chunk = gbuf + (chunk - sb);
X	}
X	movebytes(chunk, sub_ptr, size);
X	sub_ptr += size;
X	*sub_ptr = '\0';	/* Null terminate the gbuf string */
X}
X
X/*
X * Put a single character into the growable buffer.
X */
XLOCAL void
Xsub_c_put(c)
X	int	c;
X{
X	grant_gbuf(1);
X	*sub_ptr++ = c & 0xFF;
X	*sub_ptr   = '\0';	/* Null terminate the gbuf string */
X}
X
X/*
X * Put a string bounded by strlen() into the growable buffer.
X */
XLOCAL void
Xsub_s_put(chunk)
X	char	*chunk;
X{
X	sub_put(chunk, strlen(chunk));
X}
X
X/*
X * Put one arg into the growable buffer.
X *
X * It target is nonzero, check in addition if the target
X * depends on the date of the currently selected obj too.
X *
X * Return FALSE if no more list elements are available.
X */
XLOCAL BOOL
Xsub_arg(n, depends, target)
X	int	n;
X	list_t	*depends;
X	obj_t	*target;
X{
X	register obj_t	*obj;
X		char	arg[TYPICAL_NAMEMAX];
X		char	*argp;
X
X	if ((depends = list_nth(depends, n)) == (list_t *)NULL)
X		return (FALSE);
X
X	/*
X	 * $0 is not available if no implicit source is present!
X	 * Just skip it.
X	 */
X	if ((obj =
X	    depends->l_obj) == (obj_t *)NULL)
X		return (TRUE);
X
X	/*
X	 * It the target does not yet exist, target->o_date is set
X	 * to RECURSETIME. We need to make sure that newtime in the
X	 * dependencies (here obj) is considered > target->o_date.
X	 */
X	if (target != NULL &&
X	    VALIDTIME(target->o_date) && target->o_date > obj->o_date) {
X		return (TRUE);
X	}
X	if ((argp = build_path(obj->o_level, obj->o_name, obj->o_namelen,
X						arg, sizeof (arg))) != NULL) {
X		sub_s_put(argp);
X		if (argp != obj->o_name && argp != arg) {
X			free(argp);
X		}
X	} else {
X		sub_s_put(obj->o_name);
X	}
X	return (TRUE);
X}
X
X/*
X * Do macro substitution. Substitution is done in the growable buffer buf.
X * The buffer is used as stack to allow recursive substitution.
X */
XEXPORT char *
Xsubstitute(cmd, obj, source, suffix)
X	register char	*cmd;
X		obj_t	*obj;
X		obj_t	*source;
X		char	*suffix;
X{
X		list_t	depends;
X
X	found_make = FALSE;			/* we did not expand $(MAKE) */
X	depends.l_obj = source;			/* define implicit source $< */
X	depends.l_next = obj->o_list;
X
X	sub_ptr = gbuf;
X	return (subst(cmd, obj, source, suffix, &depends));
X}
X
Xstatic int	depth = 0;			/* Keep track of recursion   */
X
X/*
X * Substitute macros.
X */
X		/* source wird eigentlich nicht gebraucht */
XLOCAL char *
Xsubst(cmd, obj, source, suffix, depends)
X	register char	*cmd;
X		obj_t	*obj;
X		obj_t	*source;
X		char	*suffix;
X		list_t	*depends;
X{
X		char	*sp = sub_ptr;
X		char	*sb = gbuf;
X	register char	*p;
X		char	name[2];
X
X	if (++depth > 100)
X		comerrno(EX_BAD, "Recursion in macro '%s'.\n", cmd);
X
X	name[1] = '\0';
X	while ((p = strchr(cmd, '$')) != NULL) {
X		sub_put(cmd, p - cmd);
X		cmd = ++p;
X		switch (*cmd++) {
X
X		default:
X			if (chartype[*(Uchar *)p] & DYNCHAR) {
X				cmd = dynmac(p, obj, source, suffix, depends, FALSE);
X				continue;
X			}
X			name[0] = cmd[-1];
X			exp_name(name, obj, source, suffix, depends, Nullstr);
X			break;
X		case '\0':
X			*sub_ptr = '\0';
X			/*
X			 * No need to update 'sb' as we exit here...
X			 */
X			if (sb != gbuf)
X				sp = gbuf + (sp - sb);
X			comerrno(EX_BAD,
X				"Fatal error '$' at end of string '%s$'\n",
X									sp);
X			/* NOTREACHED */
X		case '$':
X			sub_c_put('$');
X			break;
X		case '(':
X			cmd = exp_var(')', cmd, obj, source, suffix, depends);
X			break;
X		case '{':
X			cmd = exp_var('}', cmd, obj, source, suffix, depends);
X			break;
X		}
X	}
X	sub_s_put(cmd);
X	*sub_ptr = '\0';
X	depth--;
X	if (sb != gbuf)
X		sp = gbuf + (sp - sb);
X	return (sp);
X}
X
X/*
X * Substitute dynamic macros.
X */
XLOCAL char *
Xdynmac(cmd, obj, source, suffix, depends, domod)
X	char	*cmd;
X	obj_t	*obj;
X	obj_t	*source;
X	char	*suffix;
X	list_t	*depends;
X	BOOL	domod;
X{
X	int	num;
X	char	_base[TYPICAL_NAMEMAX];
X	char	*base = _base;
X	char	*bp = NULL;
X	size_t	blen = sizeof (_base);
X	char	*sp = sub_ptr;
X	char	*sb = gbuf;
X	char	*sp1;
X	char	*sb1;
X	register char	*p = cmd;
X
X	switch (*cmd++) {
X
X	default:
X		return (cmd);
X
X	case '@':
X		if (obj->o_flags & F_DCOLON)		/* Is a ::@ target */
X			sub_s_put(obj->o_node->o_name);	/* $@ -> full target name */
X		else
X			sub_s_put(obj->o_name);	/* $@ -> full target name */
X		break;
X	case '*':
X		if (obj->o_namelen >= blen) {
X			blen = obj->o_namelen + 1;
X			base = bp = ___realloc(bp, blen, "base name");
X		}
X#ifdef	used_to_be_in_former_versions
X		copy_base(filename(obj->o_name), base, blen, suffix);
X#endif
X		if (ObjDir || SearchList) {	/* May be removed in 2010 */
X
X			if (obj->o_name != filename(obj->o_name) &&
X			    objlook("VPATH", FALSE) == NULL)
X				error(
X				"WARNING: Old: convert $* from '%s' -> '%s'\n",
X					obj->o_name, filename(obj->o_name));
X		}
X		if (obj->o_flags & F_PATRULE) {
X			patr_t *pr = (patr_t *)obj->o_node;
X
X			copy_base(obj->o_name+pr->p_tgt_pfxlen, base, blen,
X							pr->p_tgt_suffix);
X		} else {
X			copy_base(obj->o_name, base, blen, suffix);
X			if (suffix == NULL && !nowarn("$*"))
X				warn_implicit(obj, "$*", base);
X		}
X		sub_s_put(base);		/* $* -> target name base */
X		break;
X	case '<':
X		if (depends->l_obj == NULL && !nowarn("$<"))
X			warn_implicit(obj, "$<", "");
X		sub_arg(0, depends, (obj_t *)0); /* $< -> implicit source  */
X		break;
X	case '0': case '1': case '2': case '3': case '4':
X	case '5': case '6': case '7': case '8': case '9':
X		cmd = astoi(p, &num);		/* $1 -> first dependency */
X		sub_arg(num, depends, (obj_t *)0); /* $0 -> implicit source  */
X		break;
X	case 'r':
X		/*
X		 * $r0 -> all dependencies + implicit source
X		 * $r1 -> all dependencies
X		 */
X		sp1 = sub_ptr;
X		sb1 = gbuf;
X		cmd = astoi(cmd, &num);
X		while (sub_arg(num++, depends, (obj_t *)0)) {
X			if (sb1 != gbuf)
X				sp1 = gbuf + (sp1 - sb1);
X			if (sp1 != sub_ptr)	/* Add only if nonempty arg */
X				sub_c_put(' ');
X			sp1 = sub_ptr;
X			sb1 = gbuf;
X		}
X		if (sb != gbuf)
X			sp = gbuf + (sp - sb);
X		if (sp != sub_ptr && sub_ptr[-1] == ' ')
X			sub_ptr--;		/* Kill last space */
X		break;
X	case '^':
X		sp1 = sub_ptr;
X		sb1 = gbuf;
X		num = 1;			/* $^ -> all dependencies */
X		while (sub_arg(num++, depends, (obj_t *)0)) {
X			if (sb1 != gbuf)
X				sp1 = gbuf + (sp1 - sb1);
X			if (sp1 != sub_ptr)	/* Add only if nonempty arg */
X				sub_c_put(' ');
X			sp1 = sub_ptr;
X			sb1 = gbuf;
X		}
X		if (sb != gbuf)
X			sp = gbuf + (sp - sb);
X		if (sp != sub_ptr && sub_ptr[-1] == ' ')
X			sub_ptr--;		/* Kill last space */
X		break;
X	case '?':
X		sp1 = sub_ptr;
X		sb1 = gbuf;
X		num = 1;			/* $? -> outdated dependencies*/
X		while (sub_arg(num++, depends, obj)) {
X			if (sb1 != gbuf)
X				sp1 = gbuf + (sp1 - sb1);
X			if (sp1 != sub_ptr)	/* Add only if nonempty arg */
X				sub_c_put(' ');
X			sp1 = sub_ptr;
X			sb1 = gbuf;
X		}
X		if (sb != gbuf)
X			sp = gbuf + (sp - sb);
X		if (sp != sub_ptr && sub_ptr[-1] == ' ')
X			sub_ptr--;		/* Kill last space */
X		break;
X	}
X	*sub_ptr = '\0';
X	if (bp)
X		free(bp);
X	if (!domod)
X		return (cmd);
X	if (sb != gbuf)
X		sp = gbuf + (sp - sb);
X	if (*cmd == 'F') {
X		extr_filenames(sp);		/* 'sp' must be in gbuf */
X		return (++cmd);
X	}
X	if (*cmd == 'D') {
X		extr_dirnames(sp);		/* 'sp' must be in gbuf */
X		return (++cmd);
X	}
X	return (cmd);
X}
X
XLOCAL void
Xwarn_implicit(obj, mac, exp)
X	obj_t	*obj;
X	char	*mac;
X	char	*exp;
X{
X	errmsgno(EX_BAD,
X	"WARNING: requesting implicit dynmac '%s' for explicit target '%s'\n",
X			mac, obj->o_name);
X	errmsgno(EX_BAD,
X		"WARNING: expanding implicit dynmac  '%s' to '%s'\n",
X			mac, exp);
X	errmsgno(EX_BAD,
X		"WARNING: Current working directory:  '%s', Makefile '%s'\n",
X				curwdir(), MakeFileNames[obj->o_fileindex]);
X}
X
X/*
X * Extract the filename parts from a string that contains a list of names.
X *
X * The parameter 'names' is expected to be on the 'growable buffer'.
X * If we ever need to use extr_filenames() otherwise, we need to add a boolean
X * parameter that tells extr_filenames() whether 'names' needs to be corrected
X * if 'gbuf' did change or not.
X */
XLOCAL void
Xextr_filenames(names)
X	char	*names;
X{
X	char	*p;
X	char	*np;
X	char	*s;
X	char	*sp;
X	char	*sb;
X
X	sp = ++sub_ptr;
X	sb = gbuf;
X	/*
X	 * Make sure that gbuf has enough room for the copy.
X	 */
X	grant_gbuf(sub_ptr - names);
X	if (sb != gbuf) {
X		sp = gbuf + (sp - sb);
X		names = gbuf + (names - sb);
X	}
X	for (np = p = names, s = sp; np && *np; p = np) {
X		np = strchr(np, ' ');
X		if (np)
X			*np++ = '\0';
X		p = filename(p);
X		while (*p)
X			*s++ = *p++;
X		if (np)
X			*s++ = ' ';
X	}
X	*s = '\0';
X	/*
X	 * Now copy down from uppe part of gbuf.
X	 */
X	for (s = names, p = sp; *p; )
X		*s++ = *p++;
X	*s = '\0';
X	sub_ptr = s;
X}
X
X/*
X * Extract the directory parts from a string that contains a list of names.
X *
X * The parameter 'names' is expected to be on the 'growable buffer'.
X * If we ever need to use extr_dirnames() otherwise, we need to add a boolean
X * parameter that tells extr_dirnames() whether 'names' needs to be corrected
X * if 'gbuf' did change or not.
X */
XLOCAL void
Xextr_dirnames(names)
X	char	*names;
X{
X	char	*p;
X	char	*np;
X	char	*s;
X	char	*sp;
X	char	*sb;
X	char	_base[TYPICAL_NAMEMAX];
X	char	*base = _base;
X	char	*bp = NULL;
X	size_t	blen = sizeof (_base);
X	size_t	len;
X
X	sp = ++sub_ptr;
X	sb = gbuf;
X	/*
X	 * Make sure that gbuf has enough room for the copy.
X	 */
X	grant_gbuf(sub_ptr - names);
X	if (sb != gbuf) {
X		sp = gbuf + (sp - sb);
X		names = gbuf + (names - sb);
X	}
X	for (np = p = names, s = sp; np && *np; p = np) {
X		np = strchr(np, ' ');
X		if (np) {
X			*np++ = '\0';
X			len = np - p;
X		} else {
X			len = strlen(p) + 1;
X		}
X		if (len > blen) {
X			blen = len + 32;	/* Add some reserve */
X			base = bp = ___realloc(bp, blen, "dir base");
X		}
X		copy_dir(p, base, blen);
X		p = base;
X		while (*p)
X			*s++ = *p++;
X		if (np)
X			*s++ = ' ';
X	}
X	*s = '\0';
X	if (bp)
X		free(bp);
X	/*
X	 * Now copy down from upper part of gbuf.
X	 */
X	for (s = names, p = sp; *p; )
X		*s++ = *p++;
X	*s = '\0';
X	sub_ptr = s;
X}
X
X#define	white(c)	((c) == ' ' || (c) == '\t')
X
X/*
X * Expand a macro.
X * As the replacement may be a suffix rule or a pattern rule too,
X * we first must get the basic name the macro referres to.
X */
X#ifdef	PROTOTYPES
XLOCAL char *
Xexp_var(
X	register char	end,
X	char		*cmd,
X	obj_t		*obj,
X	obj_t		*source,
X	char		*suffix,
X	list_t		*depends)
X#else
XLOCAL char *
Xexp_var(end, cmd, obj, source, suffix, depends)
X	register char	end;
X		char	*cmd;
X		obj_t	*obj;
X		obj_t	*source;
X		char	*suffix;
X		list_t	*depends;
X#endif
X{
X		char	_name[TYPICAL_NAMEMAX];
X		char	*name = _name;
X		char	*nep = &_name[sizeof (_name) - 2];
X		char	*np = NULL;
X		size_t	nlen = sizeof (_name);
X		char	_pat[TYPICAL_NAMEMAX];
X		char	*pat = _pat;
X		char	*pep = &_pat[sizeof (_pat) - 2];
X		char	*pp = NULL;
X		size_t	plen = sizeof (_pat);
X	register char	beg = cmd[-1];
X	register char	*s = cmd;
X	register char	*rname = name;
X	register char	ch;
X	register int	nestlevel = 0;
X		BOOL	funccall = FALSE;
X
X/*error("end: %c cmd: %.50s\n", end, cmd);*/
X	pat[0] = '\0';
X	while ((ch = *s) != '\0' && ch != ':' && !white(ch)) {
X		if (ch == beg)
X			nestlevel++;
X		if (ch == end)
X			nestlevel--;
X		if (nestlevel < 0) {
X/*printf("name: %s\n", name);*/
X			break;
X		}
X		if (rname >= nep) {
X			nlen += TYPICAL_NAMEMAX*2;
X			name = ___realloc(np, nlen, "macro name");
X			if (np == NULL) {
X				/*
X				 * Copy old content
X				 */
X				strlcpy(name, _name, sizeof (_name));
X				rname = name + (rname - _name);
X			} else {
X				rname = name + (rname - np);
X			}
X			np = name;
X			nep = &name[nlen - 2];
X		}
X		*rname++ = *s++;
X	}
X	*rname = '\0';
X
X	if (ch == ' ')
X		funccall = TRUE;
X
X	if (*s != end && *s != ':' && *s != ' ') {
X		comerrno(EX_BAD, "Missing '%c' in macro call '%s'\n", end, name);
X		/* NOTREACHED */
X/*		return (cmd);*/
X	}
X
X	if (*s == ':' || *s == ' ') {
X		rname = pat;
X		if (funccall) {
X			while (*s && white(*s))
X				s++;
X		} else {
X			s++;
X		}
X		while ((ch = *s) != '\0') {
X			if (ch == beg)
X				nestlevel++;
X			if (ch == end)
X				nestlevel--;
X			if (nestlevel < 0) {
X/*printf("name: %s\n", name);*/
X				break;
X			}
X			if (rname >= pep) {
X				plen += TYPICAL_NAMEMAX*2;
X				pat = ___realloc(pp, plen, "macro pattern");
X				if (pp == NULL) {
X					/*
X					 * Copy old content
X					 */
X					strlcpy(pat, _pat, sizeof (_pat));
X					rname = pat + (rname - _pat);
X				} else {
X					rname = pat + (rname - pp);
X				}
X				pp = pat;
X				pep = &pat[plen - 2];
X			}
X			*rname++ = *s++;
X		}
X		*rname = '\0';
X
X		if (nestlevel >= 0)
X			comerrno(EX_BAD, "Missing '%c' in macro call '%s%c%s'\n",
X					end, name, funccall?' ':':', pat);
X	}
X	if (*s)
X		s++;
X
X	if (name[0] == 'M' && streql(name, "MAKE"))
X		found_make = TRUE;
X
X	/*
X	 * If the name of the macro contains a '$', resursively expand it.
X	 * We need to check if we should rather expand anything between the
X	 * brackets (e.g {...}) however, this may fail to expand long lists.
X	 * See also comment in exp_name() regarding USE_SUBPAT
X	 */
X	if (strchr(name, '$')) {
X		char	*sp = sub_ptr;
X		char	*sb = gbuf;
X		char	*s2;
X
X		*sub_ptr++ = '\0';
X
X		s2 = subst(name, obj, source, suffix, depends);
X		if (sb != gbuf)
X			sp = gbuf + (sp - sb);
X		sub_ptr = sp;
X		if (*s2) {
X			if (strlcpy(name, s2, nlen) >= nlen) {
X				nlen = strlen(s2) +1;
X				name = np = ___realloc(np, nlen, "macro name");
X				if (strlcpy(name, s2, nlen) >= nlen)
X					etoolong("copy macro content", s2);
X			}
X		}
X	}
X
X	if (funccall) {
X		/*
X		 * GNU type macro functions will go here.
X		 */
X		goto out;
X	}
X/*printf("name: '%s' pat: '%s'\n", name, pat);*/
X	exp_name(name, obj, source, suffix, depends, pat);
Xout:
X	if (np)
X		free(np);
X	if (pp)
X		free(pp);
X	return (s);
X}
X
X/*
X * Check if s1 ends in strings s2
X */
XLOCAL char *
Xrstr(s1, s2)
X	char	*s1;
X	char	*s2;
X{
X	int	l1;
X	int	l2;
X
X	l1 = strlen(s1);
X	l2 = strlen(s2);
X	if (l2 > l1)
X		return ((char *)NULL);
X
X	if (streql(&s1[l1 - l2], s2))
X		return (&s1[l1 - l2]);
X	return ((char *)NULL);
X}
X
X/*
X * Substitute a pattern:
X * 1)	select the part of 'name' that is surrounded by f1 & f2
X * 2a)	output the selected part from 'name' and t1 (suffix)
X * 2b)	output t2 -
X *	if t2 contains '%' substitute the selected part of 'name'
X *
X * The parameter 'name' is expected to be on the 'growable buffer'.
X * If we ever need to use patsub() otherwise, we need to add a boolean
X * parameter that tells patsub() whether 'name' needs to be corrected
X * if 'gbuf' did change or not.
X */
XLOCAL BOOL
Xpatsub(name, f1, f2, t1, t2)
X	char	*name;
X	char	*f1;
X	char	*f2;
X	char	*t1;
X	char	*t2;
X{
X	int	l;
X	char	*p;
X	char	*sb = gbuf;
X	char	*sbe = gbufend;
X
X/*	printf("name: '%s' f1: '%s' f2: '%s' t1: '%s' t2: '%s'\n", name, f1, f2, t1, t2);*/
X
X	/*
X	 * Make sure $(VAR:%=PREFIX/%) does not expand if $VAR is empty.
X	 */
X	if (*name == '\0' && *f1 == '\0' && *f2 == '\0')
X		return (FALSE);
X	/*
X	 * XXX NeXT Step has a buggy strstr(); returns NULL if f1 == ""
X	 * XXX f1 is guaranteed to be != NULL
X	 */
X	if (*f1 != '\0' && strstr(name, f1) != name)
X		return (FALSE);		/* no matching prefix */
X
X	name += strlen(f1);		/* strip matching prefix */
X
X	if ((p = rstr(name, f2)) == NULL)
X		return (FALSE);		/* no matching suffix */
X
X	l = p - name;
X	if (t1 != NULL) {		/* This is a suffix rule */
X		sub_put(name, l);	/* 'name' maybe on gbuf... */
X		if (sb != gbuf) {
X			if (wason_gbuf(name))
X				name = gbuf + (name - sb);
X			sb = gbuf;
X			sbe = gbufend;
X		}
X		p = t1;
X	} else {			/* This is a pattern rule */
X		p = t2;
X	}
X	while (*p) {
X		/*
X		 * Expand '%' only in case of a patten macro expansion.
X		 */
X		if (*p == '%' && t2 != NULL) {
X			p++;
X			sub_put(name, l); /* 'name' is on gbuf... */
X		} else {
X			sub_put(p++, 1);
X		}
X		if (sb != gbuf) {
X			if (wason_gbuf(name))
X				name = gbuf + (name - sb);
X			if (wason_gbuf(p))
X				p = gbuf + (p - sb);
X			sb = gbuf;
X			sbe = gbufend;
X		}
X	}
X	return (TRUE);
X}
X
X#ifdef	needed
X/*
X * Do pattern substitution in a macro that may only contain one word.
X *
X * The parameter 'name' is expected to be on the 'growable buffer'.
X * If we ever need to use patssub() otherwise, we need to add a boolean
X * parameter that tells patssub() whether 'name' needs to be corrected
X * if 'gbuf' did change or not.
X */
XLOCAL void
Xpatssub(name, f1, f2, t1, t2)
X	char	*name;
X	char	*f1;
X	char	*f2;
X	char	*t1;
X	char	*t2;
X{
X	char	*osp = name;
X	char	*sp = sub_ptr;
X	char	*sb = gbuf;
X
X	*sub_ptr++ = '\0';
X
X	if (!patsub(name, f1, f2, t1, t2)) {
X		sub_ptr = sp;
X		return;
X	}
X	*sub_ptr = '\0';
X	sub_ptr = osp;
X	if (sb != gbuf) {
X		sp = gbuf + (sp - sb);
X		sub_ptr = gbuf + (sub_ptr - sb);
X	}
X	sub_s_put(&sp[1]);
X}
X#endif
X
X/*
X * Do pattern substitution in a macro that may contain multiple words.
X * Subtitution is applied separately to each word.
X *
X * The parameter 'name' is expected to be on the 'growable buffer'.
X * If we ever need to use patmsub() otherwise, we need to add a boolean
X * parameter that tells patmsub() whether 'name' needs to be corrected
X * if 'gbuf' did change or not.
X */
XLOCAL void
Xpatmsub(name, f1, f2, t1, t2)
X	char	*name;
X	char	*f1;
X	char	*f2;
X	char	*t1;
X	char	*t2;
X{
X	char	*osp = name;
X	char	*sp = sub_ptr;
X	char	*sb = gbuf;
X	char	*sbe = gbufend;
X	char	*b;
X	char	c;
X
X	*sub_ptr++ = '\0';
X
X	do {
X		b = name;
X		while (*b != '\0' && !white(*b))
X			b++;
X		if ((c = *b) != '\0')
X			*b++ = '\0';
X		else
X			b = NULL;
X
X/*error("name '%s'\n", name);*/
X		if (!patsub(name, f1, f2, t1, t2)) {
X			sub_s_put(name);	/* 'name' maybe on gbuf... */
X		}
X		if (sb != gbuf) {
X			sp = gbuf + (sp - sb);
X			osp = gbuf + (osp - sb);
X			name = gbuf + (name - sb);
X			if (b != NULL)
X				b = gbuf + (b - sb);
X			sb = gbuf;
X			sbe = gbufend;
X		}
X
X		if (b) {
X			sub_c_put(c);
X			while (*b != '\0' && white(*b)) {
X				sub_put(b++, 1);
X				if (sb != gbuf) {
X					sp = gbuf + (sp - sb);
X					osp = gbuf + (osp - sb);
X					if (wason_gbuf(b))
X						b = gbuf + (b - sb);
X					sb = gbuf;
X					sbe = gbufend;
X				}
X			}
X		}
X		name = b;
X	} while (b);
X	*sub_ptr = '\0';
X	sub_ptr = osp;
X	if (sb != gbuf) {
X		sp = gbuf + (sp - sb);
X		sub_ptr = gbuf + (sub_ptr - sb);
X	}
X	sub_s_put(&sp[1]);
X}
X
X/*
X * Parse a pattern and divide pattern into parts.
X *
X * Check if this is a suffix replacement macro or a pattern repacement macro.
X *
X * If this is a suffix macro (suf1=suf2), tp2 will point to a NULL pointer,
X * if this is a pattern macro (pref1%suf1=pref1%suf2) tp1 will point to NULL.
X */
XLOCAL void
Xparsepat(pat, fp1, fp2, tp1, tp2)
X	char	*pat;
X	char	**fp1;
X	char	**fp2;
X	char	**tp1;
X	char	**tp2;
X{
X	char	*f1;
X	char	*f2;
X	char	*t1;
X	char	*t2;
X
X	t1 = strchr(pat, '=');
X	if (t1 == NULL)
X		comerrno(EX_BAD, "'=' missing in macro substitution.\n");
X	*t1++ = '\0';
X
X	f2 = strchr(pat, '%');		/* Find '%' in from patttern */
X	if (f2 != NULL) {
X		*f2++ = '\0';
X		f1 = pat;
X	} else {
X		f2 = pat;
X		f1 = Nullstr;
X	}
X	if (f1 == pat) {		/* This is a pattern macro */
X		t2 = t1;
X		t1 = NULL;
X	} else {			/* This is a suffix macro */
X		t2 = NULL;
X	}
X	*fp1 = f1;
X	*fp2 = f2;
X	*tp1 = t1;
X	*tp2 = t2;
X/*	printf("f1: '%s' f2: '%s' t1: '%s' t2: '%s'\n", f1, f2, t1, t2);*/
X}
X
X#if	!defined(HAVE_POPEN) && defined(HAVE__POPEN)
X#	define	popen	_popen
X#	define	HAVE_POPEN
X#endif
X#if	!defined(HAVE_PCLOSE) && defined(HAVE__PCLOSE)
X#	define	pclose	_pclose
X#	define	HAVE_PCLOSE
X#endif
X/*
X * Call shell command and capture the outpout in the growable buffer.
X */
XEXPORT char *
Xshout(cmd)
X	char	*cmd;
X{
X	FILE	*f;
X	int	c;
X	char	*sptr = sub_ptr;
X	char	*sbuf = gbuf;
X
X	if (sub_ptr == NULL)
X		sptr = sub_ptr = gbuf;
X
X	f = popen(cmd, "r");
X	if (f == NULL)
X		comerr("Cannot popen '%s'.\n", cmd);
X
X	while ((c = getc(f)) != EOF) {
X		if (c == '\t' || c == '\n')
X			c = ' ';
X		sub_c_put(c);
X	}
X	if ((c = pclose(f)) != 0)
X		comerr("Shell returns %d from command line.\n", c);
X	*sub_ptr = '\0';
X	if (sbuf != gbuf)
X		sptr = gbuf + (sptr - sbuf);
X	return (sptr);
X}
X
X/*
X * Substitute a shell command output
X */
XLOCAL char *
Xshsub(l, obj, source, suffix, depends)
X	register list_t *l;
X		obj_t	*obj;
X		obj_t	*source;
X		char	*suffix;
X		list_t  *depends;
X{
X	char	*sptr = sub_ptr;
X	char	*sbuf = gbuf;
X
X	if (sub_ptr == NULL)
X		sptr = sub_ptr = gbuf;
X
X	for (;;) {
X		subst(l->l_obj->o_name, obj, source, suffix, depends);
X		if ((l = l->l_next) != NULL)
X			sub_c_put(' ');
X		else
X			break;
X	}
X	*sub_ptr = '\0';
X	if (sbuf != gbuf)
X		sptr = gbuf + (sptr - sbuf);
X	sub_ptr = sptr;
X
X	return (shout(sptr));
X}
X
X/*
X * Expand a macro for which the name is explicitely known.
X */
XLOCAL void
Xexp_name(name, obj, source, suffix, depends, pat)
X		char	*name;
X		obj_t	*obj;
X		obj_t	*source;
X		char	*suffix;
X		list_t  *depends;
X		char	*pat;
X{
X	register list_t	*l = NULL;
X		obj_t	*o = NULL;
X		BOOL	ispat;
X		char	epat[TYPICAL_NAMEMAX*2];	/* Was NAMEMAX */
X		char	*epa = epat;
X		char	*ep = NULL;
X		char	*f1, *f2;
X		char	*t1, *t2;
X		char	*sp;
X		char	*sb;
X
X	if ((chartype[*(Uchar *)name] & DYNCHAR) == 0 ||
X			(*name == 'r' && (chartype[((Uchar *)name)[1]] & NUMBER) == 0)) {
X		/*
X		 * Allow dynamic macros to appear in $() or ${} too.
X		 */
X		o = objlook(name, FALSE);
X		if (o == (obj_t *)NULL) {
X			/*
X			 * Check for $O -> ObjDir (speudo dyn) macro.
X			 * $O is a speudo dyn macro as we allow to overwrite it
X			 * in order get full POSIX make compliance.
X			 */
X			if (name[0] == 'O' && name[1] == '\0') {
X				/*
X				 * If $O has not been overwritten, use ObjDir.
X				 */
X				if (ObjDir == NULL) {
X					sp = sub_ptr;
X					sb = gbuf;
X					sub_c_put('.');
X					*sub_ptr = '\0';
X					if (pat[0] != '\0') {
X						char	*p;
X						p = subst(pat, obj, source,
X							suffix, depends);
X						if ((sub_ptr - p) >=
X						    sizeof (epat)) {
X							epa = ep = ___realloc(ep,
X								sub_ptr - p + 1,
X								"pattern content");
X						}
X						strcpy(epa, p);
X						/*
X						 * Free space from subpat()
X						 */
X						sub_ptr = p;
X						parsepat(epa, &f1, &f2, &t1, &t2);
X						if (sb != gbuf)
X							sp = gbuf + (sp - sb);
X						/*
X						 * patmsub() expects first
X						 * parameter to be in 'gbuf'
X						 */
X						patmsub(sp, f1, f2, t1, t2);
X					}
X				} else {
X					exp_name(".OBJDIR", obj, source, suffix, depends, pat);
X				}
X			}
X			if (ep)
X				free(ep);
X			return;
X		}
X		if ((l = o->o_list) == (list_t *)NULL)
X			return;
X	}
X	if (streql(pat, "sh")) {
X		/*
X		 * Allow SunPRO make compatible shell expansion as $(NAME:sh)
X		 */
X		if (o != NULL) {
X			shsub(o->o_list, obj, source, suffix, depends);
X		} else {
X			/*
X			 * Process dynamic macros that appear in $() or ${}.
X			 */
X			sp = sub_ptr;
X			sb = gbuf;
X			dynmac(name, obj, source, suffix, depends, TRUE);
X/*error("expanded1: '%s'\n", sp);*/
X			if (sb != gbuf)
X				sp = gbuf + (sp - sb);
X			sub_ptr = sp;
X			(void) shout(sp);
X		}
X		return;
X	}
X	ispat = pat[0] != '\0';
X	if (ispat) {
X		char	*p = subst(pat, obj, source, suffix, depends);
X
X		if ((sub_ptr - p) >= sizeof (epat)) {
X			epa = ep = ___realloc(ep, sub_ptr - p + 1,
X						"pattern content");
X		}
X		strcpy(epa, p);
X		sub_ptr = p;	/* Free space from subpat() */
X		parsepat(epa, &f1, &f2, &t1, &t2);
X	}
X
X	if (o == NULL) {
X		/*
X		 * Process dynamic macros that appear in $() or ${}.
X		 */
X		sp = sub_ptr;
X		sb = gbuf;
X		dynmac(name, obj, source, suffix, depends, TRUE);
X/*error("expanded1: '%s'\n", sp);*/
X		if (ispat) {
X			if (sb != gbuf)
X				sp = gbuf + (sp - sb);
X			/*
X			 * patmsub() expects first parameter to be in 'gbuf'
X			 */
X			patmsub(sp, f1, f2, t1, t2);
X/*error("expanded2: '%s'\n", sp);*/
X		}
X		if (ep)
X			free(ep);
X		return;
X	}
X	for (;;) {
X		sp = sub_ptr;
X		sb = gbuf;
X		subst(l->l_obj->o_name, obj, source, suffix, depends);
X/*error("expanded1: '%s'\n", sp);*/
X		if (ispat) {
X			if (sb != gbuf)
X				sp = gbuf + (sp - sb);
X			/*
X			 * patmsub() expects first parameter to be in 'gbuf'
X			 */
X			patmsub(sp, f1, f2, t1, t2);
X/*error("expanded2: '%s'\n", sp);*/
X		}
X		if ((l = l->l_next) != NULL)
X			sub_c_put(' ');
X		else
X			break;
X/*error("expanded3: '%s'\n", sp);*/
X	}
X	if (ep)
X		free(ep);
X}
X
X/*
X * Copy over the time and level from the intermediate :: object
X * to the main base object.
X */
XLOCAL void
Xdcolon_time(obj)
X	register obj_t	*obj;
X{
X#ifdef	__really_needed__
X	if (VALIDTIME(obj->o_node->o_date))
X		return;
X#endif
X
X#ifdef	Do_not_use_o_node
X	name = strchr(obj->o_name, '@');
X	if (name == NULL)
X		return;
X	o = objlook(++name, FALSE);
X#endif
X
X	obj->o_node->o_date = obj->o_date;
X	obj->o_node->o_level = obj->o_level;
X}
X
X/*
X * Find a file in .SEARCHLIST
X * .SEARCHLIST is a list of of src/obj dir pairs
X * Before .SEARCHLIST is searched, look for "." and .OBJDIR
X */
XLOCAL date_t
Xsearchobj(obj, maxlevel, mode)
X	register obj_t	*obj;
X		int	maxlevel;
X		int	mode;
X{
X		char	name[TYPICAL_NAMEMAX];
X		char	*namep = NULL;
X		char	*oname = NULL;
X	register int	level = MAXLEVEL;
X		date_t	filedate;
X
X
X	name[0] = '\0';			/* for clean debug print */
X
X	if ((maxlevel & 1) == 0)	/* Source has lower level	*/
X		maxlevel += 1;		/* include OBJ directory level	*/
X
X	if (obj->o_date == PHONYTIME) {
X		filedate = PHONYTIME;
X
X	} else if (isphony(obj)) {
X		obj->o_date = filedate = PHONYTIME;
X
X#ifdef	NO_SEARCHOBJ_SLASH_IN_NAME
X	/*
X	 * Earlier versions of smake did allow slashes anywhere in path names
X	 * and being searched for. A common practice in VPATH usage requires us
X	 * to allow slashes inside a path name again.
X	 */
X	} else if (strchr(obj->o_name, SLASH) != (char *)NULL) {
X#else
X	/*
X	 * If an object file name starts with a slash, is is an absolute path
X	 * name so do not search.
X	 */
X	} else if (obj->o_name[0] == SLASH) {
X#endif
X		/*
X		 * Do not search for pathnames.
X		 */
X		filedate = gftime(obj->o_name);
X	} else for (level = 0, filedate = NOTIME; level <= maxlevel; level++) {
X		if (level & 1 ? mode & SOBJ : mode & SSRC) {
X			oname = obj->o_name;
X			if ((obj->o_flags & F_DCOLON) != 0) {
X				oname = obj->o_node->o_name;
X				if ((namep = build_path(level,
X						obj->o_node->o_name,
X						obj->o_node->o_namelen,
X						name, sizeof (name))) == NULL)
X					break;
X			} else if ((namep = build_path(level, obj->o_name,
X						obj->o_namelen,
X						name, sizeof (name))) == NULL)
X				break;
X			if ((filedate = gftime(namep)) != NOTIME)
X				break;
X			if (level == WDLEVEL && ObjDir == (char *)NULL) {
X				/*
X				 * Working dir has just been searched don't
X				 * look again if no .OBJDIR has been defined.
X				 */
X				level++;
X			}
X		}
X	}
X	if (filedate == NOTIME || filedate == PHONYTIME)
X		level = MAXLEVEL;
X
X	obj->o_date = filedate;
X	obj->o_level = level;
X	if (obj->o_flags & F_DCOLON)
X		dcolon_time(obj);	/* Copy from intermediate to main obj */
X
X	if (Debug > 2) {
X		error("search(%s, %d, %s) = %s %s %d\n",
X				obj->o_name, maxlevel, searchtype(mode),
X				prtime(filedate), namep, level);
X	}
X	if (namep != NULL && namep != oname && namep != name) {
X		free(namep);
X	}
X	if (filedate == PHONYTIME) {
X		return (NOTIME);
X	}
X	return (filedate);
X}
X
X/*
X * Find a source file for a given object file, use pattern matching rules.
X */
XLOCAL obj_t *
Xpatr_src(name, prule, rtypep, suffixp, pcmd, dlev)
X	char	*name;
X	patr_t	*prule;
X	int	*rtypep;
X	char	**suffixp;
X	cmd_t	**pcmd;
X	int	dlev;
X{
X		char	*xname = name;
X	register obj_t	*source;
X		obj_t	newsource;
X		char	_sourcename[TYPICAL_NAMEMAX];
X		char	*sourcename = _sourcename;
X		char	*sp = NULL;
X		size_t	slen = sizeof (_sourcename);
X		char	_pat[TYPICAL_NAMEMAX];
X		char	*pat = _pat;
X		char	*pp = NULL;
X		size_t	plen = sizeof (_pat);
X		char	*p;
X		size_t	len;
X		obj_t	*obj;
X
X	if (prule->p_list == NULL) {
X		source = NullObj;
X		goto found;
X	}
X	if ((prule->p_list->l_obj->o_flags & F_PERCENT) == 0)
X		errmsgno(EX_BAD,
X		"WARNING: Non-percent pattern dependencies not yet supported.\n");
X	if (prule->p_list->l_next)
X		errmsgno(EX_BAD,
X		"WARNING: More than one pattern dependency not yet supported.\n");
X
Xagain:
X	*suffixp = (char *)prule->p_tgt_suffix;
X
X	p = (char *)prule->p_tgt_prefix;
X	xname += prule->p_tgt_pfxlen;	/* strip matching prefix */
X/*error("name: '%s'\n", xname);*/
X	p = rstr(xname, (char *)prule->p_tgt_suffix);
X/*error("p: '%s'\n", p);*/
X	len = p - xname + 1;
X	if (len > plen) {
X		plen = len;
X		pat = pp = ___realloc(pp, plen, "pattern content");
X	}
X	strlcpy(pat, xname, len);
X/*error("pat: '%s' len %d strlen %d\n", pat, len, strlen(pat));*/
X	/*
X	 * "len" contains the Null Byte
X	 */
X	if ((len = prule->p_src_pfxlen + len + prule->p_src_suflen) > slen) {
X		slen = len;
X		sourcename = sp = ___realloc(sp, slen, "pattern source name");
X	}
X	if ((len = snprintf(sourcename, slen, "%s%s%s",
X			prule->p_src_prefix, pat,
X			prule->p_src_suffix)) >= slen) {
X		etoolong("copy pattern source name", sourcename);
X		/* NOTREACHED */
X	}
X/*error("sourcename: '%s'\n", sourcename);*/
X
X	newsource.o_name = sourcename;
X	newsource.o_namelen = len;
X	newsource.o_date = NOTIME;
X	newsource.o_type = 0;
X	newsource.o_flags = 0;
X	newsource.o_level = MAXLEVEL;
X	newsource.o_fileindex = 0;
X	newsource.o_list = (list_t *)NULL;
X	newsource.o_cmd = (cmd_t *)NULL;
X	newsource.o_node = (obj_t *)NULL;
X
X	if (prule->p_flags & PF_TERM)
X		newsource.o_flags |= F_TERM;
X
X	if ((source = objlook(sourcename, FALSE)) != (obj_t *)NULL) {
X		make(source, TRUE, dlev);	/* source found, update it  */
X		/* XXX make() return value ??? */
X
X	} else if (make(&newsource, FALSE,
X			dlev) != NOTIME) {	/* found or made source */
X		source = objlook(sourcename, TRUE);
X		source->o_date = newsource.o_date;
X		source->o_level = newsource.o_level;
X		if (source->o_flags & F_DCOLON)
X			dcolon_time(source);
X
X	} else {
X		/*
X		 * This is a replicated search for additional matches for the
X		 * same obj.
X		 */
X		prule = _pattern_rule(prule->p_next, name);
X		if (prule != NULL)
X			goto again;
X
X		*pcmd = (cmd_t *)NULL;
X		source = (obj_t *)0;
X		goto out;
X	}
X
Xfound:
X	/*
X	 * If we do not create missing nodes here, Pattern Matching Rules like:
X	 * %.1:
X	 *	command
X	 * will cause smake to dump core.
X	 */
X	obj = objlook(name, TRUE);
X	obj->o_node = (obj_t *)prule;
X	obj->o_flags |= F_PATRULE;
X	*pcmd = prule->p_cmd;
Xout:
X	if (sp)
X		free(sp);
X	if (pp)
X		free(pp);
X	return (source);
X}
X
X/*
X * Find a source file for a given object file, use POSIX suffix rules.
X * Loop over all possible source names for all possible target suffixes.
X */
XLOCAL obj_t *
Xsuff_src(name, rule, rtypep, suffixp, pcmd, dlev)
X	char	*name;
X	obj_t	*rule;
X	int	*rtypep;
X	char	**suffixp;
X	cmd_t	**pcmd;
X	int	dlev;
X{
X	register list_t	*suf;		/* List of possible suffixes */
X	register obj_t	*source;
X	register char	*suffix = NULL;
X		BOOL	found_suffix = FALSE;
X
X	for (suf = Suffixes; suf; suf = suf->l_next) {
X		suffix = suf->l_obj->o_name;
X		if (rstr(name, suffix) == NULL)	/* may not be a suffix */
X			continue;
X
X		found_suffix = TRUE;
X		*suffixp = suffix;
X		if ((source = one_suff_src(name, suffix, pcmd, dlev)) != NULL)
X			return (source);
X	}
X	if (found_suffix) {
X		*pcmd = (cmd_t *)NULL;
X		return ((obj_t *)0);
X	}
X	/*
X	 * XXX We should never come here.
X	 */
X	errmsgno(EX_BAD, "XXX Expected double suffix rule but found none.\n");
X	return (one_suff_src(name, Nullstr, pcmd, dlev));
X}
X
X/*
X * Find a source file for a given object file, use POSIX suffix rules.
X * Loop over all possible source names for one given target suffix.
X */
XLOCAL obj_t *
Xone_suff_src(name, suffix, pcmd, dlev)
X	char	*name;
X	char	*suffix;
X	cmd_t	**pcmd;
X	int	dlev;
X{
X	register list_t	*suf;		/* List of possible suffixes */
X	register obj_t	*o;
X	register obj_t	*source;
X		obj_t	newsource;
X		char	_sourcename[TYPICAL_NAMEMAX];
X		char	*sourcename = _sourcename;
X		char	*sp = NULL;
X		size_t	slen = sizeof (_sourcename);
X		char	*endbase;
X		char	_rulename[TYPICAL_NAMEMAX];
X		char	*rulename = _rulename;
X		char	*rp = NULL;
X		size_t	rlen = sizeof (_rulename);
X		size_t	endlen;
X		size_t	sourcelen;
X		size_t	len;
X
X	if ((len = strlen(name)) >= slen) {
X		slen = len + 16;		/* Add space for '\0' and suf */
X		sourcename = sp = ___realloc(sp, slen,
X					"suffix source name");
X	}
X	copy_base(name, sourcename, slen, suffix);
X	endbase = sourcename + strlen(sourcename);
X	endlen = slen - (endbase - sourcename);
X
X	newsource.o_name = sourcename;
X	newsource.o_namelen = sourcelen = strlen(sourcename);
X	newsource.o_date = NOTIME;
X	newsource.o_type = 0;
X	newsource.o_flags = 0;
X	newsource.o_level = MAXLEVEL;
X	newsource.o_fileindex = 0;
X	newsource.o_list = (list_t *)NULL;
X	newsource.o_cmd = (cmd_t *)NULL;
X	newsource.o_node = (obj_t *)NULL;
X
X	for (suf = Suffixes; suf; suf = suf->l_next) {
X	again:
X		if (snprintf(rulename, rlen,
X					"%s%s",
X					suf->l_obj->o_name,
X					suffix) >= rlen) {
X			/*
X			 * Expand rule name space.
X			 */
X			rlen = strlen(suffix) + suf->l_obj->o_namelen + 16;
X			rulename = rp = ___realloc(rp, rlen, "suffix rule name");
X			goto again;
X
X		}
X
X		if ((o = objlook(rulename, FALSE)) == NULL || o->o_type != COLON)
X			continue;
X
X		if (o->o_list)
X			suffix_warn(o);
X
X		if (Debug > 1)
X			error("Trying %s suffix rule '%s' for: %s (suffix: '%s')\n",
X				*suffix?"double":"single", rulename, name, suffix);
X
X		if (suf->l_obj->o_namelen >= endlen) {
X			slen = sourcelen + suf->l_obj->o_namelen + 1;
X			sourcename = ___realloc(sp, slen,
X						"suffix source name");
X			if (sp == NULL) {
X				/*
X				 * Copy old content
X				 */
X				strlcpy(sourcename, _sourcename, sourcelen+1);
X			}
X			newsource.o_name = sp = sourcename;
X			endbase = sourcename + sourcelen;
X			endlen = slen - (endbase - sourcename);
X		}
X		if (strlcpy(endbase, suf->l_obj->o_name, endlen) >= endlen)
X			etoolong("build suffix source name", sourcename);
X		newsource.o_namelen = sourcelen + suf->l_obj->o_namelen;
X		if ((source = objlook(sourcename, FALSE)) != (obj_t *)NULL) {
X			make(source, TRUE, dlev); /* source known, update it */
X			/* XXX make() return value ??? */
X
X			*pcmd = o->o_cmd;
X			if (sp)
X				free(sp);
X			if (rp)
X				free(rp);
X			return (source);
X		}
X		if (make(&newsource, FALSE,
X				dlev) != NOTIME) { /* found/made source */
X			source = objlook(sourcename, TRUE);
X			source->o_date = newsource.o_date;
X			source->o_level = newsource.o_level;
X			if (source->o_flags & F_DCOLON)
X				dcolon_time(source);
X
X			*pcmd = o->o_cmd;
X			if (sp)
X				free(sp);
X			if (rp)
X				free(rp);
X			return (source);
X		}
X	}
X	if (sp)
X		free(sp);
X	if (rp)
X		free(rp);
X	*pcmd = (cmd_t *)NULL;
X	return ((obj_t *)0);
X}
X
X/*
X * Find a source file for a given object file, use simple suffix rules.
X */
XLOCAL obj_t *
Xssuff_src(name, rule, rtypep, suffixp, pcmd, dlev)
X	char	*name;
X	obj_t	*rule;
X	int	*rtypep;
X	char	**suffixp;
X	cmd_t	**pcmd;
X	int	dlev;
X{
X	register list_t	*suf = rule->o_list;	/* List of possible suffixes */
X	register cmd_t	*cmd = rule->o_cmd;	/* List of implicit commands */
X		cmd_t	*ncmd;			/* for allocated new command */
X	register obj_t	*source;
X		obj_t	newsource;
X		char	_sourcename[TYPICAL_NAMEMAX];
X		char	*sourcename = _sourcename;
X		char	*sp = NULL;
X		size_t	slen = sizeof (_sourcename);
X		char	*endbase;
X		size_t	endlen;
X		size_t	sourcelen;
X		size_t	len;
X
X	*suffixp = get_suffix(name, (char *)0);	/* Use '.' (dot) suffix only */
X
X	if ((len = strlen(name)) >= slen) {
X		slen = len + 16;		/* Add space for '\0' and suf */
X		sourcename = sp = ___realloc(sp, slen,
X					"simple suffix source name");
X	}
X	copy_base(name, sourcename, slen, (char *)NULL);
X	endbase = sourcename + strlen(sourcename);
X	endlen = slen - (endbase - sourcename);
X
X	newsource.o_name = sourcename;
X	newsource.o_namelen = sourcelen = strlen(sourcename);
X	newsource.o_date = NOTIME;
X	newsource.o_type = 0;
X	newsource.o_flags = 0;
X	newsource.o_level = MAXLEVEL;
X	newsource.o_fileindex = 0;
X	newsource.o_list = (list_t *)NULL;
X	newsource.o_cmd = (cmd_t *)NULL;
X	newsource.o_node = (obj_t *)NULL;
X
X	do {
X		if (suf->l_obj->o_namelen >= endlen) {
X			slen = sourcelen + suf->l_obj->o_namelen + 1;
X			sourcename = ___realloc(sp, slen,
X						"simple suffix source name");
X			if (sp == NULL) {
X				/*
X				 * Copy old content
X				 */
X				strlcpy(sourcename, _sourcename, sourcelen+1);
X			}
X			newsource.o_name = sp = sourcename;
X			endbase = sourcename + sourcelen;
X			endlen = slen - (endbase - sourcename);
X		}
X		if (strlcpy(endbase, suf->l_obj->o_name, endlen) >= endlen)
X			etoolong("build simple suffix source name", sourcename);
X		newsource.o_namelen = sourcelen + suf->l_obj->o_namelen;
X		if ((source = objlook(sourcename, FALSE)) != (obj_t *)NULL) {
X			make(source, TRUE, dlev); /* source known, update it */
X			/* XXX make() return value ??? */
X			break;
X		}
X		if (make(&newsource, FALSE,
X				dlev) != NOTIME) { /* found/made source */
X			source = objlook(sourcename, TRUE);
X			source->o_date = newsource.o_date;
X			source->o_level = newsource.o_level;
X			if (source->o_flags & F_DCOLON)
X				dcolon_time(source);
X
X			break;
X		}
X	} while ((suf = suf->l_next) != (list_t *)NULL &&
X				(cmd = cmd->c_next) != (cmd_t *)NULL);
X	if (sp)
X		free(sp);
X	if (source) {
X		ncmd = (cmd_t *)fastalloc(sizeof (cmd_t));
X		ncmd->c_next = (cmd_t *)NULL;
X		ncmd->c_line = cmd->c_line;
X		*pcmd = ncmd;
X		*rtypep |= RTYPE_NEEDFREE;
X	} else {
X		*pcmd = (cmd_t *)NULL;
X	}
X	return (source);
X}
X
XLOCAL obj_t	*BadObj;
X/*
X * Find a source file for a given object file.
X */
XLOCAL obj_t *
Xfindsrc(obj, rule, rtypep, suffixp, pcmd, dlev)
X	obj_t	*obj;
X	obj_t	*rule;
X	int	*rtypep;
X	char	**suffixp;
X	cmd_t	**pcmd;
X	int	dlev;
X{
X	int	rtype = *rtypep;
X
X	if (BadObj == NULL) {
X		BadObj = objlook("BAD OBJECT", TRUE);
X		BadObj->o_date = BADTIME;
X		BadObj->o_type = ':';
X	}
X	*suffixp = (char *)NULL;
X	*pcmd = (cmd_t *)NULL;
X
X	if (obj->o_flags & F_TERM)
X		return ((obj_t *)0);
X
X	switch (rtype) {
X
X	case RTYPE_PATTERN:
X		return (patr_src(obj->o_name, (patr_t *)rule,
X					rtypep, suffixp, pcmd, dlev));
X
X	case RTYPE_DSUFFIX:
X		return (suff_src(obj->o_name, rule,
X					rtypep, suffixp, pcmd, dlev));
X
X	case RTYPE_SUFFIX:
X		*suffixp = Nullstr;
X		return (one_suff_src(obj->o_name, Nullstr, pcmd, dlev));
X
X	case RTYPE_SSUFFIX:
X		return (ssuff_src(obj->o_name, rule,
X					rtypep, suffixp, pcmd, dlev));
X
X	case RTYPE_DEFAULT:
X		*pcmd = (cmd_t *)rule;
X		return (obj);		/* This causes $< to be == $@ */
X
X	default:
X		break;
X	}
X	errmsgno(EX_BAD, "Impossible default rule type %X for '%s'.\n",
X			rtype,
X			obj->o_name);
X	return (BadObj);
X}
X
X/*
X * Process a target with no explicit command list.
X */
XLOCAL date_t
Xdefault_cmd(obj, depname, deptime, deplevel, must_exist, dlev)
X	register obj_t	*obj;
X		char	*depname;
X		date_t	deptime;
X		int	deplevel;
X		BOOL	must_exist;
X		int	dlev;
X{
X	obj_t	*rule = (obj_t *)NULL;
X	obj_t	*source;
X	cmd_t	*cmd;
X	cmd_t	*cp;
X	char	*suffix;
X	int	rtype = RTYPE_NONE;
X
X
X	if (dlev <= 0) {
X		errmsgno(EX_BAD,
X			"Recursion in default rule for '%s'.\n",
X			obj->o_name);
X		return (NOTIME);
X	}
X
X	if (((obj->o_flags & F_TERM) == 0) &&
X	    ((rule = default_rule(obj, &rtype)) == (obj_t *)NULL)) {
X		/*
X		 * Found no default dependency rule for this target.
X		 * This is most likely a placeholder target where no
X		 * related file exists. As we did not found rules,
X		 * we do not run commands and thus do not propagate deptime.
X		 */
X		if (obj->o_list != (list_t *)NULL) {
X			obj->o_level = deplevel;
X			return (NOTIME);
X#ifdef	notdef
X			/*
X			 * This caused "all is up to date" messages.
X			 */
X			return (deptime);
X#endif
X		}
X		/*
X		 * Found no rule to make target.
X		 */
X		if (obj == default_tgt) {
X			/*
X			 * For intermediate placeholder targets like FORCE:
X			 * that have no prerequisites, do not create an error.
X			 */
X			if (obj->o_list == (list_t *)NULL)
X				return (NOTIME);
X			errmsgno(EX_BAD, "'%s' does not say how to make '%s'.\n",
X				MakeFileNames[obj->o_fileindex], obj->o_name);
X			return (BADTIME);
X		}
X		/*
X		 * Check if it is a source.
X		 */
X		if (searchobj(obj, MAXLEVEL, SSRC) != NOTIME)
X			return (obj->o_date);
X		if (!must_exist)
X			return (NOTIME);
X		/*
X		 * For intermediate placeholder targets like FORCE:
X		 * that have no prerequisites, do not create an error.
X		 */
X		if (obj->o_list == (list_t *)NULL)
X			return (NOTIME);
X
X		errmsgno(EX_BAD, "'%s' does not exist.\n", obj->o_name);
X		return (BADTIME);
X	}
X	/*
X	 * findsrc() returns NULL if (obj->o_flags & F_TERM) != 0.
X	 * This prevents problems with rule == NULL from default_rule().
X	 */
X	if ((source =
X		findsrc(obj, rule, &rtype, &suffix, &cmd,
X						dlev)) == (obj_t *)NULL) {
X
X		/* Probably a obj file name. */
X		if (searchobj(obj, MAXLEVEL, ObjSearch) != NOTIME)
X			return (obj->o_date);
X
X		if (Debug > 2)
X			error("Cannot find source for: %s->time: %s %s(type: %X)\n",
X				obj->o_name, prtime(obj->o_date),
X				must_exist?"but must ":"", obj->o_type);
X		if (!must_exist)
X			return (NOTIME);
X		/*
X		 * A target must not exist, a dependency must.
X		 */
X		if (basetype(obj->o_type) == COLON)
X			return (NOTIME);
X		if (!No_Warn)
X			errmsgno(EX_BAD,
X				"Can't find any source for '%s'.\n",
X							obj->o_name);
X		if (NSflag)
X			return (NOTIME);	/* -N specified */
X		return (BADTIME);
X	}
X
X	if (source->o_date == BADTIME)
X		goto badtime;
X
X	if (source->o_date > deptime) {	/* target depends on this source too */
X		depname = source->o_name;
X		deptime = source->o_date;
X	}
X	if (source->o_level < deplevel)
X		deplevel = source->o_level;
X	if (deptime == BADTIME)		/* Errors occured cannot make source.*/
X		goto badtime;
X
X	if (deptime >= newtime ||		/* made some targets    */
X	    !searchobj(obj, deplevel, SALL) ||	/* found no obj file    */
X	    deptime > obj->o_date) {		/* target is out of date */
X
X		if (Debug > 0)
X			error("Default: %s is out of date to: %s%s\n",
X						obj->o_name, depname,
X						isphony(obj)?" and .PHONY:":"");
X		if (Tflag) {
X			if (!isphony(obj) && !touch_file(obj->o_name))
X				goto badtime;
X		} else for (cp = cmd; cp; cp = cp->c_next) {
X			if (docmd(substitute(cp->c_line, obj, source, suffix), obj)) {
X				goto badtime;
X			}
X		}
X		obj->o_date = newtime;
X		obj->o_level = WDLEVEL;
X		if (obj->o_flags & F_DCOLON)
X			dcolon_time(obj);
X
X	}
X	if ((rtype & RTYPE_NEEDFREE) != 0 && cmd != NULL)
X		fastfree((char *)cmd, sizeof (*cmd));
X
X	if (!Tflag && ObjDir != (char *)NULL && obj->o_level == WDLEVEL) {
X		if (Debug > 3) {
X			list_t	*l = list_nth(SearchList, source->o_level-2);
X
X			error("%s: obj->o_level: %d %s: source->o_level: %d '%s'\n",
X					obj->o_name, obj->o_level,
X					source->o_name, source->o_level,
X					l ? l->l_obj->o_name:Nullstr);
X		}
X		obj->o_level = source->o_level;
X		if ((source->o_level & 1) == 0)	/* Source has lower level  */
X			obj->o_level += 1;	/* use corresponding ObjDir*/
X
X		if (!move_tgt(obj)) {		/* move target into ObjDir */
X			obj->o_level = WDLEVEL;
X			return (BADTIME);	/* move failed */
X		}
X/*		obj->o_level = OBJLEVEL;*/
X	}
X	return (obj->o_date);
Xbadtime:
X	if ((rtype & RTYPE_NEEDFREE) != 0 && cmd != NULL)
X		fastfree((char *)cmd, sizeof (*cmd));
X
X	return (BADTIME);
X}
X
X/*
X * Do all commands that are required to make the current target up to date.
X *
X * If any step fails, return BADTIME. This will stop dependent commands but
X * all other commands, not related to the failed target may be made.
X *
X * If must_exist is FALSE, return value 0 if no source file exists.
X * In this case, findsrc will try other suffixes in the implicit rules.
X */
XLOCAL date_t
Xmake(obj, must_exist, dlev)
X	register obj_t	*obj;
X		BOOL	must_exist;
X		int	dlev;
X{
X		char	*depname = 0;
X		date_t	deptime = NOTIME;
X		date_t	mtime;
X		short	deplevel = MAXLEVEL;
X	register list_t	*l;
X	register obj_t	*dep;
X	register cmd_t	*cmd;
X
X	if (Debug > 1)
X		error("%sing %s\n", must_exist?"Mak":"Check", obj->o_name);
X
X	if (obj->o_date != 0) {
X		if (Debug > 2)
X			error("make: %s->time: %s\n",
X				obj->o_name, prtime(obj->o_date));
X		/*
X		 * We have been here before!
X		 */
X		if (obj->o_date == RECURSETIME)
X			comerrno(EX_BAD, "Recursion in dependencies for '%s'.\n",
X				obj->o_name);
X		return (obj->o_date);
X	}
X	obj->o_date = RECURSETIME;	/* mark obj "we have been here" */
X	if (obj->o_flags & F_DCOLON)
X		dcolon_time(obj);
X
X	/*
X	 * Loop through the list of dependencies for obj, but do not try
X	 * to "make" the names that appear as content of a NAME=val type macro.
X	 */
X	if (obj->o_type != EQUAL)
X	for (l = obj->o_list; l; l = l->l_next) {
X		dep = l->l_obj;
X		mtime = make(dep, TRUE, dlev);
X		if (!Kflag && mtime == BADTIME) {
X			deptime = BADTIME;
X			break;
X		}
X
X
X		if (dep->o_date > deptime) {
X			/*
X			 * Remember the date of the newest
X			 * object in the list.
X			 */
X			depname = dep->o_name;
X			deptime = dep->o_date;
X		}
X		if (dep->o_level < deplevel) {
X			/*
X			 * Remember the highest index in the search path
X			 * for all objects in the list.
X			 */
X			deplevel = dep->o_level;
X		}
X	}
X	if (deptime == BADTIME) {	/* Errors occured cannot make target.*/
X		obj->o_date = BADTIME;
X		if (obj->o_flags & F_DCOLON)
X			dcolon_time(obj);
X
X		return (obj->o_date);
X	}
X
X	if ((obj->o_type != DCOLON) &&		/* If final :: target */
X	    (obj->o_flags & F_DCOLON) == 0 &&	/* If no intermediate target */
X	    obj->o_cmd == (cmd_t *)NULL) {	/* Find default commands */
X		obj->o_date = default_cmd(obj, depname, deptime,
X							deplevel, must_exist,
X							dlev < 0?16:dlev-1);
X		if (obj->o_flags & F_DCOLON)
X			dcolon_time(obj);
X		/*
X		 * Fake sucsess for targets listed in the makefile that have
X		 * no exlicit commands no explicit dependencies (prerequisites)
X		 * and where we could not find implicit dependencies.
X		 * These intermediate placeholde targets look similar to FORCE:
X		 */
X		if (obj->o_list == NULL && obj->o_date == NOTIME && must_exist)
X			obj->o_date = newtime;
X
X		if (obj->o_flags & F_DCOLON)
X			dcolon_time(obj);
X
X		return (obj->o_date);
X	}
X
X	/*
X	 * There is an explicit command list for the current target.
X	 */
X	if (Debug > 2)
X		error("deptime: %s\n", prtime(deptime));
X	if (deptime >= newtime ||			/* made some targets */
X	    !searchobj(obj, deplevel, ObjSearch) ||	/* found no obj file */
X	    deptime > obj->o_date) {			/* tgt is out of date*/
X
X		if (Debug > 0)
X			error("Make:    %s is out of date to: %s%s\n",
X						obj->o_name, depname,
X						isphony(obj)?" and .PHONY:":"");
X		if (Tflag) {
X			if (!isphony(obj) && !touch_file(obj->o_name)) {
X
X				obj->o_date = BADTIME;
X				if (obj->o_flags & F_DCOLON)
X					dcolon_time(obj);
X
X				return (obj->o_date);
X			}
X		} else for (cmd = obj->o_cmd; cmd; cmd = cmd->c_next) {
X			if (docmd(substitute(cmd->c_line, obj, (obj_t *)NULL, (char *)NULL),
X									obj)) {
X
X				obj->o_date = BADTIME;
X				if (obj->o_flags & F_DCOLON)
X					dcolon_time(obj);
X				return (obj->o_date);
X			}
X		}
X		if (obj->o_level == MAXLEVEL)
X			searchobj(obj, deplevel, SALL);
X		obj->o_date = newtime;
X		if (obj->o_flags & F_DCOLON)
X			dcolon_time(obj);
X	}
X	return (obj->o_date);
X}
X
X/*
X * This is the interface function that is to be called from main()
X * If called with a NULL pointer, it checks for the default target first,
X * otherwise the named target is made.
X */
XEXPORT BOOL
Xdomake(name)
X	char	*name;
X{
X	date_t	mtime;
X
X	if (name) {
X		default_tgt = objlook(name, TRUE);
X		if (Debug > 0)
X			error("Target:  %s\n", name);
X	} else if (default_tgt) {
X		name = default_tgt->o_name;
X		if (Debug > 0)
X			error("DTarget:  %s\n", name);
X	}
X	if (default_tgt) {
X		mtime = make(default_tgt, TRUE, -1);
X		if (mtime == BADTIME) {
X			errmsgno(EX_BAD, "Couldn't make '%s'.\n", name);
X			if (Debug > 0)
X				error("Current working directory:  %s\n", curwdir());
X			return (FALSE);
X		}
X		if (mtime != NOTIME && mtime != newtime) {
X			/*
X			 * Nothing to do.
X			 */
X			if (!Qflag)
X				errmsgno(EX_BAD, "'%s' is up to date.\n", name);
X			return (TRUE);
X		}
X		if (Qflag)
X			return (FALSE);
X		return (TRUE);
X	}
X	errmsgno(EX_BAD, "No default Command defined.\n");
X	usage(1);
X	return (FALSE);	/* keep lint happy */
X}
X
X/*
X * Try to make target 'obj'.
X * Return TRUE, if target could be made.
X *
X * omake and xmake are used to make intermediate targets with no direct
X * dependency (e.g. .INIT and included files).
X */
XEXPORT BOOL
Xomake(obj, must_exist)
X	obj_t	*obj;
X	BOOL	must_exist;
X{
X	date_t	mtime;
X
X	if (obj == (obj_t *)NULL)
X		return (TRUE);
X
X	if (Debug > 2)
X		error("xmake: %s->time: %s\n",
X			obj->o_name, prtime(obj->o_date));
X	mtime = make(obj, must_exist, -1);
X
X	if (Debug > 2)
X		error("xmake: %s\n", prtime(mtime));
X	if (mtime == BADTIME) {
X/*		errmsgno(EX_BAD, "Couldn't make '%s'.\n", obj->o_name);*/
X		return (FALSE);
X	}
X	return (TRUE);
X}
X
X/*
X * First do an objlook(name), then make it using omake.
X */
XEXPORT BOOL
Xxmake(name, must_exist)
X	char	*name;
X	BOOL	must_exist;
X{
X	obj_t	*o;
X
X	o = objlook(name, TRUE);
X	return (omake(o, must_exist));
X}
END-of-smake-1.2.1/smake/update.c
echo x - smake-1.2.1/smake/smake.1
sed 's/^X//' >smake-1.2.1/smake/smake.1 << 'END-of-smake-1.2.1/smake/smake.1'
X. \" @(#)smake.1	1.37 09/12/09 Copyright 1985-2009 J. Schilling
X. \"  Manual page for smake
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U
X.if t .ds s \(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.TH SMAKE 1 "09/12/09" "J\*org Schilling" "Schily\'s USER COMMANDS"
X.SH NAME
Xsmake \- maintain, update, and regenerate programs
X.SH SYNOPSIS
X.B smake
X[
X.I options
X] [
X.BI \-f " makefilename"
X] [
X.IR target "1\|.\|.\|." target n
X]
X
X.SH DESCRIPTION
X.B Smake
Xexecutes command sequences based on relations of modification dates of files.
XThe command sequences are taken from a set of rules found in a 
X.B makefile  
Xor in the set of implicit rules.
XThe argument 
X.I target 
Xis typically a program that is to be built from the known rules.
X.PP
XIf no
X.B \-f
Xoption is present, 
X.B smake
Xlooks for 
X.B SMakefile
Xthen for
X.B Makefile
Xand then for
X.B makefile 
Xin the named order.
XIf in POSIX mode,
X.B smake
Xlooks for
X.BR makefile , " Makefile
Xand then for 
X.BR SMakefile .
X.PP
XIf no 
X.I target 
Xis specified on the command line,
X.B smake
Xuses the first regular target that could be found in
X.I makefilename 
Xand that does not start with a dot ('.') letter combination.
X.PP
XIf a 
X.I target 
Xhas no explicit entry in the 
X.I makefile
X.B smake
Xtries to use implicit rules or the 
X.B \&.DEFAULT
Xrule.
X.PP
XUnlike most other make programs,
X.B smake
Xpropagates all command line macros to sub makes.
XThis is a big advantage with hierarchical makefile systems.
XPropagation is done in a 
X.B POSIX
Xcompliant way using the
X.B MAKEFLAGS=
Xenvironment.
X.PP
XUnlike other make programs,
X.B smake
Xincludes a set of 
X.B automake
Xfeatures that allow to implement portable, layered, object oriented makefiles.
X.PP
X
X.SH OPTIONS
X.TP
X.BI \-C " dir
XChange the working directory to
X.I dir
Xbefore starting work.
X.TP
X.B \-e
XEnvironment variables override macro definition in Makefile(s).
X.TP
X.B \-i
XIgnore error codes returned by commands that are called from rules.
XThis is equivalent to having the special target
X.B \&.IGNORE
Xwithout dependencies inside a makefile.
X.TP
X.B \-k
XIgnore errors by aborting work on the current target and continuing the
Xwork on other targets that do not depend on the failed target.
X.TP
X.B \-N
XContinue if a named dependency does not exist and no related source
Xcould be found. 
X.B Smake
Xby default aborts on this condition, but it seems that traditional UNIX
Xmake programs ignore this condition for unknown reason.
X.TP
X.B \-n
XDon't make \- only say what to do. 
XThis prints the commands that would be executed on standard output.
XLines with a plus sign ('+') will be executed in any case.
XEven those lines that have an at sign ('@') will be printed to standard output.
XIf a command line contains the macro
X.B "$(MAKE)"
Xor
X.B "${MAKE}"
Xthis command line is executed even if there is no plus sign ('+').
XThis is the opposite to the
X.B \-s
Xoption.
X.TP
X.B \-p
XPrint the complete set of macro and target definitions on standard output.
X.TP
X.B \-q
XQuestion mode. Exit code is 0 if the target is up to date. In all other
Xcases, the exit code is 1.
XLines with a plus sign ('+') will be executed in any case.
X.TP
X.B \-r
XTurn off internal rules.
XDo not use the built in rules and do not read the files 
X.B \&./defaults.smk
Xand
X.B /opt/schily/lib/defaults.smk
X.TP
X.B \-S
XUndo the effect of the \-k option and terminate 
X.B smake
Xif an error occurs while updating targets.
X.TP
X.B \-s
XBe silent. (Do not print command lines or touch messages
Xon standard output before they are executed.)
XThis is equivalent to having the special target
X.B \&.SILENT
Xwithout dependencies inside a makefile.
X.TP
X.B \-t
XTouch objects instead of executing the defined commands.
XThis brings a target up to date by simply setting the modification
Xtime of the targets.
XTargets that do not have a command associated are not touched.
XThe command lines that are associated with a target are not executed.
XLines with a plus sign ('+') will be executed in any case.
X.TP
X.B \-w
XDon't print warning messages.
X.TP
X.B \-W
XPrint extra debug messages and warning messages.
X.TP
X.B \-D
XDisplay Makefiles as they are read in.
XThis allows to debug the effective 
X.I makefile
Xwhen the makefiles use
X.B include 
Xstatements.
X.TP
X.B \-DD
XDisplay Makefiles and internal rules as they are read in.
XThis is the same as specifying
X.B \-D
Xbut 
X.B smake 
Xstarts to print the effective makefile when reading the internal definitions.
XIf
X.B \-DDD
Xis specified, the printout includes even the 
Xdefinitions of the environment variables as make macros.
X.TP
X.B \-d
XPrint the reason why a target has to be rebuilt.
XAlso turns off external and internal silent flag.
XThis special feature allows to write makefiles that usually
Xsuppress the printing of commands line (using a '@' at the
Xstart of a command line) as in debug mode
X.B smake 
Xundoes the effect of the '@' character.
X.TP
X.B \-dd
XPrint additional debugging messages.
XThis includes the messages from the \-d flag and additional
Xmessages that allow to trace the execution of the various rules.
XIf more 'd' characters are added (e.g.
X.BR \-dddd ") the verbose level for tracing is enhanced."
X.TP
X.B \-xM
XPrint the make file include dependency list.
XThis options allows to trace complex makefiles that make heavy use
Xof the 
X.B include
Xstatement.
X.TP
X.B \-xd
XPrint extended debug messages.
XThis is only useful, if you have 
Xinternal knowledge to 
X.B smake
Xitself and want to do heavy debugging.
X.TP
X.B \-probj
XPrint the whole object tree.
XThis is only useful, if you have 
Xinternal knowledge to 
X.B smake
Xitself and want to do heavy debugging.
X.TP
X.B \-help
XPrints a short summary of the 
X.B smake
Xoptions and exists.
X.TP
X.B \-version
XPrints the 
X.B smake
Xversion number string and exists.
X.TP
X.B \-posix
XForce
X.B smake
Xto go into POSIX mode.
XThis is equivalent to having the special target
X.B \&.POSIX
Xinside a makefile.
X.RS
X.PP
XSee the description of the special target
X.B \&.POSIX
Xfor more information.
X.RE
X.TP
X.BI \-f " makefilename, " mf= "makefilename, " mf= " makefilename
XSpecifies the Makefile.
X.TP
X.I macro=value
XSet a macro. A macro definition on command line overrides any other
Xmacro definition.
X.PP
XOptions, command line macros and target name may be intermixed.
X.B Smake
Xwill always first evaluate all options then all command line macros and
Xthen will start building the targets.
XWith 
X.B smake
Xit is not possible to first make one target, then set a command line macro and
Xthen make the next target with different macro values,
X.B POSIX 
Xdoes not specify the behavior in this case anyway.
X
X.SH OPERANDS
XThe following operands are supported:
X.TP
X.I target
Xany number of target names. The targets are build in the order of occurence.
X.TP
X.I macro=value
XA macro definition. Macro definitions from the command line overwrite regular macro
Xdefinitions in makefiles or taken from the environment.
X.PP
XAll macro definitions are evaluated before any target it build.
X
X.\".SH "Arbeitsweise
X.SH BASICS \" Grundlagen
X.PP
X.B Smake
Xmaintains the dependency of a group of files by building a dependency
Xtree of the targets (derived files) and the files that are the 
Xprerequisites of the targets (called the sources or the dependency list
Xof files).
XA 
X.I makefile
Xcontains a description of the relations of the targets and the prerequisites
Xand the commands that should be executed to make the target up to date.
X.PP
X.nf
X.B
X	foo : main.o lex.o parse.o 
X.B
X	main.o: main.c main.h
X.fi
X.PP
XThe file 
X.B foo
Xdepends on the files
X.B main.o lex.o
Xand
X.B parse.o
Xwhile
X.B main.o 
Xdepends on
X.B main.c
Xand 
X.BR main.h .
XThis example describes a project in the C-programming language,
Xbut it is possible to maintain any project that depends on the modification
Xtime of the related files.
X.PP
X.B Smake
Xconsiders a file up to date if it has been modified after the files
Xit depends on (its prerequisites) and all files it depends on are recursively up
Xto date too.
XIf a file does not exit, it is considered to be out of date.
XThe targets are processed in the order they appear in the dependency list.
X.PP
XFor example, if 
X.B main.o
Xis newer than 
X.BR foo ,
Xthen it is assumed that 
X.B foo
Xis not up to date.
XIf 
X.B main.c
Xis newer than 
X.BR main.o, 
Xthen it is assumed that both,
X.B main.o
Xand
X.B foo
Xare not up to date.
X.PP
X.B Smake
Xupdates all targets based on 
X.BR rules .
XA 
X.B rule
Xspecifies a target and its prerequisites and defines a set of commands
Xthat allow to create an up to date target from its prerequisites.
X.PP
XIf the target and its prerequisites are named explicitely, the rule
Xis called an 
X.BR "explicit rule" . 
XIf the target and its prerequisites are named in an abstract way, the rule
Xis called an 
X.B "implicit rule" 
Xor an
X.BR "inference rule" .
X.PP
XIf 
X.B smake 
Xis called to update a target, it first checks if an explicit rule for this
Xtarget can be found. If there is no explicit rule for this target, then
X.B smake
Xlooks for an implicit rule. It checks the following methods of
Xspecifying an implicit rule until a suitable rule is found.
XEach method is described in section
X.B "Makefile Format
Xbelow or in the section
X.BR "Implicit Rules" .
X.
X.TP
X\(bu
XPattern matching rules from a user supplied makefile.
X.TP
X\(bu
XSuffix rules,
Xeither from a user supplied makefile or from the
Xset of builtin rules.
X.TP
X\(bu
XSimple suffix rules,
Xeither from a user supplied makefile or from the
Xset of builtin rules.
X.TP
X\(bu
X.B SCCS
Xretrieval.
XIf 
X.B smake
Xfinds a more recent 
X.B SCCS
Xhistory file, it tries to retrieve the most recent version
Xfrom the
X.B SCCS
Xhistory. See the description of the
X.B \&.SCCS_GET
Xspecial target.
X.TP
X\(bu
XThe rule from the
X.B \&.DEFAULT
Xtarget entry, if such an entry exists in a makefile.
X.PP
XA limited set of built in rules is compiled into
X.BR smake .
XA more complete set is read from the file
X.B \&./defaults.smk
Xor
X.BR /opt/schily/lib/defaults.smk .
X
X.SH "Makefile Format
X.PP
X.B
XSmake
Xreads its rules from a file named
X.BR SMakefile , " Makefile
Xor 
X.B makefile
Xin the current directory and checks for the files in the named order. 
XIf in POSIX mode,
X.B smake
Xlooks for
X.BR makefile , " Makefile
Xand then for
X.BR SMakefile .
XIf a different makefile is specified with the
X.B \-f
Xoption, 
X.B smake 
Xreads from this file.
XIn case that no makefile was specified with the 
X.B \-f
Xoption, it is not an error if no makefile exists.
XIn this case
X.B smake
Xonly uses the built in rules.
XThe term 
X.I makefile
Xis used for any user supplied file that contains rules for the
X.B make
Xutility.
X.PP
XA 
X.B makefile 
Xcontains rules, macro definitions, special make directives and comments.
XA rule may either be a target rule (explicit rule) or an implicit rule.
X.B Smake
Xitself contains or loads a number of built in implicit rules which are not used
Xif the 
X.B \-r 
Xoption is used. The user specified 
X.I makefile
Xdefines additional explicit and implicit rules and macros.
XIf a macro is defined more than once, the last definition is used.
XIf a target rule is defined more than once, the dependency list is the
Xsum of all dependency lists and the set of commands is the 
Xset of commands from the last specification.
XA back slash ('\e') at the end of a line indicates that this line
Xis to be continued on the next line.
XAn escaped newline is replaced by a single space character
Xand the white space at the beginning of the next line is removed.
XA comment starts with a hash mark ('#') and ends if an un-escaped
Xnew line is found.
X
X.SS "Command Execution
X.PP
XCommand lines associated with rules are sequentially executed line by line.
XAll commands are executed by the standard shell
X.RB ( /bin/sh ),
Xthey may use all constructs that
Xare permitted for a POSIX shell as long as the local shell supports them.
XCommand lines may have prefixes that are interpreted by 
X.B smake
Xbefore the rest of the command line is passed to the shell.
XAll characters from the list below that immediately follow the TAB character
Xare interpreted by
X.BR smake .
XThe first character that is not from the list below is the first character
Xpassed to the shell.
XThe following
Xprefixes are implemented:
X.TP
X.B \-
XIf the character '-' is amongst the prefix characters or of the 
X.B \-i
Xoption has been specified or the special target
X.B \&.IGNORE
Xhas been specified with no dependencies or with the current
Xtarget in the list of dependencies, the exit code
Xfrom the command line is ignored.
X.TP
X.B +
XIf the character '+' is amongst the prefix characters, the command line
Xis executed even if one of the options
X.BR \-n ", " \-q " or " \-t
Xwas specified.
X.TP
X.B @
XIf the character '@' is amongst the prefix characters or of the
X.B \-s
Xoption has been specified or the special target
X.B \&.SILENT
Xhas been specified with no dependencies or with the current
Xtarget in the list of dependencies, the command line
Xis not printed before it is executed.
X.TP
X.B ?
XReserved for future use (currently ignored).
X.TP
X.B !
XReserved for future use (currently ignored).
X
X
X.SS "Target rules
X.PP
XA target rule looks this way:
X.PP
X.ne 3
X.RS
X.HP
X.IR target " .\|.\|."
X.RB [ : \||\| :: ]
X.RI [ dependency "] .\|.\|."
X.RB [ ;
X.IR command "] .\|.\|."
X.nf
X.RI "[<tab> " command ]
X\&\|.\|.\|.
X.fi
X.RE
X.PP
XThe first line may not start with a TAB character. 
XIt starts with a 
X.I target name 
Xor a white space separated list of 
X.IR "target names" ,
Xin both cases followed by colon as a target separator
X(':') or by a double colon ('::').
XThe colon may be followed by a 
X.I dependency name 
Xor a white space 
Xseparated list of 
X.IR "dependency names" .
XThe double colon allows to specify alternate dependency lists and
Xcommands for the same target.
XThe dependency list may be followed by a semicolon (';') and a
XBourne shell
X.IR command .
XThere may be additional lines with Bourne shell commands, all
Xstarting with a TAB. The first line that does not start with a TAB
Xstarts another definition.
X.PP
XBourne shell commands may be continued over more than one line if
Xthe new line is escaped with a back slash. The next line must also
Xstart with a TAB character.
X
X.SS "Make directives
X.PP
X.TP
X.BI export " macro .\|.\|.
XThe list of macros that follows the
X.B export
Xdirective is exported in the list of environment variables.
XIf an environment variable with the same name already exists,
Xit's value is replaced by the current value of the related make macro.
XAn empty list of macro names is not considered an error.
XIf the 
X.B PATH
Xmacro is in the list of parameters, the path search of the current
X.B smake
Xprocess is also affected.
XIf the 
X.B SHELL
Xmacro is in the list of parameters, it is ignored and the
Xprevious 
X.B SHELL
Xenvironment is kept.
X.TP
X.BI include " filename .\|.\|.
XReading and parsing makefiles is temporarily continued with the list of 
Xthe file name parameters to the
X.B include
Xdirective.
XIf one or more file names from the parameter list contains make macro expressions, 
Xthe macro expressions are evaluated before the file names are used.
XA single make macro may contain a list of include file names.
XIf 
X.B smake
Xknows rules to 
X.B make
Xthe files to include,
X.B smake
Xwill evaluate the related rules before doing the include.
XInclude directives may be nested as long as there are unsued file descriptors.
XAn empty list of filenames is not considered an error.
XIf one or more files from the parameter list do not exist, 
X.B smake
Xaborts.
X.TP
X.BI \-include " filename .\|.\|.
XThe
X.B \-include
Xdirective is implemented similar to the
X.B include
Xdirective, except that a nonexistent file is not considered to be an error.
X.TP
X.BI readonly " macro .\|.\|.
XMark the list of macros in the parameter list as
X.BR readonly .
XThis prevents further modification of the content of the related macros.
XAn empty list of macro names is not considered an error.
X.TP
X.BI unexport " macro .\|.\|.
XThe list of macros that follows the
X.B unexport
Xdirective is removed from the list of environment variables.
XAn empty list of macro names is not considered an error.
XIf the 
X.B PATH
Xmacro is in the list of parameters, the path search of the current
X.B smake
Xprocess is also affected.
XIf the 
X.B SHELL
Xmacro is in the list of parameters, it is ignored and the
Xprevious 
X.B SHELL
Xenvironment is kept.
X
X.SH "Automake Features
X.PP
X.B Smake
Ximplements
X.B automake
Xfeatures that help to write highly portable makefile systems. The
X.B automake
Xfeatures are implemented with a set of special purpose macros and by special
Xrules that help to extend the functionality and automated adaptivity of
X.BR smake .
X.SS "Automake special purpose macros
X.PP
XThe special purpose macros that have names that match
X.B "MAKE_*
X(see section
X.BR "Special Macros" )
Xare part of the
X.B automake
Xfeatures of smake.
XThe related special macros are set up by 
X.B smake
Xto contain values that have been retrieved from the results of the
X.BR uname (2),
X.BR sysinfo (2)
Xor
X.BR sysctl (2)
Xsystem calls.
XThe values for these macros may however be overwritten from a makefile
Xor from a command line macro definition.
X.SS "Automake special targets
X.PP
XThe special target
X.B \&.INCLUDE_FAILED
Xallows to define a rule that is evaluated in case that an include
Xfiles does not exist and could not be made from other rules.
XAs the asociated command for this target is typically a shell script,
Xthe shell script can be written to create fall back rules in a platform
Xindependent way.
X
X.SH "Search Rules For Files"
X.PP
XIn many cases, it is desirable to hold object files in a special
Xdirectory which is different from the directory where the source
Xfiles are located.
XFor this reason, 
X.B smake
Xallows to specify a directory where all targets are placed in case they are
Xa result of an implicit rule.
XAdd 
X.PP
X.BI \&.OBJDIR: "	object_directory"
X.PP
Xto the 
X.B makefile
Xto activate this 
X.B smake 
Xfeature.
XIf a 
X.B makefile
Xuses this feature, it must either explicitely use the right 
Xfile names (including the object directory) or use dynamic macros 
Xthat are automatically updated to include the path of the
Xobject directory.
XIf
X.B smake
Xuses file name searching, the dynamic macros
X.BR "$<" ", " "$0" ", " "$\fIn\fP" ", " "$r1" ", " $^ ", and " "$?"
Xare updated to reflect the
Xactual path of the source or object directory.
X.
X.PP
XA line of the form:
X.PP
X.BI \&.SEARCHLIST: "	source_directory_1 object_directory_1"
X\&.\|.\|.
X.PP
Xthat contains pairs of source and corresponding object directory
Xnames, will cause
X.B smake
Xnot only to search for files in the current directory and in
Xthe directory which is pointed to by
X.BR \&.OBJDIR ,
Xbut also in the directories from
X.BR \&.SEARCHLIST: .
X.B Smake
Xfirst looks in the current directory, then in the directory pointed to
Xby
X.B \&.OBJDIR
Xand then in the directories from
X.BR \&.SEARCHLIST: .
X.PP
XIf a source could be found in a specific source directory of the
Xlist of source and object directories,
Xthe targets will only be looked for in the corresponding object 
Xdirectory.
XA result of a source, which is found in any of the
Xsource-directories of the
X.B \&.SEARCHLIST:
Xis placed into the
Xcorresponding object-directory.
X.PP
XA line in the form:
X.PP
X.BI \&.OBJSEARCH: 	value
X.PP
XWhere
X.I value
Xmay be one of
X.I src, obj, all.
Xcauses
X.B smake
Xto look for left-hand-sides of rules in only the
X.B source-directories,
Xthe
X.B object-directories
Xor 
X.BR both .
XThe default value for
X.B \&.OBJSEARCH:
Xis:
X.BR all .
XThat causes
X.B smake
Xto search for results in object-directories and source-directories.
X.PP
XIf no 
X.B \&.SEARCHLIST
Xtarget exists, but a
X.B VPATH=
Xmacro is found, 
X.B smake
Xtransforms the content of the
X.B VPATH=
Xmacro into a form suitable for 
X.BR \&.SEARCHLIST: .
XThis is done by putting each 
X.B VPATH=
Xentry twice into the
X.BR \&.SEARCHLIST: .
XPlease report problems with this solution.
X
X.br
X.ne 10
X.SH Macros
X.SS "Macro Definitions"
XMacros are defined by a line in the form:
X.PP
X.BI macroname= "	value"
X.PP
XThe value assigned to the macro contains all characters after the equal sign
Xup to a comment character ('#') or an unescaped newline. Any blank characters that
Xdirectly follow the equal sign are ignored.
X.PP
XAn alternate macro definitions use the form:
X.PP
X.BI "macroname +=" "	value"
X.PP
Xto append
X.B value
Xto the current definition for
X.BR macroname .
XNote that there needs to be white space before the '+=' as
X.B smake
Xallows macro names like
X.BR C++ .
X.PP
XA macro definition that uses the form:
X.PP
X.BI macroname:= "	value"
X.PP
Xwill evaluate the right side of the assignment when the line is read by the parser.
XNote that SunPro make uses 
X.B := 
Xfor a different incompatible purpose. A makefile that uses 
X.B :=
Xis non-portable.
X.PP
XA macro definition that uses the form:
X.PP
X.BI macroname:sh= "	command"
X.PP
Xwill call
X.I command
Xand define the macro value to be the output of
X.I command
Xwhen the line is read by the parser.
X.SS "Macro References"
X.PP
XMacros may be referenced by either: 
X.BI $( macroname )
Xor
X.BI ${ macroname }.
XThe parentheses or braces are optional for a macro with a single character name.
X.PP
XMacro definitions and macro references can appear anywhere in the makefile. Macro
Xreferences are expanded under the following circumstances:
X.TP
X\(bu
XMacros in target lines are evaluated when the target line is read by the parser.
X.TP
X\(bu
XMacros in command lines for rules are evaluated when the command is executed.
X.TP
X\(bu
XMacros in the string before ':', '::', '=' or '+=' (names for target or macro 
Xdefinitions)
Xare evaluated when the target line is read by the parser.
X.TP
X\(bu
XMacro references after the equal sign in a macro definition are not evaluated
Xuntil the defined macro itself is used in a rule or a command or to the left of
Xthe equal sign from a macro definition.
X.SS "Macro Substitution"
X.PP
XMacro references may be used to substitute macro values.
XThere are different methods for macro substitution.
X.SS "Suffix Replacement Macro References"
X.PP
XA macro reference in the following form:
X.PP
X.B
X	$(\fIname\fP:\fIsubst1\fP=\fIsubst2\fP)
X.PP
Xis used to replace the suffix or word
X.B subst1
Xin the value of the macro
X.B name
Xby
X.BR subst2 .
XWords are separated by space or tab characters.
X
X.SS "Pattern Replacement Macro References"
X.PP
XA macro reference in the following form:
X.PP
X.B
X	$(\fIname\fP:\fIop\fP%\fIos\fP=\fInp\fP%\fIns\fP)
X.PP
Xis used to replace prefixes and suffixes in words. In this case,
X.I op
Xis the old prefix,
X.I os
Xis the old suffix,
X.I np
Xis the new prefix
Xand
X.I ns
Xis the new suffix.
XThe strings
X.IR op ,
X.IR os ,
X.I np
Xand
X.I ns
Xmay all be empty strings.
XThe pattern % matches a string of zero or more characters.
XThe matched pattern is carried forward to the replacement target.
XFor example:
X.PP
X.B OBJECT=foo.o
X.br
X.B SCCS_HISTFILE=$(OBJECT:%.o=SCCS/s.%.c)
X.PP
Xreplaces 
X.B foo.o 
Xby 
X.B SCCS/s.foo.c
Xwhen the macro
X.B $(SCCS_HISTFILE)
Xis referenced.
X.SS "Shell Replacement Macro References"
X.PP
XA macro reference in the following form:
X.PP
X.B
X	$(\fIname\fP:sh)
X.PP
Xwill interpret the content of the macro
X.I name
Xas a shell command line, call the shell with the content of the macro
Xand return the output of the called command.
X
X.SH "Special Targets"
X.\".TP
X.\".B \&.AR_REPLACE
X.\"This target can be used to specify a rule to preprocess
X.\"member files before updating an
X.\".BR ar (1)
X.\"library.
X.TP
X.B \&.DEFAULT:
XIf a 
X.I target 
Xis considered to be out of date and no other rule applies to this
Xtarget, 
X.B smake
Xexecutes the commands from this special target.
XThe
X.B \&.DEFAULT
Xtarget may not have a dependency list.
X.TP
X.B \&.DONE:
XIf this special target is present, 
X.B smake
Xexecutes the commands after all targets have been processed.
XThe
X.B \&.DONE
Xtarget is also executed if a failure occurs and no
X.B \&.FAILED
Xtarget is present.
XThe
X.B \&.DONE
Xtarget may not have a dependency list.
X.TP
X.B \&.FAILED:
XIf this special target is present and an error occurred,
X.B smake
Xexecutes the commands instead of the the commands of the
X.B \&.DONE
Xtarget after all targets have been processed.
XThe
X.B \&.FAILED
Xtarget may not have a dependency list.
X.TP
X.B \&.GET_POSIX:
XReserved for future use.
X.\"This target contains the rule for retrieving the current version of an
X.\".SM SCCS
X.\"file from its history file in the current working directory.
X.\".B smake
X.\"uses this rule when it is running in
X.\".SM POSIX
X.\"mode.
X.TP
X.B \&.IGNORE:
XIgnore errors.
XWhen this special target is present and has no dependencies, 
X.B smake
Xwill ignore errors from commands.
XSpecifying
X.B \&.IGNORE:
Xwithout dependencies is equivalent to using the
X.B \-i
Xoption.
XIf
X.B \&.IGNORE:
Xhas dependencies and the current target is in the list of dependencies
Xof
X.B \&.IGNORE:
Xthe exit code for the related commands is ignored.
X.TP
X.B \&.INCLUDE_FAILED:
XThis special target implements
X.B automake
Xfeatures for object oriented layered makefiles.
XIf this target is present, 
X.B smake
Xexecutes the commands for this target
Xin case that a make file could not be included and there
Xwas no other explicit or implicit rule that did create the the missing
Xmake include file.
XThe
X.B \&.INCLUDE_FAILED
Xtarget may not have a dependency list.
XWhen the commands for the target
X.B \&.INCLUDE_FAILED
Xare called, the dependency list of the special target is set up to
Xthe include file name.
XThe commands for the target
X.B \&.INCLUDE_FAILED
Xare called for both, the
X.B include
Xand the
X.B \-include
Xdirective. If the commands for the
X.B \&.INCLUDE_FAILED
Xtarget cannot create a file that is going to be included,
X.B smake
Xwill fail in case that the
X.B include
Xdirective was used.
X.TP
X.B \&.INIT:
XIf this target is present, the target and its dependencies are built before
Xany other target is made.
X.TP
X.B \&.KEEP_STATE:
XReserved by SunPRO make. Don't use this target to avoid problems with
Xthe SCHILY (Sing) makefile system.
X.TP
X.B \&.KEEP_STATE_FILE:
XReserved by SunPRO make. Don't use this target to avoid problems with
Xthe SCHILY (Sing) makefile system.
X.TP
X.B \&.MAKE_VERSION:
XReserved for future use. Future versions of 
X.B smake
Xmay implement this special target in a way similar to SunPRO make.
X.sp
XA special target of the form:
X.RS
X.IP
X.BI \s-1.MAKE_VERSION:\s0\0\0\s-1smake\-\s0 number
X.RE
X.IP
Xforces to check the version of
X.BR smake .
XIf the version of
X.B smake
Xdiffers from the version in the dependency list,
X.B smake
Xissues a warning message.
XThe actual version of 
X.B smake 
Xis
X.I smake-1.0
X.TP
X.B \&.NO_PARALLEL:
XReserved for future use.
X.TP
X.B \&.NO_WARN:
XIf this special target is present and has a dependency list, special
Xwarnings may be disabled depending on the names used in the pseudo
Xdependency list.
X.sp
XIf
X.B \&.NO_WARN:
Xdoes not have any dependencies, the list of warning exceptions is
Xcleared.
X.sp
XThe following pseudo dependencies are implemented:
X.RS
X.TP
X.B :=
XSuppress warnings about nonportable ':=' macro assignments.
X.TP
X.B $$*
XSuppress warnings for using the dynamic macro '$*' in explicit rules.
X.TP
X.B $$<
XSuppress warnings for using the dynamic macro '$<' in explicit rules.
X.RE
X.TP
X.B \&.OBJDIR:
XIf this special target is present, 
X.B smake 
Xassumes that all files that have been created by a rule should be
Xplaced in a special directory called the object directory.
XThe object directory is the only member of the dependency list
Xof the 
X.B \&.OBJDIR
Xtarget.
X.B Smake
Xmoves the targets automatically into that directory.
XAutomatic macros like $^, $?, $r1 are automatically modified in
Xa way that allows transparent use of the object directory.
XIf 
X.B \&.OBJDIR:
Xis not specified, it is assumed to be the current directory '.'.
X.TP
X.B \&.OBJSEARCH:
XThis target may hold one of three predefined values:
X.BR src ", " obj " and " all .
XIt defines where objects (targets of a rule) are searched for.
XThe default for
X.B \&.OBJSEARCH:
Xis to look for targets in both
X(source and object) directories or directory lists.
XSee also
X.B \&.SEARCHLIST
Xfor a description of the src and obj directories.
X.TP
X.B \&.PARALLEL:
XReserved for future use.
X.TP
X.B \&.POSIX:
XIf this special target is found, POSIX mode is enabled.
X.RS
X.PP
XWith this option the verbose command lines written to the
X.I stdout
Xstream are prefixed by a TAB character instead of three dots (...).
XI POSIX mode,
X.B smake
Xalso calls commands via
X.B "/bin/sh \-c 'cmd'
Xinstead of
X.BR "/bin/sh \-ce 'cmd'" .
XThis causes 
X.B smake
Xnot to stop at failing sub commands in complex commands. If the 
X.B \&.POSIX:
Xspecial target is used, it is highly recommended to also specify
X.B "MAKE_SHELL_FLAG=\-ce
Xto make sure that the make process still stops at failed commands.
X.RE
X.TP
X.B \&.PRECIOUS:
XThis macro holds a list of targets that should not be removed while they 
Xare built if
X.B smake
Xreceives a signal.
XIf the list is empty, this applies to all targets.
X.TP
X.B \&.PHONY:
XThis macro holds a list of targets that should not be checked against existing
Xfiles. A target that is marked
X.B \&.PHONY
Xwill always considered to be out of date. If
X.B smake
Xreceives a signal, targets marked as
X.B \&.PHONY
Xare not removed.
XIf 
X.B smake
Xis called with the
X.B \-t
X(touch) option, the targets marked as
X.B \&.PHONY
Xare not touched.
X.TP
X.B \&.SCCS_GET:
XReserved for future use.
X.TP
X.B \&.SCCS_GET_POSIX:
XReserved for future use.
X.\"This target contains the rule for retrieving the current version of an
X.\".SM SCCS
X.\"file from its history file.
X.\".B smake
X.\"uses this rule when it is running in POSIX mode.
X.TP
X.B \&.SEARCHLIST:
X.B \&.SEARCHLIST
Xis a list of alternate source and object directories
Xwhere 
X.B smake
Xshould look for targets.
XThis macro may be used as an extended replacement of the 
X.B VPATH=
Xmacro of other make programs.
XThe macro 
X.B \&.SEARCHLIST
Xholds a list of 
X.I srcdir " / " objdir
Xpairs. 
XThe complete internal list is build from '.'
X.B \&.OBJDIR
Xand the content of
X.BR \&.SEARCHLIST .
X.TP
X.B \&.SILENT:
XRun silently.
XWhen this special target is present and has no dependencies, 
X.B smake
Xwill not echo commands before executing them.
XSpecifying
X.B \&.SILENT:
Xwithout dependencies is equivalent to using the
X.B \-s
Xoption.
XIf
X.B \&.SILENT:
Xhas dependencies and the current target is in the list of dependencies
Xof
X.B \&.SILENT:
Xthe related commands are not echoed before they are executed.
X.TP
X.B \&.SPACE_IN_NAMES:
XIf this target is present and has a dependency list, escaped
Xspaces may occur in object and dependency names. If
X.B \&.SPACE_IN_NAMES:
Xis not followed by any dependency, the previous dependencies are cleared
Xand make file parsing is done again in a
X.B POSIX
Xcompliant way.
XThe following code fragment allows to use non standard space handling
Xfor one target only:
X.sp
X.ne 7
X.RS
X.BR \&.SPACE_IN_NAMES: " true
X.sp
X.B "target\e with\e spaces: dependency\e with\e spaces
X.br
X.B "	command list
X.sp
X.B \&.SPACE_IN_NAMES:
X.br
X.RE
X.TP
X.B \&.SSUFFIX_RULES:
XIf this special macro is present with no dependencies, all current
X.B Simple Suffix Rules
Xare cleared.
X.TP
X.B \&.SUFFIXES:
XDependencies of
X.B \&.SUFFIXES
Xare appended to the list of known suffixes and are used in conjunction with
Xthe suffix rules (see
X.BR "Suffix Rules" ).
XIf
X.B \&.SUFFIXES
Xdoes not have any dependencies, the list of known suffixes is cleared.
XIf the list of
X.B \&.SUFFIXES
Xwas cleared, no implicit suffix rule search is done.
X.TP
X.B \&.SYM_LINK_TO:
XReserved for future use.
X.TP
X.B \&.WAIT:
XReserved for future use.
X
X.SH "Special Macros"
X.TP
X.B MAKE
XThis macro contains a path name that is sufficient to recursively
Xcall the same 
X.I make
Xprogram again (either that last path component or the full path
Xname of the make program).
XNote that this may differ from the name that was used on the command line
Xif the name that was used on the command line would not allow to call the
Xsame 
X.I make 
Xprogram from a different directory using this name.
XFor this reason 
X.I $(MAKE)
Xmay not be used to check for a specific 
X.I make 
Xprogram. Use
X.B $(MAKE_NAME)
Xinstead.
XIf a command line contains this macro,
Xthis command line is executed even if there is no plus sign ('+').
X.
X.TP
X.B MAKEFLAGS
XThis macro contains the command line flags and the command line macros
X.B smake
Xis called with.
XThe 
X.B MAKEFLAGS
Xmacro is exported into the environment to allow automatic propagation of 
X.I make
Xflags and command line macros to sub make programs.
XThe content of this macro is
X.B POSIX
Xcompliant.
X.sp
XIf there were no command line flags or command line macros, the
X.B MAKEFLAGS
Xmacro is empty.
X.sp
XIf there were only command line flags, the
X.B MAKEFLAGS
Xmacro contains a concatenation of the single char versions of the
Xflags. A hyphen is the first char, so
X.B MAKEFLAGS
Xwould be suitable as a command line flag in this case.
XA typical
Xcontent may look this way: 
X.br
X.BR "\-id" .
X.sp
XIf there were only command line macros, the
X.B MAKEFLAGS
Xmacro contains a concatenation of the macro specifications.
XThe different macro specifications are separated by a space.
XAny occurrence of a space or a back slash inside a macro specification
Xis escaped by a back slash.
XA typical
Xcontent may look this way:
X.br 
X.BR "CC=gcc COPTX=\-DTEST\e \-DDEBUG" .
X.sp
XIf both command line flags and command line macros are used, the
Xflag part is made as if there were only flags and the macro part
Xis made as if there were only macros.
XThe separator between the flag part and the macro part is a space,
Xtwo hyphens and a space.
XA typical
Xcontent may look this way:
X.br 
X.BR "\-id -\|- CC=gcc COPTX=\-DTEST\e \-DDEBUG" .
X.sp
XAs the 
X.B MAKEFLAGS
Xnotation of the command line macros uses a special escape notation
Xto allow to propagate any possible command line macro, it is not
Xpossible to call: 
X.br
X.B make $(MAKEFLAGS)
Xfrom a make file.
X.
X.TP
X.B MAKE_MACS
XThis macro contains the complete set of command line macros and the
Xmacros read from the
X.B MAKEFLAGS
Xenvironment.
XThe content is the same as the last part of the
X.B MAKEFLAGS
Xmacro which holds the macro part.
XThe 
X.B MAKE_MACS
Xmacro is exported into the environment.
X.
X.TP
X.B MAKE_FLAGS
XThis macro contains the command line flags
X.B smake
Xis called with.
XThe content is the same as the content of the
X.B MAKEFLAGS
Xmacro except that no command line macros are added.
XThe 
X.B MAKE_FLAGS
Xmacro is exported into the environment.
X.
X.TP
X.B MAKE_ARCH
XThis macro is set up by 
X.B smake
Xas part of the 
X.B automake
Xfeatures of
X.BR smake .
XIt contains the processor architecture of the current machine
X(e.g. mc68020, sparc, pentium).
X.
X.TP
X.B MAKE_BRAND
XThis macro is set up by 
X.B smake
Xas part of the 
X.B automake
Xfeatures of
X.BR smake .
XIt contains the brand of the current machine
X(e.g. Sun_Microsystems).
X.
X.TP
X.B MAKE_HOST
XThis macro is set up by 
X.B smake
Xas part of the 
X.B automake
Xfeatures of
X.BR smake .
XIt contains the host name of the current machine
X(e.g. duffy, sherwood, ghost).
X.TP
X.B MAKE_HOST_OS
XThis macro is set up by 
X.B smake
Xas part of the 
X.B automake
Xfeatures of
X.BR smake .
XIt contains the host OS name from
X.B uname \-Hs
Xof the current machine in case that there
Xis a layered OS like Cygwin (e.g. windows).
X.
X.TP
X.B MAKE_HOST_OSREL
XThis macro is set up by 
X.B smake
Xas part of the 
X.B automake
Xfeatures of
X.BR smake .
XIt contains the host OS release from
X.B uname \-Hr
Xof the current machine in case that there
Xis a layered OS like Cygwin (e.g. 5.1).
X.
X.TP
X.B MAKE_HOST_OSVERSION
XThis macro is set up by 
X.B smake
Xas part of the 
X.B automake
Xfeatures of
X.BR smake .
XIt contains the host OS version from
X.B uname \-Hv
Xof the current machine in case that there
Xis a layered OS like Cygwin (e.g. sp2).
X.
X.TP
X.B MAKE_MACH
XThis macro is set up by 
X.B smake
Xas part of the 
X.B automake
Xfeatures of
X.BR smake .
XIt contains the kernel architecture of the current machine
X(e.g. sun3, sun4c, sun4m, sun4u).
X.
X.TP
X.B MAKE_MODEL
XThis macro is set up by 
X.B smake
Xas part of the 
X.B automake
Xfeatures of
X.BR smake .
XIt contains the model name of the current machine
X(e.g. SUNW,SPARCstation-20).
X.
X.TP
X.B MAKE_M_ARCH
XThis macro is set up by 
X.B smake
Xas part of the 
X.B automake
Xfeatures of
X.BR smake .
XIt contains the machine architecture of the current machine
X(e.g. sun3, sun4).
X.
X.TP
X.B MAKE_NAME
XThis macro is set up by 
X.B smake
Xas part of the 
X.B automake
Xfeatures of
X.BR smake .
XIt contains the official name of the
Xmake program \- in our case 
X.BR smake .
X.
X.TP
X.B MAKE_OS
XThis macro is set up by 
X.B smake
Xas part of the 
X.B automake
Xfeatures of
X.BR smake .
XIt contains the operating system name of the current machine
X(e.g. sunos, linux, dgux).
X.
X.TP
X.B MAKE_OSDEFS
XThis macro is set up by 
X.B smake
Xas part of the 
X.B automake
Xfeatures of
X.BR smake .
XIt contains operating system specific defines for the compiler
X(e.g. \-D__SVR4).
X.
X.TP
X.B MAKE_OSREL
XThis macro is set up by 
X.B smake
Xas part of the 
X.B automake
Xfeatures of
X.BR smake .
XIt contains the operating system release name of the current machine
X(e.g. 5.5, 4.1.1).
X.
X.TP
X.B MAKE_OSVERSION
XThis macro is set up by 
X.B smake
Xas part of the 
X.B automake
Xfeatures of
X.BR smake .
XIt contains the operating system version of the current machine
X(e.g. generic).
X.
X.TP
X.B MAKE_SERIAL
XThis macro is set up by 
X.B smake
Xas part of the 
X.B automake
Xfeatures of
X.BR smake .
XIt contains the serial number of the current machine
X(e.g. 1920098175).
X.
X.TP
X.B MAKE_SHELL_FLAG
XThis macro contains the shell flags used when calling commands from
X.BR smake .
XThe default value is
X.BR \-ce ,
XWhen 
X.B smake
Xin in POSIX mode,
Xthe default value is
X.BR \-c.
XThe
X.B MAKE_SHELL_FLAG
Xmacro allows to overwrite the default behavior.
X.
X.TP
X.B MAKE_SHELL_IFLAG
XThis macro contains the shell flags used when calling commands from
X.BR "smake \-i" .
XThe default value is
X.BR \-c .
XThe
X.B MAKE_SHELL_IFLAG
Xmacro allows to overwrite the default behavior.
X.
X.TP
X.B MAKE_VERSION
XThis macro contains the 
X.B smake
Xversion number string.
X.
X.TP
X.B NUMBER_SIGN
XThis macro is predefined to contain the number sign ('#') that is used as
Xthe make comment start character and for this reason cannot be appear
Xin non comment parts of regular makefiles.
X.
X.TP
X.B SHELL
X.
XThe 
X.B SHELL
Xmacro is neither imported nor exported from/to the environment.
XIf it is set from within a makefile or from the commandline, the
Xvalue is used as the name of an alternate shell to execute commands.
XMakefiles that set 
X.B SHELL=
Xshould be used very carefully as not all platforms support all shells.
X.TP
X.B VPATH
XThis macro implements some object search functionality as found in 
Xother UNIX make programs. In 
X.B smake
Xthis functionality is implemented using the
X.B \&.SEARCHLIST:
Xspecial target, see chapter
X.B "Search Rules For Files"
Xfor more information.
X
X.SH "Dynamic Macros"
X.PP
XThere are several internal macros that are updated dynamically.
XExcept 
X.BR $O ,
Xthey cannot be overwritten. Using them in explicit rules makes the
Xmakefile more consistent as the file names do not have to be typed
Xin a second time.
XUsing them in implicit rules is the only way to make
Ximplicit rules work as the actual file name cannot be coded into
Xan implicit rule.
X.PP
XIf
X.B smake
Xuses file name searching, the dynamic macros
X.BR "$<" ", " "$0" ", " "$\fIn\fP" ", " "$r1" ", " $^ ", and " "$?"
Xare updated to reflect the
Xactual path of the source or object directory.
X.PP
XThe dynamic macros are:
X.TP
X.B $O
Xexpands to the value of
X.RB \&.OBJDIR .
XIf 
X.B \&.OBJDIR
Xis not defined, 
X.B $O
Xexpands to '.'.
XIf
X.B $O
Xhas been overwritten, it may no longer be used as a reliable
Xalias for
X.BR \&.OBJDIR .
X.TP
X.B $@
Xexpands to the path name of the current target.
XIt is expanded for both explicit and implicit rules.
X.TP
X.B $*
Xexpands to the path base name of the current target (the
Xname of the current target with the suffix stripped off).
XIt is expanded for both explicit and implicit rules.
X.B POSIX
Xrequires that this macro is expanded at least for implicit rules.
X.TP
X.B $<
Xexpands to the path name of implicit source made in this step.
XIt is expanded for implicit rules only.
XThe existence of this macro is required by 
X.BR POSIX .
X.TP
X.B $0
Xexpands to the path name of implicit source made in this step.
XIt is expanded for implicit rules only.
XThis macro is available with
X.B smake
Xonly. It is made available to make the behavior more orthogonal.
X.TP
X.B $1 $2 $3 ...
Xexpands to the path name of the nth file in the dependency list.
XIt is expanded for explicit rules only.
X
X.TP
X.BI $r n
Xexpands to the path names of all files in the dependency list
Xstarting with the 
X.IR n th.
XIt is valid to specify
X.BR $r0 .
XIt is expanded for both explicit and implicit rules.
XThe 0th entry is available only with implicit rules, the other
Xentries ae available only with explicit rules.
X.TP
X.B "$^
Xexpands to the path names of all files in the dependency list.
XIt is identical to
X.BR $r1 .
XIt is expanded for both explicit rules only.
X.TP
X.B "$?
Xexpands to the path names of all files outdated dependencies for this target.
XIt is expanded for explicit rules only.
X.B POSIX
Xrequires that this macro is expanded for both explicit and implicit rules.
X.PP
XThe following example shows how dynamic macros may be used together with
Xfile searching rules:
X.PP
X.nf
X.B
X	foo : main.o lex.o parse.o 
X.B
X		$(CC) \-o $@ $^
X.fi
X.PP
Xmay expand to:
X.PP
Xcc \-o foo OBJ/main.o parser/OBJ/lex.o parser/OBJ/parse.o
X
X.SH "Implicit Rules"
X.PP
XIf there is no explicit target rule for a specific target,
X.B smake
Xtries to find a matching implicit rule.
XThere are three different types of implicit rules. 
X.B "Pattern Matching Rules"
Xare searched first. If no matching pattern matching rule could be found, the
X.B "Suffix Rules"
Xare checked and if there was no matching
Xsuffix rule, the 
X.B "Simple Suffix Rules"
Xare checked.
X.PP
XCommands defined for implicit rules of any type typically make use of the
Xdynamic macros
X.BR $@ ,
X.BR $* " and
X.B $<
Xas placeholders for target and dependency file names.
X
X.SS "Pattern Matching Rules"
X.PP
XPattern matching rules have been introduced by SunPRO make on SunOS-3.x
Xin 1986.
XThey are now also implemented in
X.BR smake . 
XPattern matching rules are searched in the same order as they appear in the
Xmakefile.
X.PP
XA pattern matching rule looks this way:
X.PP
X.ne 3
X.RS
X.HP
X\f2tp\f3%\f2ts\f1\|:  \f2dp\f3%\f2ds\f1
X.nf
X.RI "<tab> " command
X\&\|.\|.\|.
X.fi
X.RE
X.sp
XIn this rule, 
X.I tp
Xis the target prefix,
X.I ts 
Xis the target suffix,
X.I dp
Xis the dependency prefix
Xand
X.I ds
Xis the dependency suffix.
XAny of the parts may be a null string.
XThe 
X.B %
Xpart of the strings is the base name that matches zero or more characters
Xin the target name.
XWhenever
X.B smake
Xencounters a match with a target pattern of a pattern matching rule, it
Xuses the matching base name to construct dependency names. If the target
Xis out of date relative to the dependency,
X.B smake
Xuses the commands from the pattern matching rule to build or rebuild the 
Xtarget.
X.sp
XA rule in the form:
X.PP
X.ne 3
X.RS
X.HP
X\f2tp\f3%\f2ts\f1\|:
X.nf
X.RI "<tab> " command
X\&\|.\|.\|.
X.fi
X.RE
X.sp
Xis permitted.
X
X.SS "Suffix Rules"
X.PP
XSuffix rules are the POSIX way of spefifying implicit dependencies.
XSuffix rules are searched when no pattern matching rule applies.
XIf the special target
X.B .SUFFIXES:
Xwas cleared or is empty,
X.B smake
Xdoes not check suffix rules.
XIf
X.B .SUFFIXES:
Xdefines a list of suffixes, the current target file name is checked against
Xthis list. If there is a match, the list of suffix rules is checked against
Xthe target suffix and a dependency suffix that is also in the
X.B .SUFFIXES:
Xlist. The search order is derived from the order of suffixes in the suffix
Xlist while matching dependency suffixes.
XA suffix does not need to begin with a
X.B '\&.'
Xto be recognized.
X.PP
XA Double Suffix rule looks this way:
X.PP
X.ne 3
X.RS
X.HP
X.IB DsTs :
X.nf
X<tab> dependency_command
X\&\|.\|.\|.
X.fi
X.RE
X.PP
X.B Ds
Xis the dependency suffix and
X.B Ts
Xis the target suffix.
XThey are used when both target file name and dependency file name have a suffix.
XDouble Suffix rules are searched before Single Suffix rules are checked.
X.PP
XA Single Suffix rule looks this way:
X.PP
X.ne 3
X.RS
X.HP
X.IB Ds :
X.nf
X<tab> dependency_command
X\&\|.\|.\|.
X.fi
X.RE
X.PP
X.B Ds
Xis the dependency suffix.
XSingle Suffix rules are used when the target file name does not have a suffix.
X
X.SS "Simple Suffix Rules"
X.PP
XSimple suffix rules have the lowest preference when looking for
Ximplicit rules.
XSimple suffix rules are specific to
X.BR smake.
X.PP
XA simple suffix rule looks this way:
X.PP
X.ne 3
X.RS
X.HP
X.I target_suffix
X.B :
X.IR dependency_1_suffix " .\|.\|."
X.nf
X<tab> dependency_1_command
X\&\|.\|.\|.
X.fi
X.RE
X.PP
XThe first line may not start with a TAB character.
XIt starts with the target suffix or "" if no target suffix exists.
XThe target suffix is followed by the target separator (':') and
Xone or more dependency suffixes which are also written as "" if
Xno dependency suffix exists.
XThe first line is followed by exactly the same number of Bourne
Xshell command lines (each starting with a TAB) as there were dependency
Xsuffix specifications in the right side of the first line.
XEach of the Bourne shell command lines correspond to one of the
X.I dependency suffixes
Xin the same order.
X.PP
XWhen 
X.B smake
Xlooks for a possible source for a target with a specific suffix,
Xthe dependency suffixes are tried out in the order they appear in the
Xfirst line of the suffix rule. If a source is found, the corresponding
Xcommand line is executed.
X.PP
XThere may only one simple suffix rule per target suffix.
XAll suffixes except the empty suffix ("") must start with a dot ('.').
X.PP
XThe following example shows how a simple suffix rule
Xfor creating a zero suffix executable from a .o file may look:
X.PP
X.ne 2
X.nf
X.B
X"": .o
X.B 	$(CC) \-o $@ $<
X.fi
X.PP
XA simple suffix rule that describes how to create a
X.B \&.o
Xfile from the possible
X.BR \&.c " and " .s
Xsources may look this way:
X.PP
X.ne 3
X.nf
X.B \&.o: .c .s
X.B 	$(CC) \-c $<
X.B 	$(AS) \-o $*.o $<
X.fi
X.PP
XIf 
X.B smake
Xis going to update 
X.B foo.c
Xusing simple suffix rules, it will first look for a file
X.B foo.c
Xand then for a file
X.BR foo.s .
XIf the file
X.B foo.c
Xcan be found the first command line 
X.RB ( "$(CC) \-c $<" )
Xis executed, if the file
X.B foo.s
Xcan be found the second command line 
X.RB ( "$(AS) \-o $*.o $<" )
Xis executed. Which command is executed depends on which 
Xsource file exists.
X
X.SH "DEFAULT IMPLICIT RULES"
X.PP
XChanging the implicit rules allows to change the default behavior
Xof
X.BR smake .
X.SS "Default Simple Suffix Rules"
X.PP
XThe current default implicit rules are using the simple suffix rule
Xnotation are compiled into
X.BR smake :
X.PP
X.nf
X.BI FC= 		f77
X.BI RC= 		f77
X.BI PC= 		pc
X.BI AS= 		as
X.BI CC= 		cc
X.BI LEX= 		lex
X.BI YACCR= "	yacc \-r"
X.BI YACC= 		yacc
X.BI ROFF= 		nroff
X.BI RFLAGS= 	\-ms
X.B \&.o: "	.c .s .l"
X.B
X 	$(CC) \-c $(CFLAGS) $0
X.B
X 	$(AS) \-o $*.o $0
X.B
X 	$(LEX) $(LFLAGS) $0;$(CC) \-c $(CFLAGS) lex.yy.c;rm lex.yy.c;mv lex.yy.o $@
X.B \&.c: 	.y
X.B
X	$(YACC) $(YFLAGS) $0;mv y.tab.c $@
X.B
X"":  .o .sc
X.B
X	$(CC) \-o $* $0
X.B
X	$(ROFF) $(RFLAGS) $0 > $@
X.fi
X.PP
XIf 
X.B smake
Xreads a file
X.B defaults.smk
Xwith default implicit rules, the compiled in rules are disabled.
X
X.SH "ENVIRONMENT VARIABLES
XOn startup,
X.B smake
Xreads all environment variables (except the
X.B SHELL
Xenvironment) into make macros.
XThe following environment variables affect the behavior of 
X.BR smake .
X.TP 12
X.B LANG
XSets up a default value for internationalization variables that are unset or NULL:
X.TP
X.B LC_ALL
XIf set, this overrides any other internationalization variables.
X.TP
X.B LC_CTYPE
XDetermine the the interpretation of byte sequences.
X.TP
X.B LC_MESSAGES
XDetermine the diagnostic messages.
X.TP
X.B MAKE_LEVEL
XThis variable is managed by
X.B smake
Xto track nested
X.B smake
Xcalls.
XIt is initialized with 1 and exported. Nested calls to
X.B smake
Xincrement the level.
X.TP
X.B MAKEFLAGS
XThis variable is set up by 
X.B smake
Xin order to forward command line options to nested calls to
X.BR smake .
XIn order to do this,
X.B smake
Xsets the content of the 
X.B MAKEFLAGS
Xvariable to contain a list of single character option letters.
XThe option 
X.B \-f
Xis not forwarded via the
X.B MAKEFLAGS
Xenvironment.
XIf command line macro definitions in the form
X.IR name=value
Xhave been specified, the list of option letters is followed
Xby the string "\ --\ " and by a list of macro definitions.
X.sp
XIf any of the
X.IR name=value
Xcommand line macro definitions contains a space ('\ ') or a 
Xbackslash ('\e'), these characters are escaped by a single
Xbackslash.
X.sp
XAs required by POSIX,
X.B smake
Xaccepts all possible variants of formatting the content of the
X.B MAKEFLAGS
Xenvironment.
X.sp
XSee section
X.B "Special Macros
Xfor more information on the
X.B MAKEFLAGS
Xenvironment.
X.TP
X.B PATH
XThe
X.B PATH
Xenvironment variable is used by
X.B smake
Xwhen calling commands. When 
X.B PATH
Xis modified, this may cause that specific commands cannot be found
Xor that a different implementation with different behavior is found 
Xinstead.
X.TP
X.B PROJECTDIR
XThis enviroment variable controls the way SCCS history files are searched for.
XSee
X.BR sccs (1)
Xfor more information.
X
X.SH "ASYNCHRONOUS EVENTS
X.PP
XIf not already ignored by the shell, 
X.B smake
Xcatches
X.BR SIGHUP ,
X.BR SIGINT ,
X.B SIGQUIT 
Xand
X.B SIGTERM
Xand removes the current target unless the current target is a directory,
Xthe current target is a prerequisite of the special target
X.B .PRECIOUS
Xor the special target
X.B .PHONY
Xor one of the options: 
X.BR \-t ,
X.BR \-q ,
X.B \-p
Xor
X.BR \-n 
Xhave been specified.
X.PP
XAs 
X.BR bash (1)
Xis known to handle signals in a non POSIX compliant way because bash
Xsets up different process groups for non-interactive commands, 
X.B smake
Xactively propagates the signals named above in case that the autoconfiguration
Xidentified /bin/sh to be bash based.
X
X.SH "EXIT STATUS
X.PP
XWhen the
X.B \-q 
Xoption is specified,
X.B smake
Xexits with one of the following values:
X.TP
X.B 0
XSuccessful completion.
X.TP
X.B 1
XThe target was not up-to-date.
X.TP
X.B -1 (255)
XA command line usage error or makefile parsing error occurred. 
X.TP
X.B >0
XAn error occurred.
X.PP
XWhen the
X.B \-q 
Xoption is not specified,
X.B smake
Xexits with one of the following values:
X.TP
X.B 0
XSuccessful completion.
X.TP
X.B -1 (255)
XA command line usage error or makefile parsing error occurred. 
X.TP
X.B >0
XAn error occurred.
X
X.SH FILES
X.PP
X.TP
X.B SMakefile
X.TP
X.B Makefile
X.TP
X.B makefile
X.B Smake
Xfirst looks for 
X.B SMakefile
Xthen for
X.B Makefile
Xand then for
X.B makefile
Xin the current directory to find a list of rules to be used to resolve
Xthe targets.
X.TP
X.B defaults.smk
XIf 
X.B smake 
Xfinds this file in the current directory, then the implicit rules
Xare read in from this file.
X.TP
X.B /opt/schily/lib/defaults.smk
XIf the file
X.B defaults.smk
Xcould not be found, then 
X.B smake
Xtries to read the implicit rules from this file.
XIf this file cannot be found too, then 
X.B smake uses the rules compiled into
X.BR smake .
X
X.SH "SEE ALSO
X.BR sh (1),
X.BR sccs (1),
X.BR sysctl (2),
X.BR sysinfo (2),
X.BR uname (2),
X.BR makefiles (4),
X.BR makerules (4)
X
X.SH NOTES
X.PP
XIf a platform uses a shell that does not handle signals correctly and
X.B smake
Xdoes not implement the work around that was mentioned above in the section
X.BR "ASYNCHRONOUS EVENTS" ,
Xsub makes may continue to run even though the top level make was killed by
Xa signal.
X.PP
XIn order to be able to abort complex make structures after a failed
Xcommand was encountered, the shell needs to behave correctly with the 
X.B \-e
Xoption.
XBash version 3.x in general and the Korn Shell variant that comes with HP-UX 
Xare known to handle the
X.B \-e
Xoption in a non-POSIX compliant way.
XIf the autoconfiguration tests detect a non-compliant /bin/sh and there is 
Xa working Bourne Shell available under /bin/bosh or /opt/schily/bin/bosh,
X.B smake
Xwill use this
X.B bosh
Xas the default shell.  See the schily source consolidation at:
Xftp://ftp.berlios.de/pub/schily/.
X.PP
XThe old 
X.B schily (SING)
Xmakefile system (until late 1999) did only define simple suffix rules.
XThe current version of
X.B smake
Xadded support for pattern matching rules and POSIX suffix rules.
XThese rules are considered to be rated with higher preference than
Xsimple suffix rules.
XIf build in suffix rules can be found, current 
X.B smake
Xversions will not work correctly with old makefile systems.
XTo use current 
X.B smake
Xversions with old makefile systems, call
X.B smake
Xwith the 
X.B \-r
Xflag to disable build in POSIX suffix rules.
XNewer makefile system version include pattern matching rules that will be
Xsearched before the POSIX suffix rules.
X.PP
XA new shell is run for each command line. If you want to run
Xmore complicated shell scripts, you need to escape the end of line
Xwith a backslash to keep all commands on one virtual shell command line.
X.PP
X.B Smake
Xtries to be as
X.B POSIX
Xcompliant as possible.
X.PP
X.B POSIX
Xdoes not cover everything that is needed to write portable makefiles
Xsuitable to compile large portable projects.
XEven simple things like
X.BI macro+= value
Xare not covered by
X.BR POSIX .
XNote that adding something to a macro definition is supported by all
Xknown 
X.I make
Ximplementations since ~ 1980.
XIn addition,
Xit is most unlikely
Xthat different 
X.B make
Ximplementations although
X.B POSIX
Xcompliant, are as compatible enough to maintain large projects.
XFor these reasons, it seems to be better to have a portable 
X.B make 
Ximplementation like
X.BR smake .
X
X.SH BUGS
X.PP
X.B SCCS
Xretrieval is not yet implemented.
X.PP
XA '+' character does not cancel the
X.B \-t
Xoption, the commands are not executed.
X.PP
XA command line that contains the macro
X.B "$(MAKE)"
Xis always executed, even when in POSIX mode.
XThis is conflict with the POSIX standard since POSIX.1-2008.
X.PP
XBuilt in library handling is not yet implemented.
X.PP
XThere are currently no other known bugs.
XAs 
X.B smake
Xsince spring 1993 is used as the reference make program for
Xthe SCHILY (Sing) makefile system,
X.B smake
Xis the best choice when compiling projects that are using
Xthe SCHILY (Sing) makefile system.
X
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xjoerg.schilling@fokus.fraunhofer.de
END-of-smake-1.2.1/smake/smake.1
echo x - smake-1.2.1/smake/defaults.smk
sed 's/^X//' >smake-1.2.1/smake/defaults.smk << 'END-of-smake-1.2.1/smake/defaults.smk'
X# @(#)defaults.smk	1.4 05/06/11 Copyright 1987-2005 J. Schilling
X#
X
X#
X# Special SCCS target
X# SCCS is not yet supported
X#
X#.SCCS_GET:
X#	sccs $(SCCSFLAGS) get $(SCCSGETFLAGS) $@
X
X#
X# Special Suffix target
X# We start without SCCS support
X#
X#SUFFIXES= .o .c .y .l .a .sh .f .c~ .y~ .l~ .sh~ .f~
X
XSUFFIXES= .o .c .y .l .s .a .sh .f
X.SUFFIXES: $(SUFFIXES)
X
X
XAR=		ar
XARFLAGS=	-rv
XAS=		as
XASFLAGS=
XCC=		cc
XCFLAGS=		-O
XCPPFLAGS=
XFC=		f77
XFFLAGS=
XRC=		f77
XRCFLAGS=
XGET=		get
XGFLAGS=
XLD=		ld
XLDFLAGS=
XLDLIBS=
XLEX=		lex
XLFLAGS=
XMAKE=		smake
XPC=		pc
XPFLAGS=
XRM=		rm -f
XROFF=		nroff
XRFLAGS=		-ms
XSCCSFLAGS=
XSCCSGETFLAGS=	-s
XYACC=		yacc
XYFLAGS=
X
X#
X# Simple Suffix Rules
X# We do not use them in case there are POSIX sufix rules
X#
X#.o: .c .s .l
X#	$(CC) -c $(CFLAGS) $(CPPFLAGS) $<
X#	$(AS) -o $*.o $(ASFLAGS) $<
X#	$(LEX) $(LFLAGS) $<;$(CC) -c $(CFLAGS) lex.yy.c;rm lex.yy.c;mv lex.yy.o $@
X#.c: .y
X#	$(YACC) $(YFLAGS) $<;mv y.tab.c $@
X#"": .o .sc
X#	$(CC) -o $* $<
X#	$(ROFF) $(RFLAGS) $< > $@
X
X#
X# POSIX Single Suffix Rules
X#
X
X#	C language
X.c:
X	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ $<
X
X#	Fortran language
X.f:
X	$(FC) $(FFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ $<
X
X#	Shell language
X.sh:
X	$(RM) $@
X	cp $< $@
X	chmod a+x $@
X
X#	Yacc language
X.y:
X	$(YACC) $(YFLAGS) $<
X	$(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ y.tab.c
X	$(RM) y.tab.c
X
X#	Lex language
X.l:
X	$(LEX) $(LFLAGS) $<
X	$(CC) $(CFLAGS) $(LDFLAGS) -ll $(LDLIBS) -o $@ lex.yy.c
X	$(RM) lex.yy.c
X
X#
X# POSIX Double Suffix Rules
X#
X
X#	C language
X.c.o:
X	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
X
X#	Fortran language
X.f.o:
X	$(FC) $(FFLAGS) $(CPPFLAGS) -c $<
X
X#	Yacc language
X.y.o:
X	$(YACC) $(YFLAGS) $<
X	$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c y.tab.c
X	$(RM) y.tab.c
X
X#	Lex language
X.l.o:
X	$(LEX) $(LFLAGS) $<
X	$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c lex.yy.c
X	$(RM) lex.yy.c
X
X#	Yacc language to C
X.y.c:
X	$(YACC) $(YFLAGS) $<
X	mv y.tab.c $@
X
X#	Lex language to C
X.l.c:
X	$(LEX) $(LFLAGS) $<
X	mv lex.yy.c $@
X
X#	C language to archive
X.c.a:
X	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
X	$(AR) $(ARFLAGS) $@ $*.o
X	$(RM) $*.o
X
X#	Fortran language to archive
X.f.a:
X	$(FC) $(FFLAGS) $(CPPFLAGS) -c $<
X	$(AR) $(ARFLAGS) $@ $*.o
X	$(RM) $*.o
X
X#	Assembly language
X.s.o:
X	$(AS) $(ASFLAGS) -o $@ $<
END-of-smake-1.2.1/smake/defaults.smk
echo x - smake-1.2.1/smake/Makefile.man
sed 's/^X//' >smake-1.2.1/smake/Makefile.man << 'END-of-smake-1.2.1/smake/Makefile.man'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSMODE=	0644
XMANDIR=		man
XTARGETMAN=	smake
XMANSECT=	$(MANSECT_CMD)
XMANSUFFIX=	$(MANSUFF_CMD)
XMANFILE=	smake.1
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-smake-1.2.1/smake/Makefile.man
echo x - smake-1.2.1/smake/Makefile.def
sed 's/^X//' >smake-1.2.1/smake/Makefile.def << 'END-of-smake-1.2.1/smake/Makefile.def'
X#ident @(#)Makefile.def	1.2 00/11/19 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		lib/
XTARGET=		defaults.smk
XXMK_FILE=	
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-smake-1.2.1/smake/Makefile.def
echo c - smake-1.2.1/include
mkdir -p smake-1.2.1/include > /dev/null 2>&1
echo c - smake-1.2.1/include/schily
mkdir -p smake-1.2.1/include/schily > /dev/null 2>&1
echo x - smake-1.2.1/include/schily/alloca.h
sed 's/^X//' >smake-1.2.1/include/schily/alloca.h << 'END-of-smake-1.2.1/include/schily/alloca.h'
X/* @(#)alloca.h	1.6 06/09/13 Copyright 2002 J. Schilling */
X/*
X *	Definitions for users of alloca()
X *
X *	Important: #include this directly after <schily/mconfig.h>
X *	and before any other include file.
X *	See comment in _AIX part below.
X *
X *	Copyright (c) 2002 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X
X#ifndef	_SCHILY_ALLOCA_H
X#define	_SCHILY_ALLOCA_H
X
X#ifdef __GNUC__
X#	ifndef	alloca
X#		define	alloca(s)	__builtin_alloca(s)
X#	endif
X#else
X#	ifdef _MSC_VER
X#		include <malloc.h>
X#		define alloca _alloca
X#	else
X#		if HAVE_ALLOCA_H
X#			include <alloca.h>
X#		else
X#			ifdef _AIX
X				/*
X				 * Indent so pre-ANSI compilers will ignore it
X				 *
X				 * Some versions of AIX may require this to be
X				 * first in the file and only preceded by
X				 * comments and preprocessor directives/
X				 */
X				/* CSTYLED */
X				#pragma alloca
X#			else
X#				ifndef alloca
X					/*
X					 * predefined by HP cc +Olibcalls
X					 */
X#					ifdef	PROTOTYPES
X						extern void *alloca();
X#					else
X						extern char *alloca();
X#					endif
X#				endif
X#			endif
X#		endif
X#	endif
X#endif
X
X
X#endif	/* _SCHILY_ALLOCA_H */
END-of-smake-1.2.1/include/schily/alloca.h
echo x - smake-1.2.1/include/schily/btorder.h
sed 's/^X//' >smake-1.2.1/include/schily/btorder.h << 'END-of-smake-1.2.1/include/schily/btorder.h'
X/* @(#)btorder.h	1.19 07/01/16 Copyright 1996-2007 J. Schilling */
X/*
X *	Definitions for Bit and Byte ordering
X *
X *	Copyright (c) 1996-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X
X#ifndef	_SCHILY_BTORDER_H
X#define	_SCHILY_BTORDER_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>		/* load bit/byte-oder from xmconfig.h*/
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>		/* try to load isa_defs.h on Solaris */
X#endif
X
X/*
X * Convert bit-order definitions from xconfig.h into our values
X * and verify them.
X */
X#if defined(HAVE_C_BITFIELDS)	&& \
X    defined(BITFIELDS_LTOH)
X#define	_BIT_FIELDS_LTOH
X#endif
X
X#if defined(HAVE_C_BITFIELDS)	&& \
X    defined(BITFIELDS_HTOL)
X#define	_BIT_FIELDS_HTOL
X#endif
X
X#if defined(HAVE_C_BITFIELDS) && \
X	!defined(BITFIELDS_HTOL)
X#define	BITFIELDS_LTOH
X#define	_BIT_FIELDS_LTOH
X#endif
X
X#if	defined(_BIT_FIELDS_LTOH) && defined(_BIT_FIELDS_HTOL)
X/*
X * #error will not work for all compilers (e.g. sunos4)
X * The following line will abort compilation on all compilers
X * if none of the above is defines. And that's  what we want.
X */
Xerror  Only one of _BIT_FIELDS_LTOH or _BIT_FIELDS_HTOL may be defined
X#endif
X
X
X/*
X * Convert byte-order definitions from xconfig.h into our values
X * and verify them.
X * Note that we cannot use the definitions _LITTLE_ENDIAN and _BIG_ENDIAN
X * because they are used on IRIX-6.5 with different meaning.
X */
X#if defined(HAVE_C_BIGENDIAN) && \
X	!defined(WORDS_BIGENDIAN)
X#define	WORDS_LITTLEENDIAN
X/*#define	_LITTLE_ENDIAN*/
X#endif
X
X#if defined(HAVE_C_BIGENDIAN)	&& \
X    defined(WORDS_BIGENDIAN)
X#undef	WORDS_LITTLEENDIAN
X/*#define	_BIG_ENDIAN*/
X#endif
X
X#if	defined(_BIT_FIELDS_LTOH) || defined(_BIT_FIELDS_HTOL)
X/*
X * Bitorder is already known.
X */
X#else
X/*
X * Bitorder not yet known.
X */
X#	if defined(sun3) || defined(mc68000) || \
X	    defined(sun4) || defined(__sparc) || defined(sparc) || \
X	    defined(__hppa) || defined(_ARCH_PPC) || defined(_IBMR2)
X#		define _BIT_FIELDS_HTOL
X#	endif
X
X#	if defined(__sgi) && defined(__mips)
X#		define _BIT_FIELDS_HTOL
X#	endif
X
X#	if defined(__i386__) || defined(__i386) || defined(i386) || \
X	    defined(__alpha__) || defined(__alpha) || defined(alpha) || \
X	    defined(__arm__) || defined(__arm) || defined(arm)
X#		define _BIT_FIELDS_LTOH
X#	endif
X
X#	if defined(__ppc__) || defined(ppc) || defined(__ppc) || \
X	    defined(__PPC) || defined(powerpc) || defined(__powerpc__)
X
X#		if	defined(__BIG_ENDIAN__)
X#			define _BIT_FIELDS_HTOL
X#		else
X#			define _BIT_FIELDS_LTOH
X#		endif
X#	endif
X#endif
X
X#endif	/* _SCHILY_BTORDER_H */
END-of-smake-1.2.1/include/schily/btorder.h
echo x - smake-1.2.1/include/schily/ccomdefs.h
sed 's/^X//' >smake-1.2.1/include/schily/ccomdefs.h << 'END-of-smake-1.2.1/include/schily/ccomdefs.h'
X/* @(#)ccomdefs.h	1.8 10/02/23 Copyright 2000-2009 J. Schilling */
X/*
X *	Various compiler dependant macros.
X *
X *	Copyright (c) 2000-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_CCOMDEFS_H
X#define	_SCHILY_CCOMDEFS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * Compiler-dependent macros to declare that functions take printf-like
X * or scanf-like arguments. They are defined to nothing for versions of gcc
X * that are not known to support the features properly (old versions of gcc-2
X * didn't permit keeping the keywords out of the application namespace).
X */
X#if __GNUC__ < 2 || __GNUC__ == 2 && __GNUC_MINOR__ < 7
X
X#define	__printflike__(fmtarg, firstvararg)
X#define	__printf0like__(fmtarg, firstvararg)
X#define	__scanflike__(fmtarg, firstvararg)
X
X#else /* We found GCC that supports __attribute__ */
X
X#define	__printflike__(fmtarg, firstvararg) \
X		__attribute__((__format__(__printf__, fmtarg, firstvararg)))
X#define	__printf0like__(fmtarg, firstvararg) \
X		__attribute__((__format__(__printf0__, fmtarg, firstvararg)))
X
X/*
X * FreeBSD GCC implements printf0 that allows the format string to
X * be a NULL pointer.
X */
X#if	__FreeBSD_cc_version < 300001
X#undef	__printf0like__
X#define	__printf0like__	__printflike__
X#endif
X
X#define	__scanflike__(fmtarg, firstvararg) \
X		__attribute__((__format__(__scanf__, fmtarg, firstvararg)))
X
X#endif /* GNUC */
X
X#if __GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 1
X
X/* CSTYLED */
X#define	UConst	__attribute__ ((__used__)) const
X
X#else	/* GNUC 3.2 */
X
X#define	UConst	const
X
X#endif /* GNUC 3.2 */
X
X#ifdef	__PCC__
X/*
X * Hack until pcc supports __attribute__ ((__used__))
X */
X#ifdef	UConst
X#undef	UConst
X#define	UConst	const
X#endif
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_CCOMDEFS_H */
END-of-smake-1.2.1/include/schily/ccomdefs.h
echo x - smake-1.2.1/include/schily/deflts.h
sed 's/^X//' >smake-1.2.1/include/schily/deflts.h << 'END-of-smake-1.2.1/include/schily/deflts.h'
X/* @(#)deflts.h	1.8 06/10/10 Copyright 1997 J. Schilling */
X/*
X *	Definitions for reading program defaults.
X *
X *	Copyright (c) 1997 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_DEFLTS_H
X#define	_SCHILY_DEFLTS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#define	DEFLT	"/etc/default"
X
X/*
X * cmd's to defltcntl()
X */
X#define	DC_GETFLAGS	0	/* Get actual flags	*/
X#define	DC_SETFLAGS	1	/* Set new flags	*/
X
X/*
X * flags to defltcntl()
X *
X * Make sure that when adding features, the default behaviour
X * is the same as old behaviour.
X */
X#define	DC_CASE		0x0001	/* Don't ignore case	*/
X
X#define	DC_STD		DC_CASE	/* Default flags	*/
X
X/*
X * Macros to handle flags
X */
X#ifndef	TURNON
X#define	TURNON(flags, mask)	flags |= mask
X#define	TURNOFF(flags, mask)	flags &= ~(mask)
X#define	ISON(flags, mask)	(((flags) & (mask)) == (mask))
X#define	ISOFF(flags, mask)	(((flags) & (mask)) != (mask))
X#endif
X
Xextern	int	defltopen	__PR((const char *name));
Xextern	int	defltclose	__PR((void));
Xextern	void	defltfirst	__PR((void));
Xextern	char	*defltread	__PR((const char *name));
Xextern	char	*defltnext	__PR((const char *name));
Xextern	int	defltcntl	__PR((int cmd, int flags));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_DEFLTS_H */
END-of-smake-1.2.1/include/schily/deflts.h
echo x - smake-1.2.1/include/schily/device.h
sed 's/^X//' >smake-1.2.1/include/schily/device.h << 'END-of-smake-1.2.1/include/schily/device.h'
X/* @(#)device.h	1.19 09/11/16 Copyright 1995-2007 J. Schilling */
X/*
X *	Generic header for users of major(), minor() and makedev()
X *
X *	Copyright (c) 1995-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_DEVICE_H
X#define	_SCHILY_DEVICE_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * On generic SVR4, major is a function (defined in sys/mkdev.h).
X * On Solaris it is defined ...
X * As we cannot just test if major is #define'd, we have to
X * define _FOUND_MAJOR_ instead.
X *
X * WARNING: Do never include <sys/sysmacros.h> in SVR4, it contains
X * an old definition for major()/minor() defining 8 minorbits.
X * Use <sys/mkdev.h> instead.
X */
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X/*
X * Some systems define major in <sys/types.h>.
X * We are ready...
X */
X#ifdef major
X#	define _FOUND_MAJOR_
X#endif
X
X#ifdef MAJOR_IN_MKDEV
X#	ifndef	_INCL_SYS_MKDEV_H
X#	include <sys/mkdev.h>
X#	define	_INCL_SYS_MKDEV_H
X#	endif
X	/*
X	 * Interix doesn't use makedev(); it uses mkdev()
X	 */
X#	if !defined(makedev) && defined(mkdev)
X#		define makedev(a, b)	mkdev((a), (b))
X#	endif
X#	define _FOUND_MAJOR_
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	ifdef MAJOR_IN_SYSMACROS
X#		ifndef	_INCL_SYS_SYSMACROS_H
X#		include <sys/sysmacros.h>
X#		define	_INCL_SYS_SYSMACROS_H
X#		endif
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X/*
X * If we are on HP/UX before HP/UX 8,
X * major/minor are not in <sys/sysmacros.h>.
X */
X#ifndef _FOUND_MAJOR_
X#	if defined(hpux) || defined(__hpux__) || defined(__hpux)
X#		ifndef	_INCL_SYS_MKOD_H
X#		include <sys/mknod.h>
X#		define	_INCL_SYS_MKOD_H
X#		endif
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef	_FOUND_MAJOR_
X#	ifdef VMS
X#		define major(dev)		(((((long)dev) >> 8) & 0xFF))
X#		define minor(dev)		((((long)dev) & 0xFF))
X#		define makedev(majo, mino)	(((majo) << 8) | (mino))
X#		define _FOUND_MAJOR_
X#	endif /* VMS */
X#endif /* _FOUND_MAJOR_ */
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * For all other systems define major()/minor() here.
X * XXX Check if this definition will be usefull for ms dos too.
X */
X#ifndef _FOUND_MAJOR_
X#	define major(dev)		(((dev) >> 8) & 0xFF)
X#	define minor(dev)		((dev) & 0xFF)
X#	define makedev(majo, mino)	(((majo) << 8) | (mino))
X#endif
X
X/*
X * Don't pollute namespace...
X */
X#undef _FOUND_MAJOR_
X
X#ifdef	__XDEV__
X/*
X * The following defines are currently only needed for 'star'.
X * We make it conditional code to avoid to pollute the namespace.
X */
X#define	XDEV_T	unsigned long
X
Xextern	int	minorbits;
Xextern	XDEV_T	minormask;
Xextern	XDEV_T	_dev_mask[];
X
X#define	dev_major(dev)			(((XDEV_T)(dev)) >> minorbits)
X#define	_dev_major(mbits, dev)		(((XDEV_T)(dev)) >> (mbits))
X
X#define	dev_minor(dev)			(((XDEV_T)(dev)) & minormask)
X#define	_dev_minor(mbits, dev)		(((XDEV_T)(dev)) & _dev_mask[(mbits)])
X
X
X#define	dev_make(majo, mino)		((((XDEV_T)(majo)) << minorbits) | \
X							((XDEV_T)(mino)))
X#define	_dev_make(mbits, majo, mino)	((((XDEV_T)(majo)) << (mbits) | \
X							((XDEV_T)(mino)))
X
Xextern	void	dev_init	__PR((BOOL debug));
X#ifndef	dev_major
Xextern	XDEV_T	dev_major	__PR((XDEV_T dev));
Xextern	XDEV_T	_dev_major	__PR((int mbits, XDEV_T dev));
Xextern	XDEV_T	dev_minor	__PR((XDEV_T dev));
Xextern	XDEV_T	_dev_minor	__PR((int mbits, XDEV_T dev));
Xextern	XDEV_T	dev_make	__PR((XDEV_T majo, XDEV_T mino));
Xextern	XDEV_T	_dev_make	__PR((int mbits, XDEV_T majo, XDEV_T mino));
X#endif
X
X#endif	/* __XDEV__ */
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_DEVICE_H */
END-of-smake-1.2.1/include/schily/device.h
echo x - smake-1.2.1/include/schily/dirent.h
sed 's/^X//' >smake-1.2.1/include/schily/dirent.h << 'END-of-smake-1.2.1/include/schily/dirent.h'
X/* @(#)dirent.h	1.28 09/05/24 Copyright 1987, 1998, 2000-2009 J. Schilling */
X/*
X *	Copyright (c) 1987, 1998, 2000-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_DIRENT_H
X#define	_SCHILY_DIRENT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifdef JOS
X#	ifdef	HAVE_SYS_STYPES_H
X#		ifndef	_INCL_SYS_STYPES_H
X#		include <sys/stypes.h>
X#		define	_INCL_SYS_STYPES_H
X#		endif
X#	endif
X#	ifdef	HAVE_SYS_FILEDESC_H
X#		ifndef	_INCL_SYS_FILEDESC_H
X#		include <sys/filedesc.h>
X#		define	_INCL_SYS_FILEDESC_H
X#		endif
X#	endif
X#	define	NEED_READDIR
X#	define 	dirent			_direct
X#	define	DIR_NAMELEN(dirent)	strlen((dirent)->d_name)
X#	define	DIRSIZE	30
X#	define	FOUND_DIRSIZE
X	typedef struct _dirent {
X		char	name[DIRSIZE];
X		short	ino;
X	} dirent;
X
X#else	/* !JOS */
X
X#	ifndef	_SCHILY_TYPES_H
X#		include <schily/types.h>
X#	endif
X#	ifndef	_SCHILY_STAT_H
X#		include <schily/stat.h>
X#	endif
X#	ifndef	_SCHILY_LIMITS_H
X#		include	<schily/limits.h>
X#	endif
X#	ifndef	_SCHILY_PARAM_H
X#		include <schily/param.h>
X#	endif
X
X#	ifdef	HAVE_DIRENT_H		/* This a POSIX compliant system */
X#		ifndef	_INCL_DIRENT_H
X#		include <dirent.h>
X#		define	_INCL_DIRENT_H
X#		endif
X#		define	DIR_NAMELEN(dirent)	strlen((dirent)->d_name)
X#		define	_FOUND_DIR_
X#	else				/* This is a Pre POSIX system	 */
X
X#	define 	dirent	direct
X#	define	DIR_NAMELEN(dirent)	(dirent)->d_namlen
X
X#	if	defined(HAVE_SYS_DIR_H)
X#		ifndef	_INCL_SYS_DIR_H
X#		include <sys/dir.h>
X#		define	_INCL_SYS_DIR_H
X#		endif
X#		define	_FOUND_DIR_
X#	endif
X
X#	if	defined(HAVE_NDIR_H) && !defined(_FOUND_DIR_)
X#		ifndef	_INCL_NDIR_H
X#		include <ndir.h>
X#		define	_INCL_NDIR_H
X#		endif
X#		define	_FOUND_DIR_
X#	endif
X
X#	if	defined(HAVE_SYS_NDIR_H) && !defined(_FOUND_DIR_)
X#		ifndef	_INCL_SYS_NDIR_H
X#		include <sys/ndir.h>
X#		define	_INCL_SYS_NDIR_H
X#		endif
X#		define	_FOUND_DIR_
X#	endif
X#	endif	/* HAVE_DIRENT_H */
X
X#	if	defined(_FOUND_DIR_)
X/*
X * Don't use defaults here to allow recognition of problems.
X */
X#	if !defined(FOUND_DIRSIZE) && defined(MAXNAMELEN)
X#		define	DIRSIZE		MAXNAMELEN	/* From sys/param.h */
X#		define	FOUND_DIRSIZE
X#	endif
X
X#	if !defined(FOUND_DIRSIZE) && defined(MAXNAMLEN)
X#		define	DIRSIZE		MAXNAMLEN	/* From dirent.h    */
X#		define	FOUND_DIRSIZE
X#	endif
X
X#	ifdef	__never__
X	/*
X	 * DIRSIZ(dp) is a parameterized macro, we cannot use it here.
X	 */
X#	if !defined(FOUND_DIRSIZE) && defined(DIRSIZ)
X#		define	DIRSIZE		DIRSIZ		/* From sys/dir.h   */
X#		define	FOUND_DIRSIZE
X#	endif
X#	endif	/* __never__ */
X
X#	if !defined(FOUND_DIRSIZE) && defined(NAME_MAX)
X#		define	DIRSIZE		NAME_MAX	/* From limits.h    */
X#		define	FOUND_DIRSIZE
X#	endif
X
X#	else	/* !_FOUND_DIR_ */
X
X#		define	NEED_DIRENT
X#		define	NEED_READDIR
X#		undef	dirent
X#		define 	dirent			_direct
X#		undef	DIR_NAMELEN
X#		define	DIR_NAMELEN(dirent)	strlen((dirent)->d_name)
X
X#	endif	/* _FOUND_DIR_ */
X
X
X#ifdef	NEED_DIRENT
X
X#ifndef	FOUND_DIRSIZE
X#define	DIRSIZE		14	/* The old UNIX standard value */
X#define	FOUND_DIRSIZE
X#endif
X
Xtypedef struct _dirent {
X	short	ino;
X	char	name[DIRSIZE];
X} dirent;
X
X#endif	/* NEED_DIRENT */
X
X#endif	/* !JOS */
X
X#ifdef	NEED_READDIR
X
X#ifndef _SCHILY_STDIO_H
X#include <schily/stdio.h>
X#endif
X
X	typedef struct __dirdesc {
X		FILE	*dd_fd;
X	} DIR;
X
X	struct _direct {
X		unsigned long	d_ino;
X		unsigned short	d_reclen;
X		unsigned short	d_namlen;
X		char		d_name[DIRSIZE +1];
X	};
X#define	HAVE_DIRENT_D_INO
X
Xextern	DIR		*opendir();
Xextern			closedir();
Xextern	struct dirent	*readdir();
X
X#endif	/* NEED_READDIR */
X
X#if	!defined(HAVE_DIRFD) && defined(HAVE_DIR_DD_FD)
X#	define	dirfd(dirp)	((dirp)->dd_fd)
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_DIRENT_H */
END-of-smake-1.2.1/include/schily/dirent.h
echo x - smake-1.2.1/include/schily/fcntl.h
sed 's/^X//' >smake-1.2.1/include/schily/fcntl.h << 'END-of-smake-1.2.1/include/schily/fcntl.h'
X/* @(#)fcntl.h	1.16 07/01/16 Copyright 1996-2007 J. Schilling */
X/*
X *	Generic header for users of open(), creat() and chmod()
X *
X *	Copyright (c) 1996-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_FCNTL_H
X#define	_SCHILY_FCNTL_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>	/* Needed for fcntl.h			*/
X#endif
X
X#ifndef	_SCHILY_STAT_H
X#include <schily/stat.h>	/* For 3rd arg of open() and chmod()	*/
X#endif
X
X#ifdef	HAVE_SYS_FILE_H
X/*
X * Historical systems with flock() only need sys/file.h
X */
X#	ifndef	_INCL_SYS_FILE_H
X#	include <sys/file.h>
X#	define	_INCL_SYS_FILE_H
X#	endif
X#endif
X#ifdef	HAVE_FCNTL_H
X#	ifndef	_INCL_FCNTL_H
X#	include <fcntl.h>
X#	define	_INCL_FCNTL_H
X#endif
X#endif
X
X/*
X * Do not define more than O_RDONLY / O_WRONLY / O_RDWR / O_BINARY
X * The values may differ.
X *
X * O_BINARY is defined here to allow all applications to compile on a non DOS
X * environment without repeating this definition.
X */
X#ifndef	O_RDONLY
X#	define	O_RDONLY	0
X#endif
X#ifndef	O_WRONLY
X#	define	O_WRONLY	1
X#endif
X#ifndef	O_RDWR
X#	define	O_RDWR		2
X#endif
X#ifndef	O_BINARY			/* Only present on DOS or similar */
X#	define	O_BINARY	0
X#endif
X#ifndef	O_NDELAY			/* This is undefined on BeOS :-( */
X#	define	O_NDELAY	0
X#endif
X
X#ifndef	O_ACCMODE
X#define	O_ACCMODE		(O_RDONLY|O_WRONLY|O_RDWR)
X#endif
X
X#endif	/* _SCHILY_FCNTL_H */
END-of-smake-1.2.1/include/schily/fcntl.h
echo x - smake-1.2.1/include/schily/fnmatch.h
sed 's/^X//' >smake-1.2.1/include/schily/fnmatch.h << 'END-of-smake-1.2.1/include/schily/fnmatch.h'
X/* @(#)fnmatch.h	8.7 09/05/05 Copyright 2006-2009 J. Schilling from 8.1 (Berkeley) */
X
X#ifndef	_SCHILY_FNMATCH_H
X#define	_SCHILY_FNMATCH_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifdef	HAVE_FNMATCH_H
X#include <fnmatch.h>
X#else
X/*
X * Copyright (c) 1992, 1993
X *	The Regents of the University of California.  All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X *    notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X *    notice, this list of conditions and the following disclaimer in the
X *    documentation and/or other materials provided with the distribution.
X * 3. Neither the name of the University nor the names of its contributors
X *    may be used to endorse or promote products derived from this software
X *    without specific prior written permission.
X *
X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X *
X *	@(#)fnmatch.h	8.7 (Berkeley) 05/05/09
X */
X
X#define	FNM_NOMATCH	1	/* Match failed. */
X
X#define	FNM_NOESCAPE	0x01	/* Disable backslash escaping. */
X#define	FNM_PATHNAME	0x02	/* Slash must be matched by slash. */
X#define	FNM_PERIOD	0x04	/* Period must be matched by period. */
X
Xint	 fnmatch __PR((const char *, const char *, int));
X
X#endif /* !HAVE_FNMATCH */
X#endif /* !_SCHILY_FNMATCH_H */
END-of-smake-1.2.1/include/schily/fnmatch.h
echo x - smake-1.2.1/include/schily/getargs.h
sed 's/^X//' >smake-1.2.1/include/schily/getargs.h << 'END-of-smake-1.2.1/include/schily/getargs.h'
X/* @(#)getargs.h	1.18 07/07/02 Copyright 1985-2007 J. Schilling */
X/*
X *	Definitions for getargs()/getallargs()/getfiles()
X *
X *	Copyright (c) 1985-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_GETARGS_H
X#define	_SCHILY_GETARGS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * Return values for get*args()/get*files()
X *
X * This package calls options "flags", they are returned from get*args().
X *
X * Note that NOTAFILE is not returned by the interface functions.
X * NOTAFILE is however used as return code from the user's callback functions
X * to signal that the current arg may be an option the callback function does
X * not know and definitely is no file type argument.
X *
X * General rules for the return code of the interface functions
X * get*args()/get*files():
X *
X *	> 0		A file type argument was found
X *	  0		All arguments have been parsed
X *	< 0		An error occured
X *
X * Flag and file arg processing should be terminated after getting a return
X * code <= 0.
X */
X#define	FLAGDELIM	  2	/* "--" stopped flag processing	*/
X#define	NOTAFLAG	  1	/* Not a flag type argument	*/
X#define	NOARGS		  0	/* No more args			*/
X#define	BADFLAG		(-1)	/* Not a valid flag argument	*/
X#define	BADFMT		(-2)	/* Error in format string	*/
X#define	NOTAFILE	(-3)	/* Seems to be a flag type	*/
X
Xtypedef	int	(*getargfun)	__PR((const char *__arg, void *__valp));
Xtypedef	int	(*getpargfun)	__PR((const char *__arg, void *__valp, int *__pac, char *const **__pav, const char *__opt));
X
X#define	NO_ARGFUN	(getargpfun)0
X
Xstruct ga_flags {
X	const char	*ga_format;
X	void		*ga_arg;
X	getpargfun	ga_funcp;
X};
X
Xstruct ga_props {
X	UInt32_t	ga_flags;
X	UInt32_t	ga_oflags;
X	size_t		ga_size;
X};
X
X#define	GA_NO_PROPS	(struct ga_props *)0
X
X/*
X * Definitions for ga_flags
X */
X#define	GAF_DEFAULT		0x00	/* The default behavior		    */
X#define	GAF_NO_PLUS		0x01	/* Options may not start with '+'   */
X#define	GAF_NO_EQUAL		0x02	/* Disallow '=' between opt and val */
X#define	GAF_NEED_DASH		0x04	/* Need dash before (-name=val),    */
X					/*  name=val is not allowed	    */
X#define	GAF_DELIM_DASHDASH	0x08	/* "--" stops even get?allargs()    */
X
X/*
X * POSIX does not allow options in the form "+option", "-option=value" or
X * "option=value".
X *
X * GAF_NO_PLUS		do not allow options to start with a '+'
X * GAF_NO_EQUAL		do not allow options to contain '=' between name & val
X */
X#define	GAF_POSIX_DEFAULT	(GAF_NO_PLUS | GAF_NO_EQUAL)
X
X/*
X * Keep in sync with schily.h
X */
Xextern	int	getallargs __PR((int *, char * const**, const char *, ...));
Xextern	int	getargs __PR((int *, char * const**, const char *, ...));
Xextern	int	getfiles __PR((int *, char * const**, const char *));
Xextern	char	*getargerror __PR((int));
X
X/*
X * The new list versions of the functions need struct ga_props and thus need
X * getargs.h
X */
Xextern	int	getlallargs __PR((int *, char * const**, struct ga_props *, const char *, ...));
Xextern	int	getlargs __PR((int *, char * const**, struct ga_props *, const char *, ...));
Xextern	int	getlfiles __PR((int *, char * const**, struct ga_props *, const char *));
Xextern	int	_getarginit __PR((struct ga_props *, size_t, UInt32_t));
X
X#define	getarginit(p, f)	_getarginit(p, sizeof (struct ga_props), f)
X
X/*
X * The vector versions of the functions need struct ga_flags and thus need
X * getargs.h
X */
Xextern	int	getvallargs __PR((int *, char * const**, struct ga_flags *, struct ga_props *));
Xextern	int	getvargs __PR((int *, char * const**, struct ga_flags *, struct ga_props *));
Xextern	int	getvfiles __PR((int *, char * const**, struct ga_flags *, struct ga_props *));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_GETARGS_H */
END-of-smake-1.2.1/include/schily/getargs.h
echo x - smake-1.2.1/include/schily/getcwd.h
sed 's/^X//' >smake-1.2.1/include/schily/getcwd.h << 'END-of-smake-1.2.1/include/schily/getcwd.h'
X/* @(#)getcwd.h	1.5 08/12/08 Copyright 1998-2008 J. Schilling */
X/*
X *	Definitions for getcwd()
X *
X *	Copyright (c) 1998-2008 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_GETCWD_H
X#define	_SCHILY_GETCWD_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_UNISTD_H
X#include <schily/unistd.h>
X#endif
X
X#ifdef JOS
X#	ifndef	_INCL_SYS_STYPES_H
X#	include <sys/stypes.h>
X#	define	_INCL_SYS_STYPES_H
X#	endif
X	extern char	*gwd();
X#	define		getcwd(b, len)	gwd(b)
X#else
X#	ifndef	HAVE_GETCWD
X#		define	getcwd(b, len)	getwd(b)
X#	endif
X#endif
X
X#endif	/* _SCHILY_GETCWD_H */
END-of-smake-1.2.1/include/schily/getcwd.h
echo x - smake-1.2.1/include/schily/intcvt.h
sed 's/^X//' >smake-1.2.1/include/schily/intcvt.h << 'END-of-smake-1.2.1/include/schily/intcvt.h'
X/* @(#)intcvt.h	1.5 06/09/13 Copyright 1986-2003 J. Schilling */
X/*
X *	Definitions for conversion to/from integer data types of various size.
X *
X *	Copyright (c) 1986-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_INTCVT_H
X#define	_SCHILY_INTCVT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#define	i_to_2_byte(a, i)	(((Uchar *)(a))[0] = ((i) >> 8) & 0xFF,\
X				    ((Uchar *)(a))[1] = (i) & 0xFF)
X
X#define	i_to_3_byte(a, i)	(((Uchar *)(a))[0] = ((i) >> 16)& 0xFF,\
X				    ((Uchar *)(a))[1] = ((i) >> 8) & 0xFF,\
X				    ((Uchar *)(a))[2] = (i) & 0xFF)
X
X#define	i_to_4_byte(a, i)	(((Uchar *)(a))[0] = ((i) >> 24)& 0xFF,\
X				    ((Uchar *)(a))[1] = ((i) >> 16)& 0xFF,\
X				    ((Uchar *)(a))[2] = ((i) >> 8) & 0xFF,\
X				    ((Uchar *)(a))[3] = (i) & 0xFF)
X
X
X
X#define	a_to_byte(a)		(((Int8_t *) a)[0])
X
X#define	a_to_u_byte(a)		((UInt8_t) \
X				(((Uchar *) a)[0]		& 0xFF))
X
X#define	a_to_u_2_byte(a)	((UInt16_t) \
X				((((Uchar *) a)[1]		& 0xFF) | \
X				    (((Uchar *) a)[0] << 8	& 0xFF00)))
X
X#define	a_to_2_byte(a)		(int)(Int16_t)a_to_u_2_byte(a)
X
X#define	a_to_u_3_byte(a)	((Ulong) \
X				((((Uchar *) a)[2]		& 0xFF) | \
X				    (((Uchar *) a)[1] << 8	& 0xFF00) | \
X				    (((Uchar *) a)[0] << 16	& 0xFF0000)))
X
X#define	a_to_3_byte(a)		a_to_u_3_byte(a)	/* XXX Is there a signed version ? */
X
X#ifdef	__STDC__
X#	define	__TOP_4BYTE	0xFF000000UL
X#else
X#	define	__TOP_4BYTE	0xFF000000
X#endif
X
X#define	a_to_u_4_byte(a)	((Ulong) \
X				((((Uchar*) a)[3]		& 0xFF) | \
X				    (((Uchar*) a)[2] << 8	& 0xFF00) | \
X				    (((Uchar*) a)[1] << 16	& 0xFF0000) | \
X				    (((Uchar*) a)[0] << 24	& __TOP_4BYTE)))
X
X#define	a_to_4_byte(a)		(long)(Int32_t)a_to_u_4_byte(a)
X
X/*
X * Little Endian versions of above macros
X */
X#define	li_to_2_byte(a, i)	(((Uchar *)(a))[1] = ((i) >> 8) & 0xFF,\
X				    ((Uchar *)(a))[0] = (i) & 0xFF)
X
X#define	li_to_3_byte(a, i)	(((Uchar *)(a))[2] = ((i) >> 16)& 0xFF,\
X				    ((Uchar *)(a))[1] = ((i) >> 8) & 0xFF,\
X				    ((Uchar *)(a))[0] = (i) & 0xFF)
X
X#define	li_to_4_byte(a, i)	(((Uchar *)(a))[3] = ((i) >> 24)& 0xFF,\
X				    ((Uchar *)(a))[2] = ((i) >> 16)& 0xFF,\
X				    ((Uchar *)(a))[1] = ((i) >> 8) & 0xFF,\
X				    ((Uchar *)(a))[0] = (i) & 0xFF)
X
X
X#define	la_to_u_2_byte(a)	((UInt16_t) \
X				((((Uchar*) a)[0]		& 0xFF) | \
X				    (((Uchar*) a)[1] << 8	& 0xFF00)))
X
X#define	la_to_2_byte(a)		(int)(Int16_t)la_to_u_2_byte(a)
X
X#define	la_to_u_3_byte(a)	((Ulong) \
X				((((Uchar*) a)[0]		& 0xFF) | \
X				    (((Uchar*) a)[1] << 8	& 0xFF00) | \
X				    (((Uchar*) a)[2] << 16	& 0xFF0000)))
X
X#define	la_to_3_byte(a)		la_to_u_3_byte(a)	/* XXX Is there a signed version ? */
X
X#define	la_to_u_4_byte(a)	((Ulong) \
X				((((Uchar*) a)[0]		& 0xFF) | \
X				    (((Uchar*) a)[1] << 8	& 0xFF00) | \
X				    (((Uchar*) a)[2] << 16	& 0xFF0000) | \
X				    (((Uchar*) a)[3] << 24	& __TOP_4BYTE)))
X
X#define	la_to_4_byte(a)		(long)(Int32_t)la_to_u_4_byte(a)
X
X#endif	/* _SCHILY_INTCVT_H */
END-of-smake-1.2.1/include/schily/intcvt.h
echo x - smake-1.2.1/include/schily/jmpdefs.h
sed 's/^X//' >smake-1.2.1/include/schily/jmpdefs.h << 'END-of-smake-1.2.1/include/schily/jmpdefs.h'
X/* @(#)jmpdefs.h	1.9 09/07/13 Copyright 1998-2009 J. Schilling */
X/*
X *	Definitions that help to handle a jmp_buf
X *
X *	Copyright (c) 1998-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_JMPDEFS_H
X#define	_SCHILY_JMPDEFS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_SETJMP_H
X#include <schily/setjmp.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xtypedef struct {
X	jmp_buf	jb;
X} jmps_t;
X
X#if defined(HAVE_SIGSETJMP) && defined(HAVE_SIGLONGJMP)
X#define	HAVE_SIGJMPS_T
X
Xtypedef struct {
X	sigjmp_buf jb;
X} sigjmps_t;
X
X#else
X
X/*
X * Make sure to use the best available
X */
X#define	sigjmps_t		jmps_t
X#define	sigsetjmp(je, sm)	setjmp(je)
X#define	siglongjmp		longjmp
X
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_JMPDEFS_H */
END-of-smake-1.2.1/include/schily/jmpdefs.h
echo x - smake-1.2.1/include/schily/libport.h
sed 's/^X//' >smake-1.2.1/include/schily/libport.h << 'END-of-smake-1.2.1/include/schily/libport.h'
X/* @(#)libport.h	1.20 09/10/22 Copyright 1995-2009 J. Schilling */
X/*
X *	Copyright (c) 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X
X#ifndef _SCHILY_LIBPORT_H
X#define	_SCHILY_LIBPORT_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#ifndef _SCHILY_UNISTD_H
X#include <schily/unistd.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#if	defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_) || defined(size_t)
X#	ifndef	FOUND_SIZE_T
X#	define	FOUND_SIZE_T
X#	endif
X#endif
X#if	defined(_MSC_VER) && !defined(_SIZE_T_DEFINED)
X#	undef	FOUND_SIZE_T
X#endif
X
X#ifdef	OPENSERVER
X/*
X * Don't use the usleep() from libc on SCO's OPENSERVER.
X * It will kill our processes with SIGALRM.
X */
X/*
X * Don't #undef HAVE_USLEEP in this file, SCO has a
X * usleep() prototype in unistd.h
X */
X/*#undef	HAVE_USLEEP*/
X#endif
X
X#ifndef	HAVE_GETHOSTID
Xextern	long		gethostid	__PR((void));
X#endif
X#ifndef	HAVE_GETPAGESIZE
Xextern	int		getpagesize	__PR((void));
X#endif
X#ifndef	HAVE_USLEEP
Xextern	int		usleep		__PR((int usec));
X#endif
X
X#ifndef	HAVE_STRCAT
Xextern	char		*strcat		__PR((char *s1, const char *s2));
X#endif
X#ifndef	HAVE_STRCHR
Xextern	char		*strchr		__PR((const char *s1, int c));
X#endif
X#ifndef	HAVE_STRCMP
Xextern	int		strcmp		__PR((const char *s1, const char *s2));
X#endif
X#ifndef	HAVE_STRCPY
Xextern	char		*strcpy		__PR((char *s1, const char *s2));
X#endif
X#if	!defined(HAVE_STRDUP) || defined(__SVR4)
Xextern	char		*strdup		__PR((const char *s));
X#endif
X#ifdef	FOUND_SIZE_T
X#ifndef	HAVE_STRLEN
Xextern	size_t		strlen		__PR((const char *s));
X#endif
X#ifndef	HAVE_STRLCPY
Xextern	size_t		strlcpy		__PR((char *s1, const char *s2, size_t len));
X#endif
X#ifndef	HAVE_STRNCAT
Xextern	char		*strncat	__PR((char *s1, const char *s2, size_t len));
X#endif
X#ifndef	HAVE_STRNCMP
Xextern	int		strncmp		__PR((const char *s1, const char *s2, size_t len));
X#endif
X#ifndef	HAVE_STRNCPY
Xextern	char		*strncpy	__PR((char *s1, const char *s2, size_t len));
X#endif
X#endif	/* FOUND_SIZE_T */
X#ifndef	HAVE_STRRCHR
Xextern	char		*strrchr	__PR((const char *s1, int c));
X#endif
X
X#ifdef	_SCHILY_WCHAR_H
X#ifndef	HAVE_WCSCAT
Xextern	wchar_t		*wcscat		__PR((wchar_t *s1, const wchar_t *s2));
X#endif
X#ifndef	HAVE_WCSCHR
Xextern	wchar_t		*wcschr		__PR((const wchar_t *s1, wchar_t c));
X#endif
X#ifndef	HAVE_WCSCMP
Xextern	int		wcscmp		__PR((const wchar_t *s1, const wchar_t *s2));
X#endif
X#ifndef	HAVE_WCSCPY
Xextern	wchar_t		*wcscpy		__PR((wchar_t *s1, const wchar_t *s2));
X#endif
X#ifndef	HAVE_WCSDUP
Xextern	wchar_t		*wcsdup		__PR((const wchar_t *s));
X#endif
X#ifdef	FOUND_SIZE_T
X#ifndef	HAVE_WCSLEN
Xextern	size_t		wcslen		__PR((const wchar_t *s));
X#endif
X#ifndef	HAVE_WCSLCPY
Xextern	size_t		wcslcpy		__PR((wchar_t *s1, const wchar_t *s2, size_t len));
X#endif
X#ifndef	HAVE_WCSNCAT
Xextern	wchar_t		*wcsncat	__PR((wchar_t *s1, const wchar_t *s2, size_t len));
X#endif
X#ifndef	HAVE_WCSNCMP
Xextern	int		wcsncmp		__PR((const wchar_t *s1, const wchar_t *s2, size_t len));
X#endif
X#ifndef	HAVE_WCSNCPY
Xextern	wchar_t		*wcsncpy	__PR((wchar_t *s1, const wchar_t *s2, size_t len));
X#endif
X#endif	/* FOUND_SIZE_T */
X#ifndef	HAVE_WCSRCHR
Xextern	wchar_t		*wcsrchr	__PR((const wchar_t *s1, wchar_t c));
X#endif
X#endif	/* _SCHILY_WCHAR_H */
X
X#ifndef	HAVE_RENAME
Xextern	int		rename		__PR((const char *old, const char *new));
X#endif
X
X#ifndef	HAVE_EACCESS
Xextern	int		eaccess		__PR((char *name, int mode));
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_LIBPORT_H */
END-of-smake-1.2.1/include/schily/libport.h
echo x - smake-1.2.1/include/schily/librmt.h
sed 's/^X//' >smake-1.2.1/include/schily/librmt.h << 'END-of-smake-1.2.1/include/schily/librmt.h'
X/* @(#)librmt.h	1.20 07/01/16 Copyright 1995,1996,2000-2007 J. Schilling */
X/*
X *	Prototypes for rmt client subroutines
X *
X *	Copyright (c) 1995,1996,2000-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_LIBRMT_H
X#define	_SCHILY_LIBRMT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#include <schily/rmtio.h>
X
X/*
X * remote.c
X */
Xextern	void		rmtinit		__PR((int (*errmsgn)(int, const char *, ...),
X						void (*eexit)(int)));
Xextern	int		rmtdebug	__PR((int dlevel));
Xextern	char		*rmtfilename	__PR((char *name));
Xextern	char		*rmthostname	__PR((char *hostname, int hnsize, char *rmtspec));
Xextern	int		rmtgetconn	__PR((char *host, int trsize, int excode));
Xextern	int		rmtopen		__PR((int fd, char *fname, int fmode));
Xextern	int		rmtclose	__PR((int fd));
Xextern	int		rmtread		__PR((int fd, char *buf, int count));
Xextern	int		rmtwrite	__PR((int fd, char *buf, int count));
Xextern	off_t		rmtseek		__PR((int fd, off_t offset, int whence));
Xextern	int		rmtioctl	__PR((int fd, int cmd, int count));
X#ifdef	MTWEOF
Xextern	int		rmtstatus	__PR((int fd, struct mtget *mtp));
X#endif
Xextern	int		rmtxstatus	__PR((int fd, struct rmtget *mtp));
X#ifdef	MTWEOF
Xextern	void		_rmtg2mtg	__PR((struct mtget *mtp, struct rmtget *rmtp));
Xextern	int		_mtg2rmtg	__PR((struct rmtget *rmtp, struct mtget *mtp));
X#endif
X
X#endif	/* _SCHILY_LIBRMT_H */
END-of-smake-1.2.1/include/schily/librmt.h
echo x - smake-1.2.1/include/schily/maxpath.h
sed 's/^X//' >smake-1.2.1/include/schily/maxpath.h << 'END-of-smake-1.2.1/include/schily/maxpath.h'
X/* @(#)maxpath.h	1.11 09/02/17 Copyright 1985, 1995, 1998, 2001-2009 J. Schilling */
X/*
X *	Definitions for dealing with statically limitations on pathnames
X *
X *	Copyright (c) 1985, 1995, 1998, 2001-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_MAXPATH_H
X#define	_SCHILY_MAXPATH_H
X
X#ifndef	_SCHILY_DIRENT_H
X#include <schily/dirent.h>			/* Includes mconfig.h if needed	    */
X#endif
X
X#ifdef	JOS
X#ifndef	_SCHILY_JOS_MAXP_H
X#	include <schily/jos_maxp.h>
X#endif
X#	ifndef	FOUND_MAXPATHNAME
X#	define	FOUND_MAXPATHNAME
X#	endif
X#	ifndef	FOUND_MAXFILENAME
X#	define	FOUND_MAXFILENAME
X#	endif
X#endif	/* JOS */
X
X#if !defined(FOUND_MAXPATHNAME) && defined(MAXPATHLEN)
X#	define	MAXPATHNAME	MAXPATHLEN	/* From sys/param.h */
X#	define	FOUND_MAXPATHNAME
X#endif
X
X#if !defined(FOUND_MAXPATHNAME) && defined(PATH_MAX)
X#	define	MAXPATHNAME	PATH_MAX	/* From limits.h    */
X#	define	FOUND_MAXPATHNAME
X#endif
X
X#if !defined(FOUND_MAXPATHNAME)
X#include <schily/stdlib.h>
X#endif
X#if !defined(FOUND_MAXPATHNAME) && defined(_MAX_PATH)
X#	define	MAXPATHNAME	_MAX_PATH	/* From MS stdlib.h */
X#	define	FOUND_MAXPATHNAME
X#endif
X
X#if !defined(FOUND_MAXPATHNAME)
X#	define	MAXPATHNAME	256		/* Is there a limit? */
X#endif
X
X#ifndef	PATH_MAX
X#define	PATH_MAX	MAXPATHNAME
X#endif
X
X
X/*
X * Don't use defaults here to allow recognition of problems.
X */
X#if !defined(FOUND_MAXFILENAME) && defined(MAXNAMELEN)
X#	define	MAXFILENAME	MAXNAMELEN	/* From sys/param.h */
X#	define	FOUND_MAXFILENAME
X#endif
X
X#if !defined(FOUND_MAXFILENAME) && defined(MAXNAMLEN)
X#	define	MAXFILENAME	MAXNAMLEN	/* From dirent.h    */
X#	define	FOUND_MAXFILENAME
X#endif
X
X#ifdef	__never__
X/*
X * DIRSIZ(dp) is a parameterized macro, we cannot use it here.
X */
X#if !defined(FOUND_MAXFILENAME) && defined(DIRSIZ)
X#	define	MAXFILENAME	DIRSIZ		/* From sys/dir.h   */
X#	define	FOUND_MAXFILENAME
X#endif
X#endif	/* __never__ */
X
X#if !defined(FOUND_MAXFILENAME) && defined(NAME_MAX)
X#	define	MAXFILENAME	NAME_MAX	/* From limits.h    */
X#	define	FOUND_MAXFILENAME
X#endif
X
X#if !defined(FOUND_MAXFILENAME) && defined(FOUND_DIRSIZE)
X#	define	MAXFILENAME	DIRSIZE		/* From schily/dirent.h    */
X#	define	FOUND_MAXFILENAME
X#endif
X
X#if !defined(FOUND_MAXPATHNAME)
X#include <schily/stdlib.h>
X#endif
X#if !defined(FOUND_MAXFILENAME) && defined(_MAX_FNAME)
X#	define	MAXFILENAME	_MAX_FNAME	/* From MS stdlib.h */
X#	define	FOUND_MAXFILENAME
X#endif
X
X#ifndef	NAME_MAX
X#define	NAME_MAX	MAXFILENAME
X#endif
X#ifndef	MAXNAMLEN
X#define	MAXNAMLEN	MAXFILENAME
X#endif
X
X#endif	/* _SCHILY_MAXPATH_H */
END-of-smake-1.2.1/include/schily/maxpath.h
echo x - smake-1.2.1/include/schily/mconfig.h
sed 's/^X//' >smake-1.2.1/include/schily/mconfig.h << 'END-of-smake-1.2.1/include/schily/mconfig.h'
X/* @(#)mconfig.h	1.66 09/10/17 Copyright 1995-2009 J. Schilling */
X/*
X *	definitions for machine configuration
X *
X *	Copyright (c) 1995-2009 J. Schilling
X *
X *	This file must be included before any other file.
X *	If this file is not included before stdio.h you will not be
X *	able to get LARGEFILE support
X *
X *	Use only cpp instructions.
X *
X *	NOTE: SING: (Schily Is Not Gnu)
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_MCONFIG_H
X#define	_SCHILY_MCONFIG_H
X
X/*
X * Tell our users that this is a Schily SING compile environment.
X */
X#define	IS_SCHILY
X
X/*
X * We need to do this before we include xconfig.h
X */
X#ifdef	NO_LARGEFILES
X#undef	USE_LARGEFILES
X#endif
X#ifdef	NO_ACL
X#undef	USE_ACL
X#endif
X
X/*
X * Inside <schily/archdefs.h> we get architecture specific Processor defines
X * fetched from compiler predefinitions only.
X */
X#include <schily/archdefs.h>
X
X/*
X * Inside <schily/xconfig.h> we decide whether to use static or dynamic
X * autoconf stuff.
X */
X#include <schily/xconfig.h>
X
X/*
X * Make sure that neither HAVE_LARGEFILES nor USE_LARGEFILES is defined
X * if the platform does not support large files.
X */
X#ifndef	HAVE_LARGEFILES
X#undef	USE_LARGEFILES
X#endif
X
X#ifdef __cplusplus
Xextern "C" {
X#endif
X
X/*
X * The NetBSD people want to bother us.
X * They removed the definition for 'unix' and are bleating for every test
X * for #if defined(unix). So we need to check for NetBSD early.
X */
X#ifndef	IS_UNIX
X#	if defined(__NetBSD__)
X#		define	IS_UNIX
X#	endif
X#endif
X
X#ifndef	IS_UNIX
X#	if (defined(unix) || defined(__unix) || defined(__unix__)) && !defined(__DJGPP__)
X#		define	IS_UNIX
X#	endif
X#endif
X
X#ifdef	__MSDOS__
X#	define	IS_MSDOS
X#endif
X
X#if defined(tos) || defined(__tos)
X#	define	IS_TOS
X#endif
X
X#ifdef	THINK_C
X#	define	IS_MAC
X#endif
X
X#if defined(sun) || defined(__sun) || defined(__sun__)
X#	define	IS_SUN
X#endif
X
X#if defined(__CYGWIN32__) || defined(__CYGWIN__)
X#	define	IS_GCC_WIN32
X#	define	IS_CYGWIN
X
X#if	defined(unix) || defined(_X86)
X#	define	IS_CYGWIN_1
X#endif
X#endif
X
X/*--------------------------------------------------------------------------*/
X/*
X * Some magic that cannot (yet) be figured out with autoconf.
X */
X
X#if defined(sun3) || defined(mc68000) || defined(mc68020)
X#	ifndef	HAVE_SCANSTACK
X#	define	HAVE_SCANSTACK
X#	endif
X#endif
X#ifdef sparc
X#	ifndef	HAVE_LDSTUB
X#	define	HAVE_LDSTUB
X#	endif
X#	ifndef	HAVE_SCANSTACK
X#	define	HAVE_SCANSTACK
X#	endif
X#endif
X#if	defined(__i386_) || defined(i386)
X#	ifndef	HAVE_XCHG
X#	define	HAVE_XCHG
X#	endif
X#	ifndef	HAVE_SCANSTACK
X#	define	HAVE_SCANSTACK
X#	endif
X#endif
X
X/*
X * Use of SCANSTACK is disabled by default
X */
X#ifndef	USE_SCANSTACK
X#	undef	HAVE_SCANSTACK
X#else
X/*
X * But ....
X * The tests are much better now, so always give it a chance.
X */
X#ifndef	HAVE_SCANSTACK
X#	define	HAVE_SCANSTACK
X#endif
X#endif
X
X/*
X * Allow to overwrite the defines in the makefiles by calling
X *
X *	make COPTX=-DFORCE_SCANSTACK
X */
X#ifdef	FORCE_SCANSTACK
X#	undef	NO_SCANSTACK
X#ifndef	HAVE_SCANSTACK
X#	define	HAVE_SCANSTACK
X#endif
X#ifndef	USE_SCANSTACK
X#	define	USE_SCANSTACK
X#endif
X#endif
X
X/*
X * This is the global switch to deactivate stack scanning
X */
X#ifdef	NO_SCANSTACK
X#	ifdef	HAVE_SCANSTACK
X#	undef	HAVE_SCANSTACK
X#	endif
X#endif
X
X#ifdef	NO_FORK
X#	ifdef	HAVE_FORK
X#	undef	HAVE_FORK
X#	endif
X#	ifdef	HAVE_VFORK
X#	undef	HAVE_VFORK
X#	endif
X#endif
X#ifdef	NO_VFORK
X#	ifdef	HAVE_VFORK
X#	undef	HAVE_VFORK
X#	endif
X#endif
X
X#if	defined(SOL2) || defined(SOL2) || \
X	defined(S5R4) || defined(__S5R4) || defined(SVR4)
X#	ifndef	__SVR4
X#		define	__SVR4
X#	endif
X#endif
X
X#ifdef	__SVR4
X#	ifndef	SVR4
X#		define	SVR4
X#	endif
X#endif
X
X/*
X * SunOS 4.x / SunOS 5.x
X */
X#if defined(IS_SUN)
X#	define	HAVE_GETAV0
X#endif
X
X/*
X * AIX
X */
X#if	defined(_IBMR2) || defined(_AIX)
X#	ifndef	IS_UNIX
X#	define	IS_UNIX		/* ??? really ??? */
X#	endif
X#endif
X
X/*
X * QNX
X */
X#if defined(__QNX__)
X#	ifndef	IS_UNIX
X#	define	IS_UNIX
X#	endif
X#endif
X
X/*
X * Silicon Graphics	(must be before SVR4)
X */
X#if defined(sgi) || defined(__sgi)
X#	define	__NOT_SVR4__	/* Not a real SVR4 implementation */
X#endif
X
X/*
X * Data General
X */
X#if defined(__DGUX__)
X#ifdef	XXXXXXX
X#	undef	HAVE_MTGET_DSREG
X#	undef	HAVE_MTGET_RESID
X#	undef	HAVE_MTGET_FILENO
X#	undef	HAVE_MTGET_BLKNO
X#endif
X#	define	mt_type		mt_model
X#	define	mt_dsreg	mt_status1
X#	define	mt_erreg	mt_status2
X	/*
X	 * DGUX hides its flock as dg_flock.
X	 */
X#	define	HAVE_FLOCK
X#	define	flock	dg_flock
X	/*
X	 * Use the BSD style wait on DGUX to get the resource usages of child
X	 * processes.
X	 */
X#	define	_BSD_WAIT_FLAVOR
X#endif
X
X/*
X * Apple Rhapsody (This is the name for Mac OS X beta)
X */
X#if defined(__NeXT__) && defined(__TARGET_OSNAME) && __TARGET_OSNAME == rhapsody
X#	define	HAVE_OSDEF /* prevent later definitions to overwrite current */
X#	ifndef	IS_UNIX
X#	define	IS_UNIX
X#	endif
X#endif
X
X/*
X * NextStep
X */
X#if defined(__NeXT__) && !defined(HAVE_OSDEF)
X#define	NO_PRINT_OVR
X#undef	HAVE_USG_STDIO
X				/*
X				 * NeXT Step 3.x uses __flsbuf(unsigned char, FILE *)
X				 * instead of __flsbuf(int, FILE *)
X				 */
X#	ifndef	IS_UNIX
X#	define	IS_UNIX
X#	endif
X#endif
X
X/*
X * Mac OS X
X */
X#if defined(__APPLE__) && defined(__MACH__)
X#	ifndef	IS_UNIX
X#	define	IS_UNIX
X#	endif
X#	define	IS_MACOS_X
X#endif
X
X/*
X * NextStep 3.x has a broken linker that does not allow us to override
X * these functions.
X */
X#ifndef	__OPRINTF__
X
X#ifdef	NO_PRINT_OVR
X#	define	printf	Xprintf
X#	define	fprintf	Xfprintf
X#	define	sprintf	Xsprintf
X#endif
X
X#endif	/* __OPRINTF__ */
X
X/*--------------------------------------------------------------------------*/
X
X#ifndef	_SCHILY_PROTOTYP_H
X#include <schily/prototyp.h>
X#endif
X
X/*
X * We use HAVE_LONGLONG as generalized test on whether "long long", "__in64" or
X * something similar exist.
X *
X * In case that HAVE_LONGLONG is defined here, this is an indication that
X * "long long" works. We define HAVE_LONG_LONG to keep this knowledge.
X */
X#ifdef	HAVE_LONGLONG
X#	define	HAVE_LONG_LONG
X#endif
X
X/*
X * Microsoft C defines _MSC_VER
X * use __int64 instead of long long and use 0i64 for a signed long long const
X * and 0ui64 for an unsigned long long const.
X *
X * #if defined(HAVE___INT64)
X *	use __int64
X * #elif defined(HAVE_LONGLONG)
X *	use long long
X * #endif
X *
X * Be very careful here as older MSVC versions do not implement long long but
X * rather __int64 and once someone makes 'long long' 128 bits on a 64 bit machine,
X * we may need to check for a MSVC __int128 type.
X */
X#ifndef	HAVE_LONGLONG
X#	if	defined(HAVE___INT64)
X#		define	HAVE_LONGLONG
X#	endif
X#endif
X
X/*
X * gcc 2.x generally implements the "long long" type.
X */
X#ifdef	__GNUC__
X#	if	__GNUC__ > 1
X#		ifndef	HAVE_LONGLONG
X#			define	HAVE_LONGLONG
X#		endif
X#		ifndef	HAVE_LONG_LONG
X#			define	HAVE_LONG_LONG
X#		endif
X#	endif
X#endif
X
X#ifdef	__CHAR_UNSIGNED__	/* GNU GCC define (dynamic)	*/
X#ifndef CHAR_IS_UNSIGNED
X#define	CHAR_IS_UNSIGNED	/* Sing Schily define (static)	*/
X#endif
X#endif
X
X/*
X * Convert to GNU name
X */
X#ifdef	HAVE_STDC_HEADERS
X#	ifndef	STDC_HEADERS
X#		define	STDC_HEADERS
X#	endif
X#endif
X/*
X * Convert to SCHILY name
X */
X#ifdef	STDC_HEADERS
X#	ifndef	HAVE_STDC_HEADERS
X#		define	HAVE_STDC_HEADERS
X#	endif
X#endif
X
X#ifdef	IS_UNIX
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'/'
X#	define	PATH_DELIM_STR		"/"
X#	define	PATH_ENV_DELIM		':'
X#	define	PATH_ENV_DELIM_STR	":"
X#	define	far
X#	define	near
X#endif
X
X/*
X * Win32 with Gygwin
X */
X#ifdef	IS_GCC_WIN32
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'/'
X#	define	PATH_DELIM_STR		"/"
X#	define	PATH_ENV_DELIM		':'
X#	define	PATH_ENV_DELIM_STR	":"
X#	define	HAVE_DOS_DRIVELETTER
X#	define	far
X#	define	near
X#	define	NEED_O_BINARY
X#endif
X
X/*
X * Win32 with Mingw32
X */
X#ifdef	__MINGW32__
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'/'
X#	define	PATH_DELIM_STR		"/"
X#	define	PATH_ENV_DELIM		';'
X#	define	PATH_ENV_DELIM_STR	";"
X#	define	HAVE_DOS_DRIVELETTER
X#	define	far
X#	define	near
X#	define	NEED_O_BINARY
X#endif
X
X/*
X * OS/2 EMX
X */
X#ifdef	__EMX__				/* We don't want to call it UNIX */
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'/'
X#	define	PATH_DELIM_STR		"/"
X#	define	PATH_ENV_DELIM		';'
X#	define	PATH_ENV_DELIM_STR	";"
X#	define	HAVE_DOS_DRIVELETTER
X#	define	far
X#	define	near
X#	define	NEED_O_BINARY
X#endif
X
X#ifdef	__BEOS__			/* We don't want to call it UNIX */
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'/'
X#	define	PATH_DELIM_STR		"/"
X#	define	PATH_ENV_DELIM		':'
X#	define	PATH_ENV_DELIM_STR	":"
X#	define	far
X#	define	near
X#endif
X
X/*
X * DOS with DJGPP
X */
X#ifdef	__DJGPP__			/* We don't want to call it UNIX */
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'/'
X#	define	PATH_DELIM_STR		"/"
X#	define	PATH_ENV_DELIM		';'
X#	define	PATH_ENV_DELIM_STR	";"
X#	define	HAVE_DOS_DRIVELETTER
X
X#	define	NEED_O_BINARY
X#endif
X
X/*
X * Vanilla DOS
X */
X#if	defined(IS_MSDOS) && !defined(__DJGPP__)
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'\\'
X#	define	PATH_DELIM_STR		"\\"
X#	define	PATH_ENV_DELIM		';'
X#	define	PATH_ENV_DELIM_STR	";"
X#	define	HAVE_DOS_DRIVELETTER
X
X#	define	NEED_O_BINARY
X#endif
X
X/*
X * ATARI TOS
X */
X#ifdef	IS_TOS
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'\\'
X#	define	PATH_DELIM_STR		"\\"
X#	define	PATH_ENV_DELIM		','
X#	define	PATH_ENV_DELIM_STR	","
X#	define	HAVE_DOS_DRIVELETTER
X#	define	far
X#	define	near
X#endif
X
X/*
X * Mac OS 9
X */
X#ifdef	IS_MAC
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		':'
X#	define	PATH_DELIM_STR		":"
X#	define	PATH_ENV_DELIM		';'	/* ??? */
X#	define	PATH_ENV_DELIM_STR	";"	/* ??? */
X#	define	far
X#	define	near
X#endif
X
X/*
X * I hope this will make compilation on unknown OS easier.
X */
X#ifndef	HAVE_PATH_DELIM			/* Default to POSIX rules */
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'/'
X#	define	PATH_DELIM_STR		"/"
X#	define	PATH_ENV_DELIM		':'
X#	define	PATH_ENV_DELIM_STR	":"
X#	define	far
X#	define	near
X#endif
X
X#ifdef	DBG_MALLOC
X/*
X * We need to include this here already in order to make sure that
X * every program that is based on mconfig.h will include schily/dbgmalloc.h
X * in case that we specify -DDBD_MALLOC
X */
X#include <schily/dbgmalloc.h>
X#endif
X
X#ifdef __cplusplus
X}
X#endif
X
X#endif /* _SCHILY_MCONFIG_H */
END-of-smake-1.2.1/include/schily/mconfig.h
echo x - smake-1.2.1/include/schily/mman.h
sed 's/^X//' >smake-1.2.1/include/schily/mman.h << 'END-of-smake-1.2.1/include/schily/mman.h'
X/* @(#)mman.h	1.4 07/01/16 Copyright 2001-2007 J. Schilling */
X/*
X *	Definitions to be used for mmap()
X *
X *	Copyright (c) 2001-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_MMAN_H
X#define	_SCHILY_MMAN_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#if defined(HAVE_SMMAP)
X
X#ifndef	_INCL_SYS_MMAN_H
X#include <sys/mman.h>
X#define	_INCL_SYS_MMAN_H
X#endif
X
X#ifndef	MAP_ANONYMOUS
X#	ifdef	MAP_ANON
X#	define	MAP_ANONYMOUS	MAP_ANON
X#	endif
X#endif
X
X#ifndef MAP_FILE
X#	define MAP_FILE		0	/* Needed on Apollo Domain/OS */
X#endif
X
X/*
X * Needed for Apollo Domain/OS and may be for others?
X */
X#ifdef	_MMAP_WITH_SIZEP
X#	define	mmap_sizeparm(s)	(&(s))
X#else
X#	define	mmap_sizeparm(s)	(s)
X#endif
X
X#endif	/* defined(HAVE_SMMAP) */
X
X#endif	/* _SCHILY_MMAN_H */
END-of-smake-1.2.1/include/schily/mman.h
echo x - smake-1.2.1/include/schily/mtio.h
sed 's/^X//' >smake-1.2.1/include/schily/mtio.h << 'END-of-smake-1.2.1/include/schily/mtio.h'
X/* @(#)mtio.h	1.5 06/09/13 Copyright 1995,2000-2002 J. Schilling */
X/*
X *	Generic header for users of magnetic tape ioctl interface.
X *
X *	If there is no local mtio.h or equivalent, define
X *	simplified mtio definitions here in order
X *	to be able to do at least remote mtio on systems
X *	that have no local mtio
X *
X *	Copyright (c) 1995,2000-2002 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_MTIO_H
X#define	_SCHILY_MTIO_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_MTIO_H
X
X#include <sys/mtio.h>
X
X#else	/* ! HAVE_SYS_MTIO_H */
X
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * Definitions for magnetic tape io control commands
X */
X
X/*
X * structure for MTIOCTOP - magnetic tape operation command
X */
Xstruct	mtop {
X	short	mt_op;		/* op code (see below)			*/
X	daddr_t	mt_count;	/* repeat count or param		*/
X};
X
X/*
X * op code values for mt_op
X */
X#define	MTWEOF		0	/* write EOF record(s)			*/
X#define	MTFSF		1	/* fwd space over file mark(s)		*/
X#define	MTBSF		2	/* back space over file mark(s) (1/2" only ) */
X#define	MTFSR		3	/* fwd space record(s) (to inter-record gap) */
X#define	MTBSR		4	/* back space record(s) (to inter-record gap)*/
X#define	MTREW		5	/* rewind tape				*/
X#define	MTOFFL		6	/* rewind and put the drive offline	*/
X#define	MTNOP		7	/* no operation (sets status ?)		*/
X
X/*
X * structure for MTIOCGET - magnetic tape get status command
X */
Xstruct	mtget {
X	short	mt_type;	/* type of magnetic tape device		*/
X				/* the next two regs are device dependent */
X	short	mt_dsreg;	/* drive status 'register'		*/
X	short	mt_erreg;	/* error 'register'			*/
X	daddr_t	mt_resid;	/* transfer residual count		*/
X	daddr_t	mt_fileno;	/* file # for current position		*/
X	daddr_t	mt_blkno;	/* block # for current position		*/
X};
X
X#define	HAVE_MTGET_TYPE
X#define	HAVE_MTGET_DSREG
X#define	HAVE_MTGET_ERREG
X#define	HAVE_MTGET_RESID
X#define	HAVE_MTGET_FILENO
X#define	HAVE_MTGET_BLKNO
X
X/*
X * Define some junk here as software may assume that these two definitions
X * are always present.
X */
X#define	MTIOCGET	0x12340001
X#define	MTIOCTOP	0x12340002
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* HAVE_SYS_MTIO_H */
X
X#endif /* _SCHILY_MTIO_H */
END-of-smake-1.2.1/include/schily/mtio.h
echo x - smake-1.2.1/include/schily/nlsdefs.h
sed 's/^X//' >smake-1.2.1/include/schily/nlsdefs.h << 'END-of-smake-1.2.1/include/schily/nlsdefs.h'
X/* @(#)nlsdefs.h	1.3 09/05/23 Copyright 2004-2009 J. Schilling */
X/*
X *	Copyright (c) 2004-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_NLSDEFS_H
X#define	_SCHILY_NLSDEFS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_LIBINTL_H
X#ifndef	_INCL_LIBINTL_H
X#include <libintl.h>		/* gettext() */
X#define	_INCL_LIBINTL_H
X#endif
X#else
X#undef	USE_NLS
X#endif
X
X#ifndef	_SCHILY_LOCALE_H
X#include <schily/locale.h>	/* LC_* definitions */
X#endif
X#ifndef	_INCL_LOCALE_H
X#undef	USE_NLS
X#endif
X
X#ifdef	HAVE_LANGINFO_H
X#ifndef	_INCL_LAGINFO_H
X#include <langinfo.h>		/* YESSTR amnd similar */
X#define	_INCL_LANGINFO_H
X#endif
X#else
X#undef	USE_NLS
X#endif
X
X#ifndef	HAVE_GETTEXT
X#undef	USE_NLS
X#endif
X
X#ifdef	NO_NLS
X#undef	USE_NLS
X#endif
X
X
X#ifndef	USE_NLS
X#undef	gettext
X#define	gettext(s)			s
X#undef	dgettext
X#define	dgettext(d, s)			s
X#undef	dcgettext
X#define	dcgettext(d, s, c)		s
X
X#undef	textdomain
X#define	textdomain(a)			((char *)0)
X#undef	bindtextdomain
X#define	bindtextdomain(d, dir)		((char *)0)
X#undef	bind_textdomain_codeset
X#define	bind_textdomain_codeset(d, c)	((char *)0)
X#endif
X
X#endif	/* _SCHILY_NLSDEFS_H */
END-of-smake-1.2.1/include/schily/nlsdefs.h
echo x - smake-1.2.1/include/schily/patmatch.h
sed 's/^X//' >smake-1.2.1/include/schily/patmatch.h << 'END-of-smake-1.2.1/include/schily/patmatch.h'
X/* @(#)patmatch.h	1.13 09/05/30 Copyright 1985,1993-2009 J. Schilling */
X
X#ifndef	_SCHILY_PATMATCH_H
X#define	_SCHILY_PATMATCH_H
X/*
X *	Definitions for the pattern matching functions.
X *
X *	Copyright (c) 1985,1993-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X/*
X *	The pattern matching functions are based on the algorithm
X *	presented by Martin Richards in:
X *
X *	"A Compact Function for Regular Expression Pattern Matching",
X *	Software-Practice and Experience, Vol. 9, 527-534 (1979)
X *
X *	Several changes have been made to the original source which has been
X *	written in BCPL:
X *
X *	'/'	is replaced by	'!'		(to allow UNIX filenames)
X *	'(',')' are replaced by	'{', '}'
X *	'\''	is replaced by	'\\'		(UNIX compatible quote)
X *
X *	Character classes have been added to allow "[<character list>]"
X *	to be used.
X *	Start of line '^' and end of line '$' have been added.
X *
X *	Any number in the following comment is zero or more occurrencies
X */
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#define	ALT	'!'	/* Alternation in match i.e. this!that!the_other */
X#define	REP	'#'	/* Any number of occurrences of the following expr */
X#define	NIL	'%'	/* Empty string (exactly nothing) */
X#define	STAR	'*'	/* Any number of any character (equivalent of #?) */
X#define	ANY	'?'	/* Any one character */
X#define	QUOTE	'\\'	/* Quotes the next character */
X#define	LBRACK	'{'	/* Begin of precedence grouping */
X#define	RBRACK	'}'	/* End of precedence grouping */
X#define	LCLASS	'['	/* Begin of character set */
X#define	RCLASS	']'	/* End of character set */
X#define	NOT	'^'	/* If first in set: invert set content */
X#define	RANGE	'-'	/* Range notation in sets */
X#define	START	'^'	/* Begin of a line */
X#define	END	'$'	/* End of a line */
X
X/*
X * A list of case statements that may be used for a issimple() or ispattern()
X * funtion that checks whether a string conrtains characters that need the
X * pattern matcher.
X *
X * Note that this list does not contain NOT or RANGE because you need
X * LCLASS and RCLASS in addition.
X */
X#define	casePAT	case ALT: case REP: case NIL: case STAR: case ANY:	\
X		case QUOTE: case LBRACK: case RBRACK:			\
X		case LCLASS: case RCLASS: case START: case END:
X
X
X#define	MAXPAT	128	/* Max length of pattern for opatmatch()/opatlmatch() */
X
Xextern	int	    patcompile	__PR((const unsigned char * __pat, int __patlen, int * __aux));
X
Xextern	unsigned char *opatmatch	__PR((const unsigned char * __pat, const int * __aux,
X						const  unsigned char * __str, int __soff, int __slen,
X						int __alt));
Xextern	unsigned char *opatlmatch __PR((const unsigned char * __pat, const int * __aux,
X						const  unsigned char * __str, int __soff, int __slen,
X						int __alt));
Xextern	unsigned char *patmatch	__PR((const unsigned char * __pat, const int * __aux,
X						const  unsigned char * __str, int __soff, int __slen,
X						int __alt, int __state[]));
Xextern	unsigned char *patlmatch __PR((const unsigned char * __pat, const int * __aux,
X						const  unsigned char * __str, int __soff, int __slen,
X						int __alt, int __state[]));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#ifdef	_SCHILY_WCHAR_H
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern	int	patwcompile	__PR((const wchar_t * __pat, int __patlen, int * __aux));
Xextern	wchar_t	*patwmatch	__PR((const wchar_t * __pat, const int * __aux,
X						const  wchar_t * __str, int __soff, int __slen,
X						int __alt, int __state[]));
Xextern	wchar_t	*patwlmatch	__PR((const wchar_t * __pat, const int * __aux,
X						const  wchar_t * __str, int __soff, int __slen,
X						int __alt, int __state[]));
X
X
X#ifdef	__cplusplus
X}
X#endif
X#endif	/* _SCHILY_WCHAR_H */
X
X#endif	/* _SCHILY_PATMATCH_H */
END-of-smake-1.2.1/include/schily/patmatch.h
echo x - smake-1.2.1/include/schily/prototyp.h
sed 's/^X//' >smake-1.2.1/include/schily/prototyp.h << 'END-of-smake-1.2.1/include/schily/prototyp.h'
X/* @(#)prototyp.h	1.14 09/06/23 Copyright 1995-2009 J. Schilling */
X/*
X *	Definitions for dealing with ANSI / KR C-Compilers
X *
X *	Copyright (c) 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X/*
X * mconfig.h includes prototype.h so we must do this include before we test
X * for _SCHILY_PROTOTYP_H
X */
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_PROTOTYP_H
X#define	_SCHILY_PROTOTYP_H
X
X#include <schily/ccomdefs.h>
X
X#ifndef	PROTOTYPES
X	/*
X	 * If this has already been defined,
X	 * someone else knows better than us...
X	 */
X#	ifdef	__STDC__
X#		if	__STDC__				/* ANSI C */
X#			define	PROTOTYPES
X#		endif
X#		if	defined(sun) && __STDC__ - 0 == 0	/* Sun C */
X#			define	PROTOTYPES
X#		endif
X#	endif
X#endif	/* PROTOTYPES */
X
X#if	!defined(PROTOTYPES) && (defined(__cplusplus) || defined(_MSC_VER))
X	/*
X	 * C++ always supports prototypes.
X	 * Define PROTOTYPES so we are not forced to make
X	 * a separtate autoconf run for C++
X	 *
X	 * Microsoft C has prototypes but does not define __STDC__
X	 */
X#	define	PROTOTYPES
X#endif
X
X/*
X * If we have prototypes, we should have stdlib.h string.h stdarg.h
X */
X#ifdef	PROTOTYPES
X#if	!(defined(SABER) && defined(sun))
X#	ifndef	HAVE_STDARG_H
X#		define	HAVE_STDARG_H
X#	endif
X#endif
X#ifndef	JOS
X#	ifndef	HAVE_STDLIB_H
X#		define	HAVE_STDLIB_H
X#	endif
X#	ifndef	HAVE_STRING_H
X#		define	HAVE_STRING_H
X#	endif
X#	ifndef	HAVE_STDC_HEADERS
X#		define	HAVE_STDC_HEADERS
X#	endif
X#	ifndef	STDC_HEADERS
X#		define	STDC_HEADERS	/* GNU name */
X#	endif
X#endif
X#endif
X
X#ifdef	NO_PROTOTYPES		/* Force not to use prototypes */
X#	undef	PROTOTYPES
X#endif
X
X#ifdef	PROTOTYPES
X#	define	__PR(a)	a
X#else
X#	define	__PR(a)	()
X#endif
X
X#if !defined(PROTOTYPES) && !defined(NO_CONST_DEFINE)
X#	ifndef	const
X#		define	const
X#	endif
X#	ifndef	signed
X#		define	signed
X#	endif
X#	ifndef	volatile
X#		define	volatile
X#	endif
X#endif
X
X#endif	/* _SCHILY_PROTOTYP_H */
END-of-smake-1.2.1/include/schily/prototyp.h
echo x - smake-1.2.1/include/schily/rmtio.h
sed 's/^X//' >smake-1.2.1/include/schily/rmtio.h << 'END-of-smake-1.2.1/include/schily/rmtio.h'
X/* @(#)rmtio.h	1.6 06/09/13 Copyright 1995,2000 J. Schilling */
X/*
X *	Definition for enhanced remote tape IO
X *
X *	Copyright (c) 1995,2000-2002 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_RMTIO_H
X#define	_SCHILY_RMTIO_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef	_SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X
X/*
X * values for mt_op
X */
X#define	RMTWEOF		0	/* write an end-of-file record */
X#define	RMTFSF		1	/* forward space over file mark */
X#define	RMTBSF		2	/* backward space over file mark (1/2" only ) */
X#define	RMTFSR		3	/* forward space to inter-record gap */
X#define	RMTBSR		4	/* backward space to inter-record gap */
X#define	RMTREW		5	/* rewind */
X#define	RMTOFFL		6	/* rewind and put the drive offline */
X#define	RMTNOP		7	/* no operation, sets status only */
X
X#ifdef	__needed__
X#define	MTRETEN		8	/* retension the tape (cartridge tape only) */
X#define	MTERASE		9	/* erase the entire tape */
X#define	MTEOM		10	/* position to end of media */
X#define	MTNBSF		11	/* backward space file to BOF */
X
X#define	MTSRSZ		12	/* set record size */
X#define	MTGRSZ		13	/* get record size */
X#define	MTLOAD		14	/* for loading a tape (use o_delay to open */
X				/* the tape device) */
X#endif
X
X/*
X * Definitions for the new RMT Protocol version 1
X *
X * The new Protocol version tries to make the use
X * of rmtioctl() more portable between different platforms.
X */
X#define	RMTIVERSION	-1	/* Opcode to request version */
X#define	RMT_NOVERSION	-1	/* Old version code */
X#define	RMT_VERSION	1	/* New (current) version code */
X
X/*
X * Support for commands bejond MTWEOF..MTNOP (0..7)
X */
X#define	RMTICACHE	0	/* enable controller cache */
X#define	RMTINOCACHE	1	/* disable controller cache */
X#define	RMTIRETEN	2	/* retension the tape (cartridge tape only) */
X#define	RMTIERASE	3	/* erase the entire tape */
X#define	RMTIEOM		4	/* position to end of media */
X#define	RMTINBSF	5	/* backward space file to BOF */
X
X/*
X * Old MTIOCGET copies a binary version of struct mtget back
X * over the wire. This is highly non portable.
X * MTS_* retrieves ascii versions (%d format) of a single
X * field in the struct mtget.
X * NOTE: MTS_ERREG may only be valid on the first call and
X *	 must be retrived first.
X */
X#define	MTS_TYPE	'T'		/* mtget.mt_type */
X#define	MTS_DSREG	'D'		/* mtget.mt_dsreg */
X#define	MTS_ERREG	'E'		/* mtget.mt_erreg */
X#define	MTS_RESID	'R'		/* mtget.mt_resid */
X#define	MTS_FILENO	'F'		/* mtget.mt_fileno */
X#define	MTS_BLKNO	'B'		/* mtget.mt_blkno */
X#define	MTS_FLAGS	'f'		/* mtget.mt_flags */
X#define	MTS_BF		'b'		/* mtget.mt_bf */
X
X/*
X * structure for remote MTIOCGET - mag tape get status command
X */
Xstruct rmtget	{
X	Llong		mt_type;	/* type of magtape device	    */
X	/* the following two registers are grossly device dependent	    */
X	Llong		mt_dsreg;	/* ``drive status'' register	    */
X	Int32_t		mt_dsreg1;	/* ``drive status'' register	    */
X	Int32_t		mt_dsreg2;	/* ``drive status'' register	    */
X	Llong		mt_gstat;	/* ``generic status'' register	    */
X	Llong		mt_erreg;	/* ``error'' register		    */
X	/* optional error info.						    */
X	Llong		mt_resid;	/* residual count		    */
X	Llong		mt_fileno;	/* file number of current position  */
X	Llong		mt_blkno;	/* block number of current position */
X	Llong		mt_flags;
X	Llong		mt_gflags;	/* generic flags		    */
X	long		mt_bf;		/* optimum blocking factor	    */
X	int		mt_xflags;	/* eXistence flags for struct members */
X};
X
X/*
X * Values for mt_xflags
X */
X#define	RMT_TYPE		0x0001	/* mt_type/mt_model present	*/
X#define	RMT_DSREG		0x0002	/* mt_dsreg present		*/
X#define	RMT_DSREG1		0x0004	/* mt_dsreg1 present		*/
X#define	RMT_DSREG2		0x0008	/* mt_dsreg2 present		*/
X#define	RMT_GSTAT		0x0010	/* mt_gstat present		*/
X#define	RMT_ERREG		0x0020	/* mt_erreg present		*/
X#define	RMT_RESID		0x0040	/* mt_resid present		*/
X#define	RMT_FILENO		0x0080	/* mt_fileno present		*/
X#define	RMT_BLKNO		0x0100	/* mt_blkno present		*/
X#define	RMT_FLAGS		0x0200	/* mt_flags present		*/
X#define	RMT_BF			0x0400	/* mt_bf present		*/
X#define	RMT_COMPAT		0x0800	/* Created from old compat data	*/
X
X/*
X * values for mt_flags
X */
X#define	RMTF_SCSI		0x01
X#define	RMTF_REEL		0x02
X#define	RMTF_ASF		0x04
X#define	RMTF_TAPE_HEAD_DIRTY	0x08
X#define	RMTF_TAPE_CLN_SUPPORTED	0x10
X
X/*
X * these are recommended
X */
X#ifdef	__needed__
X#define	MT_ISQIC	0x32		/* generic QIC tape drive */
X#define	MT_ISREEL	0x33		/* generic reel tape drive */
X#define	MT_ISDAT	0x34		/* generic DAT tape drive */
X#define	MT_IS8MM	0x35		/* generic 8mm tape drive */
X#define	MT_ISOTHER	0x36		/* generic other type of tape drive */
X
X/* more Sun devices */
X#define	MT_ISTAND25G	0x37		/* sun: SCSI Tandberg 2.5 Gig QIC */
X#define	MT_ISDLT	0x38		/* sun: SCSI DLT tape drive */
X#define	MT_ISSTK9840	0x39		/* sun: STK 9840 (Ironsides) */
X#endif
X
X#endif /* _SCHILY_RMTIO_H */
END-of-smake-1.2.1/include/schily/rmtio.h
echo x - smake-1.2.1/include/schily/schily.h
sed 's/^X//' >smake-1.2.1/include/schily/schily.h << 'END-of-smake-1.2.1/include/schily/schily.h'
X/* @(#)schily.h	1.86 09/10/22 Copyright 1985-2009 J. Schilling */
X/*
X *	Definitions for libschily
X *
X *	This file should be included past:
X *
X *	schily/mconfig.h / config.h
X *	schily/standard.h
X *	stdio.h
X *	stdlib.h	(better use schily/stdlib.h)
X *	unistd.h	(better use schily/unistd.h) needed f. LARGEFILE support
X *	schily/string.h
X *	sys/types.h
X *
X *	If you need stdio.h, you must include it before schily/schily.h
X *
X *	NOTE: If you need ctype.h and did not include stdio.h you need to
X *	include ctype.h past schily/schily.h as OpenBSD does not follow POSIX
X *	and defines EOF in ctype.h
X *
X *	Copyright (c) 1985-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_SCHILY_H
X#define	_SCHILY_SCHILY_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef _SCHILY_STANDARD_H
X#include <schily/standard.h>
X#endif
X#ifndef _SCHILY_CCOMDEFS_H
X#include <schily/ccomdefs.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#if	defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_) || defined(off_t)
X#	ifndef	FOUND_OFF_T
X#	define	FOUND_OFF_T
X#	endif
X#endif
X#if	defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_) || defined(size_t)
X#	ifndef	FOUND_SIZE_T
X#	define	FOUND_SIZE_T
X#	endif
X#endif
X#if	defined(_MSC_VER) && !defined(_SIZE_T_DEFINED)
X#	undef	FOUND_SIZE_T
X#endif
X
X#ifdef	__never_def__
X/*
X * It turns out that we cannot use the folloginw definition because there are
X * some platforms that do not behave application friendly. These are mainly
X * BSD-4.4 based systems (which #undef a definition when size_t is available.
X * We actually removed this code because of a problem with QNX Neutrino.
X * For this reason, it is important not to include <sys/types.h> directly but
X * via the Schily SING include files so we know whether it has been included
X * before we come here.
X */
X#if	defined(_SIZE_T)	|| defined(_T_SIZE_)	|| defined(_T_SIZE) || \
X	defined(__SIZE_T)	|| defined(_SIZE_T_)	|| \
X	defined(_GCC_SIZE_T)	|| defined(_SIZET_)	|| \
X	defined(__sys_stdtypes_h) || defined(___int_size_t_h) || defined(size_t)
X
X#ifndef	FOUND_SIZE_T
X#	define	FOUND_SIZE_T	/* We already included a size_t definition */
X#endif
X#endif
X#endif	/* __never_def__ */
X
X#if	defined(HAVE_LARGEFILES)
X#	define	_fcons		_fcons64
X#	define	fdup		fdup64
X#	define	fileluopen	fileluopen64
X#	define	fileopen	fileopen64
X#	define	filemopen	filemopen64
X#	define	filepos		filepos64
X#	define	filereopen	filereopen64
X#	define	fileseek	fileseek64
X#	define	filesize	filesize64
X#	define	filestat	filestat64
X#	define	_openfd		_openfd64
X#endif
X
X/*
X * The official POSIX rule is not to define "new" interfaces that
X * are in conflict with older interfaces of the same name.
X * Our interfaces fexec*() have been defined and published in 1982.
X * The new POSIX interfaces define a different interface and the
X * new POSIX interfaces even use names that are not compatible with
X * POSIX rules. The new POSIX interfaces in question should be called
X * fdexec*() to follow the rules of other similar POSIX functions.
X * Simiar problems exist with getline()/fgetline().
X */
X#if	defined(HAVE_RAW_FEXECL) || defined(HAVE_RAW_FEXECLE) || \
X	defined(HAVE_RAW_FEXECV) || defined(HAVE_RAW_FEXECVE)
X#define	RENAME_FEXEC
X#endif
X#if	defined(HAVE_RAW_FSPAWNV) || defined(HAVE_RAW_FSPAWNL) || \
X	defined(HAVE_RAW_FSPAWNV_NOWAIT)
X#define	RENAME_FSPAWN
X#endif
X#if	defined(HAVE_RAW_GETLINE) || defined(HAVE_RAW_FGETLINE)
X#define	RENAME_GETLINE
X#endif
X
X#ifdef	__needed__
X#define	RENAME_FEXEC
X#define	RENAME_FSPAWN
X#define	RENAME_GETLINE
X#endif
X
X#if	defined(RENAME_FEXEC) || defined(RENAME_FSPAWN)
X#ifndef	_SCHILY_UNISTD_H
X#include <schily/unistd.h>	/* Need to include before fexec*() protoypes */
X#endif
X#endif
X
X#if	defined(RENAME_GETLINE)
X#ifndef _SCHILY_STDIO_H
X#include <schily/stdio.h>	/* Need to include before *getline() protoypes */
X#endif
X
X#endif
X
X#ifdef	RENAME_FEXEC
X#define	fexecl		js_fexecl
X#define	fexecle		js_fexecle
X#define	fexecv		js_fexecv
X#define	fexecve		js_fexecve
X#endif
X#ifdef	RENAME_FSPAWN
X#define	fspawnv		js_fspawnv
X#define	fspawnv_nowait	js_fspawnv_nowait
X#define	fspawnl		js_fspawnl
X#endif
X#ifdef	RENAME_GETLINE
X#define	getline		js_getline
X#define	fgetline	js_fgetline
X#endif
X
X#ifdef	EOF	/* stdio.h has been included */
X
Xextern	int	_cvmod __PR((const char *, int *, int *));
Xextern	FILE	*_fcons __PR((FILE *, int, int));
Xextern	FILE	*fdup __PR((FILE *));
X#if	!defined(fdown) || defined(PROTOTYPES)
X/*
X * We cannot declare fdown() with K&R in case that fdown() has been #define'd
X */
Xextern	int	fdown __PR((FILE *));
X#endif
Xextern	int	fexecl __PR((const char *, FILE *, FILE *, FILE *,
X							const char *, ...));
Xextern	int	fexecle __PR((const char *, FILE *, FILE *, FILE *,
X							const char *, ...));
X		/* 6th arg not const, fexecv forces av[ac] = NULL */
Xextern	int	fexecv __PR((const char *, FILE *, FILE *, FILE *, int,
X							char **));
Xextern	int	fexecve __PR((const char *, FILE *, FILE *, FILE *,
X					char * const *, char * const *));
Xextern	int	fspawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
Xextern	int	fspawnl __PR((FILE *, FILE *, FILE *, const char *, ...));
Xextern	int	fspawnv_nowait __PR((FILE *, FILE *, FILE *,
X					const char *, int, char *const*));
Xextern	int	fgetline __PR((FILE *, char *, int));
Xextern	int	fgetstr __PR((FILE *, char *, int));
Xextern	int	file_getraise __PR((FILE *));
Xextern	void	file_raise __PR((FILE *, int));
Xextern	int	fileclose __PR((FILE *));
Xextern	FILE	*fileluopen __PR((int, const char *));
Xextern	FILE	*fileopen __PR((const char *, const char *));
X#ifdef	_SCHILY_TYPES_H
Xextern	FILE	*filemopen __PR((const char *, const char *, mode_t));
X#endif
X#ifdef	FOUND_OFF_T
Xextern	off_t	filepos __PR((FILE *));
X#endif
X#ifdef	FOUND_SIZE_T
Xextern	ssize_t	fileread __PR((FILE *, void *, size_t));
Xextern	ssize_t	ffileread __PR((FILE *, void *, size_t));
X#endif
Xextern	FILE	*filereopen __PR((const char *, const char *, FILE *));
X#ifdef	FOUND_OFF_T
Xextern	int	fileseek __PR((FILE *, off_t));
Xextern	off_t	filesize __PR((FILE *));
X#endif
X#ifdef	S_IFMT
Xextern	int	filestat __PR((FILE *, struct stat *));
X#endif
X#ifdef	FOUND_SIZE_T
Xextern	ssize_t	filewrite __PR((FILE *, void *, size_t));
Xextern	ssize_t	ffilewrite __PR((FILE *, void *, size_t));
X#endif
Xextern	int	flush __PR((void));
Xextern	int	fpipe __PR((FILE **));
X/*extern	int	fprintf __PR((FILE *, const char *, ...)) __printflike__(2, 3);*/
Xextern	int	getbroken __PR((FILE *, char *, char, char **, int));
Xextern	int	ofindline __PR((FILE *, char, const char *, int,
X							char **, int));
Xextern	int	peekc __PR((FILE *));
X
X#ifdef	__never_def__
X/*
X * We cannot define this or we may get into problems with DOS based systems.
X */
Xextern	int	spawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
Xextern	int	spawnl __PR((FILE *, FILE *, FILE *, const char *, ...));
Xextern	int	spawnv_nowait __PR((FILE *, FILE *, FILE *,
X					const char *, int, char *const*));
X#endif	/* __never_def__ */
X#endif	/* EOF */
X
X#ifdef	_SCHILY_UTYPES_H
Xtypedef struct gnmult {
X	char	key;
X	Llong	mult;
X} gnmult_t;
X
Xextern	int	getllnum __PR((char *arg, Llong *lvalp));
Xextern	int	getxnum	 __PR((char *arg, long *valp, gnmult_t *mult));
Xextern	int	getllxnum __PR((char *arg, Llong *lvalp, gnmult_t *mult));
X
Xextern	int	getlltnum  __PR((char *arg, Llong *lvalp));
Xextern	int	getxtnum  __PR((char *arg, time_t *valp, gnmult_t *mult));
Xextern	int	getllxtnum __PR((char *arg, Llong *lvalp, gnmult_t *mult));
X#endif
Xextern	int	getnum	__PR((char *arg, long *valp));
X#ifdef	_SCHILY_TYPES_H
Xextern	int	gettnum	__PR((char *arg, time_t *valp));
X#endif
X
X#ifdef	EOF			/* stdio.h has been included */
X#ifdef	_SCHILY_TYPES_H
X/*
X * getperm() flags:
X */
X#define	GP_NOX		0	/* This is not a dir and 'X' is not valid */
X#define	GP_DOX		1	/* 'X' perm character is valid		  */
X#define	GP_XERR		2	/* 'X' perm characters are invalid	  */
X#define	GP_FPERM	4	/* TRUE if we implement find -perm	  */
X
Xextern	int	getperm	__PR((FILE *f, char *perm, char *opname, \
X				mode_t *modep, int smode, int flag));
X#endif
X#endif
X
X#ifdef	FOUND_SIZE_T
Xextern	ssize_t	_niread __PR((int, void *, size_t));
Xextern	ssize_t	_niwrite __PR((int, void *, size_t));
Xextern	ssize_t	_nixread __PR((int, void *, size_t));
Xextern	ssize_t	_nixwrite __PR((int, void *, size_t));
X#endif
Xextern	int	_openfd __PR((const char *, int));
Xextern	int	on_comerr __PR((void (*fun)(int, void *), void *arg));
X/*PRINTFLIKE1*/
Xextern	void	comerr __PR((const char *, ...)) __printflike__(1, 2);
X/*PRINTFLIKE2*/
Xextern	void	comerrno __PR((int, const char *, ...)) __printflike__(2, 3);
X/*PRINTFLIKE1*/
Xextern	int	errmsg __PR((const char *, ...)) __printflike__(1, 2);
X/*PRINTFLIKE2*/
Xextern	int	errmsgno __PR((int, const char *, ...)) __printflike__(2, 3);
X#ifdef	FOUND_SIZE_T
X/*PRINTFLIKE3*/
Xextern	int	serrmsg __PR((char *, size_t, const char *, ...)) __printflike__(3, 4);
X/*PRINTFLIKE4*/
Xextern	int	serrmsgno __PR((int, char *, size_t, const char *, ...)) __printflike__(4, 5);
X#endif
Xextern	void	comexit	__PR((int));
Xextern	char	*errmsgstr __PR((int));
X
X#ifdef	EOF	/* stdio.h has been included */
X/*PRINTFLIKE2*/
Xextern	void	fcomerr		__PR((FILE *, const char *, ...)) __printflike__(2, 3);
X/*PRINTFLIKE3*/
Xextern	void	fcomerrno	__PR((FILE *, int, const char *, ...)) __printflike__(3, 4);
X/*PRINTFLIKE2*/
Xextern	int	ferrmsg		__PR((FILE *, const char *, ...)) __printflike__(2, 3);
X/*PRINTFLIKE3*/
Xextern	int	ferrmsgno	__PR((FILE *, int, const char *, ...)) __printflike__(3, 4);
X#ifdef	_SCHILY_VARARGS_H
X/*PRINTFLIKE4*/
Xextern	int	_comerr		__PR((FILE *, int, int, const char *, va_list));
X#endif
X#endif
X
X/*PRINTFLIKE1*/
Xextern	int	error __PR((const char *, ...)) __printflike__(1, 2);
X#ifdef	FOUND_SIZE_T
Xextern	char	*fillbytes __PR((void *, ssize_t, char));
Xextern	char	*findbytes __PR((const void *, ssize_t, char));
X#endif
Xextern	char	*findinpath __PR((char *__name, int __mode, BOOL __plain_file));
Xextern	int	findline __PR((const char *, char, const char *,
X							int, char **, int));
Xextern	int	getline __PR((char *, int));
Xextern	int	getstr __PR((char *, int));
Xextern	int	breakline __PR((char *, char, char **, int));
Xextern	int	getallargs __PR((int *, char * const**, const char *, ...));
Xextern	int	getargs __PR((int *, char * const**, const char *, ...));
Xextern	int	getfiles __PR((int *, char * const**, const char *));
Xextern	char	*astoi __PR((const char *, int *));
Xextern	char	*astol __PR((const char *, long *));
Xextern	char	*astolb __PR((const char *, long *, int base));
X#ifdef	_SCHILY_UTYPES_H
Xextern	char	*astoll __PR((const char *, Llong *));
Xextern	char	*astollb __PR((const char *, Llong *, int));
Xextern	char	*astoull __PR((const char *, Ullong *));
Xextern	char	*astoullb __PR((const char *, Ullong *, int));
X#endif
X
X/*extern	void	handlecond __PR((const char *, SIGBLK *, int(*)(const char *, long, long), long));*/
X/*extern	void	unhandlecond __PR((SIGBLK *));*/
X
Xextern	int		patcompile __PR((const unsigned char *, int, int *));
Xextern	unsigned char	*patmatch __PR((const unsigned char *, const int *,
X					const unsigned char *, int, int, int, int[]));
Xextern	unsigned char	*patlmatch __PR((const unsigned char *, const int *,
X					const unsigned char *, int, int, int, int[]));
X
X/*extern	int	printf __PR((const char *, ...)) __printflike__(1, 2);*/
X#ifdef	FOUND_SIZE_T
Xextern	char	*movebytes __PR((const void *, void *, ssize_t));
X#endif
X
Xextern	void	save_args __PR((int, char **));
Xextern	int	saved_ac __PR((void));
Xextern	char	**saved_av __PR((void));
Xextern	char	*saved_av0 __PR((void));
X#ifndef	seterrno
Xextern	int	seterrno __PR((int));
X#endif
Xextern	void	set_progname __PR((const char *));
Xextern	char	*get_progname __PR((void));
X
Xextern	void	setfp __PR((void * const *));
Xextern	int	wait_chld __PR((int));		/* for fspawnv_nowait() */
Xextern	int	geterrno __PR((void));
Xextern	void	raisecond __PR((const char *, long));
X#ifdef	FOUND_SIZE_T
X/*
X * We currently cannot define this here because there IXIX has a definition
X * than violates the standard.
X */
X#ifndef	HAVE_SNPRINTF
X/*PRINTFLIKE3*/
Xextern	int	snprintf __PR((char *, size_t, const char *, ...)) __printflike__(3, 4);
X#endif
X#endif
X/*extern	int	sprintf __PR((char *, const char *, ...)); ist woanders falsch deklariert !!!*/
Xextern	char	*strcatl __PR((char *, ...));
Xextern	int	streql __PR((const char *, const char *));
X#ifdef	_SCHILY_WCHAR_H
Xextern	wchar_t	*wcscatl __PR((wchar_t *, ...));
Xextern	int	wcseql __PR((const wchar_t *, const wchar_t *));
X#endif
X#ifdef	va_arg
Xextern	int	format __PR((void (*)(char, long), long, const char *, va_list));
X#else
Xextern	int	format __PR((void (*)(char, long), long, const char *, void *));
X#endif
X
Xextern	int	ftoes __PR((char *, double, int, int));
Xextern	int	ftofs __PR((char *, double, int, int));
X
X#ifdef	EOF	/* stdio.h has been included */
X/*PRINTFLIKE2*/
Xextern	int	js_fprintf	__PR((FILE *, const char *, ...)) __printflike__(2, 3);
X/*PRINTFLIKE1*/
Xextern	int	js_printf	__PR((const char *, ...)) __printflike__(1, 2);
X#ifdef	FOUND_SIZE_T
X/*PRINTFLIKE3*/
Xextern	int	js_snprintf	__PR((char *, size_t, const char *, ...)) __printflike__(3, 4);
X#endif
X/*PRINTFLIKE2*/
Xextern	int	js_sprintf	__PR((char *, const char *, ...)) __printflike__(2, 3);
X#endif	/* EOF */
X
X#ifdef	FOUND_SIZE_T
Xextern	void	swabbytes	__PR((void *, ssize_t));
X#endif
Xextern	char	**getmainfp	__PR((void));
Xextern	char	**getavp	__PR((void));
Xextern	char	*getav0		__PR((void));
Xextern	void	**getfp		__PR((void));
Xextern	int	flush_reg_windows __PR((int));
X#ifdef	FOUND_SIZE_T
Xextern	ssize_t	cmpbytes	__PR((const void *, const void *, ssize_t));
Xextern	ssize_t	cmpnullbytes	__PR((const void *, ssize_t));
X#endif
X
X#ifdef	nonono
X#if	defined(HAVE_LARGEFILES)
X/*
X * To allow this, we need to figure out how to do autoconfiguration for off64_t
X */
Xextern	FILE	*_fcons64	__PR((FILE *, int, int));
Xextern	FILE	*fdup64		__PR((FILE *));
Xextern	FILE	*fileluopen64	__PR((int, const char *));
Xextern	FILE	*fileopen64	__PR((const char *, const char *));
X#ifdef	FOUND_OFF_T
Xextern	off64_t	filepos64	__PR((FILE *));
X#endif
Xextern	FILE	*filereopen64	__PR((const char *, const char *, FILE *));
X#ifdef	FOUND_OFF_T
Xextern	int	fileseek64	__PR((FILE *, off64_t));
Xextern	off64_t	filesize64	__PR((FILE *));
X#endif
X#ifdef	S_IFMT
Xextern	int	filestat64	__PR((FILE *, struct stat *));
X#endif
Xextern	int	_openfd64	__PR((const char *, int));
X#endif
X#endif
X
X#ifdef	SCHILY_PRINT
X#undef	fprintf
X#define	fprintf		js_fprintf
X#undef	printf
X#define	printf		js_printf
X#undef	snprintf
X#define	snprintf	js_snprintf
X#undef	sprintf
X#define	sprintf		js_sprintf
X#else
X#ifndef	HAVE_SNPRINTF
X#undef	snprintf
X#define	snprintf	js_snprintf
X#endif
X#endif
X
X
X#ifdef	FOUND_SIZE_T
Xextern	void	*js_malloc	__PR((size_t size, char *msg));
Xextern	void	*js_realloc	__PR((void *ptr, size_t size, char *msg));
X#endif
Xextern	char	*js_savestr	__PR((const char *s));
X
X#ifdef	_SCHILY_JMPDEFS_H
X
X/*
X * Special valued for the "jmp" parameter.
X */
X#define	JM_EXIT		((sigjmps_t *)-1) /* Call comexit(errno) instead of siglongjmp() */
X#define	JM_RETURN	((sigjmps_t *)0)  /* Return instead of calling siglongjmp() */
X
X#ifdef	FOUND_SIZE_T
Xextern	void	*js_jmalloc	__PR((size_t size, char *msg, sigjmps_t *jmp));
Xextern	void	*js_jrealloc	__PR((void *ptr, size_t size, char *msg, sigjmps_t *jmp));
X#endif
Xextern	char	*js_jsavestr	__PR((const char *s, sigjmps_t *jmp));
X
X#ifdef	EOF	/* stdio.h has been included */
X#ifdef	FOUND_SIZE_T
Xextern	void	*js_fjmalloc	__PR((FILE *f, size_t size, char *msg, sigjmps_t *jmp));
Xextern	void	*js_fjrealloc	__PR((FILE *f, void *ptr, size_t size, char *msg, sigjmps_t *jmp));
X#endif
Xextern	char	*js_fjsavestr	__PR((FILE *f, const char *s, sigjmps_t *jmp));
X#endif	/* EOF */
X#endif	/* _SCHILY_JMPDEFS_H */
X
X#define	___malloc	js_malloc
X#define	___realloc	js_realloc
X#define	___savestr	js_savestr
X#define	__jmalloc	js_jmalloc
X#define	__jrealloc	js_jrealloc
X#define	__jsavestr	js_jsavestr
X#define	__fjmalloc	js_fjmalloc
X#define	__fjrealloc	js_fjrealloc
X#define	__fjsavestr	js_fjsavestr
X
X#ifdef	__cplusplus
X}
X#endif
X
X#if defined(_JOS) || defined(JOS)
X#	ifndef	_SCHILY_JOS_IO_H
X#	include <schily/jos_io.h>
X#	endif
X#endif
X
X#if !defined(_SCHILY_LIBPORT_H) && !defined(NO_LIBPORT_H)
X#include <schily/libport.h>
X#endif
X#if !defined(_SCHILY_HOSTNAME_H) && defined(USE_HOSTNAME_H)
X#include <schily/hostname.h>
X#endif
X
X#endif	/* _SCHILY_SCHILY_H */
END-of-smake-1.2.1/include/schily/schily.h
echo x - smake-1.2.1/include/schily/sigblk.h
sed 's/^X//' >smake-1.2.1/include/schily/sigblk.h << 'END-of-smake-1.2.1/include/schily/sigblk.h'
X/* @(#)sigblk.h	1.12 08/12/24 Copyright 1985, 1995-2008 J. Schilling */
X/*
X *	software signal block definition
X *
X *	Copyright (c) 1985, 1995-2008 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SIGBLK_H
X#define	_SCHILY_SIGBLK_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xtypedef struct sigblk {
X	long		**sb_savfp;	/* Real saved framepointer	*/
X	struct sigblk	*sb_signext;	/* Next sw signal blk for this func */
X	short		sb_siglen;	/* Strlen for sb_signame	*/
X	const char	*sb_signame;	/* Name of software signal	*/
X
X					/* sb_sigfun: function to call	*/
X	int		(*sb_sigfun)	__PR((const char *, long, long));
X
X	long		sb_sigarg;	/* Second arg for sb_sigfun	*/
X} SIGBLK;
X
X/*
X * The handler function is called with three arguments:
X *
X *	1)	The name of the software signal
X *	2)	The argument from the handlecond() call
X *	3)	The argument from the raisecond() call
X */
Xtypedef	int	(*handlefunc_t)		__PR((const char *, long, long));
X
Xextern	void	handlecond		__PR((const char *, SIGBLK *,
X					    int(*)(const char *, long, long),
X									long));
Xextern	void	raisecond		__PR((const char *, long));
Xextern	void	starthandlecond		__PR((SIGBLK *));
Xextern	void	unhandlecond		__PR((SIGBLK *));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_SIGBLK_H */
END-of-smake-1.2.1/include/schily/sigblk.h
echo x - smake-1.2.1/include/schily/signal.h
sed 's/^X//' >smake-1.2.1/include/schily/signal.h << 'END-of-smake-1.2.1/include/schily/signal.h'
X/* @(#)signal.h	1.8 09/06/30 Copyright 1997-2009 J. Schilling */
X/*
X *	Signal abstraction for signals
X *
X *	Copyright (c) 1997-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SIGNAL_H
X#define	_SCHILY_SIGNAL_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SIGNAL_H
X#ifndef	_INCL_SIGNAL_H
X#include <signal.h>
X#define	_INCL_SIGNAL_H
X#endif
X#endif
X
X#endif	/* _SCHILY_SIGNAL_H */
END-of-smake-1.2.1/include/schily/signal.h
echo x - smake-1.2.1/include/schily/standard.h
sed 's/^X//' >smake-1.2.1/include/schily/standard.h << 'END-of-smake-1.2.1/include/schily/standard.h'
X/* @(#)standard.h	1.37 09/10/22 Copyright 1985-2007 J. Schilling */
X/*
X *	standard definitions
X *
X *	This file should be included past:
X *
X *	mconfig.h / config.h
X *	stdio.h
X *	stdlib.h	(better use schily/stdlib.h)
X *	unistd.h	(better use schily/unistd.h) needed f. LARGEFILE support
X *
X *	If you need stdio.h, you must include it before standard.h
X *
X *	Copyright (c) 1985-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_STANDARD_H
X#define	_SCHILY_STANDARD_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	M68000
X#	ifndef	tos
X#		define	JOS	1
X#	endif
X#endif
X
X/*
X *	fundamental constants
X */
X#ifndef	NULL
X#	define	NULL		0
X#endif
X#ifndef	TRUE
X#	define	TRUE		1
X#	define	FALSE		0
X#endif
X
X/*
X *	Program exit codes
X */
X#define	EX_BAD			(-1)
X
X/*
X *	standard storage class definitions
X */
X#define	GLOBAL	extern
X#define	IMPORT	extern
X#define	EXPORT
X#define	INTERN	static
X#define	LOCAL	static
X#define	FAST	register
X
X#ifndef	PROTOTYPES
X#	ifndef	const
X#		define	const
X#	endif
X#	ifndef	signed
X#		define	signed
X#	endif
X#	ifndef	volatile
X#		define	volatile
X#	endif
X#endif	/* PROTOTYPES */
X
X/*
X *	standard type definitions
X *
X *	The hidden Schily BOOL definition is used in case we need to deal
X *	with other BOOL defines on systems we like to port to.
X */
Xtypedef int __SBOOL;
Xtypedef int BOOL;
X#ifdef	JOS
X#	ifndef	__GNUC__
X#	define	NO_VOID
X#	endif
X#endif
X#ifdef	NO_VOID
X#	ifndef	lint
X		typedef int void;
X#	endif
X#endif
X
X#if	defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_) || defined(off_t)
X#	ifndef	FOUND_OFF_T
X#	define	FOUND_OFF_T
X#	endif
X#endif
X#if	defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_) || defined(size_t)
X#	ifndef	FOUND_SIZE_T
X#	define	FOUND_SIZE_T
X#	endif
X#endif
X#if	defined(_MSC_VER) && !defined(_SIZE_T_DEFINED)
X#	undef	FOUND_SIZE_T
X#endif
X
X#ifdef	__never_def__
X/*
X * It turns out that we cannot use the folloginw definition because there are
X * some platforms that do not behave application friendly. These are mainly
X * BSD-4.4 based systems (which #undef a definition when size_t is available.
X * We actually removed this code because of a problem with QNX Neutrino.
X * For this reason, it is important not to include <sys/types.h> directly but
X * via the Schily SING include files so we know whether it has been included
X * before we come here.
X */
X#if	defined(_SIZE_T)	|| defined(_T_SIZE_)	|| defined(_T_SIZE) || \
X	defined(__SIZE_T)	|| defined(_SIZE_T_)	|| \
X	defined(_GCC_SIZE_T)	|| defined(_SIZET_)	|| \
X	defined(__sys_stdtypes_h) || defined(___int_size_t_h) || defined(size_t)
X
X#ifndef	FOUND_SIZE_T
X#	define	FOUND_SIZE_T	/* We already included a size_t definition */
X#endif
X#endif
X#endif	/* __never_def__ */
X
X#if defined(_JOS) || defined(JOS)
X#	ifndef	_SCHILY_SCHILY_H
X#	include <schily/schily.h>
X#	endif
X
X#	ifndef	_SCHILY_JOS_DEFS_H
X#	include <schily/jos_defs.h>
X#	endif
X
X#	ifndef	_SCHILY_JOS_IO_H
X#	include <schily/jos_io.h>
X#	endif
X#endif
X
X#endif	/* _SCHILY_STANDARD_H */
END-of-smake-1.2.1/include/schily/standard.h
echo x - smake-1.2.1/include/schily/stat.h
sed 's/^X//' >smake-1.2.1/include/schily/stat.h << 'END-of-smake-1.2.1/include/schily/stat.h'
X/* @(#)stat.h	1.14 09/12/31 Copyright 1998-2007 J. Schilling */
X/*
X *	Definitions for stat() file mode
X *
X *	Copyright (c) 1998-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_STAT_H
X#define	_SCHILY_STAT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>	/* Needed for sys/stat.h		*/
X#endif
X#ifndef	_INCL_SYS_STAT_H
X#include <sys/stat.h>		/* For S_IS* and S_IF*			*/
X#define	_INCL_SYS_STAT_H
X#endif
X
X/*
X * Apollo Domain/OS has a broken sys/stat.h that defines
X * S_IFIFO == S_IFSOCK and creates trouble if the constants
X * are used as case labels.
X */
X#if S_IFIFO == S_IFSOCK
X#	undef	S_IFSOCK
X#endif
X
X#ifdef	STAT_MACROS_BROKEN
X#undef	S_ISFIFO			/* Named pipe		*/
X#undef	S_ISCHR				/* Character special	*/
X#undef	S_ISMPC				/* UNUSED multiplexed c	*/
X#undef	S_ISDIR				/* Directory		*/
X#undef	S_ISNAM				/* Named file (XENIX)	*/
X#undef	S_ISBLK				/* Block special	*/
X#undef	S_ISMPB				/* UNUSED multiplexed b	*/
X#undef	S_ISREG				/* Regular file		*/
X#undef	S_ISCNT				/* Contiguous file	*/
X#undef	S_ISLNK				/* Symbolic link	*/
X#undef	S_ISSHAD			/* Solaris shadow inode	*/
X#undef	S_ISSOCK			/* UNIX domain socket	*/
X#undef	S_ISDOOR			/* Solaris DOOR		*/
X#undef	S_ISPORT			/* Solaris event port	*/
X#undef	S_ISWHT				/* BSD whiteout		*/
X#undef	S_ISEVC				/* UNOS eventcount	*/
X#endif
X
X#ifndef	S_ISFIFO			/* 1 Named pipe		*/
X#	ifdef	S_IFIFO
X#		define	S_ISFIFO(m)	(((m) & S_IFMT) == S_IFIFO)
X#	else
X#		define	S_ISFIFO(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISCHR				/* 2 Character special	*/
X#	ifdef	S_IFCHR
X#		define	S_ISCHR(m)	(((m) & S_IFMT) == S_IFCHR)
X#	else
X#		define	S_ISCHR(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISMPC				/* 3 UNUSED multiplexed char	*/
X#	ifdef	S_IFMPC
X#		define	S_ISMPC(m)	(((m) & S_IFMT) == S_IFMPC)
X#	else
X#		define	S_ISMPC(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISDIR				/* 4 Directory			*/
X#	ifdef	S_IFDIR
X#		define	S_ISDIR(m)	(((m) & S_IFMT) == S_IFDIR)
X#	else
X#		define	S_ISDIR(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISNAM				/* 5 Named file (XENIX)		*/
X#	ifdef	S_IFNAM
X#		define	S_ISNAM(m)	(((m) & S_IFMT) == S_IFNAM)
X#	else
X#		define	S_ISNAM(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISBLK				/* 6 Block special		*/
X#	ifdef	S_IFBLK
X#		define	S_ISBLK(m)	(((m) & S_IFMT) == S_IFBLK)
X#	else
X#		define	S_ISBLK(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISMPB				/* 7 UNUSED multiplexed block	*/
X#	ifdef	S_IFMPB
X#		define	S_ISMPB(m)	(((m) & S_IFMT) == S_IFMPB)
X#	else
X#		define	S_ISMPB(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISREG				/* 8 Regular file		*/
X#	ifdef	S_IFREG
X#		define	S_ISREG(m)	(((m) & S_IFMT) == S_IFREG)
X#	else
X#		define	S_ISREG(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISCNT				/* 9 Contiguous file		*/
X#	ifdef	S_IFCNT
X#		define	S_ISCNT(m)	(((m) & S_IFMT) == S_IFCNT)
X#	else
X#		define	S_ISCNT(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISLNK				/* 10 Symbolic link		*/
X#	ifdef	S_IFLNK
X#		define	S_ISLNK(m)	(((m) & S_IFMT) == S_IFLNK)
X#	else
X#		define	S_ISLNK(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISSHAD			/* 11 Solaris shadow inode	*/
X#	ifdef	S_IFSHAD
X#		define	S_ISSHAD(m)	(((m) & S_IFMT) == S_IFSHAD)
X#	else
X#		define	S_ISSHAD(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISSOCK			/* 12 UNIX domain socket	*/
X#	ifdef	S_IFSOCK
X#		define	S_ISSOCK(m)	(((m) & S_IFMT) == S_IFSOCK)
X#	else
X#		define	S_ISSOCK(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISDOOR			/* 13 Solaris DOOR		*/
X#	ifdef	S_IFDOOR
X#		define	S_ISDOOR(m)	(((m) & S_IFMT) == S_IFDOOR)
X#	else
X#		define	S_ISDOOR(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISPORT			/* 14 Solaris event port	*/
X#	ifdef	S_IFPORT
X#		define	S_ISPORT(m)	(((m) & S_IFMT) == S_IFPORT)
X#	else
X#		define	S_ISPORT(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISWHT				/* 14 BSD whiteout		*/
X#	ifdef	S_IFWHT
X#		define	S_ISWHT(m)	(((m) & S_IFMT) == S_ISWHT)
X#	else
X#		define	S_ISWHT(m)	(0)
X#	endif
X#endif
X#ifndef	S_IFEVC				/* 15 UNOS eventcount		*/
X#	ifdef	S_IFEVC
X#		define	S_ISEVC(m)	(((m) & S_IFMT) == S_IFEVC)
X#	else
X#		define	S_ISEVC(m)	(0)
X#	endif
X#endif
X
X#ifndef	S_TYPEISMQ
X/*
X * XXX ??? where is a definition of a message queue ???
X */
X#		define	S_TYPEISMQ(_stbuf)	(0)
X#endif
X#ifndef	S_TYPEISSEM
X#	ifdef	S_INSEM
X#		define	S_TYPEISSEM(_stbuf)	(S_ISNAM((_stbuf)->st_mode) && (_stbuf)->st_rdev == S_INSEM)
X#	else
X#		define	S_TYPEISSEM(_stbuf)	(0)
X#	endif
X#endif
X#ifndef	S_TYPEISSHM
X#	ifdef	S_INSHD
X#		define	S_TYPEISSHM(_stbuf)	(S_ISNAM((_stbuf)->st_mode) && (_stbuf)->st_rdev == S_INSHD)
X#	else
X#		define	S_TYPEISSHM(_stbuf)	(0)
X#	endif
X#endif
X
X/*
X * Mode permission bits.
X * UNIX V.7 has only	S_ISUID/S_ISGID/S_ISVTX and S_IREAD/S_IWRITE/S_IEXEC
X */
X#ifndef	S_ISUID			/* Set-user-ID on execution */
X#define	S_ISUID	0		/* If it is not defined, it is not supported */
X#endif
X#ifndef	S_ISGID			/* Set-group-ID on execution */
X#define	S_ISGID	0		/* If it is not defined, it is not supported */
X#endif
X#ifndef	S_ISVTX			/* On directories, restricted deletion flag */
X#define	S_ISVTX	0		/* If it is not defined, it is not supported */
X#endif
X
X#ifndef	S_IRUSR			/* Read permission, owner */
X#ifdef	S_IREAD
X#define	S_IRUSR	S_IREAD		/* Needed on old UNIX systems */
X#else
X#define	S_IRUSR	0400
X#endif
X#endif
X#ifndef	S_IWUSR			/* Write permission, owner */
X#ifdef	S_IWRITE
X#define	S_IWUSR	S_IWRITE	/* Needed on old UNIX systems */
X#else
X#define	S_IWUSR	0200
X#endif
X#endif
X#ifndef	S_IXUSR			/* Execute/search permission, owner */
X#ifdef	S_IEXEC
X#define	S_IXUSR	S_IEXEC		/* Needed on old UNIX systems */
X#else
X#define	S_IXUSR	0100
X#endif
X#endif
X#ifndef	S_IRGRP			/* Read permission, group */
X#ifdef	S_IREAD
X#define	S_IRGRP	(S_IREAD >> 3)	/* Needed on old UNIX systems */
X#else
X#define	S_IRGRP	040
X#endif
X#endif
X#ifndef	S_IWGRP			/* Write permission, group */
X#ifdef	S_IWRITE
X#define	S_IWGRP	(S_IWRITE >> 3)	/* Needed on old UNIX systems */
X#else
X#define	S_IWGRP	020
X#endif
X#endif
X#ifndef	S_IXGRP			/* Execute/search permission, group */
X#ifdef	S_IEXEC
X#define	S_IXGRP	(S_IEXEC >> 3)	/* Needed on old UNIX systems */
X#else
X#define	S_IXGRP	010
X#endif
X#endif
X#ifndef	S_IROTH			/* Read permission, others */
X#ifdef	S_IREAD
X#define	S_IROTH	(S_IREAD >> 6)	/* Needed on old UNIX systems */
X#else
X#define	S_IROTH	004
X#endif
X#endif
X#ifndef	S_IWOTH			/* Write permission, others */
X#ifdef	S_IWRITE
X#define	S_IWOTH	(S_IWRITE >> 6)	/* Needed on old UNIX systems */
X#else
X#define	S_IWOTH	002
X#endif
X#endif
X#ifndef	S_IXOTH			/* Execute/search permission, others */
X#ifdef	S_IEXEC
X#define	S_IXOTH	(S_IEXEC >> 6)	/* Needed on old UNIX systems */
X#else
X#define	S_IXOTH	001
X#endif
X#endif
X
X#ifndef	S_IRWXU			/* Read, write, execute/search by owner */
X#define	S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
X#endif
X#ifndef	S_IRWXG			/* Read, write, execute/search by group */
X#define	S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
X#endif
X#ifndef	S_IRWXO			/* Read, write, execute/search by others */
X#define	S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
X#endif
X
X/*
X * SCO UnixWare has st_atim.st__tim.tv_nsec but the st_atim.tv_nsec tests also
X * succeeds. If we use st_atim.tv_nsec on UnixWare, we get a warning about
X * illegal structure usage. For this reason, our code needs to have
X * #ifdef HAVE_ST__TIM before #ifdef HAVE_ST_NSEC.
X */
X#if	defined(HAVE_ST_ATIMENSEC)
X
X#define	stat_ansecs(s)		((s)->st_atimensec)
X#define	stat_mnsecs(s)		((s)->st_mtimensec)
X#define	stat_cnsecs(s)		((s)->st_ctimensec)
X
X#define	_FOUND_STAT_NSECS_
X#endif
X
X#if	defined(HAVE_ST_ATIME_N)
X
X#define	stat_ansecs(s)		((s)->st_atime_n)
X#define	stat_mnsecs(s)		((s)->st_mtime_n)
X#define	stat_cnsecs(s)		((s)->st_ctime_n)
X
X#define	_FOUND_STAT_NSECS_
X#endif
X
X#if	defined(HAVE_ST__TIM) && !defined(_FOUND_STAT_NSECS_)
X
X#define	stat_ansecs(s)		((s)->st_atim.st__tim.tv_nsec)
X#define	stat_mnsecs(s)		((s)->st_mtim.st__tim.tv_nsec)
X#define	stat_cnsecs(s)		((s)->st_ctim.st__tim.tv_nsec)
X
X#define	_FOUND_STAT_NSECS_
X#endif
X
X#if	defined(HAVE_ST_NSEC) && !defined(_FOUND_STAT_NSECS_)
X
X#define	stat_ansecs(s)		((s)->st_atim.tv_nsec)
X#define	stat_mnsecs(s)		((s)->st_mtim.tv_nsec)
X#define	stat_cnsecs(s)		((s)->st_ctim.tv_nsec)
X
X#define	_FOUND_STAT_NSECS_
X#endif
X
X#if	defined(HAVE_ST_ATIMESPEC) && !defined(_FOUND_STAT_NSECS_)
X
X#define	stat_ansecs(s)		((s)->st_atimespec.tv_nsec)
X#define	stat_mnsecs(s)		((s)->st_mtimespec.tv_nsec)
X#define	stat_cnsecs(s)		((s)->st_ctimespec.tv_nsec)
X
X#define	_FOUND_STAT_NSECS_
X#endif
X
X/*
X * st_spare1 is last as some implementations keep backwards
X * compatibility although there is one of the nsec implementations.
X */
X#if	defined(HAVE_ST_SPARE1) && !defined(_FOUND_STAT_NSECS_)
X
X#define	stat_ansecs(s)		((s)->st_spare1 * 1000)
X#define	stat_mnsecs(s)		((s)->st_spare2 * 1000)
X#define	stat_cnsecs(s)		((s)->st_spare3 * 1000)
X
X#define	_FOUND_STAT_USECS_
X#define	_FOUND_STAT_NSECS_
X#endif
X
X#if	!defined(_FOUND_STAT_NSECS_)
X#define	stat_ansecs(s)		(0)
X#define	stat_mnsecs(s)		(0)
X#define	stat_cnsecs(s)		(0)
X#endif
X
X#endif	/* _SCHILY_STAT_H */
END-of-smake-1.2.1/include/schily/stat.h
echo x - smake-1.2.1/include/schily/stdlib.h
sed 's/^X//' >smake-1.2.1/include/schily/stdlib.h << 'END-of-smake-1.2.1/include/schily/stdlib.h'
X/* @(#)stdlib.h	1.7 06/09/13 Copyright 1996 J. Schilling */
X/*
X *	Definitions for stdlib
X *
X *	Copyright (c) 1996 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_STDLIB_H
X#define	_SCHILY_STDLIB_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_STDLIB_H
X#ifndef	_INCL_STDLIB_H
X#include <stdlib.h>
X#define	_INCL_STDLIB_H
X#endif
X#else
X
Xextern	char	*malloc();
Xextern	char	*realloc();
X
Xextern	double	atof();
X
X#endif	/* HAVE_STDLIB_H */
X
X#ifndef	EXIT_FAILURE
X#define	EXIT_FAILURE	1
X#endif
X#ifndef	EXIT_SUCCESS
X#define	EXIT_SUCCESS	0
X#endif
X#ifndef	RAND_MAX
X#define	RAND_MAX	32767
X#endif
X
X#endif	/* _SCHILY_STDLIB_H */
END-of-smake-1.2.1/include/schily/stdlib.h
echo x - smake-1.2.1/include/schily/stkframe.h
sed 's/^X//' >smake-1.2.1/include/schily/stkframe.h << 'END-of-smake-1.2.1/include/schily/stkframe.h'
X/* @(#)stkframe.h	1.12 09/01/06 Copyright 1995-2009 J. Schilling */
X/*
X * Common definitions for routines that parse the stack frame.
X *
X * This file has to be fixed if you want to port routines which use getfp().
X * Have a look at struct frame below and use it as a sample,
X * the new struct frame must at least contain a member 'fr_savfp'.
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_STKFRAME_H
X#define	_SCHILY_STKFRAME_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#if defined(sun) && (defined(SVR4) || defined(__SVR4) || defined(__SVR4__))
X	/*
X	 * Solaris 2.x aka SunOS 5.x
X	 */
X#	ifdef	i386
X		/*
X		 * On Solaris 2.1 x86 sys/frame.h is not useful at all
X		 * On Solaris 2.4 x86 sys/frame.h is buggy (fr_savfp is int!!)
X		 */
X#		ifndef	_INCL_SYS_REG_H
X#		include <sys/reg.h>
X#		define	_INCL_SYS_REG_H
X#		endif
X#	endif
X#	ifndef	_INCL_SYS_FRAME_H
X#	include <sys/frame.h>
X#	define	_INCL_SYS_FRAME_H
X#	endif
X
X#else
X# if	defined(sun)
X	/*
X	 * SunOS 4.x
X	 */
X#	ifndef	_INCL_MACHINE_FRAME_H
X#	include <machine/frame.h>
X#	define	_INCL_MACHINE_FRAME_H
X#	endif
X# else
X	/*
X	 * Anything that is not SunOS
X	 */
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifndef	_SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X
X/*
X * XXX: I hope this will be useful on other machines (no guarantee)
X * XXX: It is taken from a sun Motorola system, but should also be useful
X * XXX: on a i386.
X * XXX: In general you have to write a sample program, set a breakpoint
X * XXX: on a small function and inspect the stackframe with adb.
X */
X
Xstruct frame {
X	struct frame	*fr_savfp;	/* saved frame pointer */
X	Intptr_t	fr_savpc;	/* saved program counter */
X	int		fr_arg[1];	/* array of arguments */
X};
X
X#ifdef	__cplusplus
X}
X#endif
X
X# endif	/* ! defined (sun) */
X#endif	/* ! defined (sun) && (defined(SVR4) || defined(__SVR4) || defined(__SVR4__)) */
X
X#endif	/* _SCHILY_STKFRAME_H */
END-of-smake-1.2.1/include/schily/stkframe.h
echo x - smake-1.2.1/include/schily/string.h
sed 's/^X//' >smake-1.2.1/include/schily/string.h << 'END-of-smake-1.2.1/include/schily/string.h'
X/* @(#)string.h	1.10 06/10/10 Copyright 1996 J. Schilling */
X/*
X *	Definitions for strings
X *
X *	Copyright (c) 1996 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_STRING_H
X#define	_SCHILY_STRING_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * It may be that IBM's AIX has problems when doing
X * #include <string.h>
X * #include <strings.h>
X * So I moved the #include <strings.h> to the top. As the file strings.h
X * defines strcasecmp() we may need it...
X *
X * Note that the only real problem appears if we use rubbish FSF based code that
X * #defines _NO_PROTO
X */
X#ifdef	HAVE_STRINGS_H
X#ifndef	_INCL_STRINGS_H
X#include <strings.h>
X#define	_INCL_STRINGS_H
X#endif
X#endif	/* HAVE_STRINGS_H */
X
X
X#ifdef	HAVE_STRING_H
X#ifndef	_INCL_STRING_H
X#include <string.h>
X#define	_INCL_STRING_H
X#endif
X#else	/* HAVE_STRING_H */
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifndef NULL
X#define	NULL	0
X#endif
X
Xextern void *memcpy	__PR((void *, const void *, int));
Xextern void *memmove	__PR((void *, const void *, int));
Xextern char *strcpy	__PR((char *, const char *));
Xextern char *strncpy	__PR((char *, const char *, int));
X
Xextern char *strcat	__PR((char *, const char *));
Xextern char *strncat	__PR((char *, const char *, int));
X
Xextern int memcmp	__PR((const void *, const void *, int));
Xextern int strcmp	__PR((const char *, const char *));
Xextern int strcoll	__PR((const char *, const char *));
Xextern int strncmp	__PR((const char *, const char *, int));
Xextern int strxfrm	__PR((char *, const char *, int));
X
Xextern void *memchr	__PR((const void *, int, int));
Xextern char *strchr	__PR((const char *, int));
X
Xextern int strcspn	__PR((const char *, const char *));
X/*#pragma int_to_unsigned strcspn*/
X
Xextern char *strpbrk	__PR((const char *, const char *));
Xextern char *strrchr	__PR((const char *, int));
X
Xextern int strspn	__PR((const char *, const char *));
X/*#pragma int_to_unsigned strspn*/
X
Xextern char *strstr	__PR((const char *, const char *));
Xextern char *strtok	__PR((char *, const char *));
Xextern void *memset	__PR((void *, int, int));
Xextern char *strerror	__PR((int));
X
Xextern int strlen	__PR((const char *));
X/*#pragma int_to_unsigned strlen*/
X
Xextern void *memccpy	__PR((void *, const void *, int, int));
X
Xextern int strcasecmp	__PR((const char *, const char *));
Xextern int strncasecmp	__PR((const char *, const char *, int));
X
X/*#define	index	strchr*/
X/*#define	rindex	strrchr*/
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* HAVE_STRING_H */
X
X#endif	/* _SCHILY_STRING_H */
END-of-smake-1.2.1/include/schily/string.h
echo x - smake-1.2.1/include/schily/termcap.h
sed 's/^X//' >smake-1.2.1/include/schily/termcap.h << 'END-of-smake-1.2.1/include/schily/termcap.h'
X/* @(#)termcap.h	1.8 06/10/10 Copyright 1995 J. Schilling */
X/*
X *	Copyright (c) 1995 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_TERMCAP_H
X#define	_SCHILY_TERMCAP_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_STANDARD_H
X#include <schily/standard.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * Flags for tcsetflags()
X */
X#define	TCF_NO_TC		0x0001	/* Don't follow tc= entries */
X#define	TCF_NO_SIZE		0x0002	/* Don't get actual ttysize (li#/co#)*/
X#define	TCF_NO_STRIP		0x0004	/* Don't strip down termcap buffer */
X
Xextern	char	PC;		/* Pad character */
Xextern	char	*BC;		/* Backspace if not "\b" from "bc" capability*/
Xextern	char	*UP;		/* Cursor up string from "up" capability */
Xextern	short	ospeed;		/* output speed coded as in ioctl */
X
Xextern	int	tgetent		__PR((char *bp, char *name));
Xextern	int	tcsetflags	__PR((int flags));
Xextern	char	*tcgetbuf	__PR((void));
Xextern	int	tgetnum		__PR((char *ent));
Xextern	BOOL	tgetflag	__PR((char *ent));
Xextern	char	*tgetstr		__PR((char *ent, char **array));
Xextern	char	*tdecode		__PR((char *ep, char **array));
X
Xextern	int	tputs		__PR((char *cp, int affcnt, int (*outc)(int c)));
Xextern	char	*tgoto		__PR((char *cm, int destcol, int destline));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_TERMCAP_H */
END-of-smake-1.2.1/include/schily/termcap.h
echo x - smake-1.2.1/include/schily/termios.h
sed 's/^X//' >smake-1.2.1/include/schily/termios.h << 'END-of-smake-1.2.1/include/schily/termios.h'
X/* @(#)termios.h	1.32 09/07/21 Copyright 1984-2007 J. Schilling */
X/*
X *	Terminal driver tty mode handling
X *
X *	Copyright (c) 1984-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X
X#ifndef	_SCHILY_TERMIOS_H
X#define	_SCHILY_TERMIOS_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X#ifndef	_SCHILY_UNISTD_H
X#include <schily/unistd.h>	/* Haiku needs this for _POSIX_VDISABLE */
X#endif
X
X#ifdef	JOS
X#	include <ttymodes.h>
X#	include <spfcode.h>
X#else
X#ifdef	HAVE_TERMIOS_H
X#	include <termios.h>
X#	define	_INCL_TERMIOS_H
X#	ifdef TIOCGETA				/* FreeBSD */
X#		define	TCGETS	TIOCGETA
X#		define	TCSETSW	TIOCSETAW
X#	endif
X#	ifdef TCGETATTR
X#		define	TCGETS	TCGETATTR
X#		define	TCSETSW	TCSETATTRD
X#	endif
X#else
X#	ifdef	HAVE_TERMIO_H
X#		include	<termio.h>
X#		define	_INCL_TERMIO_H
X#		ifndef	TCGETS
X#		define	termios	termio
X#		define	TCGETS	TCGETA
X#		define	TCSETSW	TCSETAW
X#		endif
X#	else
X#		define	USE_V7_TTY
X#	endif
X#endif
X#endif
X
X#if !defined(HAVE_TCGETATTR) || !defined(HAVE_TCSETATTR)
X#	undef	TCSANOW
X#endif
X
X#ifndef	TCSANOW
X#	if	!defined(TCGETS) || !defined(TCSETSW)
X#		define	USE_V7_TTY
X#	endif
X#endif
X
X#if !defined(_INCL_TERMIOS_H) && !defined(_INCL_TERMIO_H)
X#	include	<schily/ioctl.h>
X#endif
X
X#ifdef	HAVE_SYS_BSDTTY_H
X#include <sys/bsdtty.h>
X#endif
X
X#if	!defined(TIOCGWINSZ) && ! defined(TIOCGSIZE)
X#	include	<schily/ioctl.h>
X#endif
X
X#ifndef	OXTABS					/* OS/2 EMX */
X#define	OXTABS	0
X#endif
X#ifndef	XTABS
X#	ifndef	TAB3				/* FreeBSD */
X#	define	TABDLY	OXTABS
X#	define	XTABS	OXTABS
X#	else
X#	define	XTABS	TAB3
X#	endif
X#endif
X#ifndef	ONLCR					/* OS/2 EMX */
X#define	ONLCR	0
X#endif
X#ifndef	OCRNL					/* FreeBSD */
X#	define	OCRNL	0
X#endif
X#ifndef	ONLRET					/* FreeBSD */
X#	define	ONLRET	0
X#endif
X#ifndef	_POSIX_VDISABLE
X#	define	_POSIX_VDISABLE	0
X#endif
X
X#endif	/* _SCHILY_TERMIOS_H */
END-of-smake-1.2.1/include/schily/termios.h
echo x - smake-1.2.1/include/schily/time.h
sed 's/^X//' >smake-1.2.1/include/schily/time.h << 'END-of-smake-1.2.1/include/schily/time.h'
X/* @(#)time.h	1.18 07/04/25 Copyright 1996-2007 J. Schilling */
X/*
X *	Generic header for users of time(), gettimeofday() ...
X *
X *	It includes definitions for time_t, struct timeval, ...
X *
X *	Copyright (c) 1996-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_TIME_H
X#define	_SCHILY_TIME_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>	/* Needed for time_t		*/
X#endif
X
X#ifdef	TIME_WITH_SYS_TIME
X#	ifndef	_INCL_SYS_TIME_H
X#	include <sys/time.h>
X#	define	_INCL_SYS_TIME_H
X#	endif
X#	ifndef	_INCL_TIME_H
X#	include <time.h>
X#	define	_INCL_TIME_H
X#	endif
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	ifndef	_INCL_SYS_TIME_H
X#	include <sys/time.h>
X#	define	_INCL_SYS_TIME_H
X#	endif
X#else
X#	ifndef	_INCL_TIME_H
X#	include <time.h>
X#	define	_INCL_TIME_H
X#	endif
X#endif
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifdef	timerclear
X/*
X * With MSVC timerclear / struct timeval present in case that
X * winsock2.h has been included before.
X */
X#undef	HAVE_STRUCT_TIMEVAL
X#define	HAVE_STRUCT_TIMEVAL	1
X#endif
X
X#ifndef	HAVE_STRUCT_TIMEVAL
X
Xstruct timeval {
X	long	tv_sec;
X	long	tv_usec;
X};
X#endif
X
X#ifndef	HAVE_STRUCT_TIMEZONE
X
Xstruct timezone {
X	int	tz_minuteswest;
X	int	tz_dsttime;
X};
X#endif
X
X#undef	timerclear
X#define	timerclear(tvp)		(tvp)->tv_sec = (tvp)->tv_usec = 0
X
X#undef	timerfix
X#define	timerfix1(tvp)		while ((tvp)->tv_usec < 0) {		\
X					(tvp)->tv_sec--;		\
X					(tvp)->tv_usec += 1000000;	\
X				}
X
X#define	timerfix2(tvp)		while ((tvp)->tv_usec > 1000000) {	\
X					(tvp)->tv_sec++;		\
X					(tvp)->tv_usec -= 1000000;	\
X				}
X
X#define	timerfix(tvp)		do { timerfix1(tvp); timerfix2(tvp); } while (0)
X
X/*
X * timersub() and timeradd() are defined on FreeBSD with a different
X * interface (3 parameters).
X */
X#undef	timersub
X#define	timersub(tvp1, tvp2)	do {					\
X					(tvp1)->tv_sec -= (tvp2)->tv_sec; \
X					(tvp1)->tv_usec -= (tvp2)->tv_usec; \
X					timerfix1(tvp1); timerfix2(tvp1); \
X				} while (0)
X
X#undef	timeradd
X#define	timeradd(tvp1, tvp2)	do {					\
X					(tvp1)->tv_sec += (tvp2)->tv_sec; \
X					(tvp1)->tv_usec += (tvp2)->tv_usec; \
X					timerfix1(tvp1); timerfix2(tvp1); \
X				} while (0)
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_TIME_H */
END-of-smake-1.2.1/include/schily/time.h
echo x - smake-1.2.1/include/schily/unistd.h
sed 's/^X//' >smake-1.2.1/include/schily/unistd.h << 'END-of-smake-1.2.1/include/schily/unistd.h'
X/* @(#)unistd.h	1.21 09/07/27 Copyright 1996-2009 J. Schilling */
X/*
X *	Definitions for unix system interface
X *
X *	Copyright (c) 1996-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_UNISTD_H
X#define	_SCHILY_UNISTD_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * unistd.h grants things like off_t to be typedef'd.
X */
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#ifdef	HAVE_UNISTD_H
X
X#ifndef	_INCL_UNISTD_H
X#include <unistd.h>
X#define	_INCL_UNISTD_H
X#endif
X
X#ifndef	_SC_PAGESIZE
X#ifdef	_SC_PAGE_SIZE	/* HP/UX & OSF */
X#define	_SC_PAGESIZE	_SC_PAGE_SIZE
X#endif
X#endif
X
X#else	/* !HAVE_UNISTD_H */
X#ifndef	_SCHILY_STDLIB_H
X#include <schily/stdlib.h>	/* MSVC: no unistd.h environ is in stdlib.h */
X#endif
X#endif	/* !HAVE_UNISTD_H */
X
X/*
X * MSVC has getcwd()/chdir()/mkdir()/rmdir() in direct.h
X */
X#if defined(_MSC_VER) && defined(HAVE_DIRECT_H)
X#ifndef	_INCL_DIRECT_H
X#include <direct.h>
X#define	_INCL_DIRECT_H
X#endif
X#endif
X
X/*
X * MSVC has size_t in stddef.h
X */
X#ifdef HAVE_STDDEF_H
X#ifndef	_INCL_STDDEF_H
X#include <stddef.h>
X#define	_INCL_STDDEF_H
X#endif
X#endif
X
X#ifndef	STDIN_FILENO
X#	ifdef	JOS
X#		ifndef	_SCHILY_JOS_IO_H
X#		include <schily/jos_io.h>
X#		endif
X#	else
X#		define	STDIN_FILENO	0
X#		define	STDOUT_FILENO	1
X#		define	STDERR_FILENO	2
X#	endif
X#endif
X
X#ifndef	R_OK
X/* Symbolic constants for the "access" routine: */
X#define	R_OK	4	/* Test for Read permission */
X#define	W_OK	2	/* Test for Write permission */
X#define	X_OK	1	/* Test for eXecute permission */
X#define	F_OK	0	/* Test for existence of File */
X#endif
X#ifndef	E_OK
X#ifdef	HAVE_ACCESS_E_OK
X#ifdef	EFF_ONLY_OK
X#define	E_OK	EFF_ONLY_OK /* Irix */
X#else
X#ifdef	EUID_OK
X#define	E_OK	EUID_OK	/* UNICOS (0400) */
X#else
X#define	E_OK	010	/* Test effective uids */
X#endif	/* EUID_OK */
X#endif	/* EFF_ONLY_OK */
X#else
X#define	E_OK	0
X#endif	/* HAVE_ACCESS_E_OK */
X#endif	/* !E_OK */
X
X/* Symbolic constants for the "lseek" routine: */
X#ifndef	SEEK_SET
X#define	SEEK_SET	0	/* Set file pointer to "offset" */
X#endif
X#ifndef	SEEK_CUR
X#define	SEEK_CUR	1	/* Set file pointer to current plus "offset" */
X#endif
X#ifndef	SEEK_END
X#define	SEEK_END	2	/* Set file pointer to EOF plus "offset" */
X#endif
X
X#ifndef	HAVE_ENVIRON_DEF
Xextern	char	**environ;
X#endif
X
X#if	!defined(HAVE_UNISTD_H) || !defined(_POSIX_VERSION)
X/*
X * Maybe we need a lot more definitions here...
X * It is not clear whether we should have prototyped definitions.
X */
Xextern	int	access	__PR((const char *, int));
Xextern	int	close	__PR((int));
Xextern	int	dup	__PR((int));
Xextern	int	dup2	__PR((int, int));
X#ifndef	_MSC_VER
X/*
X * MS C comes with broken prototypes in wrong header files (in our case, the
X * wrong prototype is in stdlib.h). Avoid to redefine the broken MS stuff with
X * correct prototypes.
X */
Xextern	void	_exit	__PR((int));
X#endif
Xextern	int	link	__PR((const char *, const char *));
Xextern	int	read	__PR((int, void *, size_t));
Xextern	int	unlink	__PR((const char *));
Xextern	int	write	__PR((int, const void *, size_t));
X#endif
X
X#endif	/* _SCHILY_UNISTD_H */
END-of-smake-1.2.1/include/schily/unistd.h
echo x - smake-1.2.1/include/schily/param.h
sed 's/^X//' >smake-1.2.1/include/schily/param.h << 'END-of-smake-1.2.1/include/schily/param.h'
X/* @(#)param.h	1.5 09/07/14 Copyright 2006-2007 J. Schilling */
X/*
X *	Abstraction from sys/param.h
X *
X *	Copyright (c) 2006-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_PARAM_H
X#define	_SCHILY_PARAM_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * Let us include system defined types first.
X */
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X#ifndef	_SCHILY_LIMITS_H
X#include <schily/limits.h>	/* For _SC_CLK_TCK */
X#endif
X#ifndef	_SCHILY_UNISTD_H
X#include <schily/unistd.h>	/* For _SC_CLK_TCK */
X#endif
X
X#ifdef	HAVE_SYS_PARAM_H
X#ifndef	_INCL_SYS_PARAM_H
X#include <sys/param.h>
X#define	_INCL_SYS_PARAM_H
X#endif
X#endif
X
X#ifndef	NBBY
X#define	NBBY		8	/* Number of bits per byte */
X#endif
X
X#ifndef	DEV_BSIZE
X#define	DEV_BSIZE	512	/* UNIX Device Block size */
X#endif
X
X/*
X * NODEV may be in sys/param.h keep this definition past the include.
X */
X#ifndef	NODEV
X#define	NODEV	((dev_t)-1L)
X#endif
X
X#ifndef	HZ
X#if	defined(_SC_CLK_TCK)
X#define	HZ	((clock_t)sysconf(_SC_CLK_TCK))
X#else
X#define	HZ	100
X#endif
X#endif
X
X#endif	/* _SCHILY_PARAM_H */
END-of-smake-1.2.1/include/schily/param.h
echo x - smake-1.2.1/include/schily/utime.h
sed 's/^X//' >smake-1.2.1/include/schily/utime.h << 'END-of-smake-1.2.1/include/schily/utime.h'
X/* @(#)utime.h	1.8 07/01/16 Copyright 2001-2007 J. Schilling */
X/*
X *	Defines for utimes() / utime()
X *
X *	Copyright (c) 2001-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_UTIME_H
X#define	_SCHILY_UTIME_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#ifdef	HAVE_UTIMES
X#ifndef _SCHILY_TIME_H
X#include <schily/time.h>
X#endif
X#endif
X
X#ifdef	HAVE_UTIME_H
X#ifndef	_INCL_UTIME_H
X#include <utime.h>
X#define	_INCL_UTIME_H
X#endif
X#else
X#ifdef	HAVE_SYS_UTIME_H
X#ifndef	_INCL_SYS_UTIME_H
X#include <sys/utime.h>
X#define	_INCL_SYS_UTIME_H
X#endif
X#else
Xstruct utimbuf {
X	time_t	actime;
X	time_t	modtime;
X};
X#endif
X#endif
X
X#ifdef	__comment__
X/*
X * file.c contains this
X * I am not sure if it is really needed.
X * It may be a good idea to add a test for HAVE_STRUCT_UTIMBUF
X * as in gnutar.
X */
X#if (__COHERENT__ >= 0x420)
X# include <sys/utime.h>
X#else
X#  include <utime.h>
X#endif
X
X#endif	/* __comment__ */
X
X
X#endif	/* _SCHILY_UTIME_H */
END-of-smake-1.2.1/include/schily/utime.h
echo x - smake-1.2.1/include/schily/utypes.h
sed 's/^X//' >smake-1.2.1/include/schily/utypes.h << 'END-of-smake-1.2.1/include/schily/utypes.h'
X/* @(#)utypes.h	1.29 09/11/05 Copyright 1997-2009 J. Schilling */
X/*
X *	Definitions for some user defined types
X *
X *	Copyright (c) 1997-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_UTYPES_H
X#define	_SCHILY_UTYPES_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * Let us include system defined types too.
X */
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X/*
X * Include limits.h for CHAR_BIT
X */
X#ifndef	_SCHILY_LIMITS_H
X#include <schily/limits.h>
X#endif
X
X/*
X * Do we need to define _XOPEN_SOURCE to get NZERO?
X * On Linux, it is needed but on Linux NZERO is 20.
X */
X#ifndef	NZERO		/* for nice(2) */
X#define	NZERO	20
X#endif
X
X/*
X * Include sys/param.h for NBBY
X */
X#ifndef	_SCHILY_PARAM_H
X#include <schily/param.h>
X#endif
X
X#ifndef	CHAR_BIT
X#ifdef	NBBY
X#define	CHAR_BIT	NBBY
X#endif
X#endif
X
X#ifndef	CHAR_BIT
X#define	CHAR_BIT	8
X#endif
X
X/*
X * These macros may not work on all platforms but as we depend
X * on two's complement in many places, they do not reduce portability.
X * The macros below work with 2s complement and ones complement machines.
X * Verify with this table...
X *
X *	Bits	1's c.	2's complement.
X * 	100	-3	-4
X * 	101	-2	-3
X * 	110	-1	-2
X * 	111	-0	-1
X * 	000	+0	 0
X * 	001	+1	+1
X * 	010	+2	+2
X * 	011	+3	+3
X *
X * Computing -TYPE_MINVAL(type) will not work on 2's complement machines
X * if 'type' is int or more. Use -(UIntmax_t)TYPE_MINVAL(type), it works
X * for both 1's complement and 2's complement machines.
X */
X#define	TYPE_ISSIGNED(t)	(((t)-1) < ((t)0))
X#define	TYPE_ISUNSIGNED(t)	(!TYPE_ISSIGNED(t))
X#define	TYPE_MSBVAL(t)		((t)(~((t)0) << (sizeof (t)*CHAR_BIT - 1)))
X#define	TYPE_MINVAL(t)		(TYPE_ISSIGNED(t)			\
X				    ? TYPE_MSBVAL(t)			\
X				    : ((t)0))
X#define	TYPE_MAXVAL(t)		((t)(~((t)0) - TYPE_MINVAL(t)))
X
X/*
X * MSVC has size_t in stddef.h
X */
X#ifdef HAVE_STDDEF_H
X#ifndef	_INCL_STDDEF_H
X#include <stddef.h>
X#define	_INCL_STDDEF_H
X#endif
X#endif
X
X#ifdef	__CHAR_UNSIGNED__	/* GNU GCC define (dynamic)	*/
X#ifndef CHAR_IS_UNSIGNED
X#define	CHAR_IS_UNSIGNED	/* Sing Schily define (static)	*/
X#endif
X#endif
X
X/*
X * Several unsigned cardinal types
X */
Xtypedef	unsigned long	Ulong;
Xtypedef	unsigned int	Uint;
Xtypedef	unsigned short	Ushort;
Xtypedef	unsigned char	Uchar;
X
X/*
X * This is a definition for a compiler dependant 64 bit type.
X * There is currently a silently fallback to a long if the compiler does not
X * support it. Check if this is the right way.
X *
X * Be very careful here as MSVC does not implement long long but rather __int64
X * and once someone makes 'long long' 128 bits on a 64 bit machine, we need to
X * check for a MSVC __int128 type.
X */
X#ifndef	NO_LONGLONG
X#	if	!defined(USE_LONGLONG) && defined(HAVE_LONGLONG)
X#		define	USE_LONGLONG
X#	endif
X#	if	!defined(USE_LONGLONG) && defined(HAVE___INT64)
X#		define	USE_LONGLONG
X#	endif
X#endif
X
X#ifdef	USE_LONGLONG
X
X#	if	defined(HAVE___INT64)
X
Xtypedef	__int64			Llong;
Xtypedef	unsigned __int64	Ullong;	/* We should avoid this */
Xtypedef	unsigned __int64	ULlong;
X
X#define	SIZEOF_LLONG		SIZEOF___INT64
X#define	SIZEOF_ULLONG		SIZEOF_UNSIGNED___INT64
X
X#	else	/* We must have HAVE_LONG_LONG */
X
Xtypedef	long long		Llong;
Xtypedef	unsigned long long	Ullong;	/* We should avoid this */
Xtypedef	unsigned long long	ULlong;
X
X#define	SIZEOF_LLONG		SIZEOF_LONG_LONG
X#define	SIZEOF_ULLONG		SIZEOF_UNSIGNED_LONG_LONG
X
X#	endif	/* HAVE___INT64 / HAVE_LONG_LONG */
X
X#else	/* !USE_LONGLONG */
X
Xtypedef	long			Llong;
Xtypedef	unsigned long		Ullong;	/* We should avoid this */
Xtypedef	unsigned long		ULlong;
X
X#define	SIZEOF_LLONG		SIZEOF_LONG
X#define	SIZEOF_ULLONG		SIZEOF_UNSIGNED_LONG
X
X#endif	/* USE_LONGLONG */
X
X#ifndef	LLONG_MIN
X#define	LLONG_MIN	TYPE_MINVAL(Llong)
X#endif
X#ifndef	LLONG_MAX
X#define	LLONG_MAX	TYPE_MAXVAL(Llong)
X#endif
X#ifndef	ULLONG_MAX
X#define	ULLONG_MAX	TYPE_MAXVAL(Ullong)
X#endif
X
X/*
X * The IBM AIX C-compiler seems to be the only compiler on the world
X * which does not allow to use unsigned char bit fields as a hint
X * for packed bit fields. Define a pesical type to avoid warnings.
X * The packed attribute is honored wit unsigned int in this case too.
X */
X#if	defined(_AIX) && !defined(__GNUC__)
X
Xtypedef unsigned int	Ucbit;
X
X#else
X
Xtypedef unsigned char	Ucbit;
X
X#endif
X
X/*
X * Start inttypes.h emulation.
X *
X * Thanks to Solaris 2.4 and even recent 1999 Linux versions, we
X * cannot use the official UNIX-98 names here. Old Solaris versions
X * define parts of the types in some exotic include files.
X * Linux even defines incompatible types in <sys/types.h>.
X */
X
X#if defined(HAVE_INTTYPES_H) || defined(HAVE_STDINT_H)
X#if defined(HAVE_INTTYPES_H)
X#	ifndef	_INCL_INTTYPES_H
X#	include <inttypes.h>
X#	define	_INCL_INTTYPES_H
X#	endif
X#else
X#if defined(HAVE_STDINT_H)
X#	ifndef	_INCL_STDINT_H
X#	include <stdint.h>
X#	define	_INCL_STDINT_H
X#	endif
X#endif
X#endif
X/*
X * On VMS on VAX, these types are present but non-scalar.
X * Thus we may not be able to use them
X */
X#ifdef	HAVE_LONGLONG
X#	define	HAVE_INT64_T
X#	define	HAVE_UINT64_T
X#endif
X
X#define	Int8_t			int8_t
X#define	Int16_t			int16_t
X#define	Int32_t			int32_t
X#ifdef	HAVE_LONGLONG
X#define	Int64_t			int64_t
X#endif
X#define	Intmax_t		intmax_t
X#define	UInt8_t			uint8_t
X#define	UInt16_t		uint16_t
X#define	UInt32_t		uint32_t
X#ifdef	HAVE_LONGLONG
X#define	UInt64_t		uint64_t
X#endif
X#define	UIntmax_t		uintmax_t
X
X#define	Intptr_t		intptr_t
X#define	UIntptr_t		uintptr_t
X
X/*
X * If we only have a UNIX-98 inttypes.h but no SUSv3
X *
X * Beware not to use int64_t / uint64_t as VMS on a VAX defines
X * them as non-scalar (structure) based types.
X */
X#ifndef	HAVE_TYPE_INTMAX_T
X#define	intmax_t	Llong
X#endif
X#ifndef	HAVE_TYPE_UINTMAX_T
X#define	uintmax_t	ULlong
X#endif
X
X#else	/* !HAVE_INTTYPES_H */
X
X#if SIZEOF_CHAR != 1 || SIZEOF_UNSIGNED_CHAR != 1
X/*
X * #error will not work for all compilers (e.g. sunos4)
X * The following line will abort compilation on all compilers
X * if the above is true. And that's what we want.
X */
Xerror  Sizeof char is not equal 1
X#endif
X
X#if	defined(__STDC__) || defined(CHAR_IS_UNSIGNED)
X	typedef	signed char		Int8_t;
X#else
X	typedef	char			Int8_t;
X#endif
X
X#if SIZEOF_SHORT_INT == 2
X	typedef	short			Int16_t;
X#else
X	error		No int16_t found
X#endif
X
X#if SIZEOF_INT == 4
X	typedef	int			Int32_t;
X#else
X	error		No int32_t found
X#endif
X
X#if SIZEOF_LONG_INT == 8
X	typedef		long		Int64_t;
X#	define	HAVE_INT64_T
X#else
X#if SIZEOF_LONG_LONG == 8
X	typedef		long long	Int64_t;
X#	define	HAVE_INT64_T
X#else
X#if SIZEOF___INT64 == 8
X	typedef		__int64		Int64_t;
X#	define	HAVE_INT64_T
X#else
X/*	error		No int64_t found*/
X#endif
X#endif
X#endif
X
X#if SIZEOF_CHAR_P == SIZEOF_INT
X	typedef		int		Intptr_t;
X#else
X#if SIZEOF_CHAR_P == SIZEOF_LONG_INT
X	typedef		long		Intptr_t;
X#else
X#if SIZEOF_CHAR_P == SIZEOF_LLONG
X	typedef		Llong		Intptr_t;
X#else
X	error		No intptr_t found
X#endif
X#endif
X#endif
X
Xtypedef	unsigned char		UInt8_t;
X
X#if SIZEOF_UNSIGNED_SHORT_INT == 2
X	typedef	unsigned short		UInt16_t;
X#else
X	error		No uint16_t found
X#endif
X
X#if SIZEOF_UNSIGNED_INT == 4
X	typedef	unsigned int		UInt32_t;
X#else
X	error		No int32_t found
X#endif
X
X#if SIZEOF_UNSIGNED_LONG_INT == 8
X	typedef	unsigned long		UInt64_t;
X#	define	HAVE_UINT64_T
X#else
X#if SIZEOF_UNSIGNED_LONG_LONG == 8
X	typedef	unsigned long long	UInt64_t;
X#	define	HAVE_UINT64_T
X#else
X#if SIZEOF_UNSIGNED___INT64 == 8
X	typedef	unsigned __int64	UInt64_t;
X#	define	HAVE_UINT64_T
X#else
X/*	error		No uint64_t found*/
X#endif
X#endif
X#endif
X
X#define	Intmax_t	Llong
X#define	UIntmax_t	Ullong
X
X#if SIZEOF_CHAR_P == SIZEOF_UNSIGNED_INT
X	typedef		unsigned int	UIntptr_t;
X#else
X#if SIZEOF_CHAR_P == SIZEOF_UNSIGNED_LONG_INT
X	typedef		unsigned long	UIntptr_t;
X#else
X#if SIZEOF_CHAR_P == SIZEOF_ULLONG
X	typedef		ULlong		UIntptr_t;
X#else
X	error		No uintptr_t found
X#endif
X#endif
X#endif
X
X#ifdef	_MSC_VER
X/*
X * All recent platforms define the POSIX/C-99 compliant types from inttypes.h
X * except Microsoft. With these #defines, we may also use official types on a
X * Microsoft environment.
X *
X * Warning: Linux-2.2 and before do not have inttypes.h and define some of the
X * types in an incmpatible way.
X */
X#undef	int8_t
X#define	int8_t			Int8_t
X#undef	int16_t
X#define	int16_t			Int16_t
X#undef	int32_t
X#define	int32_t			Int32_t
X#undef	int64_t
X#define	int64_t			Int64_t
X#undef	intmax_t
X#define	intmax_t		Intmax_t
X#undef	uint8_t
X#define	uint8_t			UInt8_t
X#undef	uint16_t
X#define	uint16_t		UInt16_t
X#undef	uint32_t
X#define	uint32_t		UInt32_t
X#undef	uint64_t
X#define	uint64_t		UInt64_t
X#undef	uintmax_t
X#define	uintmax_t		UIntmax_t
X
X#undef	intptr_t
X#define	intptr_t		Intptr_t
X#undef	uintptr_t
X#define	uintptr_t		UIntptr_t
X#endif	/* _MSC_VER */
X
X#endif	/* HAVE_INTTYPES_H */
X
X#ifndef	CHAR_MIN
X#define	CHAR_MIN	TYPE_MINVAL(char)
X#endif
X#ifndef	CHAR_MAX
X#define	CHAR_MAX	TYPE_MAXVAL(char)
X#endif
X#ifndef	UCHAR_MAX
X#define	UCHAR_MAX	TYPE_MAXVAL(unsigned char)
X#endif
X
X#ifndef	SHRT_MIN
X#define	SHRT_MIN	TYPE_MINVAL(short)
X#endif
X#ifndef	SHRT_MAX
X#define	SHRT_MAX	TYPE_MAXVAL(short)
X#endif
X#ifndef	USHRT_MAX
X#define	USHRT_MAX	TYPE_MAXVAL(unsigned short)
X#endif
X
X#ifndef	INT_MIN
X#define	INT_MIN		TYPE_MINVAL(int)
X#endif
X#ifndef	INT_MAX
X#define	INT_MAX		TYPE_MAXVAL(int)
X#endif
X#ifndef	UINT_MAX
X#define	UINT_MAX	TYPE_MAXVAL(unsigned int)
X#endif
X
X#ifndef	LONG_MIN
X#define	LONG_MIN	TYPE_MINVAL(long)
X#endif
X#ifndef	LONG_MAX
X#define	LONG_MAX	TYPE_MAXVAL(long)
X#endif
X#ifndef	ULONG_MAX
X#define	ULONG_MAX	TYPE_MAXVAL(unsigned long)
X#endif
X
X#ifndef	INT8_MIN
X#define	INT8_MIN	TYPE_MINVAL(Int8_t)
X#endif
X#ifndef	INT8_MAX
X#define	INT8_MAX	TYPE_MAXVAL(Int8_t)
X#endif
X#ifndef	UINT8_MAX
X#define	UINT8_MAX	TYPE_MAXVAL(UInt8_t)
X#endif
X
X#ifndef	INT16_MIN
X#define	INT16_MIN	TYPE_MINVAL(Int16_t)
X#endif
X#ifndef	INT16_MAX
X#define	INT16_MAX	TYPE_MAXVAL(Int16_t)
X#endif
X#ifndef	UINT16_MAX
X#define	UINT16_MAX	TYPE_MAXVAL(UInt16_t)
X#endif
X
X#ifndef	INT32_MIN
X#define	INT32_MIN	TYPE_MINVAL(Int32_t)
X#endif
X#ifndef	INT32_MAX
X#define	INT32_MAX	TYPE_MAXVAL(Int32_t)
X#endif
X#ifndef	UINT32_MAX
X#define	UINT32_MAX	TYPE_MAXVAL(UInt32_t)
X#endif
X
X#ifdef	HAVE_INT64_T
X#ifndef	INT64_MIN
X#define	INT64_MIN	TYPE_MINVAL(Int64_t)
X#endif
X#ifndef	INT64_MAX
X#define	INT64_MAX	TYPE_MAXVAL(Int64_t)
X#endif
X#endif
X#ifdef	HAVE_UINT64_T
X#ifndef	UINT64_MAX
X#define	UINT64_MAX	TYPE_MAXVAL(UInt64_t)
X#endif
X#endif
X
X#ifndef	INTMAX_MIN
X#define	INTMAX_MIN	TYPE_MINVAL(Intmax_t)
X#endif
X#ifndef	INTMAX_MAX
X#define	INTMAX_MAX	TYPE_MAXVAL(Intmax_t)
X#endif
X#ifndef	UINTMAX_MAX
X#define	UINTMAX_MAX	TYPE_MAXVAL(UIntmax_t)
X#endif
X
X#define	SIZE_T_MIN	TYPE_MINVAL(size_t)
X#ifdef	SIZE_T_MAX
X#undef	SIZE_T_MAX				/* FreeBSD has a similar #define */
X#endif
X#define	SIZE_T_MAX	TYPE_MAXVAL(size_t)
X
X#define	SSIZE_T_MIN	TYPE_MINVAL(ssize_t)
X#define	SSIZE_T_MAX	TYPE_MAXVAL(ssize_t)
X
X#define	OFF_T_MIN	TYPE_MINVAL(off_t)
X#define	OFF_T_MAX	TYPE_MAXVAL(off_t)
X
X#define	UID_T_MIN	TYPE_MINVAL(uid_t)
X#define	UID_T_MAX	TYPE_MAXVAL(uid_t)
X
X#define	GID_T_MIN	TYPE_MINVAL(gid_t)
X#define	GID_T_MAX	TYPE_MAXVAL(gid_t)
X
X#define	PID_T_MIN	TYPE_MINVAL(pid_t)
X#define	PID_T_MAX	TYPE_MAXVAL(pid_t)
X
X#define	MODE_T_MIN	TYPE_MINVAL(mode_t)
X#define	MODE_T_MAX	TYPE_MAXVAL(mode_t)
X
X#define	TIME_T_MIN	TYPE_MINVAL(time_t)
X#define	TIME_T_MAX	TYPE_MAXVAL(time_t)
X
X#define	CADDR_T_MIN	TYPE_MINVAL(caddr_t)
X#define	CADDR_T_MAX	TYPE_MAXVAL(caddr_t)
X
X#define	DADDR_T_MIN	TYPE_MINVAL(daddr_t)
X#define	DADDR_T_MAX	TYPE_MAXVAL(daddr_t)
X
X#define	DEV_T_MIN	TYPE_MINVAL(dev_t)
X#define	DEV_T_MAX	TYPE_MAXVAL(dev_t)
X
X#define	MAJOR_T_MIN	TYPE_MINVAL(major_t)
X#define	MAJOR_T_MAX	TYPE_MAXVAL(major_t)
X
X#define	MINOR_T_MIN	TYPE_MINVAL(minor_t)
X#define	MINOR_T_MAX	TYPE_MAXVAL(minor_t)
X
X#define	INO_T_MIN	TYPE_MINVAL(ino_t)
X#define	INO_T_MAX	TYPE_MAXVAL(ino_t)
X
X#define	NLINK_T_MIN	TYPE_MINVAL(nlink_t)
X#define	NLINK_T_MAX	TYPE_MAXVAL(nlink_t)
X
X#define	BLKSIZE_T_MIN	TYPE_MINVAL(blksize_t)
X#define	BLKSIZE_T_MAX	TYPE_MAXVAL(blksize_t)
X
X#define	BLKCNT_T_MIN	TYPE_MINVAL(blkcnt_t)
X#define	BLKCNT_T_MAX	TYPE_MAXVAL(blkcnt_t)
X
X#define	CLOCK_T_MIN	TYPE_MINVAL(clock_t)
X#define	CLOCK_T_MAX	TYPE_MAXVAL(clock_t)
X
X#define	SOCKLEN_T_MIN	TYPE_MINVAL(socklen_t)
X#define	SOCKLEN_T_MAX	TYPE_MAXVAL(socklen_t)
X
X#endif	/* _SCHILY_UTYPES_H */
END-of-smake-1.2.1/include/schily/utypes.h
echo x - smake-1.2.1/include/schily/varargs.h
sed 's/^X//' >smake-1.2.1/include/schily/varargs.h << 'END-of-smake-1.2.1/include/schily/varargs.h'
X/* @(#)varargs.h	1.6 06/09/13 Copyright 1998 J. Schilling */
X/*
X *	Generic header for users of var args ...
X *
X *	Includes a default definition for va_copy()
X *	and some magic know how about the SVr4 Power PC var args ABI
X *	to create a __va_arg_list() macro.
X *
X *	Copyright (c) 1998 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_VARARGS_H
X#define	_SCHILY_VARARGS_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	PROTOTYPES
X/*
X * For ANSI C-compilers prefer stdarg.h
X */
X#	ifdef	HAVE_STDARG_H
X#		ifndef	_INCL_STDARG_H
X#		include <stdarg.h>
X#		define	_INCL_STDARG_H
X#		endif
X#	else
X#		ifndef	_INCL_VARARGS_H
X#		include <varargs.h>
X#		define	_INCL_VARARGS_H
X#		endif
X#	endif
X#else
X/*
X * For K&R C-compilers prefer varargs.h
X */
X#	ifdef	HAVE_VARARGS_H
X#		ifndef	_INCL_VARARGS_H
X#		include <varargs.h>
X#		define	_INCL_VARARGS_H
X#		endif
X#	else
X#		ifndef	_INCL_STDARG_H
X#		include <stdarg.h>
X#		define	_INCL_STDARG_H
X#		endif
X#	endif
X#endif
X
X#if (defined(__linux__) || defined(__linux) || defined(sun)) && \
X		(defined(__ppc) || defined(__PPC) || defined(powerpc) || defined(__powerpc__))
X
X#	ifndef	VA_LIST_IS_ARRAY
X#	define	VA_LIST_IS_ARRAY
X#	endif
X#endif
X
X
X/*
X * __va_copy() is used by GCC 2.8 or newer until va_copy() becomes
X * a final ISO standard.
X */
X#if !defined(va_copy) && !defined(HAVE_VA_COPY)
X#	if	defined(__va_copy)
X#		define	va_copy(to, from)	__va_copy(to, from)
X#	endif
X#endif
X
X/*
X * va_copy() is a Solaris extension to provide a portable way to perform a
X * variable argument list "bookmarking" function.
X * If it is not available via stdarg.h, use a simple assignement for backward
X * compatibility.
X */
X#if !defined(va_copy) && !defined(HAVE_VA_COPY)
X#ifdef	VA_LIST_IS_ARRAY
X#	define	va_copy(to, from)	((to)[0] = (from)[0])
X#else
X#	define	va_copy(to, from)	((to) = (from))
X#endif
X#endif
X
X/*
X * I don't know any portable way to get an arbitrary
X * C object from a var arg list so I use a
X * system-specific routine __va_arg_list() that knows
X * if 'va_list' is an array. You will not be able to
X * assign the value of __va_arg_list() but it works
X * to be used as an argument of a function.
X * It is a requirement for recursive printf to be able
X * to use this function argument. If your system
X * defines va_list to be an array you need to know this
X * via autoconf or another mechanism.
X * It would be nice to have something like
X * __va_arg_list() in stdarg.h
X */
X
X#ifdef	VA_LIST_IS_ARRAY
X#	define	__va_arg_list(list)	va_arg(list, void *)
X#else
X#	define	__va_arg_list(list)	va_arg(list, va_list)
X#endif
X
X#endif	/* _SCHILY_VARARGS_H */
END-of-smake-1.2.1/include/schily/varargs.h
echo x - smake-1.2.1/include/schily/wait.h
sed 's/^X//' >smake-1.2.1/include/schily/wait.h << 'END-of-smake-1.2.1/include/schily/wait.h'
X/* @(#)wait.h	1.17 09/11/15 Copyright 1995-2007 J. Schilling */
X/*
X *	Definitions to deal with various kinds of wait flavour
X *
X *	Copyright (c) 1995-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_WAIT_H
X#define	_SCHILY_WAIT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * Needed for SysVr4
X */
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#if	defined(HAVE_WAIT_H)
X#	ifndef	_INCL_WAIT_H
X#	include <wait.h>
X#	define	_INCL_WAIT_H
X#	endif
X#else
X/*
X * K&R Compiler doesn't like #elif
X */
X#	if	defined(HAVE_SYS_WAIT_H)	/* POSIX.1 compl. sys/wait.h */
X#	undef	HAVE_UNION_WAIT			/* POSIX.1 doesn't use U_W   */
X#		ifndef	_INCL_SYS_WAIT_H
X#		include <sys/wait.h>
X#		define	_INCL_SYS_WAIT_H
X#		endif
X#	else
X#	if	defined(HAVE_UNION_WAIT)	/* Pure BSD U_W / sys/wait.h */
X#		ifndef	_INCL_SYS_WAIT_H
X#		include <sys/wait.h>
X#		define	_INCL_SYS_WAIT_H
X#		endif
X#	endif
X#	endif
X#endif
X#ifdef	JOS
X#	ifndef	_INCL_SYS_EXIT_H
X#	include <sys/exit.h>
X#	define	_INCL_SYS_EXIT_H
X#	endif
X#endif
X#if defined(__EMX__) || defined(__DJGPP__)
X#	ifndef	_INCL_PROCESS_H
X#	include <process.h>
X#	define	_INCL_PROCESS_H
X#	endif
X#endif
X
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#if defined(HAVE_UNION_WAIT) && defined(USE_UNION_WAIT)
X#	define WAIT_T union wait
X#	define	_W_U(w)	((union wait *)&(w))
X#	ifndef WSTOPPED
X#		define	WSTOPPED	0x7F
X#	endif
X#	ifndef WTERMSIG
X#		define WTERMSIG(status)		(_W_U(status)->w_termsig)
X#	endif
X#	ifndef WCOREDUMP
X#		define WCOREDUMP(status)	(_W_U(status)->w_coredump)
X#	endif
X#	ifndef WEXITSTATUS
X#		define WEXITSTATUS(status)	(_W_U(status)->w_retcode)
X#	endif
X#	ifndef WSTOPSIG
X#		define WSTOPSIG(status)		(_W_U(status)->w_stopsig)
X#	endif
X#	ifndef WIFSTOPPED
X#		define WIFSTOPPED(status)	(_W_U(status)->w_stopval == \
X								WSTOPPED)
X#	endif
X#	ifndef WIFSIGNALED
X#		define WIFSIGNALED(status) 	(_W_U(status)->w_stopval != \
X						WSTOPPED && \
X						_W_U(status)->w_termsig != 0)
X#	endif
X#	ifndef WIFEXITED
X#		define WIFEXITED(status)	(_W_U(status)->w_stopval != \
X						WSTOPPED && \
X						_W_U(status)->w_termsig == 0)
X#	endif
X#else
X#	define WAIT_T int
X#	define	_W_I(w)	(*(int *)&(w))
X#	ifndef WTERMSIG
X#		define WTERMSIG(status)		(_W_I(status) & 0x7F)
X#	endif
X#	ifndef WCOREDUMP
X#		define WCOREDUMP(status)	(_W_I(status) & 0x80)
X#	endif
X#	ifndef WEXITSTATUS
X#		define WEXITSTATUS(status)	((_W_I(status) >> 8) & 0xFF)
X#	endif
X#	ifndef WSTOPSIG
X#		define WSTOPSIG(status)		((_W_I(status) >> 8) & 0xFF)
X#	endif
X#	ifndef WIFSTOPPED
X#		define	WIFSTOPPED(status)	((_W_I(status) & 0xFF) == 0x7F)
X#	endif
X#	ifndef WIFSIGNALED
X#		define	WIFSIGNALED(status)	((_W_I(status) & 0xFF) != 0x7F && \
X						WTERMSIG(status) != 0)
X#	endif
X#	ifndef WIFEXITED
X#		define	WIFEXITED(status)	((_W_I(status) & 0xFF) == 0)
X#	endif
X#endif
X
X
X#ifndef	WCOREFLG
X#define	WCOREFLG	0x80
X#endif
X
X#ifndef	WSTOPFLG
X#define	WSTOPFLG	0x7F
X#endif
X
X#ifndef	WCONTFLG
X#define	WCONTFLG	0xFFFF
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_WAIT_H */
END-of-smake-1.2.1/include/schily/wait.h
echo x - smake-1.2.1/include/schily/align.h
sed 's/^X//' >smake-1.2.1/include/schily/align.h << 'END-of-smake-1.2.1/include/schily/align.h'
X/* @(#)align.h	1.7 09/06/06 Copyright 1995-2009 J. Schilling */
X/*
X *	Platform dependent definitions for aligning data.
X *
X *	Copyright (c) 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X/*
X *	The automatically created included file defines the following macros:
X *
X *	saligned(a)	One parameter aligned for a "short int"
X *	s2aligned(a, b)	Both parameters aligned for a "short int"
X *	ialigned(a)	One parameter aligned for a "int"
X *	i2aligned(a, b)	Both parameters aligned for a "int"
X *	laligned(a)	One parameter aligned for a "long"
X *	l2aligned(a, b)	Both parameters aligned for a "long"
X *	llaligned(a)	One parameter aligned for a "long long"
X *	ll2aligned(a, b) Both parameters aligned for a "long long"
X *	faligned(a)	One parameter aligned for a "float"
X *	f2aligned(a, b)	Both parameters aligned for a "float"
X *	daligned(a)	One parameter aligned for a "double"
X *	d2aligned(a, b)	Both parameters aligned for a "double"
X *	paligned(a)	One parameter aligned for a "pointer"
X *	p2aligned(a, b)	Both parameters aligned for a "pointe"
X *
X *	salign(x)	Align for a "short int"
X *	ialign(x)	Align for a "int"
X *	lalign(x)	Align for a "long"
X *	llalign(x)	Align for a "long long"
X *	falign(x)	Align for a "float"
X *	dalign(x)	Align for a "double"
X *	palign(x)	Align for a "pointer"
X */
X#ifndef _SCHILY_ALIGN_H
X#define	_SCHILY_ALIGN_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X
X#ifdef	SCHILY_BUILD	/* #defined by Schily makefile system */
X	/*
X	 * Include $(SRCROOT)/incs/$(OARCH)/align.h via
X	 * -I$(SRCROOT)/incs/$(OARCH)/
X	 */
X#	include <align.h>
X#else	/* !SCHILY_BUILD */
X/*
X * The stuff for static compilation. Include files from a previous
X * dynamic autoconfiguration.
X */
X#ifdef	__SUNOS5_SPARC_CC32
X#include <schily/sparc-sunos5-cc/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_CC64
X#include <schily/sparc-sunos5-cc64/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_GCC32
X#include <schily/sparc-sunos5-gcc/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_GCC64
X#include <schily/sparc-sunos5-gcc64/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X#ifdef	__SUNOS5_X86_CC32
X#include <schily/i386-sunos5-cc/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X#ifdef	__SUNOS5_X86_CC64
X#include <schily/i386-sunos5-cc64/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X#ifdef	__SUNOS5_X86_GCC32
X#include <schily/i386-sunos5-gcc/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X#ifdef	__SUNOS5_X86_GCC64
X#include <schily/i386-sunos5-gcc64/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X
X#ifdef	__HPUX_HPPA_CC32
X#include <schily/hppa-hp-ux-cc/align.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_CC64
X#include <schily/hppa-hp-ux-cc64/align.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_GCC32
X#include <schily/hppa-hp-ux-gcc/align.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_GCC64
X#include <schily/hppa-hp-ux-gcc64/align.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X
X#ifdef	__MSWIN_X86_CL32
X#include <schily/i686-cygwin32_nt-cl/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X
X#ifdef	__CYGWIN_X86_GCC
X#include <schily/i686-cygwin32_nt-gcc/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X
X#ifndef	__JS_ARCH_ALIGN_INCL
XError unconfigured architecture
X#endif
X
X#endif	/* SCHILY_BUILD */
X
X#endif /* _SCHILY_ALIGN_H */
END-of-smake-1.2.1/include/schily/align.h
echo x - smake-1.2.1/include/schily/avoffset.h
sed 's/^X//' >smake-1.2.1/include/schily/avoffset.h << 'END-of-smake-1.2.1/include/schily/avoffset.h'
X/* @(#)avoffset.h	1.7 07/12/01 Copyright 1995-2007 J. Schilling */
X/*
X *	Platform dependent definitions for stack scanning.
X *
X *	Copyright (c) 1995-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X/*
X *	This file includes definitions for STACK_DIRECTION,
X *	AV_OFFSET and FP_INDIR.
X *
X *	STACK_DIRECTION:
X *			+1 -> stack grows to larger addresses
X *			-1 -> stack "groes" to lower addresses
X *
X *	FP_INDIR:	the number of fp chain elements above 'main'.
X *
X *	AV_OFFSET:	the offset of &av[0] relative to the frame pointer
X *			in 'main'.
X *
X *	If getav0() does not work on a specific architecture
X *	the program which generated this automaticly generated include file
X *	may dump core. In this case, the generated include file does not include
X *	definitions for AV_OFFSET and FP_INDIR but ends after the STACK_DIRECTION
X *	definition.
X *	If AV_OFFSET or FP_INDIR are missing in the file, all code
X *	that use the definitions are automatically disabled.
X */
X#ifndef _SCHILY_AVOFFSET_H
X#define	_SCHILY_AVOFFSET_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	SCHILY_BUILD	/* #defined by Schily makefile system */
X	/*
X	 * Include $(SRCROOT)/incs/$(OARCH)/avoffset.h via
X	 * -I$(SRCROOT)/incs/$(OARCH)/
X	 */
X#	include <avoffset.h>
X#else	/* !SCHILY_BUILD */
X/*
X * The stuff for static compilation. Include files from a previous
X * dynamic autoconfiguration.
X */
X#ifdef	__SUNOS5_SPARC_CC32
X#include <schily/sparc-sunos5-cc/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_CC64
X#include <schily/sparc-sunos5-cc64/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_GCC32
X#include <schily/sparc-sunos5-gcc/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_GCC64
X#include <schily/sparc-sunos5-gcc64/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X#ifdef	__SUNOS5_X86_CC32
X#include <schily/i386-sunos5-cc/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X#ifdef	__SUNOS5_X86_CC64
X#include <schily/i386-sunos5-cc64/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X#ifdef	__SUNOS5_X86_GCC32
X#include <schily/i386-sunos5-gcc/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X#ifdef	__SUNOS5_X86_GCC64
X#include <schily/i386-sunos5-gcc64/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X
X#ifdef	__HPUX_HPPA_CC32
X#include <schily/hppa-hp-ux-cc/avoffset.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_CC64
X#include <schily/hppa-hp-ux-cc64/avoffset.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_GCC32
X#include <schily/hppa-hp-ux-gcc/avoffset.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_GCC64
X#include <schily/hppa-hp-ux-gcc64/avoffset.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X
X#ifdef	__MSWIN_X86_CL32
X#include <schily/i686-cygwin32_nt-cl/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X
X#ifdef	__CYGWIN_X86_GCC
X#include <schily/i686-cygwin32_nt-gcc/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X
X#ifndef	__JS_ARCH_AVOFFSET_INCL
XError unconfigured architecture
X#endif
X
X#endif	/* SCHILY_BUILD */
X
X#endif /* _SCHILY_AVOFFSET_H */
END-of-smake-1.2.1/include/schily/avoffset.h
echo x - smake-1.2.1/include/schily/xmconfig.h
sed 's/^X//' >smake-1.2.1/include/schily/xmconfig.h << 'END-of-smake-1.2.1/include/schily/xmconfig.h'
X/* @(#)xmconfig.h	1.42 09/11/16 Copyright 1995-2009 J. Schilling */
X/*
X *	This file either includes the manual generated
X *	static definitions for a machine configuration.
X *
X *	Copyright (c) 1995-2009 J. Schilling
X *
X *	Use only cpp instructions.
X *
X *	NOTE: SING: (Schily Is Not Gnu)
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_XMCONFIG_H
X#define	_SCHILY_XMCONFIG_H
X
X/*
X * This is the only static (hand crafted) set of machine configuration
X * left over. We are trying to avoid even this in future.
X */
X
X
X#ifdef __cplusplus
Xextern "C" {
X#endif
X
X#if defined(VMS)
X#	define	PROTOTYPES
X#	define	HAVE_OSDEF	/* prevent later definitions to overwrite current */
X#	define	__NOT_SVR4__	/* Not a real SVR4 implementation */
X
X#	define	HAVE_UNISTD_H
X#	define	HAVE_SYS_TYPES_H
X#	define	HAVE_CTYPE_H
X/*  #	define	HAVE_SYS_TIME_H	*/
X#	define	HAVE_FCNTL_H
X#	define	HAVE_USLEEP
X#	if __DECC_VER >= 60000000
X#		define HAVE_INTTYPES_H
X#	endif /* __DECC_VER >= 60000000 */
X#	define SIZEOF_CHAR 1
X#	define SIZEOF_UNSIGNED_CHAR SIZEOF_CHAR
X#	define SIZEOF_SHORT_INT 2
X#	define SIZEOF_UNSIGNED_SHORT_INT SIZEOF_SHORT_INT
X#	define SIZEOF_INT 4
X#	define SIZEOF_UNSIGNED_INT SIZEOF_INT
X#	define SIZEOF_LONG_INT 4
X#	define SIZEOF_UNSIGNED_LONG_INT SIZEOF_LONG_INT
X#	ifdef __VAX
X#		define SIZEOF_LONG_LONG 4
X#	else /* def __VAX */
X#	endif /* def __VAX [else] */
X#	define SIZEOF_UNSIGNED_LONG_LONG SIZEOF_LONG_LONG
X#	define SIZEOF_CHAR_P 4
X
X#	include <types.h>
X#	ifndef __OFF_T
X		typedef int off_t;
X#	endif /* ndef __OFF_T */
X
X#	if defined(__alpha)
X#		define HOST_CPU	"Alpha"
X#	elif defined(__ia64)
X#		define HOST_CPU	"IA64"
X#	elif defined(__vax)
X#		define HOST_CPU	"VAX"
X#	else
X#		define HOST_CPU	"VAX(?)"
X#	endif
X#	define HOST_VENDOR "HP"
X#	define HOST_OS "VMS/OpenVMS"
X#	define RETSIGTYPE   void
X/*#	define	HAVE_ELF    */
X/*#	define	HAVE_COFF   */
X/*#	define	HAVE_AOUT   */
X#	define	HAVE_STDARG_H
X/*#	define	HAVE_VA_COPY	*/
X#	define	HAVE_STDLIB_H
X#	define	HAVE_STRING_H
X#	define	HAVE_STDC_HEADERS
X#	define	STDC_HEADERS
X/*#	define	HAVE_LONGLONG	*/
X
X#	define	HAVE_UNISTD_H
X#	define	HAVE_FCNTL_H
X#	define	HAVE_DIRENT_H
X/*#	define	HAVE_SYS_DIR_H	*/
X/*#	define	HAVE_NDIR_H */
X/*#	define	HAVE_SYS_NDIR_H	*/
X/*#	define	HAVE_TERMIOS_H	*/
X/*#	define	HAVE_TERMIO_H	*/
X/*#	define	HAVE_SYS_TIME_H	*/
X/*#	define	HAVE_UTIMES */
X/*#	define	HAVE_UTIME_H	*/
X#	define	HAVE_WAIT_H
X/*#	define	HAVE_SYS_WAIT_H	*/
X/*#	define	HAVE_SYS_SYSTEMINFO_H	*/
X#	define	HAVE_SYS_UTSNAME_H
X/*#	define	HAVE_SYS_PRIOCNTL_H */
X/*#	define	HAVE_SYS_RTPRIOCNTL_H	*/
X/*#	define	HAVE_SYS_MTIO_H	*/
X/*#	define	HAVE_MTGET_DSREG    */
X/*#	define	HAVE_MTGET_RESID    */
X/*#	define	HAVE_MTGET_FILENO   */
X/*#	define	HAVE_MTGET_BLKNO    */
X/*#	define	MAJOR_IN_MKDEV	*/
X/*#	define	MAJOR_IN_SYSMACROS  */
X/*#	define	HAVE_USG_STDIO	*/
X/*#	define	HAVE_DTOA   */
X#	define	HAVE_GETCWD
X#	define	HAVE_STRERROR
X#	define	HAVE_MEMMOVE
X#	define	HAVE_MMAP
X/*#	define	HAVE_SMMAP  */
X/*#	define	HAVE_USGSHM */
X/*#	define	HAVE_USGSEM */
X/*#	define	HAVE_MSEM   */
X/*#	define	HAVE_LDSTUB */
X/*#	define	HAVE_XCHG   */
X#	define	HAVE_FLOCK
X/*#	define	HAVE_FCHDIR */
X/*#	define	HAVE_STATVFS	*/
X/*#	define	HAVE_QUOTA  */
X/*#	define	HAVE_YP	*/
X/*#	define	HAVE_SHADOW */
X/*#	define	HAVE_SETREUID	*/
X/*#	define	HAVE_SETRESUID	*/
X/*#	define	HAVE_SETEUID	*/
X/*#	define	HAVE_LCHOWN */
X/*#	define	HAVE_PROCFS */
X/*#	define	HAVE_PROCFS2	*/
X/*#	define	HAVE_SIGINFO	*/
X/*#	define	HAVE_WAIT3  */
X/*#	define	HAVE_WAITPID	*/
X/*#	define	HAVE_UNION_WAIT	*/
X#	define	HAVE_GETHOSTNAME
X/*#	define	HAVE_STREAMS	*/
X/*#	define	HAVE_STRPTYS	*/
X/*#	define	HAVE_POLL   */
X#	define	HAVE_SELECT
X/*#	define	HAVE_TIRPC  */
X/*#	define	GID_T		gid_t	*/
X#	define	USLEEPRETURN_T	uint
X/*#	define	USLEEPRETURN_T	void	*/
X/*#	define	USLEEPISVOID	*/
X/*#	define	HAVE_GETAV0 */
X/*#	define	HAVE_SCANSTACK	*/
X
X#	define	HAVE_STRUCT_TIMEVAL
X#	define	HAVE_UTSNAME_ARCH	/* uname -p */
X
X#	define HAVE_MALLOC
X#	define HAVE_CALLOC
X#	define HAVE_REALLOC
X
X#	define	HAVE_UNAME
X#	define	HAVE_RENAME
X#	define	HAVE_PUTENV
X#	define	HAVE_STRNCPY
X
X/* 2005-11-22 SMS.  Enabled some above.  Added some below. */
X#	define	HAVE_ECVT
X#	define	HAVE_FCVT
X#	define	HAVE_GCVT
X#	define	HAVE_NICE 1
X#	define	HAVE_SELECT
X#	define	HAVE_STRCASECMP
X#	if __CRTL_VER >= 70312000
X#		define HAVE_SNPRINTF
X#	endif /* __CRTL_VER >= 70312000 */
X#	define	NICE_DECR -8
X
X/* 2005-03-14 SMS.  Need VMS-specific open() parameters. */
X#ifndef	NO_OPENFD_SRC
X#	define _OPENFD_SRC	/* Use VMS-specific _openfd() function.*/
X#	define _openfd openfd_vms	/* This one. */
X#	define O_BINARY 0x0004	/* DOS-like value.  Implies "ctx=bin". */
X#endif
X
X#	define HAVE_C_BIGENDIAN
X#	define HAVE_C_BITFIELDS
X#	define BITFIELDS_LTOH
X
X/* 2006-09-14 SMS.  Various things for libfind. */
X#	define fork fork_dummy
X#	ifndef _POSIX_ARG_MAX
X#		define _POSIX_ARG_MAX 4096	/* Probably needed. */
X#	endif /* ndef _POSIX_ARG_MAX */
X#	define HAVE_DECL_STAT
X#	define HAVE_DECL_LSTAT
X
X/* 2006-09-17 SMS. */
X#	if __CRTL_VER >= 70000000
X#		define HAVE_GETPAGESIZE
X#	endif /* __CRTL_VER >= 70000000 */
X
X	extern pid_t fork_dummy(void);
X
X#endif /* defined(VMS) */
X
X
X#ifdef __cplusplus
X}
X#endif
X
X#endif /* _SCHILY_XMCONFIG_H */
END-of-smake-1.2.1/include/schily/xmconfig.h
echo x - smake-1.2.1/include/schily/errno.h
sed 's/^X//' >smake-1.2.1/include/schily/errno.h << 'END-of-smake-1.2.1/include/schily/errno.h'
X/* @(#)errno.h	1.6 06/12/25 Copyright 2006 J. Schilling */
X/*
X *	Error number related definitions
X *
X *	Copyright (c) 2006 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_ERRNO_H
X#define	_SCHILY_ERRNO_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	JOS
X#include <error.h>
X
X#define	ENOEXEC		EBADHEADER
X#define	EACCES		EACCESS
X#define	ENOENT		ENOFILE
X#define	EEXIST		EEXISTS
X#else
X#include <errno.h>
X
X#define	EMISSDIR	ENOENT
X#define	ENDOFFILE	EFBIG
X#endif
X
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
X
X#ifndef	HAVE_STRERROR
Xextern	char	*sys_errlist[];
Xextern	int	sys_nerr;
X#endif
X
X#ifndef	seterrno
Xextern	int	seterrno __PR((int));
X#endif
Xextern	int	geterrno __PR((void));
X
X#endif /* _SCHILY_ERRNO_H */
END-of-smake-1.2.1/include/schily/errno.h
echo x - smake-1.2.1/include/schily/archdefs.h
sed 's/^X//' >smake-1.2.1/include/schily/archdefs.h << 'END-of-smake-1.2.1/include/schily/archdefs.h'
X/* @(#)archdefs.h	1.8 09/08/09 Copyright 2006-2009 J. Schilling */
X/*
X *	Processor, instruction set and OS architecture specific defines.
X *	The information is fetched from compiler predefinitions only.
X *
X *	Copyright (c) 2006-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_ARCHDEFS_H
X#define	_SCHILY_ARCHDEFS_H
X
X/*
X * The code in this file only depends on compiler predefined macros.
X * For this reason, it does not need to include schily/mconfig.h
X */
X
X#if	defined(sun) || defined(__sun) || defined(__sun__)
X#ifndef	__sun
X#define	__sun
X#endif
X#endif
X
X#if	defined(sun2)
X#ifndef	__mc68010
X#define	__mc68010
X#endif
X#endif
X
X#if	defined(mc68020) || defined(__mc68020) || defined(sun3)
X#ifndef	__mc68020
X#define	__mc68020
X#endif
X#endif
X
X#if	defined(__mc68010) || defined(__mc68020)
X#ifndef	__mc68000
X#define	__mc68000
X#endif
X#endif
X
X#if	defined(i386) || defined(__i386) || defined(__i386__)
X#ifndef	__i386
X#define	__i386
X#endif
X#endif
X
X#if	defined(__amd64) || defined(__amd64__) || \
X	defined(__x86_64) || defined(__x86_64__)
X#ifndef	__amd64
X#define	__amd64
X#endif
X#endif
X
X#if	defined(__i386) || defined(__amd64)
X#ifndef	__x86
X#define	__x86
X#endif
X#endif
X
X#if	defined(sparc) || defined(__sparc) || defined(__sparc__)
X#ifndef	__sparc
X#define	__sparc
X#endif
X#endif
X
X#if	defined(__sparcv9) || defined(__sparcv9__)
X#ifndef	__sparc
X#define	__sparc
X#endif
X#ifndef	__sparcv9
X#define	__sparcv9
X#endif
X#endif
X
X#if	defined(__sparc) && defined(__arch64__)
X#ifndef	__sparcv9
X#define	__sparcv9
X#endif
X#endif
X
X#if	defined(SOL2) || defined(SOL2) || \
X	defined(S5R4) || defined(__S5R4) || defined(SVR4)
X#	ifndef	__SVR4
X#		define	__SVR4
X#	endif
X#endif
X
X#if	defined(sun2) || defined(sun3) || defined(__sun)
X#ifndef	__sun
X#define	__sun
X#endif
X#ifndef	__GNUC__
X#ifndef	__SUNPRO_C
X#ifdef	__SVR4
X#define	__SUNPRO_C
X#else
X#define	__SUN_C
X#endif	/* __SVR4	*/
X#endif	/* !__SUNPRO_C	*/
X#endif	/* !__GNUC__	*/
X#endif	/* __sun	*/
X
X
X/*
X * SunOS 4 specific defines
X */
X#if	defined(__sun) && !defined(__SVR4)
X
X#if	defined(__mc68000)
X#ifdef	__GNUC__
X#define	__SUNOS4_MC68000_GCC32
X#define	__JS_ARCH_DEFINED
X#endif
X#ifdef	__SUN_C
X#define	__SUNOS4_MC68000_CC32
X#define	__JS_ARCH_DEFINED
X#endif
X#endif	/* __mc68000	*/
X
X#if	defined(__sparc)
X#ifdef	__GNUC__
X#define	__SUNOS4_SPARC_GCC32
X#define	__JS_ARCH_DEFINED
X#endif
X#if	defined(__SUN_C) || defined(__SUNPRO_C)
X#define	__SUNOS4_SPARC_CC32
X#define	__JS_ARCH_DEFINED
X#endif
X#endif	/* __sparc	*/
X
X#endif	/* SunOS 4 */
X
X
X/*
X * SunOS 5 specific defines
X */
X#if	defined(__sun) && defined(__SVR4)
X
X#if	defined(__sparc)
X#ifdef	__GNUC__
X#ifdef	__sparcv9
X#define	__SUNOS5_SPARC_GCC64
X#else
X#define	__SUNOS5_SPARC_GCC32
X#endif
X#define	__JS_ARCH_DEFINED
X#endif
X#if	defined(__SUNPRO_C)
X#ifdef	__sparcv9
X#define	__SUNOS5_SPARC_CC64
X#else
X#define	__SUNOS5_SPARC_CC32
X#endif
X#define	__JS_ARCH_DEFINED
X#endif
X#endif	/* __sparc	*/
X
X#if	defined(__x86)
X#ifdef	__GNUC__
X#ifdef	__amd64
X#define	__SUNOS5_X86_GCC64
X#else
X#define	__SUNOS5_X86_GCC32
X#endif
X#define	__JS_ARCH_DEFINED
X#endif
X#if	defined(__SUNPRO_C)
X#ifdef	__amd64
X#define	__SUNOS5_X86_CC64
X#else
X#define	__SUNOS5_X86_CC32
X#endif
X#define	__JS_ARCH_DEFINED
X#endif
X#endif	/* __x86	*/
X
X#endif	/* SunOS 5 */
X
X/*
X * HP-UX specific defines
X */
X#if	defined(__hpux)
X
X#if	defined(__hppa)
X#ifdef	__GNUC__
X#ifdef	__LP64__		/* This may be wrong! */
X#define	__HPUX_HPPA_GCC64
X#else
X#define	__HPUX_HPPA_GCC32
X#endif
X#define	__JS_ARCH_DEFINED
X#endif
X#if	!defined(__GNUC__)
X#ifdef	__LP64__
X#define	__HPUX_HPPA_CC64
X#else
X#define	__HPUX_HPPA_CC32
X#endif
X#define	__JS_ARCH_DEFINED
X#endif
X#endif	/* __hppa	*/
X
X#endif	/* HP-UX */
X
X/*
X * MS-WIN specific defines
X *
X * cl defines one of:
X *	_M_IX86
X *	_M_AMD64
X *	_M_M68K
X *	_M_MPPC
X *	_M_IA64
X */
X#if	defined(_MSC_VER) && (defined(_X86_) || defined(_M_IX86))
X#define	__MSWIN_X86_CL32
X#define	__JS_ARCH_DEFINED
X#endif
X
X#if defined(__CYGWIN32__) || defined(__CYGWIN__)
X#define	__CYGWIN_X86_GCC
X#define	__JS_ARCH_DEFINED
X#endif
X
X#endif	/* _SCHILY_ARCHDEFS_H */
END-of-smake-1.2.1/include/schily/archdefs.h
echo x - smake-1.2.1/include/schily/xconfig.h
sed 's/^X//' >smake-1.2.1/include/schily/xconfig.h << 'END-of-smake-1.2.1/include/schily/xconfig.h'
X/* @(#)xconfig.h	1.8 09/11/05 Copyright 1995-2009 J. Schilling */
X/*
X *	This file either includes the dynamic or manual autoconf stuff.
X *
X *	Copyright (c) 1995-2009 J. Schilling
X *
X *	This file is included from <schily/mconfig.h> and usually
X *	includes $(SRCROOT)/incs/$(OARCH)/xconfig.h via
X *	-I$(SRCROOT)/incs/$(OARCH)/
X *
X *	Use only cpp instructions.
X *
X *	NOTE: SING: (Schily Is Not Gnu)
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_XCONFIG_H
X#define	_SCHILY_XCONFIG_H
X
X/*
X * This hack that is needed as long as VMS has no POSIX shell.
X * It will go away soon. VMS users: in future you need to specify:
X * cc -DUSE_STATIC_CONF
X */
X#ifdef	VMS
X#	define	USE_STATIC_CONF
X#endif
X
X#ifdef	NO_STATIC_CONF
X#undef	USE_STATIC_CONF
X#endif
X
X#ifdef	USE_STATIC_CONF
X#	include <schily/xmconfig.h>	/* The static autoconf stuff */
X#else	/* USE_STATIC_CONF */
X
X
X#ifdef	SCHILY_BUILD	/* #defined by Schily makefile system */
X	/*
X	 * Include $(SRCROOT)/incs/$(OARCH)/xconfig.h via
X	 * -I$(SRCROOT)/incs/$(OARCH)/
X	 */
X#	include <xconfig.h>	/* The current dynamic autoconf stuff */
X#else	/* !SCHILY_BUILD */
X/*
X * The stuff for static compilation. Include files from a previous
X * dynamic autoconfiguration.
X */
X#ifdef	__SUNOS5_SPARC_CC32
X#include <schily/sparc-sunos5-cc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_CC64
X#include <schily/sparc-sunos5-cc64/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_GCC32
X#include <schily/sparc-sunos5-gcc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_GCC64
X#include <schily/sparc-sunos5-gcc64/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__SUNOS5_X86_CC32
X#include <schily/i386-sunos5-cc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__SUNOS5_X86_CC64
X#include <schily/i386-sunos5-cc64/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__SUNOS5_X86_GCC32
X#include <schily/i386-sunos5-gcc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__SUNOS5_X86_GCC64
X#include <schily/i386-sunos5-gcc64/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X
X#ifdef	__SUNOS4_MC68000_CC32
X#ifdef	__mc68020
X#include <schily/mc68020-sunos4-cc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#endif
X#ifdef	__SUNOS4_MC68000_GCC32
X#ifdef	__mc68020
X#include <schily/mc68020-sunos4-gcc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#endif
X
X#ifdef	__HPUX_HPPA_CC32
X#include <schily/hppa-hp-ux-cc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_CC64
X#include <schily/hppa-hp-ux-cc64/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_GCC32
X#include <schily/hppa-hp-ux-gcc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_GCC64
X#include <schily/hppa-hp-ux-gcc64/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X
X#ifdef	__MSWIN_X86_CL32
X#include <schily/i686-cygwin32_nt-cl/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X
X#ifdef	__CYGWIN_X86_GCC
X#include <schily/i686-cygwin32_nt-gcc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X
X#ifndef	__JS_ARCH_CONF_INCL
XError unconfigured architecture
X#endif
X
X#endif	/* SCHILY_BUILD */
X
X#endif	/* USE_STATIC_CONF */
X
X#endif /* _SCHILY_XCONFIG_H */
END-of-smake-1.2.1/include/schily/xconfig.h
echo x - smake-1.2.1/include/schily/Makefile
sed 's/^X//' >smake-1.2.1/include/schily/Makefile << 'END-of-smake-1.2.1/include/schily/Makefile'
X#ident @(#)Makefile	1.21 09/07/10 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		align.h
X
Xinclude Targets
XXMK_FILE=	$(X_MK_LIST)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-smake-1.2.1/include/schily/Makefile
echo x - smake-1.2.1/include/schily/align.mk
sed 's/^X//' >smake-1.2.1/include/schily/align.mk << 'END-of-smake-1.2.1/include/schily/align.mk'
X#ident @(#)align.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		align.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/align.mk
echo x - smake-1.2.1/include/schily/alloca.mk
sed 's/^X//' >smake-1.2.1/include/schily/alloca.mk << 'END-of-smake-1.2.1/include/schily/alloca.mk'
X#ident @(#)alloca.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		alloca.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/alloca.mk
echo x - smake-1.2.1/include/schily/archdefs.mk
sed 's/^X//' >smake-1.2.1/include/schily/archdefs.mk << 'END-of-smake-1.2.1/include/schily/archdefs.mk'
X#ident @(#)archdefs.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		archdefs.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/archdefs.mk
echo x - smake-1.2.1/include/schily/avoffset.mk
sed 's/^X//' >smake-1.2.1/include/schily/avoffset.mk << 'END-of-smake-1.2.1/include/schily/avoffset.mk'
X#ident @(#)avoffset.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		avoffset.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/avoffset.mk
echo x - smake-1.2.1/include/schily/btorder.mk
sed 's/^X//' >smake-1.2.1/include/schily/btorder.mk << 'END-of-smake-1.2.1/include/schily/btorder.mk'
X#ident @(#)btorder.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		btorder.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/btorder.mk
echo x - smake-1.2.1/include/schily/ccomdefs.mk
sed 's/^X//' >smake-1.2.1/include/schily/ccomdefs.mk << 'END-of-smake-1.2.1/include/schily/ccomdefs.mk'
X#ident @(#)ccomdefs.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		ccomdefs.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/ccomdefs.mk
echo x - smake-1.2.1/include/schily/deflts.mk
sed 's/^X//' >smake-1.2.1/include/schily/deflts.mk << 'END-of-smake-1.2.1/include/schily/deflts.mk'
X#ident @(#)deflts.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		deflts.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/deflts.mk
echo x - smake-1.2.1/include/schily/device.mk
sed 's/^X//' >smake-1.2.1/include/schily/device.mk << 'END-of-smake-1.2.1/include/schily/device.mk'
X#ident @(#)device.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		device.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/device.mk
echo x - smake-1.2.1/include/schily/dirent.mk
sed 's/^X//' >smake-1.2.1/include/schily/dirent.mk << 'END-of-smake-1.2.1/include/schily/dirent.mk'
X#ident @(#)dirent.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		dirent.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/dirent.mk
echo x - smake-1.2.1/include/schily/errno.mk
sed 's/^X//' >smake-1.2.1/include/schily/errno.mk << 'END-of-smake-1.2.1/include/schily/errno.mk'
X#ident @(#)errno.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		errno.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/errno.mk
echo x - smake-1.2.1/include/schily/fcntl.mk
sed 's/^X//' >smake-1.2.1/include/schily/fcntl.mk << 'END-of-smake-1.2.1/include/schily/fcntl.mk'
X#ident @(#)fcntl.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		fcntl.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/fcntl.mk
echo x - smake-1.2.1/include/schily/fnmatch.mk
sed 's/^X//' >smake-1.2.1/include/schily/fnmatch.mk << 'END-of-smake-1.2.1/include/schily/fnmatch.mk'
X#ident @(#)fnmatch.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		fnmatch.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/fnmatch.mk
echo x - smake-1.2.1/include/schily/getargs.mk
sed 's/^X//' >smake-1.2.1/include/schily/getargs.mk << 'END-of-smake-1.2.1/include/schily/getargs.mk'
X#ident @(#)getargs.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		getargs.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/getargs.mk
echo x - smake-1.2.1/include/schily/getcwd.mk
sed 's/^X//' >smake-1.2.1/include/schily/getcwd.mk << 'END-of-smake-1.2.1/include/schily/getcwd.mk'
X#ident @(#)getcwd.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		getcwd.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/getcwd.mk
echo x - smake-1.2.1/include/schily/intcvt.mk
sed 's/^X//' >smake-1.2.1/include/schily/intcvt.mk << 'END-of-smake-1.2.1/include/schily/intcvt.mk'
X#ident @(#)intcvt.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		intcvt.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/intcvt.mk
echo x - smake-1.2.1/include/schily/jmpdefs.mk
sed 's/^X//' >smake-1.2.1/include/schily/jmpdefs.mk << 'END-of-smake-1.2.1/include/schily/jmpdefs.mk'
X#ident @(#)jmpdefs.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		jmpdefs.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/jmpdefs.mk
echo x - smake-1.2.1/include/schily/types.h
sed 's/^X//' >smake-1.2.1/include/schily/types.h << 'END-of-smake-1.2.1/include/schily/types.h'
X/* @(#)types.h	1.5 09/10/22 Copyright 2006-2009 J. Schilling */
X/*
X *	Abstraction from sys/types.h
X *
X *	Copyright (c) 2006-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_TYPES_H
X#define	_SCHILY_TYPES_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_TYPES_H
X#ifndef	_INCL_SYS_TYPES_H
X#include <sys/types.h>
X#define	_INCL_SYS_TYPES_H
X#endif
X#else
X#ifdef	HAVE_TYPES_H
X#ifndef	_INCL_TYPES_H
X#include <types.h>
X#define	_INCL_TYPES_H
X#endif
X#endif
X#endif
X
X#ifdef	HAVE_STDDEF_H
X#ifndef	_INCL_STDDEF_H
X#include <stddef.h>		/* For offsetof(), ptrdiff_t, wchar_t, size_t */
X#define	_INCL_STDDEF_H
X#endif
X#endif
X
X#endif	/* _SCHILY_TYPES_H */
END-of-smake-1.2.1/include/schily/types.h
echo x - smake-1.2.1/include/schily/types.mk
sed 's/^X//' >smake-1.2.1/include/schily/types.mk << 'END-of-smake-1.2.1/include/schily/types.mk'
X#ident @(#)types.mk	1.1 07/01/03 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		types.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/types.mk
echo x - smake-1.2.1/include/schily/iconv.h
sed 's/^X//' >smake-1.2.1/include/schily/iconv.h << 'END-of-smake-1.2.1/include/schily/iconv.h'
X/* @(#)iconv.h	1.4 08/01/02 Copyright 2007 J. Schilling */
X/*
X *	Abstraction from iconv.h
X *
X *	Copyright (c) 2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_ICONV_H
X#define	_SCHILY_ICONV_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_ICONV_H
X#ifndef	_INCL_ICONV_H
X#include <iconv.h>
X#define	_INCL_ICONV_H
X#endif
X#else
X#undef	USE_ICONV
X#endif
X
X/*
X * Libiconv on Cygwin is not autoconf-friendly.
X * iconv.h #defined iconv to libiconv
X * We would need a AC_CHECK_FUNC() macro that allows to specify includefiles.
X */
X#if	defined(HAVE_LIBICONV) && defined(HAVE_LIBICONV_OPEN) && \
X	defined(HAVE_LIBICONV_CLOSE) && \
X	defined(iconv) && defined(iconv_open) && defined(iconv_close)
X#	ifndef	HAVE_ICONV
X#	define	HAVE_ICONV
X#	endif
X#	ifndef	HAVE_ICONV_OPEN
X#	define	HAVE_ICONV_OPEN
X#	endif
X#	ifndef	HAVE_ICONV_CLOSE
X#	define	HAVE_ICONV_CLOSE
X#	endif
X#endif
X
X#if	!defined(HAVE_ICONV_OPEN) || !defined(HAVE_ICONV_CLOSE)
X#	undef	HAVE_ICONV
X#endif
X
X#ifndef	HAVE_ICONV
X#undef	USE_ICONV
X#endif
X
X#ifdef	NO_ICONV
X#undef	USE_ICONV
X#endif
X
X#ifndef	USE_ICONV
X#undef	iconv_t
X#define	iconv_t		char *
X#endif
X
X
X#endif	/* _SCHILY_ICONV_H */
END-of-smake-1.2.1/include/schily/iconv.h
echo x - smake-1.2.1/include/schily/libport.mk
sed 's/^X//' >smake-1.2.1/include/schily/libport.mk << 'END-of-smake-1.2.1/include/schily/libport.mk'
X#ident @(#)libport.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		libport.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/libport.mk
echo x - smake-1.2.1/include/schily/librmt.mk
sed 's/^X//' >smake-1.2.1/include/schily/librmt.mk << 'END-of-smake-1.2.1/include/schily/librmt.mk'
X#ident @(#)librmt.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		librmt.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/librmt.mk
echo x - smake-1.2.1/include/schily/maxpath.mk
sed 's/^X//' >smake-1.2.1/include/schily/maxpath.mk << 'END-of-smake-1.2.1/include/schily/maxpath.mk'
X#ident @(#)maxpath.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		maxpath.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/maxpath.mk
echo x - smake-1.2.1/include/schily/mconfig.mk
sed 's/^X//' >smake-1.2.1/include/schily/mconfig.mk << 'END-of-smake-1.2.1/include/schily/mconfig.mk'
X#ident @(#)mconfig.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		mconfig.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/mconfig.mk
echo x - smake-1.2.1/include/schily/mman.mk
sed 's/^X//' >smake-1.2.1/include/schily/mman.mk << 'END-of-smake-1.2.1/include/schily/mman.mk'
X#ident @(#)mman.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		mman.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/mman.mk
echo x - smake-1.2.1/include/schily/mtio.mk
sed 's/^X//' >smake-1.2.1/include/schily/mtio.mk << 'END-of-smake-1.2.1/include/schily/mtio.mk'
X#ident @(#)mtio.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		mtio.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/mtio.mk
echo x - smake-1.2.1/include/schily/nlsdefs.mk
sed 's/^X//' >smake-1.2.1/include/schily/nlsdefs.mk << 'END-of-smake-1.2.1/include/schily/nlsdefs.mk'
X#ident @(#)nlsdefs.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		nlsdefs.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/nlsdefs.mk
echo x - smake-1.2.1/include/schily/patmatch.mk
sed 's/^X//' >smake-1.2.1/include/schily/patmatch.mk << 'END-of-smake-1.2.1/include/schily/patmatch.mk'
X#ident @(#)patmatch.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		patmatch.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/patmatch.mk
echo x - smake-1.2.1/include/schily/prototyp.mk
sed 's/^X//' >smake-1.2.1/include/schily/prototyp.mk << 'END-of-smake-1.2.1/include/schily/prototyp.mk'
X#ident @(#)prototyp.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		prototyp.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/prototyp.mk
echo x - smake-1.2.1/include/schily/rmtio.mk
sed 's/^X//' >smake-1.2.1/include/schily/rmtio.mk << 'END-of-smake-1.2.1/include/schily/rmtio.mk'
X#ident @(#)rmtio.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		rmtio.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/rmtio.mk
echo x - smake-1.2.1/include/schily/schily.mk
sed 's/^X//' >smake-1.2.1/include/schily/schily.mk << 'END-of-smake-1.2.1/include/schily/schily.mk'
X#ident @(#)schily.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		schily.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/schily.mk
echo x - smake-1.2.1/include/schily/sigblk.mk
sed 's/^X//' >smake-1.2.1/include/schily/sigblk.mk << 'END-of-smake-1.2.1/include/schily/sigblk.mk'
X#ident @(#)sigblk.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		sigblk.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/sigblk.mk
echo x - smake-1.2.1/include/schily/signal.mk
sed 's/^X//' >smake-1.2.1/include/schily/signal.mk << 'END-of-smake-1.2.1/include/schily/signal.mk'
X#ident @(#)signal.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		signal.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/signal.mk
echo x - smake-1.2.1/include/schily/standard.mk
sed 's/^X//' >smake-1.2.1/include/schily/standard.mk << 'END-of-smake-1.2.1/include/schily/standard.mk'
X#ident @(#)standard.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		standard.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/standard.mk
echo x - smake-1.2.1/include/schily/stat.mk
sed 's/^X//' >smake-1.2.1/include/schily/stat.mk << 'END-of-smake-1.2.1/include/schily/stat.mk'
X#ident @(#)stat.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		stat.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/stat.mk
echo x - smake-1.2.1/include/schily/stdlib.mk
sed 's/^X//' >smake-1.2.1/include/schily/stdlib.mk << 'END-of-smake-1.2.1/include/schily/stdlib.mk'
X#ident @(#)stdlib.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		stdlib.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/stdlib.mk
echo x - smake-1.2.1/include/schily/stkframe.mk
sed 's/^X//' >smake-1.2.1/include/schily/stkframe.mk << 'END-of-smake-1.2.1/include/schily/stkframe.mk'
X#ident @(#)stkframe.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		stkframe.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/stkframe.mk
echo x - smake-1.2.1/include/schily/string.mk
sed 's/^X//' >smake-1.2.1/include/schily/string.mk << 'END-of-smake-1.2.1/include/schily/string.mk'
X#ident @(#)string.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		string.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/string.mk
echo x - smake-1.2.1/include/schily/termcap.mk
sed 's/^X//' >smake-1.2.1/include/schily/termcap.mk << 'END-of-smake-1.2.1/include/schily/termcap.mk'
X#ident @(#)termcap.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		termcap.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/termcap.mk
echo x - smake-1.2.1/include/schily/termios.mk
sed 's/^X//' >smake-1.2.1/include/schily/termios.mk << 'END-of-smake-1.2.1/include/schily/termios.mk'
X#ident @(#)termios.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		termios.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/termios.mk
echo x - smake-1.2.1/include/schily/time.mk
sed 's/^X//' >smake-1.2.1/include/schily/time.mk << 'END-of-smake-1.2.1/include/schily/time.mk'
X#ident @(#)time.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		time.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/time.mk
echo x - smake-1.2.1/include/schily/unistd.mk
sed 's/^X//' >smake-1.2.1/include/schily/unistd.mk << 'END-of-smake-1.2.1/include/schily/unistd.mk'
X#ident @(#)unistd.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		unistd.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/unistd.mk
echo x - smake-1.2.1/include/schily/ioctl.h
sed 's/^X//' >smake-1.2.1/include/schily/ioctl.h << 'END-of-smake-1.2.1/include/schily/ioctl.h'
X/* @(#)ioctl.h	1.1 07/05/24 Copyright 2007 J. Schilling */
X/*
X *	Abstraction from sys/ioctl.h
X *
X *	Copyright (c) 2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_IOCTL_H
X#define	_SCHILY_IOCTL_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_IOCTL_H
X#ifndef	_INCL_SYS_IOCTL_H
X#include <sys/ioctl.h>
X#define	_INCL_SYS_IOCTL_H
X#endif
X#endif
X
X#endif	/* _SCHILY_IOCTL_H */
END-of-smake-1.2.1/include/schily/ioctl.h
echo x - smake-1.2.1/include/schily/utime.mk
sed 's/^X//' >smake-1.2.1/include/schily/utime.mk << 'END-of-smake-1.2.1/include/schily/utime.mk'
X#ident @(#)utime.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		utime.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/utime.mk
echo x - smake-1.2.1/include/schily/utypes.mk
sed 's/^X//' >smake-1.2.1/include/schily/utypes.mk << 'END-of-smake-1.2.1/include/schily/utypes.mk'
X#ident @(#)utypes.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		utypes.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/utypes.mk
echo x - smake-1.2.1/include/schily/varargs.mk
sed 's/^X//' >smake-1.2.1/include/schily/varargs.mk << 'END-of-smake-1.2.1/include/schily/varargs.mk'
X#ident @(#)varargs.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		varargs.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/varargs.mk
echo x - smake-1.2.1/include/schily/wait.mk
sed 's/^X//' >smake-1.2.1/include/schily/wait.mk << 'END-of-smake-1.2.1/include/schily/wait.mk'
X#ident @(#)wait.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		wait.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/wait.mk
echo x - smake-1.2.1/include/schily/xconfig.mk
sed 's/^X//' >smake-1.2.1/include/schily/xconfig.mk << 'END-of-smake-1.2.1/include/schily/xconfig.mk'
X#ident @(#)xconfig.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		xconfig.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/xconfig.mk
echo x - smake-1.2.1/include/schily/xmconfig.mk
sed 's/^X//' >smake-1.2.1/include/schily/xmconfig.mk << 'END-of-smake-1.2.1/include/schily/xmconfig.mk'
X#ident @(#)xmconfig.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		xmconfig.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/xmconfig.mk
echo x - smake-1.2.1/include/schily/param.mk
sed 's/^X//' >smake-1.2.1/include/schily/param.mk << 'END-of-smake-1.2.1/include/schily/param.mk'
X#ident @(#)param.mk	1.1 07/01/03 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		param.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/param.mk
echo x - smake-1.2.1/include/schily/wchar.h
sed 's/^X//' >smake-1.2.1/include/schily/wchar.h << 'END-of-smake-1.2.1/include/schily/wchar.h'
X/* @(#)wchar.h	1.12 09/06/14 Copyright 2007-2009 J. Schilling */
X/*
X *	Abstraction from wchar.h
X *
X *	Copyright (c) 2007-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_WCHAR_H
X#define	_SCHILY_WCHAR_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_STDLIB_H
X#include <schily/stdlib.h>	/* for MB_CUR_MAX */
X#endif
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X#ifdef	HAVE_STDDEF_H
X#ifndef	_INCL_STDDEF_H
X#include <stddef.h>		/* Needed for e.g. size_t (POSIX)  */
X#define	_INCL_STDDEF_H
X#endif
X#endif
X#ifndef _SCHILY_STDIO_H
X#include <schily/stdio.h>	/* Needed for e.g. FILE (POSIX)	   */
X#endif
X#ifndef	_SCHILY_VARARGS_H
X#include <schily/varargs.h>	/* Needed for e.g. va_list (POSIX) */
X#endif
X
X
X#ifdef	HAVE_WCHAR_H
X
X#ifndef	_INCL_WCHAR_H
X#include <wchar.h>
X#define	_INCL_WCHAR_H
X#endif
X
X#ifndef	USE_WCHAR
X#define	USE_WCHAR
X#endif
X
X#else	/* HAVE_WCHAR_H */
X
X#undef	USE_WCHAR
X#endif	/* !HAVE_WCHAR_H */
X
X#if	!defined(HAVE_WCTYPE_H) && !defined(HAVE_ISWPRINT)
X#undef	USE_WCHAR
X#undef	USE_WCTYPE
X#endif
X
X#ifdef	NO_WCTYPE
X#undef	USE_WCHAR
X#undef	USE_WCTYPE
X#endif
X
X#ifdef	NO_WCHAR
X#undef	USE_WCHAR
X#undef	USE_WCTYPE
X#endif
X
X#ifndef	USE_WCHAR
X
X/*
X * We either don't have wide chars or we don't use them...
X */
X#undef	wchar_t
X#define	wchar_t	char
X#undef	wint_t
X#define	wint_t	int
X
X#undef	WEOF
X#define	WEOF	((wint_t)-1)
X
X#ifndef	_SCHILY_UTYPES_H
X#include <schily/utypes.h>	/* For TYPE_MAXVAL() */
X#endif
X
X#undef	WCHAR_MAX
X#define	WCHAR_MAX	TYPE_MAXVAL(wchar_t)
X#undef	WCHAR_MIN
X#define	WCHAR_MIN	TYPE_MINVAL(wchar_t)
X
X#undef	SIZEOF_WCHAR_T
X#define	SIZEOF_WCHAR_T	SIZEOF_CHAR
X
X#undef	MB_CUR_MAX
X#define	MB_CUR_MAX	1
X#undef	MB_LEN_MAX
X#define	MB_LEN_MAX	1
X
X/*
X * The mbtowc() for the non-multibyte case could be as simple as
X *
X * #define	mbtowc(wp, cp, len)	(*(wp) = *(cp), 1)
X *
X * but Mac OS X forces us to do many mbtowc(NULL, NULL, 0) calls in order
X * to reset the internal state. On other platforms that do not support
X * wide chars, NULL may be defined as (void *)0, so we need to check
X * for "wp" != NULL and to cast "wp" and "cp" to their expected types.
X */
X#undef	mbtowc
X#define	mbtowc(wp, cp, len)	((void)((wp) ? \
X				*(wchar_t *)(wp) = *(char *)(cp) : 1), 1)
X#undef	wctomb
X#define	wctomb(cp, wc)		(*(cp) = wc, 1)
X
X#endif	/* !USE_WCHAR */
X
X#endif	/* _SCHILY_WCHAR_H */
END-of-smake-1.2.1/include/schily/wchar.h
echo x - smake-1.2.1/include/schily/wchar.mk
sed 's/^X//' >smake-1.2.1/include/schily/wchar.mk << 'END-of-smake-1.2.1/include/schily/wchar.mk'
X#ident @(#)wchar.mk	1.1 07/01/24 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		wchar.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/wchar.mk
echo x - smake-1.2.1/include/schily/schilyp.h
sed 's/^X//' >smake-1.2.1/include/schily/schilyp.h << 'END-of-smake-1.2.1/include/schily/schilyp.h'
X/* @(#)schilyp.h	1.2 09/06/06 Copyright 2007-2009 J. Schilling */
X/*
X *	Include definitions for libschily and define *printf() -> js_*printf()
X *
X *	Copyright (c) 2007-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_SCHILYP_H
X#define	_SCHILY_SCHILYP_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef _SCHILY_SCHILY_H
X#include <schily/schily.h>
X#endif
X
X/*
X * Always use js_*printf()
X */
X#undef	fprintf
X#define	fprintf		js_fprintf
X#undef	printf
X#define	printf		js_printf
X#undef	snprintf
X#define	snprintf	js_snprintf
X#undef	sprintf
X#define	sprintf		js_sprintf
X
X#endif	/* _SCHILY_SCHILYP_H */
END-of-smake-1.2.1/include/schily/schilyp.h
echo x - smake-1.2.1/include/schily/schilyp.mk
sed 's/^X//' >smake-1.2.1/include/schily/schilyp.mk << 'END-of-smake-1.2.1/include/schily/schilyp.mk'
X#ident @(#)schilyp.mk	1.1 07/02/13 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		schilyp.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/schilyp.mk
echo x - smake-1.2.1/include/schily/siconv.h
sed 's/^X//' >smake-1.2.1/include/schily/siconv.h << 'END-of-smake-1.2.1/include/schily/siconv.h'
X/* @(#)siconv.h	1.3 09/06/14 Copyright 2007-2009 J. Schilling */
X/*
X *	Definitions fur users of libsiconv
X *
X *	Copyright (c) 2007-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_SICONV_H
X#define	_SCHILY_SICONV_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X#ifndef _SCHILY_ICONV_H
X#include <schily/iconv.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X
Xtypedef struct siconv_table	siconvt_t;
Xstruct siconv_table {
X	char		*sic_name;		/* SICONV charset name	*/
X	UInt16_t	*sic_cs2uni;		/* Charset -> Unicode	*/
X	UInt8_t		**sic_uni2cs;		/* Unicode -> Charset	*/
X	iconv_t		sic_cd2uni;		/* iconv Charset -> Unicode */
X	iconv_t		sic_uni2cd;		/* iconv Unicode -> Charset */
X	siconvt_t	*sic_alt;		/* alternate iconv tab	*/
X	siconvt_t	*sic_next;		/* Next table		*/
X};
X
X#define	use_iconv(t)	((t)->sic_cd2uni != NULL)
X
X#define	sic_c2uni(t, c)	((t)->sic_cs2uni[c])
X#define	sic_uni2c(t, c)	((t)->sic_uni2cs[((c) >> 8) & 0xFF][(c) & 0xFF])
X
Xextern int		sic_list		__PR((FILE *));
Xextern siconvt_t	*sic_open		__PR((char *));
Xextern void 		sic_close		__PR((siconvt_t *));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_SICONV_H */
END-of-smake-1.2.1/include/schily/siconv.h
echo x - smake-1.2.1/include/schily/iconv.mk
sed 's/^X//' >smake-1.2.1/include/schily/iconv.mk << 'END-of-smake-1.2.1/include/schily/iconv.mk'
X#ident @(#)iconv.mk	1.1 07/05/04 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		iconv.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/iconv.mk
echo x - smake-1.2.1/include/schily/siconv.mk
sed 's/^X//' >smake-1.2.1/include/schily/siconv.mk << 'END-of-smake-1.2.1/include/schily/siconv.mk'
X#ident @(#)siconv.mk	1.1 07/05/14 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		siconv.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/siconv.mk
echo x - smake-1.2.1/include/schily/ioctl.mk
sed 's/^X//' >smake-1.2.1/include/schily/ioctl.mk << 'END-of-smake-1.2.1/include/schily/ioctl.mk'
X#ident @(#)ioctl.mk	1.1 07/05/24 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		ioctl.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/ioctl.mk
echo x - smake-1.2.1/include/schily/checkerr.h
sed 's/^X//' >smake-1.2.1/include/schily/checkerr.h << 'END-of-smake-1.2.1/include/schily/checkerr.h'
X/* @(#)checkerr.h	1.11 09/06/06 Copyright 2003-2009 J. Schilling */
X/*
X *	Generic error control for programs that do file i/o.
X *	The error control is usually used by archiving programs.
X *
X *	The current version does not provide a stable interface.
X *	It does not support multi-threaded programs and it may call
X *	comerr() from the parser. If you use the code before there is
X *	an official stable and "library-compliant" interface, be careful
X *	and watch for changes.
X *
X *	Copyright (c) 2003-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_CHECKERR_H
X#define	_SCHILY_CHECKERR_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_STANDARD_H
X#include <schily/standard.h>
X#endif
X#ifndef	_SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X
X/*
X * Error conditions handled by error control.
X */
X#define	E_STAT		0x0001		/* Could not stat(2) file	   */
X#define	E_GETACL	0x0002		/* Could not retrieve ACL info	   */
X#define	E_OPEN		0x0004		/* Could not open file		   */
X#define	E_READ		0x0008		/* Could not read file		   */
X#define	E_WRITE		0x0010		/* Could not write file		   */
X#define	E_GROW		0x0020		/* File did grow during backup	   */
X#define	E_SHRINK	0x0040		/* File did shrink during backup   */
X#define	E_MISSLINK	0x0080		/* Missing hard link(s) for file   */
X#define	E_NAMETOOLONG	0x0100		/* File name too long for archive  */
X#define	E_FILETOOBIG	0x0200		/* File too big for archive	   */
X#define	E_SPECIALFILE	0x0400		/* Improper file type for archive  */
X#define	E_READLINK	0x0800		/* Could not read symbolic link	   */
X#define	E_GETXATTR	0x1000		/* Could not get xattr		   */
X#define	E_CHDIR		0x2000		/* Could not chdir()		   */
X
X#define	E_SETTIME	0x10000		/* Could not set file times	   */
X#define	E_SETMODE	0x20000		/* Could not set access modes	   */
X#define	E_SECURITY	0x40000		/* Skipped for security reasons	   */
X#define	E_LSECURITY	0x80000		/* Link skipped for security	   */
X#define	E_SAMEFILE	0x100000	/* Skipped from/to identical	   */
X#define	E_BADACL	0x200000	/* ACL string conversion error	   */
X#define	E_SETACL	0x400000	/* Could not set ACL for file	   */
X#define	E_SETXATTR	0x800000	/* Could not set xattr		   */
X
X#define	E_DIFF		0x10000000	/* Diffs encountered		   */
X#define	E_WARN		0x20000000	/* Print this error but do exit(0) */
X#define	E_ABORT		0x40000000	/* Abort on this error		   */
X#define	E_EXT		0x80000000	/* Extended (TBD later)		   */
X
X#define	E_ALL		(~(UInt32_t)(E_DIFF|E_ABORT))
X
Xextern	int	errconfig	__PR((char *name));
Xextern	BOOL	errhidden	__PR((int etype, const char *fname));
Xextern	BOOL	errwarnonly	__PR((int etype, const char *fname));
Xextern	BOOL	errabort	__PR((int etype, const char *fname, BOOL doexit));
X
X#endif /* _SCHILY_CHECKERR_H */
END-of-smake-1.2.1/include/schily/checkerr.h
echo x - smake-1.2.1/include/schily/checkerr.mk
sed 's/^X//' >smake-1.2.1/include/schily/checkerr.mk << 'END-of-smake-1.2.1/include/schily/checkerr.mk'
X#ident @(#)checkerr.mk	1.1 07/07/14 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		checkerr.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/checkerr.mk
echo x - smake-1.2.1/include/schily/fetchdir.h
sed 's/^X//' >smake-1.2.1/include/schily/fetchdir.h << 'END-of-smake-1.2.1/include/schily/fetchdir.h'
X/* @(#)fetchdir.h	1.5 08/04/06 Copyright 2002-2008 J. Schilling */
X/*
X *	Copyright (c) 2002-2008 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_FETCHDIR_H
X#define	_SCHILY_FETCHDIR_H
X
X#ifndef	_SCHILY_DIRENT_H
X#include <schily/dirent.h>			/* Includes mconfig.h if needed	    */
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern	char	*fetchdir	__PR((char *dir, int *entp, int *lenp, ino_t **inop));
Xextern	char	*dfetchdir	__PR((DIR *dir, char *dirname, int *entp, int *lenp, ino_t **inop));
Xextern	int	fdircomp	__PR((const void *p1, const void *p2));
Xextern	char	**sortdir	__PR((char *dir, int *entp));
Xextern	int	cmpdir		__PR((int ents1, int ents2,
X					char **ep1, char **ep2,
X					char **oa, char **od,
X					int *alenp, int *dlenp));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_FETCHDIR_H */
END-of-smake-1.2.1/include/schily/fetchdir.h
echo x - smake-1.2.1/include/schily/find.mk
sed 's/^X//' >smake-1.2.1/include/schily/find.mk << 'END-of-smake-1.2.1/include/schily/find.mk'
X#ident @(#)find.mk	1.1 08/04/06 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		find.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/find.mk
echo x - smake-1.2.1/include/schily/find.h
sed 's/^X//' >smake-1.2.1/include/schily/find.h << 'END-of-smake-1.2.1/include/schily/find.h'
X/* @(#)find.h	1.20 09/01/13 Copyright 2005-2009 J. Schilling */
X/*
X *	Definitions for libfind users.
X *
X *	Copyright (c) 2004-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_FIND_H
X#define	_SCHILY_FIND_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef _SCHILY_STDIO_H
X#include <schily/stdio.h>
X#endif
X
X#ifndef _SCHILY_STANDARD_H
X#include <schily/standard.h>
X#endif
X#ifndef _SCHILY_STAT_H
X#include <schily/stat.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xtypedef struct find_args {
X	int	Argc;		/* A copy of argc		*/
X	char	**Argv;		/* A copy of argv		*/
X	FILE	*std[3];	/* To redirect stdin/stdout/err	*/
X	int	primtype;	/* The type of the last primary	*/
X	BOOL	found_action;	/* -print/-ls/-exec found	*/
X	int	patlen;		/* strlen() for longest pattern	*/
X	int	walkflags;	/* Walkflags modifed by parser	*/
X	int	maxdepth;	/* -mindepth arg		*/
X	int	mindepth;	/* -maxdepth arg		*/
X	struct plusargs *plusp;	/* List of -exec {} + commands	*/
X	void	*jmp;		/* Used internally by parser	*/
X	int	error;		/* Error code from find_parse()	*/
X} finda_t;
X
X/*
X * finda_t->primtype is set to ENDARGS by find_parse() if a complete expression
X * could be parsed.
X */
X#define	FIND_ENDARGS	1000	/* Found End of Arg Vector		*/
X#define	FIND_ERRARG	1001	/* Parser abort by -help or error	*/
X
X/*
X * Flags used for struct WALK->pflags:
X */
X#define	PF_ACL		0x00001	/* Check ACL from struct WALK->pflags	*/
X#define	PF_HAS_ACL	0x10000	/* This file has ACL			*/
X#define	PF_XATTR	0x00002	/* Check XATTR from struct WALK->pflags	*/
X#define	PF_HAS_XATTR	0x20000	/* This file has XATTR			*/
X
X#ifndef	FIND_NODE
X#define	findn_t	void
X#endif
X
X#ifndef	__squit_t_defined
X
Xtypedef struct {
X	sqfun_t	quitfun;	/* Function to query for shell signal quit   */
X	void	*qfarg;		/* Generic arg for shell builtin quit fun    */
X} squit_t;
X
X#define	__squit_t_defined
X#endif
X
X
Xextern	void	find_argsinit	__PR((finda_t *fap));
Xextern	void	find_timeinit	__PR((time_t __now));
Xextern	findn_t	*find_printnode	__PR((void));
Xextern	findn_t	*find_addprint	__PR((findn_t *np, finda_t *fap));
Xextern	void	find_free	__PR((findn_t *t, finda_t *fap));
Xextern	int	find_token	__PR((char *word));
Xextern	char	*find_tname	__PR((int op));
Xextern	findn_t	*find_parse	__PR((finda_t *fap));
Xextern	void	find_firstprim	__PR((int *pac, char *const **pav));
X
Xextern	BOOL	find_primary	__PR((findn_t *t, int op));
Xextern	BOOL	find_pname	__PR((findn_t *t, char *word));
Xextern	BOOL	find_expr	__PR((char *f, char *ff, struct stat *fs, struct WALK *state, findn_t *t));
X
Xextern	int	find_plusflush	__PR((void *p, struct WALK *state));
Xextern	void	find_usage	__PR((FILE *f));
Xextern	int	find_main	__PR((int ac, char **av, char **ev, FILE *std[3], squit_t *__quit));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_FIND_H */
END-of-smake-1.2.1/include/schily/find.h
echo x - smake-1.2.1/include/schily/walk.mk
sed 's/^X//' >smake-1.2.1/include/schily/walk.mk << 'END-of-smake-1.2.1/include/schily/walk.mk'
X#ident @(#)walk.mk	1.1 08/04/06 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		walk.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/walk.mk
echo x - smake-1.2.1/include/schily/fstream.h
sed 's/^X//' >smake-1.2.1/include/schily/fstream.h << 'END-of-smake-1.2.1/include/schily/fstream.h'
X/* @(#)fstream.h	1.14 08/01/02 Copyright 1985-2008 J. Schilling */
X/*
X *	Definitions for the file stream package
X *
X *	Copyright (c) 1985-2008 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_FSTREAM_H
X#define	_SCHILY_FSTREAM_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#define	STR_SBUF_SIZE	127	/* Size of "static" stream buffer	*/
X
X#ifdef	WSTRINGS
Xtypedef	short	CHAR;
X#else
Xtypedef	char	CHAR;
X#endif
X
X
Xtypedef struct fstream {
X	FILE	*fstr_file;
X	CHAR	*fstr_bp;
X	CHAR	*fstr_buf;
X	int 	(*fstr_func) __PR((struct fstream *, FILE *));
X	int	(*fstr_rfunc) __PR((struct fstream *));
X	CHAR	fstr_sbuf[STR_SBUF_SIZE + 1];
X} fstream;
X
Xtypedef	int	(*fstr_fun) __PR((struct fstream *, FILE *));
Xtypedef	int	(*fstr_efun) __PR((char *));
Xtypedef	int	(*fstr_rfun) __PR((struct fstream *));
X
Xextern	fstream	*mkfstream	__PR((FILE *f, fstr_fun, fstr_rfun, fstr_efun));
Xextern	void	fsclose		__PR((fstream *fsp));
Xextern	FILE	*fssetfile	__PR((fstream *fsp, FILE *f));
Xextern	int	fsgetc		__PR((fstream *fsp));
Xextern	void	fspushstr	__PR((fstream *fsp, char *ss));
Xextern	void	fspushcha	__PR((fstream *fsp, int c));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_FSTREAM_H */
END-of-smake-1.2.1/include/schily/fstream.h
echo x - smake-1.2.1/include/schily/fetchdir.mk
sed 's/^X//' >smake-1.2.1/include/schily/fetchdir.mk << 'END-of-smake-1.2.1/include/schily/fetchdir.mk'
X#ident @(#)fetchdir.mk	1.1 08/04/06 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		fetchdir.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/fetchdir.mk
echo x - smake-1.2.1/include/schily/idcache.h
sed 's/^X//' >smake-1.2.1/include/schily/idcache.h << 'END-of-smake-1.2.1/include/schily/idcache.h'
X/* @(#)idcache.h	1.2 08/04/06 Copyright 1993, 1995-2008 J. Schilling */
X/*
X *	Copyright (c) 1993, 1995-2008 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_IDCACHE_H
X#define	_SCHILY_IDCACHE_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
Xextern	BOOL	ic_nameuid	__PR((char *name, int namelen, uid_t uid));
Xextern	BOOL	ic_uidname	__PR((char *name, int namelen, uid_t *uidp));
Xextern	BOOL	ic_namegid	__PR((char *name, int namelen, gid_t gid));
Xextern	BOOL 	ic_gidname	__PR((char *name, int namelen, gid_t *gidp));
Xextern	uid_t	ic_uid_nobody	__PR((void));
Xextern	gid_t	ic_gid_nobody	__PR((void));
X
X#endif	/* _SCHILY_IDCACHE_H */
END-of-smake-1.2.1/include/schily/idcache.h
echo x - smake-1.2.1/include/schily/idcache.mk
sed 's/^X//' >smake-1.2.1/include/schily/idcache.mk << 'END-of-smake-1.2.1/include/schily/idcache.mk'
X#ident @(#)idcache.mk	1.1 08/04/06 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		idcache.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/idcache.mk
echo x - smake-1.2.1/include/schily/walk.h
sed 's/^X//' >smake-1.2.1/include/schily/walk.h << 'END-of-smake-1.2.1/include/schily/walk.h'
X/* @(#)walk.h	1.26 09/06/06 Copyright 2004-2009 J. Schilling */
X/*
X *	Definitions for directory tree walking
X *
X *	Copyright (c) 2004-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_WALK_H
X#define	_SCHILY_WALK_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef _SCHILY_STAT_H
X#include <schily/stat.h>
X#endif
X
X#ifndef _SCHILY_STDIO_H
X#include <schily/stdio.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * Flags to control treewalk() via 'walkflags'.
X *
X *	WALK_CHDIR	is not implemented, treewalk() always does chdir()
X *
X *	WALK_PHYS	Clearing WALK_PHYS has highest precedence and equals
X *			'find -follow'. If WALK_PHYS is clear, always use stat.
X *			By default, WALK_PHYS should be set.
X *
X *	WALK_ARGFOLLOW	If WALK_ARGFOLLOW is set, symlinks that are used as
X *			the first argument for trewalk() are followed even
X *			if WALK_PHYS is set. Setting WALK_ARGFOLLOW equals
X *			'find -H'.
X *
X *	WALK_ALLFOLLOW	If WALK_ALLFOLLOW is set, all symlinks are followed
X *			even if WALK_PHYS is set. Setting WALK_ALLFOLLOW
X *			equals 'find -L'.
X */
X#define	WALK_PHYS	1	/* Use lstat() instead of stat()	*/
X#define	WALK_MOUNT	2	/* Do not cross mount points		*/
X#define	WALK_DEPTH	4	/* Call content before calling the dir	*/
X#define	WALK_CHDIR	8	/* Use chdir() to each directory	*/
X#define	WALK_ARGFOLLOW	0x10	/* Use stat() for top level args only	*/
X#define	WALK_ALLFOLLOW	0x20	/* Use stat() for all files		*/
X#define	WALK_NOSTAT	0x40	/* Avoid to call stat() if st_nlink =>2 */
X#define	WALK_NOEXIT	0x100	/* Do not exit() in case of hard errors	*/
X#define	WALK_NOMSG	0x200	/* Do not write messages to stderr	*/
X#define	WALK_LS_ATIME	0x1000	/* -ls lists atime instead of mtime	*/
X#define	WALK_LS_CTIME	0x2000	/* -ls lists ctime instead of mtime	*/
X
X/*
X * The 'type' argument to walkfun.
X */
X#define	WALK_F		1	/* File	*/
X#define	WALK_SL		2	/* Symbolic Link */
X#define	WALK_D		3	/* Directory */
X#define	WALK_DP		4	/* Directory previously visited */
X#define	WALK_DNR	5	/* Directory with no read permission */
X#define	WALK_NS		6	/* Unknown file type stat failed */
X#define	WALK_SLN	7	/* Symbolic Link that points to nonexistent file */
X
X#ifndef	__sqfun_t_defined
Xtypedef	int	(*sqfun_t)	__PR((void *arg));
X#define	__sqfun_t_defined
X#endif
X
Xstruct WALK {
X	int	flags;		/* Flags for communication with (*walkfun)() */
X	int	base;		/* Filename offset in path for  (*walkfun)() */
X	int	level;		/* The nesting level set up for (*walkfun)() */
X	int	walkflags;	/* treewalk() control flags		    */
X	void	*twprivate;	/* treewalk() private do not touch	    */
X	FILE	*std[3];	/* To redirect stdin/stdout/err in treewalk  */
X	char	**env;		/* To allow different env in treewalk/exec   */
X	sqfun_t	quitfun;	/* Function to query for shell signal quit   */
X	void	*qfarg;		/* Generic arg for shell builtin quit fun    */
X	int	maxdepth;	/* (*walkfun)() private, unused by treewalk  */
X	int	mindepth;	/* (*walkfun)() private, unused by treewalk  */
X	char	*lname;		/* (*walkfun)() private, unused by treewalk  */
X	void	*tree;		/* (*walkfun)() private, unused by treewalk  */
X	void	*patstate;	/* (*walkfun)() private, unused by treewalk  */
X	int	err;		/* (*walkfun)() private, unused by treewalk  */
X	int	pflags;		/* (*walkfun)() private, unused by treewalk  */
X	int	auxi;		/* (*walkfun)() private, unused by treewalk  */
X	void	*auxp;		/* (*walkfun)() private, unused by treewalk  */
X};
X
X/*
X * Flags in struct WALK used to communicate with (*walkfun)()
X */
X#define	WALK_WF_PRUNE	1	/* (*walkfun)() -> walk(): abort waking tree	*/
X#define	WALK_WF_QUIT	2	/* (*walkfun)() -> walk(): quit completely	*/
X#define	WALK_WF_NOCHDIR	4	/* walk() -> (*walkfun)(): WALK_DNR is cannot chdir() */
X#define	WALK_WF_NOCWD	8	/* walk() -> caller: cannot get working dir	*/
X#define	WALK_WF_NOHOME	16	/* walk() -> caller: cannot chdir("..")		*/
X
Xtypedef	int	(*walkfun)	__PR((char *_nm, struct stat *_fs, int _type, struct WALK *_state));
X
Xextern	int	treewalk	__PR((char *_nm, walkfun _fn, struct WALK *_state));
Xextern	void	walkinitstate	__PR((struct WALK *_state));
Xextern	void	*walkopen	__PR((struct WALK *_state));
Xextern	int	walkgethome	__PR((struct WALK *_state));
Xextern	int	walkhome	__PR((struct WALK *_state));
Xextern	int	walkclose	__PR((struct WALK *_state));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_WALK_H */
END-of-smake-1.2.1/include/schily/walk.h
echo x - smake-1.2.1/include/schily/md4.mk
sed 's/^X//' >smake-1.2.1/include/schily/md4.mk << 'END-of-smake-1.2.1/include/schily/md4.mk'
X#ident "@(#)md4.mk	1.1 09/06/20 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		md4.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/md4.mk
echo x - smake-1.2.1/include/schily/hostname.h
sed 's/^X//' >smake-1.2.1/include/schily/hostname.h << 'END-of-smake-1.2.1/include/schily/hostname.h'
X/* @(#)hostname.h	1.18 09/07/28 Copyright 1995-2008 J. Schilling */
X/*
X *	This file has been separated from libport.h in order to avoid
X *	to include netdb.h in case gethostname() is not needed.
X *
X *	Copyright (c) 1995-2008 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X
X#ifndef _SCHILY_HOSTNAME_H
X#define	_SCHILY_HOSTNAME_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X/*
X * Try to get HOST_NAME_MAX for gethostname() from unistd.h or limits.h
X */
X#ifndef _SCHILY_UNISTD_H
X#include <schily/unistd.h>
X#endif
X#ifndef _SCHILY_LIMITS_H
X#include <schily/limits.h>
X#endif
X
X#ifndef HOST_NAME_MAX
X#if	defined(HAVE_NETDB_H) && !defined(HOST_NOT_FOUND) && \
X				!defined(_INCL_NETDB_H)
X#include <netdb.h>		/* #defines MAXHOSTNAMELEN */
X#define	_INCL_NETDB_H
X#endif
X#ifdef	MAXHOSTNAMELEN
X#define	HOST_NAME_MAX	MAXHOSTNAMELEN
X#endif
X#endif
X
X#ifndef HOST_NAME_MAX
X#ifndef	_SCHILY_PARAM_H
X#include <schily/param.h>	/* Include various defs needed with some OS */
X#endif				/* Linux MAXHOSTNAMELEN */
X#ifdef	MAXHOSTNAMELEN
X#define	HOST_NAME_MAX	MAXHOSTNAMELEN
X#endif
X#endif
X
X#ifndef HOST_NAME_MAX
X#define	HOST_NAME_MAX	255
X#endif
X#ifndef	MAXHOSTNAMELEN
X#define	MAXHOSTNAMELEN	HOST_NAME_MAX
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifndef	HAVE_GETHOSTNAME
Xextern	int		gethostname	__PR((char *name, int namelen));
X#endif
X#ifndef	HAVE_GETDOMAINNAME
Xextern	int		getdomainname	__PR((char *name, int namelen));
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_HOSTNAME_H */
END-of-smake-1.2.1/include/schily/hostname.h
echo x - smake-1.2.1/include/schily/fstream.mk
sed 's/^X//' >smake-1.2.1/include/schily/fstream.mk << 'END-of-smake-1.2.1/include/schily/fstream.mk'
X#ident @(#)fstream.mk	1.1 08/01/02 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		fstream.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/fstream.mk
echo x - smake-1.2.1/include/schily/stdio.h
sed 's/^X//' >smake-1.2.1/include/schily/stdio.h << 'END-of-smake-1.2.1/include/schily/stdio.h'
X/* @(#)stdio.h	1.2 09/04/08 Copyright 2009 J. Schilling */
X/*
X *	Abstraction from stdio.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_STDIO_H
X#define	_SCHILY_STDIO_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef _INCL_STDIO_H
X#include <stdio.h>
X#define	_INCL_STDIO_H
X#endif
X
X#ifdef	HAVE_LARGEFILES
X/*
X * If HAVE_LARGEFILES is defined, it is guaranteed that fseeko()/ftello()
X * both are available.
X */
X#define	fseek	fseeko
X#define	ftell	ftello
X#else	/* !HAVE_LARGEFILES */
X
X/*
X * If HAVE_LARGEFILES is not defined, we depend on specific tests for
X * fseeko()/ftello() which must have been done before the tests for
X * Large File support have been done.
X * Note that this only works if the tests used below are really done before
X * the Large File autoconf test is run. This is because autoconf does no
X * clean testing but instead cumulatively modifes the envivonment used for
X * testing.
X */
X#ifdef	HAVE_FSEEKO
X#	define	fseek	fseeko
X#endif
X#ifdef	HAVE_FTELLO
X#	define	ftell	ftello
X#endif
X#endif
X
X#endif	/* _SCHILY_STDIO_H */
END-of-smake-1.2.1/include/schily/stdio.h
echo x - smake-1.2.1/include/schily/hostname.mk
sed 's/^X//' >smake-1.2.1/include/schily/hostname.mk << 'END-of-smake-1.2.1/include/schily/hostname.mk'
X#ident @(#)hostname.mk	1.1 08/12/20 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		hostname.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/hostname.mk
echo x - smake-1.2.1/include/schily/sysexits.h
sed 's/^X//' >smake-1.2.1/include/schily/sysexits.h << 'END-of-smake-1.2.1/include/schily/sysexits.h'
X/* @(#)sysexits.h	1.5 09/06/14 J. Schilling */
X/*
X *
X * Copyright (c) 2009 J. Schilling
X *
X * Copyright (c) 1987, 1993
X *	The Regents of the University of California.  All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X *    notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X *    notice, this list of conditions and the following disclaimer in the
X *    documentation and/or other materials provided with the distribution.
X * 3. Neither the name of the University nor the names of its contributors
X *    may be used to endorse or promote products derived from this software
X *    without specific prior written permission.
X *
X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X *
X *	@(#)sysexits.h	8.1 (Berkeley) 6/2/93
X */
X
X#ifndef	_SCHILY_SYSEXITS_H
X#define	_SCHILY_SYSEXITS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYSEXITS_H
X#include <sysexits.h>
X#else
X
X/*
X *  SYSEXITS.H -- Exit status codes for system programs.
X *
X *	This include file attempts to categorize possible error
X *	exit statuses for system programs, notably delivermail
X *	and the Berkeley network.
X *
X *	Error numbers begin at EX__BASE to reduce the possibility of
X *	clashing with other exit statuses that random programs may
X *	already return.  The meaning of the codes is approximately
X *	as follows:
X *
X *	EX_USAGE -- The command was used incorrectly, e.g., with
X *		the wrong number of arguments, a bad flag, a bad
X *		syntax in a parameter, or whatever.
X *	EX_DATAERR -- The input data was incorrect in some way.
X *		This should only be used for user's data & not
X *		system files.
X *	EX_NOINPUT -- An input file (not a system file) did not
X *		exist or was not readable.  This could also include
X *		errors like "No message" to a mailer (if it cared
X *		to catch it).
X *	EX_NOUSER -- The user specified did not exist.  This might
X *		be used for mail addresses or remote logins.
X *	EX_NOHOST -- The host specified did not exist.  This is used
X *		in mail addresses or network requests.
X *	EX_UNAVAILABLE -- A service is unavailable.  This can occur
X *		if a support program or file does not exist.  This
X *		can also be used as a catchall message when something
X *		you wanted to do doesn't work, but you don't know
X *		why.
X *	EX_SOFTWARE -- An internal software error has been detected.
X *		This should be limited to non-operating system related
X *		errors as possible.
X *	EX_OSERR -- An operating system error has been detected.
X *		This is intended to be used for such things as "cannot
X *		fork", "cannot create pipe", or the like.  It includes
X *		things like getuid returning a user that does not
X *		exist in the passwd file.
X *	EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,
X *		etc.) does not exist, cannot be opened, or has some
X *		sort of error (e.g., syntax error).
X *	EX_CANTCREAT -- A (user specified) output file cannot be
X *		created.
X *	EX_IOERR -- An error occurred while doing I/O on some file.
X *	EX_TEMPFAIL -- temporary failure, indicating something that
X *		is not really an error.  In sendmail, this means
X *		that a mailer (e.g.) could not create a connection,
X *		and the request should be reattempted later.
X *	EX_PROTOCOL -- the remote system returned something that
X *		was "not possible" during a protocol exchange.
X *	EX_NOPERM -- You did not have sufficient permission to
X *		perform the operation.  This is not intended for
X *		file system problems, which should use NOINPUT or
X *		CANTCREAT, but rather for higher level permissions.
X */
X
X#define	EX_OK		0	/* successful termination */
X
X#define	EX__BASE	64	/* base value for error messages */
X
X#define	EX_USAGE	64	/* command line usage error */
X#define	EX_DATAERR	65	/* data format error */
X#define	EX_NOINPUT	66	/* cannot open input */
X#define	EX_NOUSER	67	/* addressee unknown */
X#define	EX_NOHOST	68	/* host name unknown */
X#define	EX_UNAVAILABLE	69	/* service unavailable */
X#define	EX_SOFTWARE	70	/* internal software error */
X#define	EX_OSERR	71	/* system error (e.g., can't fork) */
X#define	EX_OSFILE	72	/* critical OS file missing */
X#define	EX_CANTCREAT	73	/* can't create (user) output file */
X#define	EX_IOERR	74	/* input/output error */
X#define	EX_TEMPFAIL	75	/* temp failure; user is invited to retry */
X#define	EX_PROTOCOL	76	/* remote error in protocol */
X#define	EX_NOPERM	77	/* permission denied */
X#define	EX_CONFIG	78	/* configuration error */
X
X#define	EX_NOTFOUND	79	/* entry not found */
X#define	EX__MAX		79	/* maximum listed value */
X
X#endif	/* HAVE_SYSEXITS_H */
X#endif	/* !_SCHILY_SYSEXITS_H */
END-of-smake-1.2.1/include/schily/sysexits.h
echo x - smake-1.2.1/include/schily/stdio.mk
sed 's/^X//' >smake-1.2.1/include/schily/stdio.mk << 'END-of-smake-1.2.1/include/schily/stdio.mk'
X#ident "@(#)stdio.mk	1.1 09/01/05 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		stdio.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/stdio.mk
echo x - smake-1.2.1/include/schily/wctype.h
sed 's/^X//' >smake-1.2.1/include/schily/wctype.h << 'END-of-smake-1.2.1/include/schily/wctype.h'
X/* @(#)wctype.h	1.7 09/06/29 Copyright 2009 J. Schilling */
X/*
X *	Abstraction from wctype.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_WCTYPE_H
X#define	_SCHILY_WCTYPE_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_WCHAR_H
X#include <schily/wchar.h>
X#endif
X
X#ifdef	HAVE_WCTYPE_H
X/*
X * Include wctype.h if wchars have been enabled in schily/wchar.h
X */
X#ifdef	USE_WCHAR
X#ifndef	_INCL_WCTYPE_H
X#include <wctype.h>
X#define	_INCL_WCTYPE_H
X#endif
X#ifndef	USE_WCTYPE
X#define	USE_WCTYPE
X#endif
X#endif	/* USE_WCHAR */
X#endif	/* HAVE_WCTYPE_H */
X
X#if	defined(HAVE_ISWPRINT) && defined(USE_WCHAR)
X#ifndef	USE_WCTYPE
X#undef	USE_WCTYPE
X#endif
X#endif
X
X#if	!defined(HAVE_WCTYPE_H) && !defined(HAVE_ISWPRINT)
X#undef	USE_WCTYPE
X#endif
X
X#ifdef	NO_WCTYPE
X#undef	USE_WCTYPE
X#endif
X
X#ifndef	USE_WCTYPE
X
X#include <ctype.h>
X
X#undef	iswalnum
X#define	iswalnum(c)	isalnum(c)
X#undef	iswalpha
X#define	iswalpha(c)	isalpha(c)
X#undef	iswcntrl
X#define	iswcntrl(c)	iscntrl(c)
X#undef	iswcntrl
X#define	iswcntrl(c)	iscntrl(c)
X#undef	iswdigit
X#define	iswdigit(c)	isdigit(c)
X#undef	iswgraph
X#define	iswgraph(c)	isgraph(c)
X#undef	iswlower
X#define	iswlower(c)	islower(c)
X#undef	iswprint
X#define	iswprint(c)	isprint(c)
X#undef	iswpunct
X#define	iswpunct(c)	ispunct(c)
X#undef	iswspace
X#define	iswspace(c)	isspace(c)
X#undef	iswupper
X#define	iswupper(c)	isupper(c)
X#undef	iswxdigit
X#define	iswxdigit(c)	isxdigit(c)
X
X#undef	towlower
X#define	towlower(c)	tolower(c)
X#undef	towupper
X#define	towupper(c)	toupper(c)
X
X#endif	/* !USE_WCTYPE */
X
X#endif	/* _SCHILY_WCTYPE_H */
END-of-smake-1.2.1/include/schily/wctype.h
echo x - smake-1.2.1/include/schily/sysexits.mk
sed 's/^X//' >smake-1.2.1/include/schily/sysexits.mk << 'END-of-smake-1.2.1/include/schily/sysexits.mk'
X#ident "@(#)sysexits.mk	1.1 09/02/04 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		sysexits.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/sysexits.mk
echo x - smake-1.2.1/include/schily/dlfcn.h
sed 's/^X//' >smake-1.2.1/include/schily/dlfcn.h << 'END-of-smake-1.2.1/include/schily/dlfcn.h'
X/* @(#)dlfcn.h	1.2 09/06/14 Copyright 2009 J. Schilling */
X/*
X *	Abstraction from dlfcn.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_DLFCN_H
X#define	_SCHILY_DLFCN_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_DLFCN_H
X#ifndef _INCL_DLFCN_H
X#include <dlfcn.h>			/* POSIX */
X#define	_INCL_DLFCN_H
X#define	FOUND_DLFCN_H
X#endif
X#endif
X
X#ifdef	HAVE_DL_H
X#ifndef	FOUND_DLFCN_H
X#ifndef _INCL_DL_H
X#include <dl.h>				/* HP-UX */
X#define	_INCL_DL_H
X#define	FOUND_DLFCN_H
X#endif
X#endif
X#endif
X
X/*
X * dlopen() modes
X */
X#ifndef	RTLD_LAZY			/* The only mode in SunOS-4.0 */
X#define	RTLD_LAZY	0x00001
X#define	RTLD_NOW	0x00002
X#define	RTLD_GLOBAL	0x00100
X#define	RTLD_LOCAL	0x00000
X#endif
X
X#ifdef	__never_
X/*
X * dlsym() speudo handles
X * These handles are not valid on SunOS-4.0
X */
X#ifndef	RTLD_NEXT
X#define	RTLD_NEXT		(void *)-1
X#define	RTLD_DEFAULT		(void *)-2
X#define	RTLD_SELF		(void *)-3
X#endif
X#endif
X
X/*
X * dlsym() speudo handle for SunOS-4.0
X */
X#if	defined(HAVE_DLSYM) && !defined(RTLD_SELF)
X#define	RTLD_SELF		(void *)0
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifndef	HAVE_DLOPEN
Xextern	void	*dlopen	__PR((const char *pathname, int mode));
X#endif
X#ifndef	HAVE_DLCLOSE
Xextern	int	dlclose	__PR((void *handle));
X#endif
X#ifndef	HAVE_DLSYM
Xextern	void	*dlsym	__PR((void  *handle, const char *name));
X#endif
X#ifndef	HAVE_DLERROR
Xextern	const char *dlerror __PR((void));
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X
X
X#endif	/* _SCHILY_DLFCN_H */
END-of-smake-1.2.1/include/schily/dlfcn.h
echo x - smake-1.2.1/include/schily/wctype.mk
sed 's/^X//' >smake-1.2.1/include/schily/wctype.mk << 'END-of-smake-1.2.1/include/schily/wctype.mk'
X#ident "@(#)wctype.mk	1.1 09/04/12 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		wctype.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/wctype.mk
echo x - smake-1.2.1/include/schily/shcall.h
sed 's/^X//' >smake-1.2.1/include/schily/shcall.h << 'END-of-smake-1.2.1/include/schily/shcall.h'
X/* @(#)shcall.h	1.2 09/05/02 Copyright 2009 J. Schilling */
X/*
X *	Abstraction from shcall.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_SHCALL_H
X#define	_SCHILY_SHCALL_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifndef	__sqfun_t_defined
Xtypedef	int	(*sqfun_t)	__PR((void *arg));
X#define	__sqfun_t_defined
X#endif
X
X#ifndef	__squit_t_defined
X
Xtypedef struct {
X	sqfun_t	quitfun;	/* Function to query for shell signal quit   */
X	void	*qfarg;		/* Generic arg for shell builtin quit fun    */
X} squit_t;
X
X#define	__squit_t_defined
X#endif
X
Xtypedef	int	(*shcall)	__PR((int ac, char **av, char **ev, FILE *std[3], squit_t *__quit));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_SHCALL_H */
END-of-smake-1.2.1/include/schily/shcall.h
echo x - smake-1.2.1/include/schily/dlfcn.mk
sed 's/^X//' >smake-1.2.1/include/schily/dlfcn.mk << 'END-of-smake-1.2.1/include/schily/dlfcn.mk'
X#ident "@(#)dlfcn.mk	1.1 09/05/01 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		dlfcn.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/dlfcn.mk
echo x - smake-1.2.1/include/schily/limits.h
sed 's/^X//' >smake-1.2.1/include/schily/limits.h << 'END-of-smake-1.2.1/include/schily/limits.h'
X/* @(#)limits.h	1.1 09/05/24 Copyright 2009 J. Schilling */
X/*
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_LIMITS_H
X#define	_SCHILY_LIMITS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_LIMITS_H
X#ifndef	_INCL_LIMITS_H
X#include <limits.h>
X#define	_INCL_LIMITS_H
X#endif
X#endif
X
X#endif	/* _SCHILY_LIMITS_H */
END-of-smake-1.2.1/include/schily/limits.h
echo x - smake-1.2.1/include/schily/shcall.mk
sed 's/^X//' >smake-1.2.1/include/schily/shcall.mk << 'END-of-smake-1.2.1/include/schily/shcall.mk'
X#ident "@(#)shcall.mk	1.1 09/05/01 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		shcall.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/shcall.mk
echo x - smake-1.2.1/include/schily/locale.h
sed 's/^X//' >smake-1.2.1/include/schily/locale.h << 'END-of-smake-1.2.1/include/schily/locale.h'
X/* @(#)locale.h	1.2 09/05/24 Copyright 2009 J. Schilling */
X/*
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_LOCALE_H
X#define	_SCHILY_LOCALE_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_LOCALE_H
X#ifndef	_INCL_LOCALE_H
X#include <locale.h>		/* LC_* definitions */
X#define	_INCL_LOCALE_H
X#endif
X#ifndef	USE_LOCALE
X#define	USE_LOCALE
X#endif
X#else
X#undef	USE_LOCALE
X#endif
X
X#ifndef	HAVE_SETLOCALE
X#undef	USE_LOCALE
X#endif
X
X#ifdef	NO_LOCALE
X#undef	USE_LOCALE
X#endif
X
X#ifndef	USE_LOCALE
X#undef	setlocale
X#define	setlocale(n, s)		((void *)0)
X#endif
X
X
X#endif	/* _SCHILY_LOCALE_H */
END-of-smake-1.2.1/include/schily/locale.h
echo x - smake-1.2.1/include/schily/md4.h
sed 's/^X//' >smake-1.2.1/include/schily/md4.h << 'END-of-smake-1.2.1/include/schily/md4.h'
X/* @(#)md4.h	1.3 09/08/08 2009 J. Schilling */
X/*
X * MD4 hash code taken from OpenBSD
X *
X * Portions Copyright (c) 2009 J. Schilling
X */
X/*	$OpenBSD: md4.h,v 1.15 2004/06/22 01:57:30 jfb Exp $	*/
X
X/*
X * This code implements the MD4 message-digest algorithm.
X * The algorithm is due to Ron Rivest.  This code was
X * written by Colin Plumb in 1993, no copyright is claimed.
X * This code is in the public domain; do with it what you wish.
X * Todd C. Miller modified the MD5 code to do MD4 based on RFC 1186.
X *
X * Equivalent code is available from RSA Data Security, Inc.
X * This code has been tested against that, and is equivalent,
X * except that you don't need to include two pages of legalese
X * with every copy.
X */
X
X#ifndef	_SCHILY_MD4_H
X#define	_SCHILY_MD4_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#include <schily/utypes.h>
X
X#define	MD4_BLOCK_LENGTH		64
X#define	MD4_DIGEST_LENGTH		16
X#define	MD4_DIGEST_STRING_LENGTH	(MD4_DIGEST_LENGTH * 2 + 1)
X
Xtypedef struct MD4Context {
X	UInt32_t state[4];			/* state */
X	UInt32_t count[2];			/* number of bits, mod 2^64 */
X	UInt8_t	 buffer[MD4_BLOCK_LENGTH];	/* input buffer */
X} MD4_CTX;
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern void	 MD4Init	__PR((MD4_CTX *));
Xextern void	 MD4Update	__PR((MD4_CTX *, const void *, size_t));
Xextern void	 MD4Pad		__PR((MD4_CTX *));
Xextern void	 MD4Final	__PR((UInt8_t [MD4_DIGEST_LENGTH], MD4_CTX *));
Xextern void	 MD4Transform	__PR((UInt32_t [4], const UInt8_t [MD4_BLOCK_LENGTH]));
Xextern char	*MD4End		__PR((MD4_CTX *, char *));
Xextern char	*MD4File	__PR((const char *, char *));
Xextern char	*MD4FileChunk	__PR((const char *, char *, off_t, off_t));
Xextern char	*MD4Data	__PR((const UInt8_t *, size_t, char *));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* _SCHILY_MD4_H */
END-of-smake-1.2.1/include/schily/md4.h
echo x - smake-1.2.1/include/schily/limits.mk
sed 's/^X//' >smake-1.2.1/include/schily/limits.mk << 'END-of-smake-1.2.1/include/schily/limits.mk'
X#ident "@(#)limits.mk	1.1 09/05/24 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		limits.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/limits.mk
echo x - smake-1.2.1/include/schily/md5.mk
sed 's/^X//' >smake-1.2.1/include/schily/md5.mk << 'END-of-smake-1.2.1/include/schily/md5.mk'
X#ident "@(#)md5.mk	1.1 09/06/20 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		md5.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/md5.mk
echo x - smake-1.2.1/include/schily/md5.h
sed 's/^X//' >smake-1.2.1/include/schily/md5.h << 'END-of-smake-1.2.1/include/schily/md5.h'
X/* @(#)md5.h	1.10 09/08/08 2008-2009 J. Schilling */
X/*
X * MD5 hash code taken from OpenBSD
X *
X * Portions Copyright (c) 2008-2009 J. Schilling
X */
X
X/*	$OpenBSD: md5.h,v 1.16 2004/06/22 01:57:30 jfb Exp $	*/
X
X/*
X * This code implements the MD5 message-digest algorithm.
X * The algorithm is due to Ron Rivest.  This code was
X * written by Colin Plumb in 1993, no copyright is claimed.
X * This code is in the public domain; do with it what you wish.
X *
X * Equivalent code is available from RSA Data Security, Inc.
X * This code has been tested against that, and is equivalent,
X * except that you don't need to include two pages of legalese
X * with every copy.
X */
X
X#ifndef	_SCHILY_MD5_H
X#define	_SCHILY_MD5_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#include <schily/utypes.h>
X
X#define	MD5_BLOCK_LENGTH		64
X#define	MD5_DIGEST_LENGTH		16
X#define	MD5_DIGEST_STRING_LENGTH	(MD5_DIGEST_LENGTH * 2 + 1)
X
Xtypedef struct MD5Context {
X	UInt32_t state[4];			/* state */
X	UInt32_t count[2];			/* number of bits, mod 2^64 */
X	UInt8_t	 buffer[MD5_BLOCK_LENGTH];	/* input buffer */
X} MD5_CTX;
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern void	 MD5Init	__PR((MD5_CTX *));
Xextern void	 MD5Update	__PR((MD5_CTX *, const void *, size_t));
Xextern void	 MD5Pad		__PR((MD5_CTX *));
Xextern void	 MD5Final	__PR((UInt8_t [MD5_DIGEST_LENGTH], MD5_CTX *));
Xextern void	 MD5Transform	__PR((UInt32_t [4], const UInt8_t [MD5_BLOCK_LENGTH]));
Xextern char	*MD5End		__PR((MD5_CTX *, char *));
Xextern char	*MD5File	__PR((const char *, char *));
Xextern char	*MD5FileChunk	__PR((const char *, char *, off_t, off_t));
Xextern char	*MD5Data	__PR((const UInt8_t *, size_t, char *));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* _SCHILY_MD5_H */
END-of-smake-1.2.1/include/schily/md5.h
echo x - smake-1.2.1/include/schily/pwd.mk
sed 's/^X//' >smake-1.2.1/include/schily/pwd.mk << 'END-of-smake-1.2.1/include/schily/pwd.mk'
X#ident "@(#)pwd.mk	1.1 09/07/10 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		pwd.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/pwd.mk
echo x - smake-1.2.1/include/schily/sigset.h
sed 's/^X//' >smake-1.2.1/include/schily/sigset.h << 'END-of-smake-1.2.1/include/schily/sigset.h'
X/* @(#)sigset.h	1.9 09/06/30 Copyright 1997-2009 J. Schilling */
X/*
X *	Signal set abstraction for BSD/SVR4 signals
X *
X *	Copyright (c) 1997-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SIGSET_H
X#define	_SCHILY_SIGSET_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SIGSET
X/*
X * Try to by default use the function that sets up signal handlers in a way
X * that does not reset the handler after it has been called.
X */
X#define	signal		sigset
X#endif
X
X#ifdef	HAVE_SIGPROCMASK
X#define	block_sigs(a)	{ \
X				sigset_t	__new;	\
X							\
X				sigfillset(&__new);	\
X				sigprocmask(SIG_BLOCK, &__new, &a);\
X			}
X#define	unblock_sig(s)	{ \
X				sigset_t	__new;	\
X							\
X				sigemptyset(&__new);	\
X				sigaddset(&__new, (s));	\
X				sigprocmask(SIG_UNBLOCK, &__new, NULL);\
X			}
X#define	restore_sigs(a)	sigprocmask(SIG_SETMASK, &a, 0);
X
X#else	/* !HAVE_SIGPROCMASK */
X
X#define	sigset_t	int
X#define	block_sigs(a)	a = sigblock(0xFFFFFFFF)
X#define	restore_sigs(a)	sigsetmask(a);
X#define	unblock_sig(s)	{ \
X				int	__old, __new;	\
X							\
X				block_sigs(__old);	\
X				__new = sigmask(s);	\
X				__new = __old & ~__new;	\
X				sigsetmask(__new);	\
X			}
X
X#endif	/* HAVE_SIGPROCMASK */
X
X#endif	/* _SCHILY_SIGSET_H */
END-of-smake-1.2.1/include/schily/sigset.h
echo x - smake-1.2.1/include/schily/locale.mk
sed 's/^X//' >smake-1.2.1/include/schily/locale.mk << 'END-of-smake-1.2.1/include/schily/locale.mk'
X#ident "@(#)locale.mk	1.1 09/05/23 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		locale.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/locale.mk
echo x - smake-1.2.1/include/schily/pwd.h
sed 's/^X//' >smake-1.2.1/include/schily/pwd.h << 'END-of-smake-1.2.1/include/schily/pwd.h'
X/* @(#)pwd.h	1.1 09/07/10 Copyright 2009 J. Schilling */
X/*
X *	Passwd abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_PWD_H
X#define	_SCHILY_PWD_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#ifdef	HAVE_PWD_H
X#ifndef	_INCL_PWD_H
X#include <pwd.h>
X#define	_INCL_PWD_H
X#endif
X#else
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xstruct passwd {
X	char	*pw_name;
X	char	*pw_passwd;
X	uid_t	pw_uid;
X	gid_t	pw_gid;
X	char	*pw_gecos;
X	char	*pw_dir;
X	char	*pw_shell;
X};
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* ! HAVE_PWD_H */
X
X#endif	/* _SCHILY_PWD_H */
END-of-smake-1.2.1/include/schily/pwd.h
echo x - smake-1.2.1/include/schily/grp.mk
sed 's/^X//' >smake-1.2.1/include/schily/grp.mk << 'END-of-smake-1.2.1/include/schily/grp.mk'
X#ident "@(#)grp.mk	1.1 09/07/10 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		grp.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/grp.mk
echo x - smake-1.2.1/include/schily/grp.h
sed 's/^X//' >smake-1.2.1/include/schily/grp.h << 'END-of-smake-1.2.1/include/schily/grp.h'
X/* @(#)grp.h	1.1 09/07/10 Copyright 2009 J. Schilling */
X/*
X *	Group abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_GRP_H
X#define	_SCHILY_GRP_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#ifdef	HAVE_GRP_H
X#ifndef	_INCL_GRP_H
X#include <grp.h>
X#define	_INCL_GRP_H
X#endif
X#else
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xstruct	group {
X	char	*gr_name;
X	char	*gr_passwd;
X	gid_t	gr_gid;
X	char	**gr_mem;
X};
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* ! HAVE_GRP_H */
X
X#endif	/* _SCHILY_GRP_H */
END-of-smake-1.2.1/include/schily/grp.h
echo x - smake-1.2.1/include/schily/in.mk
sed 's/^X//' >smake-1.2.1/include/schily/in.mk << 'END-of-smake-1.2.1/include/schily/in.mk'
X#ident "@(#)in.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		in.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/in.mk
echo x - smake-1.2.1/include/schily/ctype.h
sed 's/^X//' >smake-1.2.1/include/schily/ctype.h << 'END-of-smake-1.2.1/include/schily/ctype.h'
X/* @(#)ctype.h	1.1 09/07/10 Copyright 2009 J. Schilling */
X/*
X *	Ctape abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_CTYPE_H
X#define	_SCHILY_CTYPE_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#ifdef	HAVE_CTYPE_H
X#ifndef	_INCL_CTYPE_H
X#include <ctype.h>
X#define	_INCL_CTYPE_H
X#endif
X#else
X
X#endif	/* ! HAVE_CTYPE_H */
X
X#endif	/* _SCHILY_CTYPE_H */
END-of-smake-1.2.1/include/schily/ctype.h
echo x - smake-1.2.1/include/schily/sigset.mk
sed 's/^X//' >smake-1.2.1/include/schily/sigset.mk << 'END-of-smake-1.2.1/include/schily/sigset.mk'
X#ident @(#)sigset.mk	1.2 09/06/30 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		sigset.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/sigset.mk
echo x - smake-1.2.1/include/schily/Targets
sed 's/^X//' >smake-1.2.1/include/schily/Targets << 'END-of-smake-1.2.1/include/schily/Targets'
X#ident @(#)Targets	1.13 09/10/16 
X
XX_MK_LIST=	\
X		align.mk alloca.mk archdefs.mk assert.mk avoffset.mk \
X		btorder.mk \
X		ccomdefs.mk checkerr.mk ctype.mk \
X		dbgmalloc.mk deflts.mk device.mk dirent.mk dlfcn.mk \
X		errno.mk fcntl.mk \
X		fetchdir.mk find.mk float.mk fnmatch.mk fstream.mk \
X		getargs.mk getcwd.mk grp.mk \
X		hostname.mk \
X		iconv.mk idcache.mk in.mk inet.mk io.mk ioctl.mk ipc.mk \
X		intcvt.mk \
X		jmpdefs.mk \
X		libport.mk librmt.mk limits.mk locale.mk \
X		math.mk maxpath.mk mconfig.mk \
X		md4.mk md5.mk \
X		mman.mk mtio.mk \
X		netdb.mk nlsdefs.mk \
X		param.mk patmatch.mk priv.mk procfs.mk prototyp.mk pwd.mk \
X		resource.mk rmd160.mk rmtio.mk \
X		schily.mk schilyp.mk select.mk sem.mk shm.mk \
X		setjmp.mk sha1.mk sha2.mk shcall.mk \
X		siconv.mk shadow.mk \
X		sigblk.mk signal.mk sigset.mk socket.mk standard.mk stat.mk \
X		stdio.mk \
X		stdlib.mk stkframe.mk string.mk \
X		sysexits.mk syslog.mk systeminfo.mk \
X		termcap.mk termios.mk time.mk times.mk \
X		types.mk unistd.mk utime.mk utsname.mk utypes.mk \
X		varargs.mk vfork.mk \
X		walk.mk wchar.mk wctype.mk wait.mk \
X		xconfig.mk xmconfig.mk
END-of-smake-1.2.1/include/schily/Targets
echo x - smake-1.2.1/include/schily/in.h
sed 's/^X//' >smake-1.2.1/include/schily/in.h << 'END-of-smake-1.2.1/include/schily/in.h'
X/* @(#)in.h	1.1 09/07/13 Copyright 2009 J. Schilling */
X/*
X *	In abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_IN_H
X#define	_SCHILY_IN_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_NETINET_IN_H
X#ifndef	_INCL_NETINET_IN_H
X#include <netinet/in.h>
X#define	_INCL_NETINET_IN_H
X#endif
X#endif
X
X#endif	/* _SCHILY_IN_H */
END-of-smake-1.2.1/include/schily/in.h
echo x - smake-1.2.1/include/schily/inet.mk
sed 's/^X//' >smake-1.2.1/include/schily/inet.mk << 'END-of-smake-1.2.1/include/schily/inet.mk'
X#ident "@(#)inet.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		inet.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/inet.mk
echo x - smake-1.2.1/include/schily/inet.h
sed 's/^X//' >smake-1.2.1/include/schily/inet.h << 'END-of-smake-1.2.1/include/schily/inet.h'
X/* @(#)inet.h	1.2 09/08/04 Copyright 2009 J. Schilling */
X/*
X *	Inet abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_INET_H
X#define	_SCHILY_INET_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_ARPA_INET_H
X#ifndef	_INCL_ARPA_INET_H
X#include <arpa/inet.h>
X#define	_INCL_ARPA_INET_H
X#endif
X#else	/* !HAVE_ARPA_INET_H */
X
X/*
X * BeOS does not have <arpa/inet.h>
X * but inet_ntaoa() is in <netdb.h>
X */
X#ifdef	HAVE_NETDB_H
X#ifndef	_INCL_NETDB_H
X#include <netdb.h>
X#define	_INCL_NETDB_H
X#endif
X#endif	/* HAVE_NETDB_H */
X
X#endif	/* !HAVE_ARPA_INET_H */
X
X#endif	/* _SCHILY_INET_H */
END-of-smake-1.2.1/include/schily/inet.h
echo x - smake-1.2.1/include/schily/io.mk
sed 's/^X//' >smake-1.2.1/include/schily/io.mk << 'END-of-smake-1.2.1/include/schily/io.mk'
X#ident "@(#)io.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		io.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/io.mk
echo x - smake-1.2.1/include/schily/io.h
sed 's/^X//' >smake-1.2.1/include/schily/io.h << 'END-of-smake-1.2.1/include/schily/io.h'
X/* @(#)io.h	1.1 09/07/13 Copyright 2009 J. Schilling */
X/*
X *	DOS io.h abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_IO_H
X#define	_SCHILY_IO_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_FCNTL_H
X#include <schily/fcntl.h>
X#endif
X
X#ifndef	NEED_O_BINARY
X#if	O_BINARY != 0
X#define	NEED_O_BINARY
X#endif
X#endif
X
X#if	defined(HAVE_IO_H) && defined(NEED_O_BINARY)
X#ifndef	_INCL_IO_H
X#include <io.h>
X#define	_INCL_IO_H
X#endif
X#else	/* ! defined(HAVE_IO_H) && defined(NEED_O_BINARY) */
X
X#define	setmode(f, m)
X
X#endif
X
X#endif	/* _SCHILY_IO_H */
END-of-smake-1.2.1/include/schily/io.h
echo x - smake-1.2.1/include/schily/sha1.mk
sed 's/^X//' >smake-1.2.1/include/schily/sha1.mk << 'END-of-smake-1.2.1/include/schily/sha1.mk'
X#ident "@(#)sha1.mk	1.1 09/08/01 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		sha1.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/sha1.mk
echo x - smake-1.2.1/include/schily/systeminfo.h
sed 's/^X//' >smake-1.2.1/include/schily/systeminfo.h << 'END-of-smake-1.2.1/include/schily/systeminfo.h'
X/* @(#)systeminfo.h	1.1 09/07/14 Copyright 2009 J. Schilling */
X/*
X *	Systeminfo abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SYSTEMINFO_H
X#define	_SCHILY_SYSTEMINFO_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_SYSTEMINFO_H
X#ifndef	_INCL_SYS_SYSTEMINFO_H
X#define	_INCL_SYS_SYSTEMINFO_H
X#include <sys/systeminfo.h>
X#endif
X#endif
X
X#endif	/* _SCHILY_SYSTEMINFO_H */
END-of-smake-1.2.1/include/schily/systeminfo.h
echo x - smake-1.2.1/include/schily/ctype.mk
sed 's/^X//' >smake-1.2.1/include/schily/ctype.mk << 'END-of-smake-1.2.1/include/schily/ctype.mk'
X#ident "@(#)ctype.mk	1.1 09/07/10 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		ctype.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/ctype.mk
echo x - smake-1.2.1/include/schily/netdb.h
sed 's/^X//' >smake-1.2.1/include/schily/netdb.h << 'END-of-smake-1.2.1/include/schily/netdb.h'
X/* @(#)netdb.h	1.1 09/07/13 Copyright 2009 J. Schilling */
X/*
X *	Netdb abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_NETDB_H
X#define	_SCHILY_NETDB_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_NETDB_H
X#ifndef	_INCL_NETDB_H
X#include <netdb.h>
X#define	_INCL_NETDB_H
X#endif
X#endif
X
X#endif	/* _SCHILY_NETDB_H */
END-of-smake-1.2.1/include/schily/netdb.h
echo x - smake-1.2.1/include/schily/resource.mk
sed 's/^X//' >smake-1.2.1/include/schily/resource.mk << 'END-of-smake-1.2.1/include/schily/resource.mk'
X#ident "@(#)resource.mk	1.1 09/08/03 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		resource.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/resource.mk
echo x - smake-1.2.1/include/schily/setjmp.h
sed 's/^X//' >smake-1.2.1/include/schily/setjmp.h << 'END-of-smake-1.2.1/include/schily/setjmp.h'
X/* @(#)setjmp.h	1.1 09/07/13 Copyright 2009 J. Schilling */
X/*
X *	Setjmp abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SETJMP_H
X#define	_SCHILY_SETJMP_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_INCL_SETJMP_H
X#define	_INCL_SETJMP_H
X#include <setjmp.h>
X#endif
X
X#endif	/* _SCHILY_SETJMP_H */
END-of-smake-1.2.1/include/schily/setjmp.h
echo x - smake-1.2.1/include/schily/netdb.mk
sed 's/^X//' >smake-1.2.1/include/schily/netdb.mk << 'END-of-smake-1.2.1/include/schily/netdb.mk'
X#ident "@(#)netdb.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		netdb.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/netdb.mk
echo x - smake-1.2.1/include/schily/shadow.h
sed 's/^X//' >smake-1.2.1/include/schily/shadow.h << 'END-of-smake-1.2.1/include/schily/shadow.h'
X/* @(#)shadow.h	1.1 09/07/13 Copyright 2009 J. Schilling */
X/*
X *	Shadow abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SHADOW_H
X#define	_SCHILY_SHADOW_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SHADOW_H
X#ifndef	_INCL_SHADOW_H
X#include <shadow.h>
X#define	_INCL_SHADOW_H
X#endif
X#endif
X
X#endif	/* _SCHILY_SHADOW_H */
END-of-smake-1.2.1/include/schily/shadow.h
echo x - smake-1.2.1/include/schily/setjmp.mk
sed 's/^X//' >smake-1.2.1/include/schily/setjmp.mk << 'END-of-smake-1.2.1/include/schily/setjmp.mk'
X#ident "@(#)setjmp.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		setjmp.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/setjmp.mk
echo x - smake-1.2.1/include/schily/socket.h
sed 's/^X//' >smake-1.2.1/include/schily/socket.h << 'END-of-smake-1.2.1/include/schily/socket.h'
X/* @(#)socket.h	1.1 09/07/13 Copyright 2009 J. Schilling */
X/*
X *	Socket abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SOCKET_H
X#define	_SCHILY_SOCKET_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_SOCKET_H
X#ifndef	_INCL_SYS_SOCKET_H
X#include <sys/socket.h>
X#define	_INCL_SYS_SOCKET_H
X#endif
X#endif
X
X#endif	/* _SCHILY_SOCKET_H */
END-of-smake-1.2.1/include/schily/socket.h
echo x - smake-1.2.1/include/schily/shadow.mk
sed 's/^X//' >smake-1.2.1/include/schily/shadow.mk << 'END-of-smake-1.2.1/include/schily/shadow.mk'
X#ident "@(#)shadow.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		shadow.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/shadow.mk
echo x - smake-1.2.1/include/schily/times.h
sed 's/^X//' >smake-1.2.1/include/schily/times.h << 'END-of-smake-1.2.1/include/schily/times.h'
X/* @(#)times.h	1.1 09/07/13 Copyright 2009 J. Schilling */
X/*
X *	Times abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_TIMES_H
X#define	_SCHILY_TIMES_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef	_SCHILY_TIME_H
X#include <schily/time.h>
X#endif
X#ifndef	_SCHILY_LIMITS_H
X#include <schily/limits.h>
X#endif
X#ifndef	_SCHILY_UNISTD_H
X#include <schily/unistd.h>
X#endif
X
X/*
X * Make sure to include schily/time.h before, because of a Next Step bug.
X */
X#ifdef	HAVE_SYS_TIMES_H
X#ifndef	_INCL_SYS_TIMES_H
X#define	_INCL_SYS_TIMES_H
X#include <sys/times.h>
X#endif
X#endif
X
X#ifndef	CLK_TCK
X#if	defined(_SC_CLK_TCK)
X#define	CLK_TCK	((clock_t)sysconf(_SC_CLK_TCK))
X#else
X#define	CLK_TCK	60
X#endif
X#endif
X
X#endif	/* _SCHILY_TIMES_H */
END-of-smake-1.2.1/include/schily/times.h
echo x - smake-1.2.1/include/schily/socket.mk
sed 's/^X//' >smake-1.2.1/include/schily/socket.mk << 'END-of-smake-1.2.1/include/schily/socket.mk'
X#ident "@(#)socket.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		socket.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/socket.mk
echo x - smake-1.2.1/include/schily/utsname.h
sed 's/^X//' >smake-1.2.1/include/schily/utsname.h << 'END-of-smake-1.2.1/include/schily/utsname.h'
X/* @(#)utsname.h	1.1 09/07/13 Copyright 2009 J. Schilling */
X/*
X *	Utsname abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_UTSNAME_H
X#define	_SCHILY_UTSNAME_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * NeXT Step has sys/utsname but not uname()
X */
X#ifdef	HAVE_SYS_UTSNAME_H
X#ifndef	_INCL_SYS_UTSNAME_H
X#define	_INCL_SYS_UTSNAME_H
X#include <sys/utsname.h>
X#endif
X#endif
X
X#endif	/* _SCHILY_UTSNAME_H */
END-of-smake-1.2.1/include/schily/utsname.h
echo x - smake-1.2.1/include/schily/times.mk
sed 's/^X//' >smake-1.2.1/include/schily/times.mk << 'END-of-smake-1.2.1/include/schily/times.mk'
X#ident "@(#)times.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		times.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/times.mk
echo x - smake-1.2.1/include/schily/vfork.h
sed 's/^X//' >smake-1.2.1/include/schily/vfork.h << 'END-of-smake-1.2.1/include/schily/vfork.h'
X/* @(#)vfork.h	1.4 09/11/15 Copyright 2009 J. Schilling */
X/*
X *	Vfork abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_VFORK_H
X#define	_SCHILY_VFORK_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef	_SCHILY_UNISTD_H
X#include <schily/unistd.h>	/* vfork() definitions are here on Solaris */
X#endif
X
X#ifdef	HAVE_VFORK_H
X#ifndef	_INCL_VFORK_H
X#define	_INCL_VFORK_H
X#include <vfork.h>
X#endif
X#endif
X#ifdef	HAVE_SYS_FORK_H
X#ifndef	_INCL_SYS_FORK_H
X#define	_INCL_SYS_FORK_H
X#include <sys/fork.h>
X#endif
X#endif
X
X#ifdef	VMS
X#ifndef	VMS_VFORK_OK
X/*
X * vfork() on VMS implements strange deviations from the expected behavior.
X * The child does not run correctly unless it calls exec*().
X * The file descriptors are not separated from the parent.
X *
X * decc$set_child_standard_streams() allows to work around the most important
X * problem of having no separate space for file descriptors if the code is
X * prepared for the deviations.
X *
X * As VMS silently overwrites the "vfork" #definition from mconfig.h in
X * unistd.h, we need to reset to the definition in mconfig.h for all programs
X * that are not prepared for the deviations.
X */
X#ifndef	HAVE_VFORK	/* Paranoia in case VMS implements a working vfork() */
X#undef	vfork
X#define	vfork	fork
X#endif	/* HAVE_VFORK */
X
X#else	/* VMS_VFORK_OK */
X
X#define	set_child_standard_fds(in, out, err)		\
X			decc$set_child_standard_streams((in), (out), (err))
X#endif	/* VMS_VFORK_OK */
X#endif	/* VMS */
X
X#endif	/* _SCHILY_VFORK_H */
END-of-smake-1.2.1/include/schily/vfork.h
echo x - smake-1.2.1/include/schily/utsname.mk
sed 's/^X//' >smake-1.2.1/include/schily/utsname.mk << 'END-of-smake-1.2.1/include/schily/utsname.mk'
X#ident "@(#)utsname.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		utsname.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/utsname.mk
echo x - smake-1.2.1/include/schily/sha1.h
sed 's/^X//' >smake-1.2.1/include/schily/sha1.h << 'END-of-smake-1.2.1/include/schily/sha1.h'
X/* @(#)sha1.h	1.2 09/08/01 2009 J. Schilling */
X/*
X * SHA1 hash code taken from OpenBSD
X *
X * Portions Copyright (c) 2009 J. Schilling
X */
X
X/*	$OpenBSD: sha1.h,v 1.23 2004/06/22 01:57:30 jfb Exp $	*/
X
X/*
X * SHA-1 in C
X * By Steve Reid <steve@edmweb.com>
X * 100% Public Domain
X */
X
X#ifndef	_SCHILY_SHA1_H
X#define	_SCHILY_SHA1_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X
X#define	SHA1_BLOCK_LENGTH		64
X#define	SHA1_DIGEST_LENGTH		20
X#define	SHA1_DIGEST_STRING_LENGTH	(SHA1_DIGEST_LENGTH * 2 + 1)
X
Xtypedef struct {
X	UInt32_t state[5];
X	UInt32_t count[2];
X	UInt8_t	 buffer[SHA1_BLOCK_LENGTH];
X} SHA1_CTX;
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern	void	SHA1Init	__PR((SHA1_CTX *));
Xextern	void	SHA1Pad		__PR((SHA1_CTX *));
Xextern	void	SHA1Transform	__PR((UInt32_t [5], const UInt8_t [SHA1_BLOCK_LENGTH]));
Xextern	void	SHA1Update	__PR((SHA1_CTX *, const UInt8_t *, size_t));
Xextern	void	SHA1Final	__PR((UInt8_t [SHA1_DIGEST_LENGTH], SHA1_CTX *));
Xextern	char *	SHA1End		__PR((SHA1_CTX *, char *));
Xextern	char *	SHA1File	__PR((const char *, char *));
Xextern	char *	SHA1FileChunk	__PR((const char *, char *, off_t, off_t));
Xextern	char *	SHA1Data	__PR((const UInt8_t *, size_t, char *));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#define	HTONDIGEST(x) do {                                              \
X	x[0] = htonl(x[0]);                                             \
X	x[1] = htonl(x[1]);                                             \
X	x[2] = htonl(x[2]);                                             \
X	x[3] = htonl(x[3]);                                             \
X	x[4] = htonl(x[4]); } while (0)
X
X#define	NTOHDIGEST(x) do {                                              \
X	x[0] = ntohl(x[0]);                                             \
X	x[1] = ntohl(x[1]);                                             \
X	x[2] = ntohl(x[2]);                                             \
X	x[3] = ntohl(x[3]);                                             \
X	x[4] = ntohl(x[4]); } while (0)
X
X#endif /* _SCHILY_SHA1_H */
END-of-smake-1.2.1/include/schily/sha1.h
echo x - smake-1.2.1/include/schily/priv.mk
sed 's/^X//' >smake-1.2.1/include/schily/priv.mk << 'END-of-smake-1.2.1/include/schily/priv.mk'
X#ident "@(#)priv.mk	1.1 09/08/07 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		priv.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/priv.mk
echo x - smake-1.2.1/include/schily/resource.h
sed 's/^X//' >smake-1.2.1/include/schily/resource.h << 'END-of-smake-1.2.1/include/schily/resource.h'
X/* @(#)resource.h	1.7 09/08/03 Copyright 1995-2009 J. Schilling */
X/*
X *	Abstraction from resource limits
X *
X *	Missing parts for wait3() taken from SunOS
X *
X *	Copyright (c) 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_RESOURCE_H
X#define	_SCHILY_RESOURCE_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TIME_H
X#include <schily/time.h>
X#endif
X
X/*
X * Get definitions from system include files
X */
X#ifdef	HAVE_SYS_RESOURCE_H
X#include <sys/resource.h>
X#endif
X
X/*
X * Now check which definitions are missing and define them localy.
X */
X
X#ifndef	RUSAGE_SELF
X/*
X * Resource utilization information.
X */
X
X#define	RUSAGE_SELF	0
X#define	RUSAGE_CHILDREN	-1
X
X#endif	/* RUSAGE_SELF */
X
X#ifndef	HAVE_STRUCT_RUSAGE
X
Xstruct	rusage {
X	struct timeval ru_utime;	/* user time used */
X	struct timeval ru_stime;	/* system time used */
X	long	ru_maxrss;
X#define	ru_first	ru_ixrss
X	long	ru_ixrss;		/* XXX: 0 */
X	long	ru_idrss;		/* XXX: sum of rm_asrss */
X	long	ru_isrss;		/* XXX: 0 */
X	long	ru_minflt;		/* any page faults not requiring I/O */
X	long	ru_majflt;		/* any page faults requiring I/O */
X	long	ru_nswap;		/* swaps */
X	long	ru_inblock;		/* block input operations */
X	long	ru_oublock;		/* block output operations */
X	long	ru_msgsnd;		/* messages sent */
X	long	ru_msgrcv;		/* messages received */
X	long	ru_nsignals;		/* signals received */
X	long	ru_nvcsw;		/* voluntary context switches */
X	long	ru_nivcsw;		/* involuntary " */
X#define	ru_last		ru_nivcsw
X};
X#endif	/* HAVE_STRUCT_RUSAGE */
X
X#ifndef	RLIMIT_CPU
X/*
X * Resource limits
X */
X#define	RLIMIT_CPU	0		/* cpu time in milliseconds */
X#define	RLIMIT_FSIZE	1		/* maximum file size */
X#define	RLIMIT_DATA	2		/* data size */
X#define	RLIMIT_STACK	3		/* stack size */
X#define	RLIMIT_CORE	4		/* core file size */
X#define	RLIMIT_RSS	5		/* resident set size */
X
X#define	RLIM_NLIMITS	6		/* number of resource limits */
X
X#ifndef	RLIM_INFINITY
X#define	RLIM_INFINITY	0x7fffffff
X#endif
X
Xstruct rlimit {
X	int	rlim_cur;		/* current (soft) limit */
X	int	rlim_max;		/* maximum value for rlim_cur */
X};
X
X#endif	/* RLIMIT_CPU */
X
X#endif /* _SCHILY_RESOURCE_H */
END-of-smake-1.2.1/include/schily/resource.h
echo x - smake-1.2.1/include/schily/vfork.mk
sed 's/^X//' >smake-1.2.1/include/schily/vfork.mk << 'END-of-smake-1.2.1/include/schily/vfork.mk'
X#ident "@(#)vfork.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		vfork.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/vfork.mk
echo x - smake-1.2.1/include/schily/select.h
sed 's/^X//' >smake-1.2.1/include/schily/select.h << 'END-of-smake-1.2.1/include/schily/select.h'
X/* @(#)select.h	1.1 09/08/04 Copyright 2009 J. Schilling */
X/*
X *	Select abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SELECT_H
X#define	_SCHILY_SELECT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X#ifndef _SCHILY_TIME_H
X#include <schily/time.h>
X#endif
X
X#ifdef	HAVE_SYS_SELECT_H
X#ifndef	_INCL_SYS_SELECT_H
X#include <sys/select.h>
X#define	_INCL_SYS_SELECT_H
X#endif
X#endif
X
X/*
X * Some systems need sys/socket.h instead or in addition to sys/select.h
X */
X#ifdef	NEED_SYS_SOCKET_H
X#ifndef _SCHILY_SOCKET_H
X#include <schily/socket.h>
X#endif
X#endif
X
X#endif	/* _SCHILY_SELECT_H */
END-of-smake-1.2.1/include/schily/select.h
echo x - smake-1.2.1/include/schily/select.mk
sed 's/^X//' >smake-1.2.1/include/schily/select.mk << 'END-of-smake-1.2.1/include/schily/select.mk'
X#ident "@(#)select.mk	1.1 09/08/04 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		select.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/select.mk
echo x - smake-1.2.1/include/schily/priv.h
sed 's/^X//' >smake-1.2.1/include/schily/priv.h << 'END-of-smake-1.2.1/include/schily/priv.h'
X/* @(#)priv.h	1.2 09/08/24 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for fine grained process privileges
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_PRIV_H
X#define	_SCHILY_PRIV_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * The Solaris process privileges interface.
X */
X#if	defined(HAVE_PRIV_H) && \
X	defined(HAVE_GETPPRIV) && defined(HAVE_SETPPRIV) && \
X	defined(HAVE_PRIV_SET)
X
X#define	HAVE_SOLARIS_PPRIV
X
X#ifndef	_INCL_PRIV_H
X#define	_INCL_PRIV_H
X#include <priv.h>
X#endif
X#endif
X
X/*
X * AIX implements an incompatible process privileges interface.
X * On AIX, we have sys/priv.h, getppriv(), setppriv() but no priv_set().
X */
X#if	defined(HAVE_SYS_PRIV_H) && \
X	defined(HAVE_GETPPRIV) && defined(HAVE_SETPPRIV) && \
X	defined(HAVE_PRIVBIT_SET)
X
X#define	HAVE_AIX_PPRIV
X
X#ifndef	_INCL_SYS_PRIV_H
X#define	_INCL_SYS_PRIV_H
X#include <sys/priv.h>
X#endif
X#endif
X
X#endif	/* _SCHILY_PRIV_H */
END-of-smake-1.2.1/include/schily/priv.h
echo x - smake-1.2.1/include/schily/ipc.mk
sed 's/^X//' >smake-1.2.1/include/schily/ipc.mk << 'END-of-smake-1.2.1/include/schily/ipc.mk'
X#ident "@(#)ipc.mk	1.1 09/08/08 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		ipc.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/ipc.mk
echo x - smake-1.2.1/include/schily/assert.h
sed 's/^X//' >smake-1.2.1/include/schily/assert.h << 'END-of-smake-1.2.1/include/schily/assert.h'
X/* @(#)assert.h	1.1 09/08/07 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for assert.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_ASSERT_H
X#define	_SCHILY_ASSERT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_ASSERT_H
X#ifndef	_INCL_ASSERT_H
X#define	_INCL_ASSERT_H
X#include <assert.h>
X#endif
X#else	/* !HAVE_ASSERT_H */
X
X#undef	assert
X
X#ifdef	NDEBUG
X#define	assert(ignore)	((void) 0)
X#else
X#if	defined(__STDC__)
X#define	assert(exp) (void)((exp) || (__assert(#exp, __FILE__, __LINE__), 0))
X#else
X#define	assert(exp) (void)((exp) || (__assert("exp", __FILE__, __LINE__), 0))
X#endif
X#endif
X
X#endif	/* !HAVE_ASSERT_H */
X
X#endif	/* _SCHILY_ASSERT_H */
END-of-smake-1.2.1/include/schily/assert.h
echo x - smake-1.2.1/include/schily/assert.mk
sed 's/^X//' >smake-1.2.1/include/schily/assert.mk << 'END-of-smake-1.2.1/include/schily/assert.mk'
X#ident "@(#)assert.mk	1.1 09/08/07 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		assert.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/assert.mk
echo x - smake-1.2.1/include/schily/syslog.h
sed 's/^X//' >smake-1.2.1/include/schily/syslog.h << 'END-of-smake-1.2.1/include/schily/syslog.h'
X/* @(#)syslog.h	1.1 09/08/07 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for syslog
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SYSLOG_H
X#define	_SCHILY_SYSLOG_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYSLOG_H
X#ifndef	_INCL_SYSLOG_H
X#define	_INCL_SYSLOG_H
X#include <syslog.h>
X#endif
X#endif
X
X#endif	/* _SCHILY_SYSLOG_H */
END-of-smake-1.2.1/include/schily/syslog.h
echo x - smake-1.2.1/include/schily/syslog.mk
sed 's/^X//' >smake-1.2.1/include/schily/syslog.mk << 'END-of-smake-1.2.1/include/schily/syslog.mk'
X#ident "@(#)syslog.mk	1.1 09/08/07 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		syslog.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/syslog.mk
echo x - smake-1.2.1/include/schily/procfs.h
sed 's/^X//' >smake-1.2.1/include/schily/procfs.h << 'END-of-smake-1.2.1/include/schily/procfs.h'
X/* @(#)procfs.h	1.1 09/08/07 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for the process filesystem
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_PROCFS_H
X#define	_SCHILY_PROCFS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_PROCFS_H
X#ifndef	_INCL_PROCFS_H
X#define	_INCL_PROCFS_H
X#include <procfs.h>
X#endif
X#else
X#ifdef	HAVE_SYS_PROCFS_H
X#ifndef	_INCL_SYS_PROCFS_H
X#define	_INCL_SYS_PROCFS_H
X#include <sys/procfs.h>
X#endif
X#endif
X#endif
X
X#endif	/* _SCHILY_PROCFS_H */
END-of-smake-1.2.1/include/schily/procfs.h
echo x - smake-1.2.1/include/schily/procfs.mk
sed 's/^X//' >smake-1.2.1/include/schily/procfs.mk << 'END-of-smake-1.2.1/include/schily/procfs.mk'
X#ident "@(#)procfs.mk	1.1 09/08/07 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		procfs.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/procfs.mk
echo x - smake-1.2.1/include/schily/float.h
sed 's/^X//' >smake-1.2.1/include/schily/float.h << 'END-of-smake-1.2.1/include/schily/float.h'
X/* @(#)float.h	1.1 09/08/08 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for float.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_FLOAT_H
X#define	_SCHILY_FLOAT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_FLOAT_H
X#ifndef	_INCL_FLOAT_H
X#define	_INCL_FLOAT_H
X#include <float.h>
X#endif
X#endif
X
X#ifdef	HAVE_VALUES_H
X#ifndef	_INCL_VALUES_H
X#define	_INCL_VALUES_H
X#include <values.h>
X#endif
X
X#ifndef	FLT_MAX
X#define	FLT_MAX	MAXFLOAT
X#endif
X#ifndef	FLT_MIN
X#define	FLT_MIN	MINFLOAT
X#endif
X#ifndef	DBL_MAX
X#define	DBL_MAX	MAXDOUBLE
X#endif
X#ifndef	DBL_MIN
X#define	DBL_MIN	MINDOUBLE
X#endif
X
X#endif
X
X
X
X#endif	/* _SCHILY_FLOAT_H */
END-of-smake-1.2.1/include/schily/float.h
echo x - smake-1.2.1/include/schily/float.mk
sed 's/^X//' >smake-1.2.1/include/schily/float.mk << 'END-of-smake-1.2.1/include/schily/float.mk'
X#ident "@(#)float.mk	1.1 09/08/08 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		float.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/float.mk
echo x - smake-1.2.1/include/schily/ipc.h
sed 's/^X//' >smake-1.2.1/include/schily/ipc.h << 'END-of-smake-1.2.1/include/schily/ipc.h'
X/* @(#)ipc.h	1.1 09/08/08 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for ipc.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_IPC_H
X#define	_SCHILY_IPC_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_IPC_H
X#ifndef	_INCL_SYS_IPC_H
X#define	_INCL_SYS_IPC_H
X#include <sys/ipc.h>
X#endif
X#endif
X
X#endif	/* _SCHILY_IPC_H */
END-of-smake-1.2.1/include/schily/ipc.h
echo x - smake-1.2.1/include/schily/sem.mk
sed 's/^X//' >smake-1.2.1/include/schily/sem.mk << 'END-of-smake-1.2.1/include/schily/sem.mk'
X#ident "@(#)sem.mk	1.1 09/08/08 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		sem.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/sem.mk
echo x - smake-1.2.1/include/schily/sem.h
sed 's/^X//' >smake-1.2.1/include/schily/sem.h << 'END-of-smake-1.2.1/include/schily/sem.h'
X/* @(#)sem.h	1.1 09/08/08 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for sem.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SEM_H
X#define	_SCHILY_SEM_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_SEM_H
X#ifndef	_INCL_SYS_SEM_H
X#define	_INCL_SYS_SEM_H
X#include <sys/sem.h>
X#endif
X#endif
X
X#endif	/* _SCHILY_SEM_H */
END-of-smake-1.2.1/include/schily/sem.h
echo x - smake-1.2.1/include/schily/shm.mk
sed 's/^X//' >smake-1.2.1/include/schily/shm.mk << 'END-of-smake-1.2.1/include/schily/shm.mk'
X#ident "@(#)shm.mk	1.1 09/08/08 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		shm.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/shm.mk
echo x - smake-1.2.1/include/schily/shm.h
sed 's/^X//' >smake-1.2.1/include/schily/shm.h << 'END-of-smake-1.2.1/include/schily/shm.h'
X/* @(#)shm.h	1.1 09/08/08 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for shm.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SHM_H
X#define	_SCHILY_SHM_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_SHM_H
X#ifndef	_INCL_SYS_SHM_H
X#define	_INCL_SYS_SHM_H
X#include <sys/shm.h>
X#endif
X#endif
X
X#endif	/* _SCHILY_SHM_H */
END-of-smake-1.2.1/include/schily/shm.h
echo x - smake-1.2.1/include/schily/sha2.mk
sed 's/^X//' >smake-1.2.1/include/schily/sha2.mk << 'END-of-smake-1.2.1/include/schily/sha2.mk'
X#ident "@(#)sha2.mk	1.1 09/08/09 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		sha2.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/sha2.mk
echo x - smake-1.2.1/include/schily/rmd160.h
sed 's/^X//' >smake-1.2.1/include/schily/rmd160.h << 'END-of-smake-1.2.1/include/schily/rmd160.h'
X/* @(#)rmd160.h	1.3 09/08/08 2009 J. Schilling */
X/*
X * RMD160 hash code taken from OpenBSD
X *
X * Portions Copyright (c) 2009 J. Schilling
X */
X/*	$OpenBSD: rmd160.h,v 1.16 2004/06/22 01:57:30 jfb Exp $	*/
X/*
X * Copyright (c) 2001 Markus Friedl.  All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X *    notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X *    notice, this list of conditions and the following disclaimer in the
X *    documentation and/or other materials provided with the distribution.
X *
X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
X * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
X * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
X * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
X * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
X * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
X * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
X * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
X */
X#ifndef	_SCHILY_RMD160_H
X#define	_SCHILY_RMD160_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#include <schily/utypes.h>
X
X#define	RMD160_BLOCK_LENGTH		64
X#define	RMD160_DIGEST_LENGTH		20
X#define	RMD160_DIGEST_STRING_LENGTH	(RMD160_DIGEST_LENGTH * 2 + 1)
X
X/* RMD160 context. */
Xtypedef struct RMD160Context {
X	UInt32_t state[5];			/* state */
X	UInt32_t count[2];			/* number of bits, mod 2^64 */
X	UInt8_t  buffer[RMD160_BLOCK_LENGTH];	/* input buffer */
X} RMD160_CTX;
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern void	 RMD160Init	__PR((RMD160_CTX *));
Xextern void	 RMD160Transform __PR((UInt32_t [5], const UInt8_t [RMD160_BLOCK_LENGTH]));
Xextern void	 RMD160Update	__PR((RMD160_CTX *, const UInt8_t *, size_t));
Xextern void	 RMD160Pad	__PR((RMD160_CTX *));
Xextern void	 RMD160Final	__PR((UInt8_t [RMD160_DIGEST_LENGTH], RMD160_CTX *));
Xextern char	*RMD160End	__PR((RMD160_CTX *, char *));
Xextern char	*RMD160File	__PR((const char *, char *));
Xextern char	*RMD160FileChunk __PR((const char *, char *, off_t, off_t));
Xextern char	*RMD160Data	__PR((const UInt8_t *, size_t, char *));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif  /* _SCHILY_RMD160_H */
END-of-smake-1.2.1/include/schily/rmd160.h
echo x - smake-1.2.1/include/schily/rmd160.mk
sed 's/^X//' >smake-1.2.1/include/schily/rmd160.mk << 'END-of-smake-1.2.1/include/schily/rmd160.mk'
X#ident "@(#)rmd160.mk	1.1 09/08/08 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		rmd160.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/rmd160.mk
echo x - smake-1.2.1/include/schily/sha2.h
sed 's/^X//' >smake-1.2.1/include/schily/sha2.h << 'END-of-smake-1.2.1/include/schily/sha2.h'
X/* @(#)sha2.h	1.3 09/08/09 2009 J. Schilling */
X/*
X * SHA2 hash code taken from OpenBSD
X *
X * Portions Copyright (c) 2009 J. Schilling
X */
X
X/*	$OpenBSD: sha2.h,v 1.7 2008/09/06 12:00:19 djm Exp $	*/
X
X/*
X * FILE:	sha2.h
X * AUTHOR:	Aaron D. Gifford <me@aarongifford.com>
X *
X * Copyright (c) 2000-2001, Aaron D. Gifford
X * All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X *    notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X *    notice, this list of conditions and the following disclaimer in the
X *    documentation and/or other materials provided with the distribution.
X * 3. Neither the name of the copyright holder nor the names of contributors
X *    may be used to endorse or promote products derived from this software
X *    without specific prior written permission.
X *
X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X *
X * $From: sha2.h,v 1.1 2001/11/08 00:02:01 adg Exp adg $
X */
X
X#ifndef	_SCHILY_SHA2_H
X#define	_SCHILY_SHA2_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#include <schily/utypes.h>
X
X
X/*** SHA-256/384/512 Various Length Definitions ***********************/
X#define	SHA256_BLOCK_LENGTH		64
X#define	SHA256_DIGEST_LENGTH		32
X#define	SHA256_DIGEST_STRING_LENGTH	(SHA256_DIGEST_LENGTH * 2 + 1)
X#ifdef	HAVE_LONGLONG
X#define	SHA384_BLOCK_LENGTH		128
X#define	SHA384_DIGEST_LENGTH		48
X#define	SHA384_DIGEST_STRING_LENGTH	(SHA384_DIGEST_LENGTH * 2 + 1)
X#define	SHA512_BLOCK_LENGTH		128
X#define	_SHA512_BLOCK_LENGTH		128
X#define	SHA512_DIGEST_LENGTH		64
X#define	SHA512_DIGEST_STRING_LENGTH	(SHA512_DIGEST_LENGTH * 2 + 1)
X#else
X#define	_SHA512_BLOCK_LENGTH		128
X#endif
X
X
X/*** SHA-256/384/512 Context Structure *******************************/
Xtypedef struct _SHA2_CTX {
X	union {
X		UInt32_t	st32[8];
X#ifdef	HAVE_LONGLONG
X		UInt64_t	st64[8];
X#else
X		UInt32_t	st64[16];	/* Keep original size */
X#endif
X	} state;
X#ifdef	HAVE_LONGLONG
X	UInt64_t	bitcount[2];
X#else
X	UInt32_t	bitcount[4];
X#endif
X	UInt8_t	buffer[_SHA512_BLOCK_LENGTH];
X} SHA2_CTX;
X
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern void SHA256Init		__PR((SHA2_CTX *));
Xextern void SHA256Transform	__PR((UInt32_t state[8], const UInt8_t [SHA256_BLOCK_LENGTH]));
Xextern void SHA256Update	__PR((SHA2_CTX *, const UInt8_t *, size_t));
Xextern void SHA256Pad		__PR((SHA2_CTX *));
Xextern void SHA256Final		__PR((UInt8_t [SHA256_DIGEST_LENGTH], SHA2_CTX *));
Xextern char *SHA256End		__PR((SHA2_CTX *, char *));
Xextern char *SHA256File		__PR((const char *, char *));
Xextern char *SHA256FileChunk	__PR((const char *, char *, off_t, off_t));
Xextern char *SHA256Data		__PR((const UInt8_t *, size_t, char *));
X
X#ifdef	HAVE_LONGLONG
Xextern void SHA384Init		__PR((SHA2_CTX *));
Xextern void SHA384Transform	__PR((UInt64_t state[8], const UInt8_t [SHA384_BLOCK_LENGTH]));
Xextern void SHA384Update	__PR((SHA2_CTX *, const UInt8_t *, size_t));
Xextern void SHA384Pad		__PR((SHA2_CTX *));
Xextern void SHA384Final		__PR((UInt8_t [SHA384_DIGEST_LENGTH], SHA2_CTX *));
Xextern char *SHA384End		__PR((SHA2_CTX *, char *));
Xextern char *SHA384File		__PR((const char *, char *));
Xextern char *SHA384FileChunk	__PR((const char *, char *, off_t, off_t));
Xextern char *SHA384Data		__PR((const UInt8_t *, size_t, char *));
X
Xextern void SHA512Init		__PR((SHA2_CTX *));
Xextern void SHA512Transform	__PR((UInt64_t state[8], const UInt8_t [SHA512_BLOCK_LENGTH]));
Xextern void SHA512Update	__PR((SHA2_CTX *, const UInt8_t *, size_t));
Xextern void SHA512Pad		__PR((SHA2_CTX *));
Xextern void SHA512Final		__PR((UInt8_t [SHA512_DIGEST_LENGTH], SHA2_CTX *));
Xextern char *SHA512End		__PR((SHA2_CTX *, char *));
Xextern char *SHA512File		__PR((const char *, char *));
Xextern char *SHA512FileChunk	__PR((const char *, char *, off_t, off_t));
Xextern char *SHA512Data		__PR((const UInt8_t *, size_t, char *));
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* _SCHILY_SHA2_H */
END-of-smake-1.2.1/include/schily/sha2.h
echo x - smake-1.2.1/include/schily/math.mk
sed 's/^X//' >smake-1.2.1/include/schily/math.mk << 'END-of-smake-1.2.1/include/schily/math.mk'
X#ident "@(#)math.mk	1.1 09/08/26 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		math.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/math.mk
echo x - smake-1.2.1/include/schily/math.h
sed 's/^X//' >smake-1.2.1/include/schily/math.h << 'END-of-smake-1.2.1/include/schily/math.h'
X/* @(#)math.h	1.1 09/08/26 Copyright 2009 J. Schilling */
X/*
X *	Abstraction from math.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_MATH_H
X#define	_SCHILY_MATH_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_MATH_H
X#ifndef	_INCL_MATH_H
X#define	_INCL_MATH_H
X#include <math.h>
X#endif
X#endif
X
X
X#endif	/* _SCHILY_MATH_H */
END-of-smake-1.2.1/include/schily/math.h
echo x - smake-1.2.1/include/schily/dbgmalloc.h
sed 's/^X//' >smake-1.2.1/include/schily/dbgmalloc.h << 'END-of-smake-1.2.1/include/schily/dbgmalloc.h'
X/* @(#)dbgmalloc.h	1.3 09/10/19 Copyright 2009 J. Schilling */
X/*
X *	Definitions for libdmalloc
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_DBGMALLOC_H
X#define	_SCHILY_DBGMALLOC_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	DBG_MALLOC
X#include <schily/types.h>
X#include <schily/stdlib.h>
X
X#ifdef __cplusplus
Xextern "C" {
X#endif
X
Xextern	void	*dbg_malloc		__PR((size_t size, char *file, int line));
Xextern	void	*dbg_calloc		__PR((size_t nelem, size_t elsize, char *file, int line));
Xextern	void	*dbg_realloc		__PR((void *t, size_t size, char *file, int line));
X#define	malloc(s)			dbg_malloc(s, __FILE__, __LINE__)
X#define	calloc(n, s)			dbg_calloc(n, s, __FILE__, __LINE__)
X#define	realloc(t, s)			dbg_realloc(t, s, __FILE__, __LINE__)
X
X#ifdef __cplusplus
X}
X#endif
X
X#endif	/* DBG_MALLOC */
X
X#include <schily/standard.h>
X
Xextern	BOOL	acheckdamage		__PR((void));
Xextern	void	freechecking		__PR((BOOL val));
Xextern	void	nomemraising		__PR((BOOL val));
X
X
X#endif	/* _SCHILY_DBGMALLOC_H */
END-of-smake-1.2.1/include/schily/dbgmalloc.h
echo x - smake-1.2.1/include/schily/systeminfo.mk
sed 's/^X//' >smake-1.2.1/include/schily/systeminfo.mk << 'END-of-smake-1.2.1/include/schily/systeminfo.mk'
X#ident "@(#)systeminfo.mk	1.1 09/07/14 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		systeminfo.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/systeminfo.mk
echo x - smake-1.2.1/include/schily/dbgmalloc.mk
sed 's/^X//' >smake-1.2.1/include/schily/dbgmalloc.mk << 'END-of-smake-1.2.1/include/schily/dbgmalloc.mk'
X#ident "@(#)dbgmalloc.mk	1.1 09/10/16 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		dbgmalloc.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-smake-1.2.1/include/schily/dbgmalloc.mk
echo x - smake-1.2.1/include/Makefile
sed 's/^X//' >smake-1.2.1/include/Makefile << 'END-of-smake-1.2.1/include/Makefile'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for sub directory makes
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XDIRS=		schily
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dir
X###########################################################################
END-of-smake-1.2.1/include/Makefile
echo c - smake-1.2.1/incs
mkdir -p smake-1.2.1/incs > /dev/null 2>&1
echo c - smake-1.2.1/lib
mkdir -p smake-1.2.1/lib > /dev/null 2>&1
echo x - smake-1.2.1/lib/Targets
sed 's/^X//' >smake-1.2.1/lib/Targets << 'END-of-smake-1.2.1/lib/Targets'
XCFILES_STDIO=	cvmod.c dat.c \
X		fcons.c \
X		fileopen.c \
X		fileread.c fileseek.c \
X		filewrite.c flag.c \
X		niread.c \
X		niwrite.c \
X		fcons64.c fileopen64.c fileseek64.c
X
X#
X# Note: getfp.c must be before getav0.c
X# Otherwise getfp.o would be made as dependency of avoffset
X#
X
XCFILES_REST=	astoi.c astoll.c \
X		comerr.c \
X		error.c \
X		fconv.c \
X		fillbytes.c \
X		format.c \
X		getfp.c \
X		getargs.c getav0.c geterrno.c \
X		jsprintf.c jssnprintf.c jssprintf.c \
X		movebytes.c \
X		raisecond.c \
X		rename.c \
X		saveargs.c \
X		seterrno.c \
X		strcatl.c streql.c strlcpy.c strncpy.c
X
XCFILES=		$(CFILES_STDIO) $(CFILES_REST)
END-of-smake-1.2.1/lib/Targets
echo c - smake-1.2.1/lib/stdio
mkdir -p smake-1.2.1/lib/stdio > /dev/null 2>&1
echo x - smake-1.2.1/lib/stdio/cvmod.c
sed 's/^X//' >smake-1.2.1/lib/stdio/cvmod.c << 'END-of-smake-1.2.1/lib/stdio/cvmod.c'
X/* @(#)cvmod.c	2.9 04/08/08 Copyright 1986, 1995-2003 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
X#ifndef	O_BINARY
X#define	O_BINARY	0
X#endif
X#ifndef	O_LARGEFILE
X#define	O_LARGEFILE	0
X#endif
X
XEXPORT int
X_cvmod(mode, omode, flag)
X	const char	*mode;
X	int		*omode;
X	int		*flag;
X{
X	while (*mode) {
X		switch (*mode) {
X
X		case 'r':   *omode |= O_RDONLY;	*flag |= FI_READ;	break;
X		case 'w':   *omode |= O_WRONLY;	*flag |= FI_WRITE;	break;
X		case 'e':   *omode |= O_EXCL;				break;
X		case 'c':   *omode |= O_CREAT;	*flag |= FI_CREATE;	break;
X		case 't':   *omode |= O_TRUNC;	*flag |= FI_TRUNC;	break;
X		case 'a':   *omode |= O_APPEND;	*flag |= FI_APPEND;	break;
X		case 'u':			*flag |= FI_UNBUF;	break;
X			/* dummy on UNIX */
X		case 'b':   *omode |= O_BINARY; *flag |= FI_BINARY;	break;
X			/*
X			 * XXX do we need this ?
X			 * XXX May this be a problem?
X			 */
X		case 'l':   *omode |= O_LARGEFILE;			break;
X		default:    raisecond(_badmode, 0L);
X			    return (0);
X		}
X		mode++;
X	}
X	if (*flag & FI_READ && *flag & FI_WRITE) {
X		*omode &= ~(O_RDONLY|O_WRONLY);
X		*omode |= O_RDWR;
X	}
X	return (1);
X}
END-of-smake-1.2.1/lib/stdio/cvmod.c
echo x - smake-1.2.1/lib/stdio/dat.c
sed 's/^X//' >smake-1.2.1/lib/stdio/dat.c << 'END-of-smake-1.2.1/lib/stdio/dat.c'
X/* @(#)dat.c	1.3 03/06/15 Copyright 1986, 1996-2003 J. Schilling */
X/*
X *	Copyright (c) 1986, 1996-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
Xchar	_badfile[]	= "bad_file";
Xchar	_badmode[]	= "bad_file_mode";
Xchar	_badop[]	= "bad_file_op";
END-of-smake-1.2.1/lib/stdio/dat.c
echo x - smake-1.2.1/lib/stdio/fcons.c
sed 's/^X//' >smake-1.2.1/lib/stdio/fcons.c << 'END-of-smake-1.2.1/lib/stdio/fcons.c'
X/* @(#)fcons.c	2.18 07/04/03 Copyright 1986, 1995-2007 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2007  J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
X/*
X * Note that because of a definition in schilyio.h we are using fseeko()/ftello()
X * instead of fseek()/ftell() if available.
X */
X
XLOCAL	char	*fmtab[] = {
X			"",	/* 0	FI_NONE				*/
X			"r",	/* 1	FI_READ				*/
X			"w",	/* 2	FI_WRITE		**1)	*/
X			"r+",	/* 3	FI_READ  | FI_WRITE		*/
X			"b",	/* 4	FI_NONE  | FI_BINARY		*/
X			"rb",	/* 5	FI_READ  | FI_BINARY		*/
X			"wb",	/* 6	FI_WRITE | FI_BINARY	**1)	*/
X			"r+b",	/* 7	FI_READ  | FI_WRITE | FI_BINARY	*/
X
X/* + FI_APPEND	*/	"",	/* 0	FI_NONE				*/
X/* ...		*/	"r",	/* 1	FI_READ				*/
X			"a",	/* 2	FI_WRITE		**1)	*/
X			"a+",	/* 3	FI_READ  | FI_WRITE		*/
X			"b",	/* 4	FI_NONE  | FI_BINARY		*/
X			"rb",	/* 5	FI_READ  | FI_BINARY		*/
X			"ab",	/* 6	FI_WRITE | FI_BINARY	**1)	*/
X			"a+b",	/* 7	FI_READ  | FI_WRITE | FI_BINARY	*/
X		};
X/*
X * NOTES:
X *	1)	fdopen() guarantees not to create/trunc files in this case
X *
X *	"w"	will create/trunc files with fopen()
X *	"a"	will create files with fopen()
X */
X
X
XEXPORT FILE *
X_fcons(fd, f, flag)
X	register FILE	*fd;
X		int	f;
X		int	flag;
X{
X	int	my_gflag = _io_glflag;
X
X	if (fd == (FILE *)NULL)
X		fd = fdopen(f,
X			fmtab[flag&(FI_READ|FI_WRITE|FI_BINARY | FI_APPEND)]);
X
X	if (fd != (FILE *)NULL) {
X		if (flag & FI_APPEND) {
X			(void) fseek(fd, (off_t)0, SEEK_END);
X		}
X		if (flag & FI_UNBUF) {
X			setbuf(fd, NULL);
X			my_gflag |= _JS_IOUNBUF;
X		}
X		set_my_flag(fd, my_gflag); /* must clear it if fd is reused */
X		return (fd);
X	}
X	if (flag & FI_CLOSE)
X		close(f);
X
X	return ((FILE *) NULL);
X}
END-of-smake-1.2.1/lib/stdio/fcons.c
echo x - smake-1.2.1/lib/stdio/fcons64.c
sed 's/^X//' >smake-1.2.1/lib/stdio/fcons64.c << 'END-of-smake-1.2.1/lib/stdio/fcons64.c'
X/* @(#)fcons64.c	1.6 04/08/08 Copyright 2000 J. Schilling */
X/*
X *	Copyright (c) 2000 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	USE_LARGEFILES
X
X#include "schilyio.h"
X
X/*#if	_LFS_LARGEFILE*/
X#ifdef	HAVE_LARGEFILES
X
X#include "fcons.c"
X
X#endif
END-of-smake-1.2.1/lib/stdio/fcons64.c
echo x - smake-1.2.1/lib/stdio/fileopen.c
sed 's/^X//' >smake-1.2.1/lib/stdio/fileopen.c << 'END-of-smake-1.2.1/lib/stdio/fileopen.c'
X/* @(#)fileopen.c	1.11 05/08/18 Copyright 1986, 1995-2005 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2005 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT FILE *
Xfileopen(name, mode)
X	const char	*name;
X	const char	*mode;
X{
X	int	ret;
X	int	omode = 0;
X	int	flag = 0;
X
X	if (!_cvmod(mode, &omode, &flag))
X		return ((FILE *) NULL);
X
X	if ((ret = _openfd(name, omode)) < 0)
X		return ((FILE *) NULL);
X
X	return (_fcons((FILE *)0, ret, flag | FI_CLOSE));
X}
END-of-smake-1.2.1/lib/stdio/fileopen.c
echo x - smake-1.2.1/lib/stdio/fileopen64.c
sed 's/^X//' >smake-1.2.1/lib/stdio/fileopen64.c << 'END-of-smake-1.2.1/lib/stdio/fileopen64.c'
X/* @(#)fileopen64.c	1.6 04/08/08 Copyright 2000 J. Schilling */
X/*
X *	Copyright (c) 2000 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	USE_LARGEFILES
X
X#include "schilyio.h"
X
X/*#if	_LFS_LARGEFILE*/
X#ifdef	HAVE_LARGEFILES
X
X#include "fileopen.c"
X
X#endif
END-of-smake-1.2.1/lib/stdio/fileopen64.c
echo x - smake-1.2.1/lib/stdio/fileread.c
sed 's/^X//' >smake-1.2.1/lib/stdio/fileread.c << 'END-of-smake-1.2.1/lib/stdio/fileread.c'
X/* @(#)fileread.c	1.16 09/06/30 Copyright 1986, 1995-2009 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
Xstatic	char	_readerr[]	= "file_read_err";
X
X#ifdef	HAVE_USG_STDIO
X
XEXPORT ssize_t
Xfileread(f, buf, len)
X	register FILE	*f;
X	void	*buf;
X	size_t	len;
X{
X	ssize_t	cnt;
X	register int	n;
X
X	down2(f, _IOREAD, _IORW);
X
X	if (f->_flag & _IONBF) {
X		cnt = _niread(fileno(f), buf, len);
X		if (cnt < 0) {
X			f->_flag |= _IOERR;
X			if (!(my_flag(f) & _JS_IONORAISE))
X				raisecond(_readerr, 0L);
X		}
X		if (cnt == 0 && len)
X			f->_flag |= _IOEOF;
X		return (cnt);
X	}
X	cnt = 0;
X	while (len > 0) {
X		if (f->_cnt <= 0) {
X			if (usg_filbuf(f) == EOF)
X				break;
X			f->_cnt++;
X			f->_ptr--;
X		}
X		n = f->_cnt >= len ? len : f->_cnt;
X		buf = (void *)movebytes(f->_ptr, buf, n);
X		f->_ptr += n;
X		f->_cnt -= n;
X		cnt += n;
X		len -= n;
X	}
X	if (!ferror(f))
X		return (cnt);
X	if (!(my_flag(f) & _JS_IONORAISE))
X		raisecond(_readerr, 0L);
X	return (-1);
X}
X
X#else
X
XEXPORT ssize_t
Xfileread(f, buf, len)
X	register FILE	*f;
X	void	*buf;
X	size_t	len;
X{
X	ssize_t	cnt;
X
X	down2(f, _IOREAD, _IORW);
X
X	if (my_flag(f) & _JS_IOUNBUF)
X		return (_niread(fileno(f), buf, len));
X	cnt = fread(buf, 1, len, f);
X
X	if (!ferror(f))
X		return (cnt);
X	if (!(my_flag(f) & _JS_IONORAISE))
X		raisecond(_readerr, 0L);
X	return (-1);
X}
X
X#endif	/* HAVE_USG_STDIO */
END-of-smake-1.2.1/lib/stdio/fileread.c
echo x - smake-1.2.1/lib/stdio/fileseek.c
sed 's/^X//' >smake-1.2.1/lib/stdio/fileseek.c << 'END-of-smake-1.2.1/lib/stdio/fileseek.c'
X/* @(#)fileseek.c	1.13 07/04/03 Copyright 1986, 1996-2007 J. Schilling */
X/*
X *	Copyright (c) 1986, 1996-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
X/*
X * Note that because of a definition in schilyio.h we are using fseeko()/ftello()
X * instead of fseek()/ftell() if available.
X */
X
Xstatic	char	_seekerr[]	= "file_seek_err";
X
XEXPORT int
Xfileseek(f, pos)
X	register FILE	*f;
X	off_t	pos;
X{
X	int	ret;
X
X	down(f);
X	ret = fseek(f, pos, SEEK_SET);
X	if (ret < 0 && !(my_flag(f) & _JS_IONORAISE))
X		raisecond(_seekerr, 0L);
X	return (ret);
X}
END-of-smake-1.2.1/lib/stdio/fileseek.c
echo x - smake-1.2.1/lib/stdio/fileseek64.c
sed 's/^X//' >smake-1.2.1/lib/stdio/fileseek64.c << 'END-of-smake-1.2.1/lib/stdio/fileseek64.c'
X/* @(#)fileseek64.c	1.6 04/08/08 Copyright 2000 J. Schilling */
X/*
X *	Copyright (c) 2000 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	USE_LARGEFILES
X
X#include "schilyio.h"
X
X/*#if	_LFS_LARGEFILE*/
X#ifdef	HAVE_LARGEFILES
X
X#include "fileseek.c"
X
X#endif
END-of-smake-1.2.1/lib/stdio/fileseek64.c
echo x - smake-1.2.1/lib/stdio/filewrite.c
sed 's/^X//' >smake-1.2.1/lib/stdio/filewrite.c << 'END-of-smake-1.2.1/lib/stdio/filewrite.c'
X/* @(#)filewrite.c	1.17 09/06/30 Copyright 1986, 1995-2009 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
Xstatic	char	_writeerr[]	= "file_write_err";
X
X#ifdef	HAVE_USG_STDIO
X
XEXPORT ssize_t
Xfilewrite(f, vbuf, len)
X	register FILE	*f;
X	void	*vbuf;
X	size_t	len;
X{
X	register int	n;
X	ssize_t	cnt;
X	char	*buf = vbuf;
X
X	down2(f, _IOWRT, _IORW);
X
X	if (f->_flag & _IONBF) {
X		cnt = _niwrite(fileno(f), buf, len);
X		if (cnt < 0) {
X			f->_flag |= _IOERR;
X			if (!(my_flag(f) & _JS_IONORAISE))
X				raisecond(_writeerr, 0L);
X		}
X		return (cnt);
X	}
X	cnt = 0;
X	while (len > 0) {
X		if (f->_cnt <= 0) {
X			if (usg_flsbuf((unsigned char) *buf++, f) == EOF)
X				break;
X			cnt++;
X			if (--len == 0)
X				break;
X		}
X		if ((n = f->_cnt >= len ? len : f->_cnt) > 0) {
X			f->_ptr = (unsigned char *)movebytes(buf, f->_ptr, n);
X			buf += n;
X			f->_cnt -= n;
X			cnt += n;
X			len -= n;
X		}
X	}
X	if (!ferror(f))
X		return (cnt);
X	if (!(my_flag(f) & _JS_IONORAISE))
X	raisecond(_writeerr, 0L);
X	return (-1);
X}
X
X#else
X
XEXPORT ssize_t
Xfilewrite(f, vbuf, len)
X	register FILE	*f;
X	void	*vbuf;
X	size_t	len;
X{
X	ssize_t	cnt;
X	char	*buf = vbuf;
X
X	down2(f, _IOWRT, _IORW);
X
X	if (my_flag(f) & _JS_IOUNBUF)
X		return (_niwrite(fileno(f), buf, len));
X	cnt = fwrite(buf, 1, len, f);
X
X	if (!ferror(f))
X		return (cnt);
X	if (!(my_flag(f) & _JS_IONORAISE))
X	raisecond(_writeerr, 0L);
X	return (-1);
X}
X
X#endif	/* HAVE_USG_STDIO */
END-of-smake-1.2.1/lib/stdio/filewrite.c
echo x - smake-1.2.1/lib/stdio/flag.c
sed 's/^X//' >smake-1.2.1/lib/stdio/flag.c << 'END-of-smake-1.2.1/lib/stdio/flag.c'
X/* @(#)flag.c	2.13 07/04/03 Copyright 1986-2007 J. Schilling */
X/*
X *	Copyright (c) 1986-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X#include <schily/stdlib.h>
X
X#ifdef	DO_MYFLAG
X
X#define	FL_INIT	10
X
X#if	defined(IS_MACOS_X)
X/*
X * The MAC OS X linker does not grok "common" varaibles.
X * Make _io_glflag a "data" variable.
X */
XEXPORT	int	_io_glflag = 0;		/* global default flag */
X#else
XEXPORT	int	_io_glflag;		/* global default flag */
X#endif
XLOCAL	int	_fl_inc = 10;		/* increment for expanding flag struct */
XEXPORT	int	_fl_max = FL_INIT;	/* max fd currently in _io_myfl */
XLOCAL	_io_fl	_io_smyfl[FL_INIT];	/* initial static space */
XEXPORT	_io_fl	*_io_myfl = _io_smyfl;	/* init to static space */
X
XLOCAL int _more_flags	__PR((FILE *));
X
XLOCAL int
X_more_flags(fp)
X	FILE	*fp;
X{
X	register int	f = fileno(fp);
X	register int	n = _fl_max;
X	register _io_fl	*np;
X
X	while (n <= f)
X		n += _fl_inc;
X
X	if (_io_myfl == _io_smyfl) {
X		np = (_io_fl *) malloc(n * sizeof (*np));
X		fillbytes(np, n * sizeof (*np), '\0');
X		movebytes(_io_smyfl, np, sizeof (_io_smyfl)/sizeof (*np));
X	} else {
X		np = (_io_fl *) realloc(_io_myfl, n * sizeof (*np));
X		if (np)
X			fillbytes(&np[_fl_max], (n-_fl_max)*sizeof (*np), '\0');
X	}
X	if (np) {
X		_io_myfl = np;
X		_fl_max = n;
X		return (_io_get_my_flag(fp));
X	} else {
X		return (_JS_IONORAISE);
X	}
X}
X
XEXPORT int
X_io_get_my_flag(fp)
X	register FILE	*fp;
X{
X	register int	f = fileno(fp);
X	register _io_fl	*fl;
X
X	if (f >= _fl_max)
X		return (_more_flags(fp));
X
X	fl = &_io_myfl[f];
X
X	if (fl->fl_io == 0 || fl->fl_io == fp)
X		return (fl->fl_flags);
X
X	while (fl && fl->fl_io != fp)
X		fl = fl->fl_next;
X
X	if (fl == 0)
X		return (0);
X
X	return (fl->fl_flags);
X}
X
XEXPORT void
X_io_set_my_flag(fp, flag)
X	FILE	*fp;
X	int	flag;
X{
X	register int	f = fileno(fp);
X	register _io_fl	*fl;
X	register _io_fl	*fl2;
X
X	if (f >= _fl_max)
X		(void) _more_flags(fp);
X
X	fl = &_io_myfl[f];
X
X	if (fl->fl_io != (FILE *)0) {
X		fl2 = fl;
X
X		while (fl && fl->fl_io != fp)
X			fl = fl->fl_next;
X		if (fl == 0) {
X			if ((fl = (_io_fl *) malloc(sizeof (*fl))) == 0)
X				return;
X			fl->fl_next = fl2->fl_next;
X			fl2->fl_next = fl;
X		}
X	}
X	fl->fl_io = fp;
X	fl->fl_flags = flag;
X}
X
XEXPORT void
X_io_add_my_flag(fp, flag)
X	FILE	*fp;
X	int	flag;
X{
X	int	oflag = _io_get_my_flag(fp);
X
X	oflag |= flag;
X
X	_io_set_my_flag(fp, oflag);
X}
X
X#endif	/* DO_MYFLAG */
END-of-smake-1.2.1/lib/stdio/flag.c
echo x - smake-1.2.1/lib/stdio/niread.c
sed 's/^X//' >smake-1.2.1/lib/stdio/niread.c << 'END-of-smake-1.2.1/lib/stdio/niread.c'
X/* @(#)niread.c	1.14 09/06/30 Copyright 1986, 1996-2009 J. Schilling */
X/*
X *	Non interruptable read
X *
X *	Copyright (c) 1986, 1996-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT ssize_t
X_niread(f, buf, count)
X	int	f;
X	void	*buf;
X	size_t	count;
X{
X	ssize_t	ret;
X	int	oerrno = geterrno();
X
X	if ((ret = (ssize_t)count) < 0) {
X		seterrno(EINVAL);
X		return ((ssize_t)-1);
X	}
X	while ((ret = read(f, buf, count)) < 0 && geterrno() == EINTR) {
X		/*
X		 * Set back old 'errno' so we don't change the errno visible
X		 * to the outside if we did not fail.
X		 */
X		seterrno(oerrno);
X	}
X	return (ret);
X}
END-of-smake-1.2.1/lib/stdio/niread.c
echo x - smake-1.2.1/lib/stdio/schilyio.h
sed 's/^X//' >smake-1.2.1/lib/stdio/schilyio.h << 'END-of-smake-1.2.1/lib/stdio/schilyio.h'
X/* @(#)schilyio.h	2.27 09/06/30 Copyright 1986, 1995-2009 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_STDIO_SCHILYIO_H
X#define	_STDIO_SCHILYIO_H
X
X#include <schily/mconfig.h>
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/types.h>
X#include <schily/unistd.h>
X#include <schily/fcntl.h>
X#include <schily/schily.h>
X#include <schily/errno.h>
X
X#ifdef	NO_USG_STDIO
X#	ifdef	HAVE_USG_STDIO
X#		undef	HAVE_USG_STDIO
X#	endif
X#endif
X
X/*#if	_LFS_LARGEFILE*/
X#ifdef	HAVE_LARGEFILES
X/*
X * XXX We may need to put this code to a more global place to allow all
X * XXX users of fseek()/ftell() to automaticaly use fseeko()/ftello()
X * XXX if the latter are available.
X *
X * If HAVE_LARGEFILES is defined, it is guaranteed that fseeko()/ftello()
X * both are available.
X */
X#	define	fseek	fseeko
X#	define	ftell	ftello
X
X#else	/* !HAVE_LARGEFILES */
X/*
X * If HAVE_LARGEFILES is not defined, we depend on specific tests for
X * fseeko()/ftello() which must have been done before the tests for
X * Large File support have been done.
X * Note that this only works if the tests used below are really done before
X * the Large File autoconf test is run. This is because autoconf does no
X * clean testing but instead cumulatively modifes the envivonment used for
X * testing.
X */
X#ifdef	HAVE_FSEEKO
X#	define	fseek	fseeko
X#endif
X#ifdef	HAVE_FTELLO
X#	define	ftell	ftello
X#endif
X
X#endif
X
X/*
X * speed things up...
X */
X#ifndef	_OPENFD_SRC
X#ifdef	_openfd
X#undef	_openfd
X#endif
X#define	_openfd(name, omode)	(open(name, omode, (mode_t)0666))
X#endif
X
X#define	DO_MYFLAG		/* use local flags */
X
X/*
X * Flags used during fileopen(), ... by _fcons()/ _cvmod()
X */
X#define	FI_NONE		0x0000	/* no flags defined */
X
X#define	FI_READ		0x0001	/* open for reading */
X#define	FI_WRITE	0x0002	/* open for writing */
X#define	FI_BINARY	0x0004	/* open in binary mode */
X#define	FI_APPEND	0x0008	/* append on each write */
X
X#define	FI_CREATE	0x0010	/* create if nessecary */
X#define	FI_TRUNC	0x0020	/* truncate file on open */
X#define	FI_UNBUF	0x0080	/* dont't buffer io */
X#define	FI_CLOSE	0x1000	/* close file on error */
X
X/*
X * Additional Schily FILE * flags that are not present with the
X * standard stdio implementation.
X */
X#define	_JS_IONORAISE	01	/* do no raisecond() on errors */
X#define	_JS_IOUNBUF	02	/* do unbuffered i/o */
X
X
X#ifdef	DO_MYFLAG
X
Xstruct _io_flags {
X	FILE	*fl_io;		/* file pointer */
X	struct _io_flags	/* pointer to next struct */
X		*fl_next;	/* if more file pointer to same fd */
X	int	fl_flags;	/* my flags */
X};
X
Xtypedef	struct _io_flags _io_fl;
X
Xextern	int	_io_glflag;	/* global default flag */
Xextern	_io_fl	*_io_myfl;	/* array of structs to hold my flags */
Xextern	int	_fl_max;	/* max fd currently in _io_myfl */
X
X/*
X *	if fileno > max
X *		expand
X *	else if map[fileno].pointer == 0
X *		return 0
X *	else if map[fileno].pointer == p
X *		return map[fileno].flags
X *	else
X *		search list
X */
X#define	flp(p)		(&_io_myfl[fileno(p)])
X
X#ifdef	MY_FLAG_IS_MACRO
X#define	my_flag(p)	((int)fileno(p) >= _fl_max ?			\
X				_io_get_my_flag(p) :			\
X			((flp(p)->fl_io == 0 || flp(p)->fl_io == p) ?	\
X				flp(p)->fl_flags :			\
X				_io_get_my_flag(p)))
X#else
X#define	my_flag(p)	_io_get_my_flag(p)
X#endif
X
X#define	set_my_flag(p, v) _io_set_my_flag(p, v)
X#define	add_my_flag(p, v) _io_add_my_flag(p, v)
X
Xextern	int	_io_get_my_flag __PR((FILE *));
Xextern	void	_io_set_my_flag __PR((FILE *, int));
Xextern	void	_io_add_my_flag __PR((FILE *, int));
X
X#else	/* DO_MYFLAG */
X
X#define	my_flag(p)		_JS_IONORAISE	/* Always noraise */
X#define	set_my_flag(p, v)			/* Ignore */
X#define	add_my_flag(p, v)			/* Ignore */
X
X#endif	/* DO_MYFLAG */
X
X#ifdef	HAVE_USG_STDIO
X
X/*
X * Use the right filbuf()/flsbuf() function.
X */
X#ifdef	HAVE___FILBUF
X#	define	usg_filbuf(fp)		__filbuf(fp)
X#	define	usg_flsbuf(c, fp)	__flsbuf(c, fp)
X/*
X * Define prototypes to verify if our interface is right
X */
Xextern	int	__filbuf		__PR((FILE *));
X/*extern	int	__flsbuf		__PR(());*/
X#else
X#	ifdef	HAVE__FILBUF
X#	define	usg_filbuf(fp)		_filbuf(fp)
X#	define	usg_flsbuf(c, fp)	_flsbuf(c, fp)
X/*
X * Define prototypes to verify if our interface is right
X */
Xextern	int	_filbuf			__PR((FILE *));
X/*extern	int	_flsbuf			__PR(());*/
X#	else
X/*
X * no filbuf() but this will not happen on USG_STDIO systems.
X */
X#	endif
X#endif
X/*
X * Do not check this because flsbuf()'s 1st parameter may be
X * int			SunOS
X * unsigned int		Apollo
X * unsigned char	HP-UX-11
X *
X * Note that the interface is now checked by autoconf.
X */
X/*extern	int	_flsbuf	__PR((int, FILE *));*/
X#else
X/*
X * If we are on a non USG system we cannot down file pointers
X */
X#undef	DO_DOWN
X#endif
X
X#ifndef	DO_DOWN
X/*
X *	No stream checking
X */
X#define	down(f)
X#define	down1(f, fl1)
X#define	down2(f, fl1, fl2)
X#else
X/*
X *	Do stream checking (works only on USG stdio)
X *
X *	New version of USG stdio.
X *	_iob[] holds only a small amount of pointers.
X *	Aditional space is allocated.
X *	We may check only if the file pointer is != NULL
X *	and if iop->_flag refers to a stream with appropriate modes.
X *	If _iob[] gets expanded by malloc() we cannot check upper bound.
X */
X#define	down(f)		((f) == 0 || (f)->_flag == 0 ? \
X				(raisecond(_badfile, 0L), (FILE *)0) : (f))
X
X#define	down1(f, fl1)	((f) == 0 || (f)->_flag == 0 ? \
X					(raisecond(_badfile, 0L), (FILE *)0) : \
X				(((f)->_flag & fl1) != fl1 ? \
X					(raisecond(_badop, 0L), (FILE *)0) : \
X					(f)))
X
X#define	down2(f, fl1, fl2)	((f) == 0 || (f)->_flag == 0 ? \
X				(raisecond(_badfile, 0L), (FILE *)0) : \
X				    (((f)->_flag & fl1) != fl1 && \
X				    ((f)->_flag & fl2)  != fl2 ? \
X				(raisecond(_badop, 0L), (FILE *)0) : \
X				(f)))
X#endif	/* DO_DOWN */
X
Xextern	char	_badfile[];
Xextern	char	_badmode[];
Xextern	char	_badop[];
X
X#endif	/* _STDIO_SCHILYIO_H */
END-of-smake-1.2.1/lib/stdio/schilyio.h
echo x - smake-1.2.1/lib/stdio/niwrite.c
sed 's/^X//' >smake-1.2.1/lib/stdio/niwrite.c << 'END-of-smake-1.2.1/lib/stdio/niwrite.c'
X/* @(#)niwrite.c	1.7 09/06/30 Copyright 1986, 2001-2009 J. Schilling */
X/*
X *	Non interruptable write
X *
X *	Copyright (c) 1986, 2001-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT ssize_t
X_niwrite(f, buf, count)
X	int	f;
X	void	*buf;
X	size_t	count;
X{
X	ssize_t	ret;
X	int	oerrno = geterrno();
X
X	if ((ret = (ssize_t)count) < 0) {
X		seterrno(EINVAL);
X		return ((ssize_t)-1);
X	}
X	while ((ret = write(f, buf, count)) < 0 && geterrno() == EINTR) {
X		/*
X		 * Set back old 'errno' so we don't change the errno visible
X		 * to the outside if we did not fail.
X		 */
X		seterrno(oerrno);
X	}
X	return (ret);
X}
END-of-smake-1.2.1/lib/stdio/niwrite.c
echo x - smake-1.2.1/lib/astoi.c
sed 's/^X//' >smake-1.2.1/lib/astoi.c << 'END-of-smake-1.2.1/lib/astoi.c'
X/* @(#)astoi.c	1.9 06/09/13 Copyright 1985, 1995-2003 J. Schilling */
X/*
X *	astoi() converts a string to int
X *	astol() converts a string to long
X *
X *	Leading tabs and spaces are ignored.
X *	Both return pointer to the first char that has not been used.
X *	Caller must check if this means a bad conversion.
X *
X *	leading "+" is ignored
X *	leading "0"  makes conversion octal (base 8)
X *	leading "0x" makes conversion hex   (base 16)
X *
X *	Copyright (c) 1985, 1995-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X#define	is_space(c)	 ((c) == ' ' || (c) == '\t')
X#define	is_digit(c)	 ((c) >= '0' && (c) <= '9')
X#define	is_hex(c)	(\
X			((c) >= 'a' && (c) <= 'f') || \
X			((c) >= 'A' && (c) <= 'F'))
X
X#define	to_lower(c)	(((c) >= 'A' && (c) <= 'Z') ? (c) - 'A'+'a' : (c))
X
X#ifdef	notdef
XEXPORT int
Xatoi(s)
X	char	*s;
X{
X	long	l;
X
X	(void) astol(s, &l);
X	return ((int) l);
X}
X
XEXPORT long
Xatol(s)
X	char	*s;
X{
X	long	l;
X
X	(void) astol(s, &l);
X	return (l);
X}
X#endif
X
XEXPORT char *
Xastoi(s, i)
X	const char *s;
X	int *i;
X{
X	long l;
X	char *ret;
X
X	ret = astol(s, &l);
X	*i = l;
X	return (ret);
X}
X
XEXPORT char *
Xastol(s, l)
X	register const char *s;
X	long *l;
X{
X	return (astolb(s, l, 0));
X}
X
XEXPORT char *
Xastolb(s, l, base)
X	register const char *s;
X	long *l;
X	register int base;
X{
X	int neg = 0;
X	register long ret = 0L;
X	register int digit;
X	register char c;
X
X	while (is_space(*s))
X		s++;
X
X	if (*s == '+') {
X		s++;
X	} else if (*s == '-') {
X		s++;
X		neg++;
X	}
X
X	if (base == 0) {
X		if (*s == '0') {
X			base = 8;
X			s++;
X			if (*s == 'x' || *s == 'X') {
X				s++;
X				base = 16;
X			}
X		} else {
X			base = 10;
X		}
X	}
X	for (; (c = *s) != 0; s++) {
X
X		if (is_digit(c)) {
X			digit = c - '0';
X		} else if (is_hex(c)) {
X			digit = to_lower(c) - 'a' + 10;
X		} else {
X			break;
X		}
X
X		if (digit < base) {
X			ret *= base;
X			ret += digit;
X		} else {
X			break;
X		}
X	}
X	if (neg)
X		ret = -ret;
X	*l = ret;
X	return ((char *)s);
X}
END-of-smake-1.2.1/lib/astoi.c
echo x - smake-1.2.1/lib/astoll.c
sed 's/^X//' >smake-1.2.1/lib/astoll.c << 'END-of-smake-1.2.1/lib/astoll.c'
X/* @(#)astoll.c	1.4 06/09/13 Copyright 1985, 2000-2003 J. Schilling */
X/*
X *	astoll() converts a string to long long
X *
X *	Leading tabs and spaces are ignored.
X *	Both return pointer to the first char that has not been used.
X *	Caller must check if this means a bad conversion.
X *
X *	leading "+" is ignored
X *	leading "0"  makes conversion octal (base 8)
X *	leading "0x" makes conversion hex   (base 16)
X *
X *	Llong is silently reverted to long if the compiler does not
X *	support long long.
X *
X *	Copyright (c) 1985, 2000-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/schily.h>
X
X#define	is_space(c)	 ((c) == ' ' || (c) == '\t')
X#define	is_digit(c)	 ((c) >= '0' && (c) <= '9')
X#define	is_hex(c)	(\
X			((c) >= 'a' && (c) <= 'f') || \
X			((c) >= 'A' && (c) <= 'F'))
X
X#define	to_lower(c)	(((c) >= 'A' && (c) <= 'Z') ? (c) - 'A'+'a' : (c))
X
Xchar *
Xastoll(s, l)
X	register const char *s;
X	Llong *l;
X{
X	return (astollb(s, l, 0));
X}
X
Xchar *
Xastollb(s, l, base)
X	register const char *s;
X	Llong *l;
X	register int base;
X{
X	int neg = 0;
X	register Llong ret = (Llong)0;
X	register int digit;
X	register char c;
X
X	while (is_space(*s))
X		s++;
X
X	if (*s == '+') {
X		s++;
X	} else if (*s == '-') {
X		s++;
X		neg++;
X	}
X
X	if (base == 0) {
X		if (*s == '0') {
X			base = 8;
X			s++;
X			if (*s == 'x' || *s == 'X') {
X				s++;
X				base = 16;
X			}
X		} else {
X			base = 10;
X		}
X	}
X	for (; (c = *s) != 0; s++) {
X
X		if (is_digit(c)) {
X			digit = c - '0';
X		} else if (is_hex(c)) {
X			digit = to_lower(c) - 'a' + 10;
X		} else {
X			break;
X		}
X
X		if (digit < base) {
X			ret *= base;
X			ret += digit;
X		} else {
X			break;
X		}
X	}
X	if (neg)
X		ret = -ret;
X	*l = ret;
X	return ((char *)s);
X}
END-of-smake-1.2.1/lib/astoll.c
echo x - smake-1.2.1/lib/comerr.c
sed 's/^X//' >smake-1.2.1/lib/comerr.c << 'END-of-smake-1.2.1/lib/comerr.c'
X/* @(#)comerr.c	1.35 09/07/10 Copyright 1985-1989, 1995-2009 J. Schilling */
X/*
X *	Routines for printing command errors
X *
X *	Copyright (c) 1985-1989, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/unistd.h>	/* include <sys/types.h> try to get size_t */
X#include <schily/stdio.h>	/* Try again for size_t	*/
X#include <schily/stdlib.h>	/* Try again for size_t	*/
X#include <schily/standard.h>
X#include <schily/varargs.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include <schily/errno.h>
X
XEXPORT	int	on_comerr	__PR((void (*fun)(int, void *), void *arg));
XEXPORT	void	comerr		__PR((const char *, ...));
XEXPORT	void	comerrno	__PR((int, const char *, ...));
XEXPORT	int	errmsg		__PR((const char *, ...));
XEXPORT	int	errmsgno	__PR((int, const char *, ...));
XEXPORT	int	_comerr		__PR((FILE *, int, int, const char *, va_list));
XEXPORT	void	comexit		__PR((int));
XEXPORT	char	*errmsgstr	__PR((int));
X
Xtypedef	struct ex {
X	struct ex *next;
X	void	(*func) __PR((int, void *));
X	void	*arg;
X} ex_t;
X
XLOCAL	ex_t	*exfuncs;
X
XEXPORT	int
Xon_comerr(func, arg)
X	void	(*func) __PR((int, void *));
X	void	*arg;
X{
X	ex_t	*fp;
X
X	fp = malloc(sizeof (*fp));
X	if (fp == NULL)
X		return (-1);
X
X	fp->func = func;
X	fp->arg  = arg;
X	fp->next = exfuncs;
X	exfuncs = fp;
X	return (0);
X}
X
X/* VARARGS1 */
X#ifdef	PROTOTYPES
XEXPORT void
Xcomerr(const char *msg, ...)
X#else
XEXPORT void
Xcomerr(msg, va_alist)
X	char	*msg;
X	va_dcl
X#endif
X{
X	va_list	args;
X
X#ifdef	PROTOTYPES
X	va_start(args, msg);
X#else
X	va_start(args);
X#endif
X	(void) _comerr(stderr, TRUE, geterrno(), msg, args);
X	/* NOTREACHED */
X	va_end(args);
X}
X
X/* VARARGS2 */
X#ifdef	PROTOTYPES
XEXPORT void
Xcomerrno(int err, const char *msg, ...)
X#else
XEXPORT void
Xcomerrno(err, msg, va_alist)
X	int	err;
X	char	*msg;
X	va_dcl
X#endif
X{
X	va_list	args;
X
X#ifdef	PROTOTYPES
X	va_start(args, msg);
X#else
X	va_start(args);
X#endif
X	(void) _comerr(stderr, TRUE, err, msg, args);
X	/* NOTREACHED */
X	va_end(args);
X}
X
X/* VARARGS1 */
X#ifdef	PROTOTYPES
XEXPORT int
Xerrmsg(const char *msg, ...)
X#else
XEXPORT int
Xerrmsg(msg, va_alist)
X	char	*msg;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, msg);
X#else
X	va_start(args);
X#endif
X	ret = _comerr(stderr, FALSE, geterrno(), msg, args);
X	va_end(args);
X	return (ret);
X}
X
X/* VARARGS2 */
X#ifdef	PROTOTYPES
XEXPORT int
Xerrmsgno(int err, const char *msg, ...)
X#else
XEXPORT int
Xerrmsgno(err, msg, va_alist)
X	int	err;
X	char	*msg;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, msg);
X#else
X	va_start(args);
X#endif
X	ret = _comerr(stderr, FALSE, err, msg, args);
X	va_end(args);
X	return (ret);
X}
X
X#if defined(__BEOS__) || defined(__HAIKU__)
X	/*
X	 * On BeOS errno is a big negative number (0x80000000 + small number).
X	 * We assume that small negative numbers are safe to be used as special
X	 * values that prevent printing the errno text.
X	 *
X	 * We tried to use #if EIO < 0 but this does not work because EIO is
X	 * defined to a enum. ENODEV may work as ENODEV is defined to a number
X	 * directly.
X	 */
X#define	silent_error(e)		((e) < 0 && (e) >= -1024)
X#else
X	/*
X	 * On UNIX errno is a small non-negative number, so we assume that
X	 * negative values cannot be a valid errno and don't print the error
X	 * string in this case. However the value may still be used as exit()
X	 * code if 'exflg' is set.
X	 */
X#define	silent_error(e)		((e) < 0)
X#endif
XEXPORT int
X_comerr(f, exflg, err, msg, args)
X	FILE		*f;
X	int		exflg;
X	int		err;
X	const char	*msg;
X	va_list		args;
X{
X	char	errbuf[20];
X	char	*errnam;
X	char	*prognam = get_progname();
X
X	if (silent_error(err)) {
X		js_fprintf(f, "%s: %r", prognam, msg, args);
X	} else {
X		errnam = errmsgstr(err);
X		if (errnam == NULL) {
X			(void) js_snprintf(errbuf, sizeof (errbuf),
X						"Error %d", err);
X			errnam = errbuf;
X		}
X		js_fprintf(f, "%s: %s. %r", prognam, errnam, msg, args);
X	}
X	if (exflg) {
X		comexit(err);
X		/* NOTREACHED */
X	}
X	return (err);
X}
X
XEXPORT void
Xcomexit(err)
X	int	err;
X{
X	while (exfuncs) {
X		(*exfuncs->func)(err, exfuncs->arg);
X		exfuncs = exfuncs->next;
X	}
X	exit(err);
X	/* NOTREACHED */
X}
X
XEXPORT char *
Xerrmsgstr(err)
X	int	err;
X{
X#ifdef	HAVE_STRERROR
X	/*
X	 * POSIX compliance may look strange...
X	 */
X	int	errsav = geterrno();
X	char	*ret;
X
X	seterrno(0);
X	ret = strerror(err);
X	err = geterrno();
X	seterrno(errsav);
X
X	if (ret == NULL || err)
X		return (NULL);
X	return (ret);
X#else
X	if (err < 0 || err >= sys_nerr) {
X		return (NULL);
X	} else {
X		return (sys_errlist[err]);
X	}
X#endif
X}
END-of-smake-1.2.1/lib/comerr.c
echo x - smake-1.2.1/lib/cvt.c
sed 's/^X//' >smake-1.2.1/lib/cvt.c << 'END-of-smake-1.2.1/lib/cvt.c'
X/* @(#)cvt.c	1.8 06/09/13 Copyright 1998 J. Schilling */
X/*
X *	Compatibility routines for 4.4BSD based C-libraries ecvt()/fcvt()
X *	and a working gcvt() that is needed on 4.4BSD and GNU libc systems.
X *
X *	On 4.4BSD, gcvt() is missing, the gcvt() implementation from GNU libc
X *	is not working correctly.
X *
X *	Neither __dtoa() nor [efg]cvt() are MT safe.
X *
X *	Copyright (c) 1998 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdlib.h>
X#include <schily/utypes.h>
X#include <schily/standard.h>
X
X#ifdef	HAVE_DTOA	/* 4.4BSD floating point implementation */
X#ifdef	HAVE_DTOA_R
Xextern	char *__dtoa	__PR((double value, int mode, int ndigit, int *decpt, int *sign, char **ep, char **resultp));
X#else
Xextern	char *__dtoa	__PR((double value, int mode, int ndigit, int *decpt, int *sign, char **ep));
X#endif
X#else
X
X#if	!defined(HAVE_ECVT)
X/*
X * As a hint from Thomas Langer <Langer.Thomas@gmx.net>, we use strtod.c in
X * hope that we then will be able to print floating point numbers on all
X * platforms, even those without *cvt() and without __dtoa() in libc.
X *
X * ... of course, we need to decide when we need to include strtod.c ...
X *
X * We come into this file if autoconf found that gcvt(), fcvt() or ecvt() is
X * missing. If we are on a *BSD alike system, there is __dtoa() but neither
X * gcvt() nor fcvt() or ecvt(), so we emulate all three functions via __dtoa().
X * Glibc has a buggy gcvt() which causes an endless recursion,
X * fcvt() from Cygwin32 is buggy, so we emulate fcvt() via ecvt() on Cygwin.
X *
X * If at least ecvt() is present, we don't need __dtoa() from strtod.c
X */
X#include "strtod.c"
X#define	HAVE_DTOA
X#endif	/* !defined(HAVE_ECVT) */
X
X#endif	/* HAVE_DTOA */
X
X#ifndef	HAVE_ECVT
XEXPORT	char *ecvt	__PR((double value, int ndigit, int *decpt, int *sign));
X#endif
X#ifndef	HAVE_FCVT
XEXPORT	char *fcvt	__PR((double value, int ndigit, int *decpt, int *sign));
X#endif
X#ifndef	HAVE_GCVT
XEXPORT	char *gcvt	__PR((double value, int ndigit, char *buf));
X#endif
X
X#if	!defined(HAVE_ECVT) && defined(HAVE_DTOA)
X#define	HAVE_ECVT
Xchar *
Xecvt(value, ndigit, decpt, sign)
X	double	value;
X	int	ndigit;
X	int	*decpt;
X	int	*sign;
X{
Xstatic	Uint	bufsize;
Xstatic	char	*buf;
X	char	*bufend;
X	char	*ep;
X	char	*bp;
X#ifdef	HAVE_DTOA_R
Xstatic	char	*result;
X#endif
X
X#ifdef	HAVE_DTOA_R
X	if (result) {
X		free(result);
X		result = NULL;
X	}
X	bp = __dtoa(value, 2, ndigit, decpt, sign, &ep, &result);
X#else
X	bp = __dtoa(value, 2, ndigit, decpt, sign, &ep);
X#endif
X
X	if (value == 0.0) {
X		/*
X		 * Handle __dtoa()'s deviation from ecvt():
X		 * 0.0 is converted to "0" instead of 'ndigit' zeroes.
X		 * The string "0" is not allocated, so
X		 * we need to allocate buffer to hold 'ndigit' zeroes.
X		 */
X		if (bufsize < ndigit + 1) {
X			if (buf != (char *)0)
X				free(buf);
X			bufsize = ndigit + 1;
X			buf = malloc(bufsize);
X		}
X		ep = bp = buf;
X	}
X
X	/*
X	 * Fill up trailing zeroes suppressed by __dtoa()
X	 * From an internal __dtoa() comment:
X	 *	Sufficient space is allocated to the return value
X	 *	to hold the suppressed trailing zeros.
X	 */
X	for (bufend = &bp[ndigit]; ep < bufend; )
X		*ep++ = '0';
X	*ep = '\0';
X
X	return (bp);
X}
X#endif
X
X#if	!defined(HAVE_FCVT) && defined(HAVE_DTOA)
X#define	HAVE_FCVT
Xchar *
Xfcvt(value, ndigit, decpt, sign)
X	double	value;
X	int	ndigit;
X	int	*decpt;
X	int	*sign;
X{
Xstatic	Uint	bufsize;
Xstatic	char	*buf;
X	char	*bufend;
X	char	*ep;
X	char	*bp;
X#ifdef	HAVE_DTOA_R
Xstatic	char	*result;
X#endif
X
X#ifdef	HAVE_DTOA_R
X	if (result) {
X		free(result);
X		result = NULL;
X	}
X	bp = __dtoa(value, 3, ndigit, decpt, sign, &ep, &result);
X#else
X	bp = __dtoa(value, 3, ndigit, decpt, sign, &ep);
X#endif
X
X	if (value == 0.0) {
X		/*
X		 * Handle __dtoa()'s deviation from fcvt():
X		 * 0.0 is converted to "0" instead of 'ndigit' zeroes.
X		 * The string "0" is not allocated, so
X		 * we need to allocate buffer to hold 'ndigit' zeroes.
X		 */
X		if (bufsize < ndigit + 1) {
X			if (buf != (char *)0)
X				free(buf);
X			bufsize = ndigit + 1;
X			buf = malloc(bufsize);
X		}
X		ep = bp = buf;
X		*decpt = 0;
X	}
X
X	/*
X	 * Fill up trailing zeroes suppressed by __dtoa()
X	 * From an internal __dtoa() comment:
X	 *	Sufficient space is allocated to the return value
X	 *	to hold the suppressed trailing zeros.
X	 */
X	for (bufend = &bp[*decpt + ndigit]; ep < bufend; )
X		*ep++ = '0';
X	*ep = '\0';
X
X	return (bp);
X}
X#endif
X
X#ifndef	HAVE_GCVT
X#define	HAVE_GCVT
Xchar *
Xgcvt(number, ndigit, buf)
X	double	number;
X	int	ndigit;
X	char	*buf;
X{
X		int	sign;
X		int	decpt;
X	register char	*b;
X	register char	*rs;
X	register int	i;
X
X	b = ecvt(number, ndigit, &decpt, &sign);
X	rs = buf;
X	if (sign)
X		*rs++ = '-';
X	for (i = ndigit-1; i > 0 && b[i] == '0'; i--)
X		ndigit--;
X#ifdef	V7_FLOATSTYLE
X	if ((decpt >= 0 && decpt-ndigit > 4) ||
X#else
X	if ((decpt >= 0 && decpt-ndigit > 0) ||
X#endif
X	    (decpt < 0 && decpt < -3)) {	/* e-format */
X		decpt--;
X		*rs++ = *b++;
X		*rs++ = '.';
X		for (i = 1; i < ndigit; i++)
X			*rs++ = *b++;
X		*rs++ = 'e';
X		if (decpt < 0) {
X			decpt = -decpt;
X			*rs++ = '-';
X		} else {
X			*rs++ = '+';
X		}
X		if (decpt >= 100) {
X			*rs++ = decpt / 100 + '0';
X			decpt %= 100;
X		}
X		*rs++ = decpt / 10 + '0';
X		*rs++ = decpt % 10 + '0';
X	} else {				/* f-format */
X		if (decpt <= 0) {
X			if (*b != '0') {
X#ifndef	V7_FLOATSTYLE
X				*rs++ = '0';
X#endif
X				*rs++ = '.';
X			}
X			while (decpt < 0) {
X				decpt++;
X				*rs++ = '0';
X			}
X		}
X		for (i = 1; i <= ndigit; i++) {
X			*rs++ = *b++;
X			if (i == decpt)
X				*rs++ = '.';
X		}
X		if (ndigit < decpt) {
X			while (ndigit++ < decpt)
X				*rs++ = '0';
X			*rs++ = '.';
X		}
X	}
X	if (rs[-1] == '.')
X		rs--;
X	*rs = '\0';
X	return (buf);
X}
X#endif
END-of-smake-1.2.1/lib/cvt.c
echo x - smake-1.2.1/lib/error.c
sed 's/^X//' >smake-1.2.1/lib/error.c << 'END-of-smake-1.2.1/lib/error.c'
X/* @(#)error.c	1.15 09/07/10 Copyright 1985, 1989, 1995-2003 J. Schilling */
X/*
X *	fprintf() on standard error stdio stream
X *
X *	Copyright (c) 1985, 1989, 1995-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/varargs.h>
X#include <schily/schily.h>
X
X/* VARARGS1 */
X#ifdef	PROTOTYPES
XEXPORT int
Xerror(const char *fmt, ...)
X#else
XEXPORT int
Xerror(fmt, va_alist)
X	char	*fmt;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, fmt);
X#else
X	va_start(args);
X#endif
X	ret = js_fprintf(stderr, "%r", fmt, args);
X	va_end(args);
X	return (ret);
X}
END-of-smake-1.2.1/lib/error.c
echo x - smake-1.2.1/lib/fconv.c
sed 's/^X//' >smake-1.2.1/lib/fconv.c << 'END-of-smake-1.2.1/lib/fconv.c'
X/* @(#)fconv.c	1.41 09/10/10 Copyright 1985, 1995-2009 J. Schilling */
X/*
X *	Convert floating point numbers to strings for format.c
X *	Should rather use the MT-safe routines [efg]convert()
X *
X *	Copyright (c) 1985, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>	/* <- may define NO_FLOATINGPOINT */
X#ifndef	NO_FLOATINGPOINT
X
X#include <schily/stdlib.h>
X#include <schily/standard.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include <schily/math.h>	/* The default place for isinf()/isnan() */
X
X#if	!defined(HAVE_STDLIB_H) || defined(HAVE_DTOA)
Xextern	char	*ecvt __PR((double, int, int *, int *));
Xextern	char	*fcvt __PR((double, int, int *, int *));
X#endif
X
X#if	defined(HAVE_ISNAN) && defined(HAVE_ISINF)
X/*
X * *BSD alike libc
X */
X#define	FOUND_ISNAN
X#define	FOUND_ISINF
X#define	FOUND_ISXX
X#endif
X
X#if	defined(HAVE_C99_ISNAN) && defined(HAVE_C99_ISINF)
X#ifndef	FOUND_ISXX
X#define	FOUND_ISXX
X#endif
X#define	FOUND_C99_ISNAN
X#define	FOUND_C99_ISINF
X#define	FOUND_C99_ISXX
X#endif
X
X#if	defined(HAVE_FP_H) && !defined(FOUND_ISXX)
X/*
X * WAS:
X * #if	defined(__osf__) || defined(_IBMR2) || defined(_AIX)
X */
X/*
X * Moved before HAVE_IEEEFP_H for True64 due to a hint
X * from Bert De Knuydt <Bert.Deknuydt@esat.kuleuven.ac.be>
X *
X * True64 has both fp.h & ieeefp.h but the functions
X * isnand() & finite() seem to be erreneously not implemented
X * as a macro and the function lives in libm.
X * Let's hope that we will not get problems with the new order.
X */
X#include <fp.h>
X#if	!defined(isnan) && defined(IS_NAN)
X#define	isnan	IS_NAN
X#define	FOUND_ISNAN
X#endif
X#if	!defined(isinf) && defined(FINITE)
X#define	isinf	!FINITE
X/*#define	isinf	IS_INF*/
X#define	FOUND_ISINF
X#endif
X#if	defined(FOUND_ISNAN) && defined(FOUND_ISINF)
X#define	FOUND_ISXX
X#endif
X#endif
X
X#if	defined(HAVE_IEEEFP_H) && !defined(FOUND_ISXX) && !defined(FOUND_C99_ISXX)
X/*
X * SVR4
X */
X#include <ieeefp.h>
X#ifdef	HAVE_ISNAND
X#ifndef	isnan
X#define	isnan	isnand
X#define	FOUND_ISNAN
X#endif
X#endif
X#ifdef	HAVE_FINITE
X#ifndef	isinf
X#define	isinf	!finite
X#define	FOUND_ISINF
X#endif
X#endif
X#if	defined(FOUND_ISNAN) && defined(FOUND_ISINF)
X#define	FOUND_ISXX
X#endif
X#endif
X
X/*
X * WAS:
X * #if	defined(__hpux) || defined(VMS) || defined(_SCO_DS) || defined(__QNX__)
X */
X#ifdef	__nneded__
X#if	defined(__hpux) || defined(__QNX__) || defined(__DJGPP__)
X#ifndef	FOUND_C99_ISXX
X#undef	isnan
X#undef	isinf
X#endif
X#endif
X#endif	/* __needed__ */
X
X/*
X * As we no longer check for defined(isnan)/defined(isinf), the next block
X * should also handle the problems with DJGPP, HP-UX, QNX and VMS.
X */
X#if	!defined(FOUND_ISNAN) && !defined(HAVE_C99_ISNAN)
X#undef	isnan
X#define	isnan(val)	(0)
X#define	NO_ISNAN
X#endif
X#if	!defined(FOUND_ISINF) && !defined(HAVE_C99_ISINF)
X#undef	isinf
X#define	isinf(val)	(0)
X#define	NO_ISINF
X#endif
X
X#if	defined(NO_ISNAN) || defined(NO_ISINF)
X#include <schily/float.h>	/* For values.h */
X#if	(_IEEE - 0) > 0		/* We know that there is IEEE FP */
X/*
X * Note that older HP-UX versions have different #defines for MAXINT in
X * values.h and sys/param.h
X */
X#include <schily/utypes.h>
X#include <schily/btorder.h>
X
X#ifdef	WORDS_BIGENDIAN
X#define fpw_high(x)	((UInt32_t *)&x)[0]
X#define fpw_low(x)	((UInt32_t *)&x)[1]
X#else
X#define fpw_high(x)	((UInt32_t *)&x)[1]
X#define fpw_low(x)	((UInt32_t *)&x)[0]
X#endif
X#define	FP_EXP		0x7FF00000
X#define	fp_exp(x)	(fpw_high(x) & FP_EXP)
X#define	fp_exc(x)	(fp_exp(x) == FP_EXP)
X
X#ifdef	NO_ISNAN
X#undef	isnan
X#define	isnan(val)	(fp_exc(val) && \
X			(fpw_low(val) != 0 || (fpw_high(val) & 0xFFFFF) != 0))
X#endif
X#ifdef	NO_ISINF
X#undef	isinf
X#define	isinf(val)	(fp_exc(val) && \
X			fpw_low(val) == 0 && (fpw_high(val) & 0xFFFFF) == 0)
X#endif
X#endif	/* We know that there is IEEE FP */
X#endif	/* defined(NO_ISNAN) || defined(NO_ISINF) */
X
X
X#if !defined(HAVE_ECVT) || !defined(HAVE_FCVT) || !defined(HAVE_GCVT)
X
X#ifdef	NO_USER_XCVT
X	/*
X	 * We cannot define our own ecvt()/fcvt()/gcvt() so we need to use
X	 * local names instead.
X	 */
X#ifndef	HAVE_ECVT
X#	define	ecvt	js_ecvt
X#endif
X#ifndef	HAVE_FCVT
X#	define	fcvt	js_fcvt
X#endif
X#ifndef	HAVE_GCVT
X#	define	gcvt	js_gcvt
X#endif
X#endif
X
X#include "cvt.c"
X#endif
X
Xstatic	char	_js_nan[] = "(NaN)";
Xstatic	char	_js_inf[] = "(Infinity)";
X
Xstatic	int	_ferr __PR((char *, double));
X
X#ifdef	abs
X#	undef	abs
X#endif
X#define	abs(i)	((i) < 0 ? -(i) : (i))
X
XEXPORT int
Xftoes(s, val, fieldwidth, ndigits)
X	register	char 	*s;
X			double	val;
X	register	int	fieldwidth;
X	register	int	ndigits;
X{
X	register	char	*b;
X	register	char	*rs;
X	register	int	len;
X	register	int	rdecpt;
X			int 	decpt;
X			int	sign;
X
X	if ((len = _ferr(s, val)) > 0)
X		return (len);
X	rs = s;
X#ifdef	V7_FLOATSTYLE
X	b = ecvt(val, ndigits, &decpt, &sign);
X	rdecpt = decpt;
X#else
X	b = ecvt(val, ndigits+1, &decpt, &sign);
X	rdecpt = decpt-1;
X#endif
X	len = ndigits + 6;			/* Punkt e +/- nnn */
X	if (sign)
X		len++;
X	if (fieldwidth > len)
X		while (fieldwidth-- > len)
X			*rs++ = ' ';
X	if (sign)
X		*rs++ = '-';
X#ifndef	V7_FLOATSTYLE
X	if (*b)
X		*rs++ = *b++;
X#endif
X	*rs++ = '.';
X	while (*b && ndigits-- > 0)
X		*rs++ = *b++;
X	*rs++ = 'e';
X	*rs++ = rdecpt >= 0 ? '+' : '-';
X	rdecpt = abs(rdecpt);
X#ifndef	V7_FLOATSTYLE
X	if (rdecpt >= 100)
X#endif
X	{
X		*rs++ = rdecpt / 100 + '0';
X		rdecpt %= 100;
X	}
X	*rs++ = rdecpt / 10 + '0';
X	*rs++ = rdecpt % 10 + '0';
X	*rs = '\0';
X	return (rs - s);
X}
X
X/*
X * fcvt() from Cygwin32 is buggy.
X */
X#if	!defined(HAVE_FCVT) && defined(HAVE_ECVT)
X#define	USE_ECVT
X#endif
X
XEXPORT int
Xftofs(s, val, fieldwidth, ndigits)
X	register	char 	*s;
X			double	val;
X	register	int	fieldwidth;
X	register	int	ndigits;
X{
X	register	char	*b;
X	register	char	*rs;
X	register	int	len;
X	register	int	rdecpt;
X			int 	decpt;
X			int	sign;
X
X	if ((len = _ferr(s, val)) > 0)
X		return (len);
X	rs = s;
X#ifdef	USE_ECVT
X	/*
X	 * Needed on systems with broken fcvt() implementation
X	 * (e.g. Cygwin32)
X	 */
X	b = ecvt(val, ndigits, &decpt, &sign);
X	/*
X	 * The next call is needed to force higher precision.
X	 */
X	if (decpt > 0)
X		b = ecvt(val, ndigits+decpt, &decpt, &sign);
X#else
X	b = fcvt(val, ndigits, &decpt, &sign);
X#endif
X	rdecpt = decpt;
X	len = rdecpt + ndigits + 1;
X	if (rdecpt < 0)
X		len -= rdecpt;
X	if (sign)
X		len++;
X	if (fieldwidth > len)
X		while (fieldwidth-- > len)
X			*rs++ = ' ';
X	if (sign)
X		*rs++ = '-';
X	if (rdecpt > 0) {
X		len = rdecpt;
X		while (*b && len-- > 0)
X			*rs++ = *b++;
X#ifdef	USE_ECVT
X		while (len-- > 0)
X			*rs++ = '0';
X#endif
X	}
X#ifndef	V7_FLOATSTYLE
X	else {
X		*rs++ = '0';
X	}
X#endif
X	*rs++ = '.';
X	if (rdecpt < 0) {
X		len = rdecpt;
X		while (len++ < 0 && ndigits-- > 0)
X			*rs++ = '0';
X	}
X	while (*b && ndigits-- > 0)
X		*rs++ = *b++;
X#ifdef	USE_ECVT
X	while (ndigits-- > 0)
X		*rs++ = '0';
X#endif
X	*rs = '\0';
X	return (rs - s);
X}
X
XLOCAL int
X_ferr(s, val)
X	char	*s;
X	double	val;
X{
X	if (isnan(val)) {
X		strcpy(s, _js_nan);
X		return (sizeof (_js_nan) - 1);
X	}
X
X	/*
X	 * Check first for NaN because finite() will return 1 on Nan too.
X	 */
X	if (isinf(val)) {
X		strcpy(s, _js_inf);
X		return (sizeof (_js_inf) - 1);
X	}
X	return (0);
X}
X#endif	/* NO_FLOATINGPOINT */
END-of-smake-1.2.1/lib/fconv.c
echo x - smake-1.2.1/lib/fillbytes.c
sed 's/^X//' >smake-1.2.1/lib/fillbytes.c << 'END-of-smake-1.2.1/lib/fillbytes.c'
X/* @(#)fillbytes.c	1.17 09/10/17 Copyright 1987, 1995-2009 J. Schilling */
X/*
X *	fill memory with data
X *
X *	Copyright (c) 1987, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/align.h>
X#include <schily/types.h>
X#include <schily/schily.h>
X
X#define	DO8(a)	a; a; a; a; a; a; a; a;
X
X#define	cval	((char) lval)
X
X/*
X * fillbytes(to, cnt, val) is the same as memset(to, val, cnt)
X */
X#ifdef	PROTOTYPES
XEXPORT char *
Xfillbytes(void *tov, ssize_t cnt, char val)
X#else
XEXPORT char *
Xfillbytes(tov, cnt, val)
X	void	*tov;
X	ssize_t	cnt;
X	char	val;
X#endif
X{
X	register char	*to = (char *)tov;
X	register ssize_t n;
X	register long	lval;
X
X	/*
X	 * If we change cnt to be unsigned, check for == instead of <=
X	 */
X	if ((n = cnt) <= 0)
X		return (to);
X
X	lval = val & 0xFF;
X
X	/*
X	 * Assign byte-wise until properly aligned for a long pointer.
X	 */
X	while (--n >= 0 && !laligned(to)) {
X		*to++ = cval;
X	}
X	n++;
X
X	if (n >= (ssize_t)(8 * sizeof (long))) {
X		register ssize_t rem = n % (8 * sizeof (long));
X
X		lval |= (lval<<8);
X		lval |= (lval<<16);
X#if SIZE_LONG > SIZE_INT
X		lval |= (lval<<32);
X#endif
X
X		n /= (8 * sizeof (long));
X		{
X			register long *tol = (long *)to;
X
X			do {
X				DO8 (*tol++ = lval);
X			} while (--n > 0);
X
X			to = (char *)tol;
X		}
X		n = rem;
X
X		if (n >= 8) {
X			n -= 8;
X			do {
X				DO8 (*to++ = cval);
X			} while ((n -= 8) >= 0);
X			n += 8;
X		}
X		if (n > 0) do {
X			*to++ = cval;
X		} while (--n > 0);
X		return (to);
X	}
X	if (n > 0) do {
X		*to++ = cval;
X	} while (--n > 0);
X	return (to);
X}
END-of-smake-1.2.1/lib/fillbytes.c
echo x - smake-1.2.1/lib/format.c
sed 's/^X//' >smake-1.2.1/lib/format.c << 'END-of-smake-1.2.1/lib/format.c'
X/* @(#)format.c	1.48 09/07/28 Copyright 1985-2009 J. Schilling */
X/*
X *	format
X *	common code for printf fprintf & sprintf
X *
X *	allows recursive printf with "%r", used in:
X *	error, comerr, comerrno, errmsg, errmsgno and the like
X *
X *	Copyright (c) 1985-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/varargs.h>
X#include <schily/string.h>
X#include <schily/stdlib.h>
X#ifdef	DEBUG
X#include <schily/unistd.h>
X#endif
X#if	!defined(HAVE_STDLIB_H) || !defined(HAVE_GCVT)
Xextern	char	*gcvt __PR((double, int, char *));
X#endif
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/schily.h>
X
X/*
X * As Llong is currently a 'best effort' long long, we usually need to
X * include long long print formats.
X * This may go away, if we implement maxint_t formats.
X */
X#ifndef	USE_LONGLONG
X#define	USE_LONGLONG
X#endif
X
X#ifdef	NO_LONGLONG
X#undef	USE_LONGLONG
X#endif
X
X#ifdef	NO_USER_XCVT
X	/*
X	 * We cannot define our own gcvt() so we need to use a
X	 * local name instead.
X	 */
X#ifndef	HAVE_GCVT
X#	define	gcvt	js_gcvt
XEXPORT	char *gcvt	__PR((double value, int ndigit, char *buf));
X#endif
X#endif
X
X/*
X * Some CPU's (e.g. PDP-11) cannot do logical shifts.
X * They use rotate instead. Masking the low bits before,
X * makes rotate work too.
X */
X#define	allmask(t)	((unsigned t)~((unsigned t)0))
X#define	lowmask(t, x)	((unsigned t)~((unsigned t)((1 << (x))-1)))
X#define	rshiftmask(t, s)((allmask(t) & lowmask(t, s)) >> (s))
X
X#define	CHARMASK	makemask(char)
X#define	SHORTMASK	makemask(short)
X#define	INTMASK		makemask(int)
X#define	LONGMASK	makemask(long)
X
X#ifdef	DIVLBYS
Xextern	long	divlbys();
Xextern	long	modlbys();
X#else
X#define	divlbys(val, base)	((val)/(base))
X#define	modlbys(val, base)	((val)%(base))
X#endif
X
X/*
X *	We use macros here to avoid the need to link to the international
X *	character routines.
X *	We don't need internationalization for our purpose.
X */
X#define	is_dig(c)	(((c) >= '0') && ((c) <= '9'))
X#define	is_cap(c)	((c) >= 'A' && (c) <= 'Z')
X#define	to_cap(c)	(is_cap(c) ? c : c - 'a' + 'A')
X#define	cap_ty(c)	(is_cap(c) ? 'L' : 'I')
X
X#ifdef	HAVE_LONGLONG
Xtypedef union {
X	Ullong	ll;
X	Ulong	l[2];
X	char	c[8];
X} quad_u;
X#endif
X
Xtypedef struct f_args {
X	void  (*outf)__PR((char, long)); /* Func from format(fun, arg)	*/
X	long	farg;			/* Arg from format (fun, arg)	*/
X	int	minusflag;		/* Fieldwidth is negative	*/
X	int	flags;			/* General flags (+-#)		*/
X	int	fldwidth;		/* Field width as in %3d	*/
X	int	signific;		/* Significant chars as in %.4d	*/
X	int	lzero;			/* Left '0' pad flag		*/
X	char	*buf;			/* Out print buffer		*/
X	char	*bufp;			/* Write ptr into buffer	*/
X	char	fillc;			/* Left fill char (' ' or '0')	*/
X	char	*prefix;		/* Prefix to print before buf	*/
X	int	prefixlen;		/* Len of prefix ('+','-','0x')	*/
X} f_args;
X
X#define	MINUSFLG	1	/* '-' flag */
X#define	PLUSFLG		2	/* '+' flag */
X#define	SPACEFLG	4	/* ' ' flag */
X#define	HASHFLG		8	/* '#' flag */
X
XLOCAL	void	prnum  __PR((Ulong, unsigned, f_args *));
XLOCAL	void	prdnum __PR((Ulong, f_args *));
XLOCAL	void	pronum __PR((Ulong, f_args *));
XLOCAL	void	prxnum __PR((Ulong, f_args *));
XLOCAL	void	prXnum __PR((Ulong, f_args *));
X#ifdef	USE_LONGLONG
XLOCAL	void	prlnum  __PR((Ullong, unsigned, f_args *));
XLOCAL	void	prldnum __PR((Ullong, f_args *));
XLOCAL	void	prlonum __PR((Ullong, f_args *));
XLOCAL	void	prlxnum __PR((Ullong, f_args *));
XLOCAL	void	prlXnum __PR((Ullong, f_args *));
X#endif
XLOCAL	int	prbuf  __PR((const char *, f_args *));
XLOCAL	int	prc    __PR((char, f_args *));
XLOCAL	int	prstring __PR((const char *, f_args *));
X#ifdef	DEBUG
XLOCAL	void	dbg_print __PR((char *fmt, int a, int b, int c, int d, int e, int f, int g, int h, int i));
X#endif
X
X
X#ifdef	PROTOTYPES
XEXPORT int
Xformat(void (*fun)(char, long),
X			long farg,
X			const char *fmt,
X			va_list args)
X#else
XEXPORT int
Xformat(fun, farg, fmt, args)
X	register void	(*fun)();
X	register long	farg;
X	register char	*fmt;
X	va_list		args;
X#endif
X{
X#ifdef	FORMAT_LOW_MEM
X	char buf[512];
X#else
X	char buf[8192];
X#endif
X	const char *sfmt;
X	register int unsflag;
X	register long val;
X	register char type;
X	register char mode;
X	register char c;
X	int count;
X	int i;
X	short sh;
X	const char *str;
X	double dval;
X#ifdef	USE_LONGLONG
X	Llong llval = 0;
X#endif
X	Ulong res;
X	char *rfmt;
X	f_args	fa;
X
X	fa.outf = fun;
X	fa.farg = farg;
X	count = 0;
X	/*
X	 * Main loop over the format string.
X	 * Increment and check for end of string is made here.
X	 */
X	for (; *fmt != '\0'; fmt++) {
X		c = *fmt;
X		while (c != '%') {
X			if (c == '\0')
X				return (count);
X			(*fun)(c, farg);
X			c = *(++fmt);
X			count++;
X		}
X
X		/*
X		 * We reached a '%' sign.
X		 */
X		buf[0] = '\0';
X		fa.buf = fa.bufp = buf;
X		fa.minusflag = 0;
X		fa.flags = 0;
X		fa.fldwidth = 0;
X		fa.signific = -1;
X		fa.lzero = 0;
X		fa.fillc = ' ';
X		fa.prefixlen = 0;
X		sfmt = fmt;
X		unsflag = FALSE;
X		type = '\0';
X		mode = '\0';
X	newflag:
X		switch (*(++fmt)) {
X
X		case '+':
X			fa.flags |= PLUSFLG;
X			goto newflag;
X
X		case '-':
X			fa.minusflag++;
X			goto newflag;
X
X		case ' ':
X			/*
X			 * If the space and the + flag are present,
X			 * the space flag will be ignored.
X			 */
X			fa.flags |= SPACEFLG;
X			goto newflag;
X
X		case '#':
X			fa.flags |= HASHFLG;
X			goto newflag;
X
X		case '0':
X			/*
X			 * '0' is a flag.
X			 */
X			fa.fillc = '0';
X			goto newflag;
X		}
X		if (*fmt == '*') {
X			fmt++;
X			fa.fldwidth = va_arg(args, int);
X			/*
X			 * A negative fieldwith is a minus flag with a
X			 * positive fieldwidth.
X			 */
X			if (fa.fldwidth < 0) {
X				fa.fldwidth = -fa.fldwidth;
X/*				fa.minusflag ^= 1;*/
X				fa.minusflag = 1;
X			}
X		} else while (c = *fmt, is_dig(c)) {
X			fa.fldwidth *= 10;
X			fa.fldwidth += c - '0';
X			fmt++;
X		}
X		if (*fmt == '.') {
X			fmt++;
X			fa.signific = 0;
X			if (*fmt == '*') {
X				fmt++;
X				fa.signific = va_arg(args, int);
X				if (fa.signific < 0)
X					fa.signific = 0;
X			} else while (c = *fmt, is_dig(c)) {
X				fa.signific *= 10;
X				fa.signific += c - '0';
X				fmt++;
X			}
X		}
X		if (strchr("UCSIL", *fmt)) {
X			/*
X			 * Enhancements to K&R and ANSI:
X			 *
X			 * got a type specifyer
X			 *
X			 * XXX 'S' in C99 is %ls, 'S' should become 'H'
X			 */
X			if (*fmt == 'U') {
X				fmt++;
X				unsflag = TRUE;
X			}
X			if (!strchr("CSILZODX", *fmt)) {
X				/*
X				 * Got only 'U'nsigned specifyer,
X				 * use default type and mode.
X				 */
X				type = 'I';
X				mode = 'D';
X				fmt--;
X			} else if (!strchr("CSIL", *fmt)) {
X				/*
X				 * no type, use default
X				 */
X				type = 'I';
X				mode = *fmt;
X			} else {
X				/*
X				 * got CSIL
X				 */
X				type = *fmt++;
X				if (!strchr("ZODX", mode = *fmt)) {
X					fmt--;
X					mode = 'D'; /* default mode */
X				}
X			}
X		} else switch (*fmt) {
X
X		case 'h':
X			if (!type)
X				type = 'H';	/* convert to short type */
X			goto getmode;
X
X		case 'l':
X			if (!type)
X				type = 'L';	/* convert to long type */
X			goto getmode;
X
X		case 'j':
X			if (!type)
X				type = 'J';	/* convert to intmax_t type */
X			goto getmode;
X
X		case 'z':			/* size_t */
X#if	SIZEOF_SIZE_T == SIZEOF_INT
X			if (!type)
X				type = 'I';	/* convert to int type */
X#else
X#if	SIZEOF_SIZE_T == SIZEOF_LONG_INT
X			if (!type)
X				type = 'L';	/* convert to long type */
X#else
X#if	SIZEOF_SIZE_T == SIZEOF_LLONG
X			if (!type)
X				type = 'Q';	/* convert to long long type */
X#else
Xerror sizeof(size_t) is unknown
X#endif
X#endif
X#endif
X			goto getmode;
X			
X		case 't':			/* ptrdiff_t */
X#if	SIZEOF_PTRDIFF_T == SIZEOF_INT
X			if (!type)
X				type = 'I';	/* convert to int type */
X#else
X#if	SIZEOF_PTRDIFF_T == SIZEOF_LONG_INT
X			if (!type)
X				type = 'L';	/* convert to long type */
X#else
X#if	SIZEOF_PTRDIFF_T == SIZEOF_LLONG
X			if (!type)
X				type = 'Q';	/* convert to long long type */
X#else
Xerror sizeof(ptrdiff_t) is unknown
X#endif
X#endif
X#endif
X		/*
X		 * XXX Future length modifiers:
X		 * XXX	'L' with double: long double
X		 */
X
X		getmode:
X			if (!strchr("udioxX", *(++fmt))) {
X				if (type == 'H' && *fmt == 'h') {
X					type = 'C';
X					goto getmode;
X				}
X#ifdef	USE_LONGLONG
X				if (type == 'L' && *fmt == 'l') {
X					type = 'Q';
X					goto getmode;
X				}
X#endif
X				fmt--;
X				mode = 'D';
X			} else {
X				mode = *fmt;
X				if (mode != 'x')
X					mode = to_cap(mode);
X				if (mode == 'U')
X					unsflag = TRUE;
X				else if (mode == 'I')	/*XXX */
X					mode = 'D';
X			}
X			break;
X		case 'x':
X			mode = 'x';
X			goto havemode;
X		case 'X':
X			mode = 'X';
X			type = 'I';
X			goto havemode;
X		case 'u':
X			unsflag = TRUE;
X		/*
X		 * XXX Need to remove uppercase letters for 'long'
X		 * XXX in future for POSIX/C99 compliance.
X		 */
X			/* FALLTHRU */
X		case 'o': case 'O':
X		case 'd': case 'D':
X		case 'i': case 'I':
X		case 'Z':
X			mode = to_cap(*fmt);
X		havemode:
X			if (!type)
X				type = cap_ty(*fmt);
X#ifdef	DEBUG
X/*dbg_print("*fmt: '%c' mode: '%c' type: '%c'\n", *fmt, mode, type);*/
X#endif
X			if (mode == 'I')	/*XXX kann entfallen*/
X				mode = 'D';	/*wenn besseres uflg*/
X			break;
X		case 'p':
X			mode = 'P';
X			type = 'L';
X			break;
X
X		case '%':
X			count += prc('%', &fa);
X			continue;
X		case ' ':
X			count += prbuf("", &fa);
X			continue;
X		case 'c':
X			c = va_arg(args, int);
X			count += prc(c, &fa);
X			continue;
X		case 's':
X			str = va_arg(args, char *);
X			count += prstring(str, &fa);
X			continue;
X		case 'b':
X			str = va_arg(args, char *);
X			fa.signific = va_arg(args, int);
X			count += prstring(str, &fa);
X			continue;
X
X#ifndef	NO_FLOATINGPOINT
X		case 'e':
X			if (fa.signific == -1)
X				fa.signific = 6;
X			dval = va_arg(args, double);
X			ftoes(buf, dval, 0, fa.signific);
X			count += prbuf(buf, &fa);
X			continue;
X		case 'f':
X			if (fa.signific == -1)
X				fa.signific = 6;
X			dval = va_arg(args, double);
X			ftofs(buf, dval, 0, fa.signific);
X			count += prbuf(buf, &fa);
X			continue;
X		case 'g':
X			if (fa.signific == -1)
X				fa.signific = 6;
X			if (fa.signific == 0)
X				fa.signific = 1;
X			dval = va_arg(args, double);
X			(void) gcvt(dval, fa.signific, buf);
X			count += prbuf(buf, &fa);
X			continue;
X#else
X#	ifdef	USE_FLOATINGARGS
X		case 'e':
X		case 'f':
X		case 'g':
X			dval = va_arg(args, double);
X			continue;
X#	endif
X#endif
X
X		case 'r':			/* recursive printf */
X		case 'R':			/* recursive printf */
X			rfmt  = va_arg(args, char *);
X			/*
X			 * I don't know any portable way to get an arbitrary
X			 * C object from a var arg list so I use a
X			 * system-specific routine __va_arg_list() that knows
X			 * if 'va_list' is an array. You will not be able to
X			 * assign the value of __va_arg_list() but it works
X			 * to be used as an argument of a function.
X			 * It is a requirement for recursive printf to be able
X			 * to use this function argument. If your system
X			 * defines va_list to be an array you need to know this
X			 * via autoconf or another mechanism.
X			 * It would be nice to have something like
X			 * __va_arg_list() in stdarg.h
X			 */
X			count += format(fun, farg, rfmt, __va_arg_list(args));
X			continue;
X
X		case 'n':
X			{
X				int	*ip = va_arg(args, int *);
X
X				*ip = count;
X			}
X			continue;
X
X		default:			/* Unknown '%' format */
X			sfmt++;			/* Dont't print '%'   */
X			count += fmt - sfmt;
X			while (sfmt < fmt)
X				(*fun)(*(sfmt++), farg);
X			if (*fmt == '\0') {
X				fmt--;
X				continue;
X			} else {
X				(*fun)(*fmt, farg);
X				count++;
X				continue;
X			}
X		}
X		/*
X		 * print numbers:
X		 * first prepare type 'C'har, s'H'ort, 'I'nt, or 'L'ong
X		 * or 'Q'ad and 'J'==maxint_t
X		 */
X		switch (type) {
X
X		case 'C':
X			c = va_arg(args, int);
X			val = c;		/* extend sign here */
X			if (unsflag || mode != 'D')
X#ifdef	DO_MASK
X				val &= CHARMASK;
X#else
X				val = (unsigned char)val;
X#endif
X			break;
X		case 'H':
X		case 'S':			/* XXX remove 'S' in future */
X			sh = va_arg(args, int);
X			val = sh;		/* extend sign here */
X			if (unsflag || mode != 'D')
X#ifdef	DO_MASK
X				val &= SHORTMASK;
X#else
X				val = (unsigned short)val;
X#endif
X			break;
X		case 'I':
X		default:
X			i = va_arg(args, int);
X			val = i;		/* extend sign here */
X			if (unsflag || mode != 'D')
X#ifdef	DO_MASK
X				val &= INTMASK;
X#else
X				val = (unsigned int)val;
X#endif
X			break;
X		case 'P':
X		case 'L':
X			val = va_arg(args, long);
X			break;
X#ifdef	USE_LONGLONG
X		case 'J':			/* For now Intmax_t is Llong */
X			type = 'Q';		/* use 'Q' for processing    */
X		case 'Q':
X			llval = va_arg(args, Llong);
X			val = llval != 0;
X			break;
X#endif
X		}
X
X		/*
X		 * Final print out, take care of mode:
X		 * mode is one of: 'O'ctal, 'D'ecimal, or he'X'
X		 * oder 'Z'weierdarstellung.
X		 */
X		fa.bufp = &buf[sizeof (buf)-1];
X		*--fa.bufp = '\0';
X
X		if (val == 0 && mode != 'D') {
X		printzero:
X			/*
X			 * Printing '0' with fieldwidth 0 results in no chars.
X			 */
X			fa.lzero = -1;
X			if (fa.signific >= 0)
X				fa.fillc = ' ';
X			count += prstring("0", &fa);
X			continue;
X		} else switch (mode) {
X
X		case 'D':
X#ifdef	USE_LONGLONG
X			if (type == 'Q') {
X				if (!unsflag && llval < 0) {
X					fa.prefix = "-";
X					fa.prefixlen = 1;
X					llval = -llval;
X				} else if (fa.flags & PLUSFLG) {
X					fa.prefix = "+";
X					fa.prefixlen = 1;
X				} else if (fa.flags & SPACEFLG) {
X					fa.prefix = " ";
X					fa.prefixlen = 1;
X				}
X				if (llval == 0)
X					goto printzero;
X				goto prunsigned;
X			}
X#endif
X			if (!unsflag && val < 0) {
X				fa.prefix = "-";
X				fa.prefixlen = 1;
X				val = -val;
X			} else if (fa.flags & PLUSFLG) {
X				fa.prefix = "+";
X				fa.prefixlen = 1;
X			} else if (fa.flags & SPACEFLG) {
X				fa.prefix = " ";
X				fa.prefixlen = 1;
X			}
X			if (val == 0)
X				goto printzero;
X			/* FALLTHRU */
X		case 'U':
X			/* output a long unsigned decimal number */
X#ifdef	USE_LONGLONG
X		prunsigned:
X			if (type == 'Q')
X				prldnum(llval, &fa);
X			else
X#endif
X			prdnum(val, &fa);
X			break;
X		case 'O':
X			/* output a long octal number */
X			if (fa.flags & HASHFLG) {
X				fa.prefix = "0";
X				fa.prefixlen = 1;
X			}
X#ifdef	USE_LONGLONG
X			if (type == 'Q') {
X				prlonum(llval, &fa);
X			} else
X#endif
X			{
X				pronum(val & 07, &fa);
X				if ((res = (val>>3) & rshiftmask(long, 3)) != 0)
X					pronum(res, &fa);
X			}
X			break;
X		case 'p':
X		case 'x':
X			/* output a hex long */
X			if (fa.flags & HASHFLG) {
X				fa.prefix = "0x";
X				fa.prefixlen = 2;
X			}
X#ifdef	USE_LONGLONG
X			if (type == 'Q')
X				prlxnum(llval, &fa);
X			else
X#endif
X			{
X				prxnum(val & 0xF, &fa);
X				if ((res = (val>>4) & rshiftmask(long, 4)) != 0)
X					prxnum(res, &fa);
X			}
X			break;
X		case 'P':
X		case 'X':
X			/* output a hex long */
X			if (fa.flags & HASHFLG) {
X				fa.prefix = "0X";
X				fa.prefixlen = 2;
X			}
X#ifdef	USE_LONGLONG
X			if (type == 'Q')
X				prlXnum(llval, &fa);
X			else
X#endif
X			{
X				prXnum(val & 0xF, &fa);
X				if ((res = (val>>4) & rshiftmask(long, 4)) != 0)
X					prXnum(res, &fa);
X			}
X			break;
X		case 'Z':
X			/* output a binary long */
X#ifdef	USE_LONGLONG
X			if (type == 'Q')
X				prlnum(llval, 2, &fa);
X			else
X#endif
X			{
X				prnum(val & 0x1, 2, &fa);
X				if ((res = (val>>1) & rshiftmask(long, 1)) != 0)
X					prnum(res, 2, &fa);
X			}
X		}
X		fa.lzero = -1;
X		/*
X		 * If a precision (fielwidth) is specified
X		 * on diouXx conversions, the '0' flag is ignored.
X		 */
X		if (fa.signific >= 0)
X			fa.fillc = ' ';
X		count += prbuf(fa.bufp, &fa);
X	}
X	return (count);
X}
X
X/*
X * Routines to print (not negative) numbers in an arbitrary base
X */
XLOCAL	unsigned char	dtab[]  = "0123456789abcdef";
XLOCAL	unsigned char	udtab[] = "0123456789ABCDEF";
X
XLOCAL void
Xprnum(val, base, fa)
X	register Ulong val;
X	register unsigned base;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[modlbys(val, base)];
X		val = divlbys(val, base);
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
XLOCAL void
Xprdnum(val, fa)
X	register Ulong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[modlbys(val, (unsigned)10)];
X		val = divlbys(val, (unsigned)10);
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
X/*
X * We may need to use division here too (PDP-11, non two's complement ...)
X */
XLOCAL void
Xpronum(val, fa)
X	register Ulong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[val & 7];
X		val >>= 3;
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
XLOCAL void
Xprxnum(val, fa)
X	register Ulong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[val & 15];
X		val >>= 4;
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
XLOCAL void
XprXnum(val, fa)
X	register Ulong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = udtab[val & 15];
X		val >>= 4;
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
X#ifdef	USE_LONGLONG
XLOCAL void
Xprlnum(val, base, fa)
X	register Ullong val;
X	register unsigned base;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[modlbys(val, base)];
X		val = divlbys(val, base);
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
XLOCAL void
Xprldnum(val, fa)
X	register Ullong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[val % (unsigned)10];
X		val = val / (unsigned)10;
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
XLOCAL void
Xprlonum(val, fa)
X	register Ullong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[val & 7];
X		val >>= 3;
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
XLOCAL void
Xprlxnum(val, fa)
X	register Ullong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[val & 15];
X		val >>= 4;
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
XLOCAL void
XprlXnum(val, fa)
X	register Ullong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = udtab[val & 15];
X		val >>= 4;
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
X#endif
X
X/*
X * Final buffer print out routine.
X */
XLOCAL int
Xprbuf(s, fa)
X	register const char *s;
X	f_args *fa;
X{
X	register int diff;
X	register int rfillc;
X	register long arg			= fa->farg;
X	register void (*fun) __PR((char, long))	= fa->outf;
X	register int count;
X	register int lzero = 0;
X
X	count = strlen(s);
X
X	/*
X	 * lzero becomes the number of left fill chars needed to reach signific
X	 */
X	if (fa->lzero < 0 && count < fa->signific)
X		lzero = fa->signific - count;
X	count += lzero + fa->prefixlen;
X	diff = fa->fldwidth - count;
X	if (diff > 0)
X		count += diff;
X
X	if (fa->prefixlen && fa->fillc != ' ') {
X		while (*fa->prefix != '\0')
X			(*fun)(*fa->prefix++, arg);
X	}
X	if (!fa->minusflag) {
X		rfillc = fa->fillc;
X		while (--diff >= 0)
X			(*fun)(rfillc, arg);
X	}
X	if (fa->prefixlen && fa->fillc == ' ') {
X		while (*fa->prefix != '\0')
X			(*fun)(*fa->prefix++, arg);
X	}
X	if (lzero > 0) {
X		rfillc = '0';
X		while (--lzero >= 0)
X			(*fun)(rfillc, arg);
X	}
X	while (*s != '\0')
X		(*fun)(*s++, arg);
X	if (fa->minusflag) {
X		rfillc = ' ';
X		while (--diff >= 0)
X			(*fun)(rfillc, arg);
X	}
X	return (count);
X}
X
X/*
X * Print out one char, allowing prc('\0')
X * Similar to prbuf()
X */
X#ifdef	PROTOTYPES
X
XLOCAL int
Xprc(char c, f_args *fa)
X
X#else
X
XLOCAL int
Xprc(c, fa)
X	char	c;
X	f_args *fa;
X#endif
X{
X	register int diff;
X	register int rfillc;
X	register long arg			= fa->farg;
X	register void (*fun) __PR((char, long))	= fa->outf;
X	register int count;
X
X	count = 1;
X	diff = fa->fldwidth - 1;
X	if (diff > 0)
X		count += diff;
X
X	if (!fa->minusflag) {
X		rfillc = fa->fillc;
X		while (--diff >= 0)
X			(*fun)(rfillc, arg);
X	}
X	(*fun)(c, arg);
X	if (fa->minusflag) {
X		rfillc = ' ';
X		while (--diff >= 0)
X			(*fun)(rfillc, arg);
X	}
X	return (count);
X}
X
X/*
X * String output routine.
X * If fa->signific is >= 0, it uses only fa->signific chars.
X * If fa->signific is 0, print no characters.
X */
XLOCAL int
Xprstring(s, fa)
X	register const char	*s;
X	f_args *fa;
X{
X	register char	*bp;
X	register int	signific;
X
X	if (s == NULL)
X		return (prbuf("(NULL POINTER)", fa));
X
X	if (fa->signific < 0)
X		return (prbuf(s, fa));
X
X	bp = fa->buf;
X	signific = fa->signific;
X
X	while (--signific >= 0 && *s != '\0')
X		*bp++ = *s++;
X	*bp = '\0';
X
X	return (prbuf(fa->buf, fa));
X}
X
X#ifdef	DEBUG
XLOCAL void
Xdbg_print(fmt, a, b, c, d, e, f, g, h, i)
Xchar *fmt;
X{
X	char	ff[1024];
X
X	sprintf(ff, fmt, a, b, c, d, e, f, g, h, i);
X	write(STDERR_FILENO, ff, strlen(ff));
X}
X#endif
END-of-smake-1.2.1/lib/format.c
echo x - smake-1.2.1/lib/getargs.c
sed 's/^X//' >smake-1.2.1/lib/getargs.c << 'END-of-smake-1.2.1/lib/getargs.c'
X/* @(#)getargs.c	2.62 09/11/28 Copyright 1985, 1988, 1994-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)getargs.c	2.62 09/11/28 Copyright 1985, 1988, 1994-2009 J. Schilling";
X#endif
X#define	NEW
X/*
X *	Copyright (c) 1985, 1988, 1994-2009 J. Schilling
X *
X *	1.3.88	 Start implementation of release 2
X */
X/*
X *	Parse arguments on a command line.
X *	Format string type specifier (appearing directly after flag name):
X *		''	BOOL size int set to TRUE (1)
X *		'%'	Extended format, next char determines the type:
X *			'%0' BOOL with size modifier set to FALSE (0)
X *			'%1' BOOL with size modifier set to TRUE(1)
X *		'*'	string
X *		'?'	char
X *		'#'	number
X *		'&'	call function for any type flag
X *		'~'	call function for BOOLEAN flag
X *		'+'	inctype			+++ NEU +++
X *
X *		XXX Single char Boolen type '~' flags cannot yet be combined
X *		XXX Single char Boolen type '%' flags cannot yet be combined
X *
X *	The format string 'f* ' may be used to disallow -ffoo for f*
X *	The same behavior is implemented for 'f# ', 'f? ' and 'f& '.
X *	The ' ' needs to immediately follow the format type specifier.
X *
X *	The format string 'f*_' may be used to disallow -f foo for f*
X *	The same behavior is implemented for 'f#_', 'f?_' and 'f&_'.
X *	The '_' needs to immediately follow the format type specifier.
X *	This also allows to implement optional arguments to options.
X *	Note: 'f#_' is only implemented for orthogonality, -f will
X *	be converted to an integer value of 0.
X *
X *	The '#', '+' and '%[01]' types may have size modifiers added:
X *		'c'/'C'	char
X *		's'/'S'	short
X *		'i'/'I'	int	(default == no size modifier)
X *		'l'/'L'	long
X *		'll'/'LL' long long
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X/* LINTLIBRARY */
X#include <schily/mconfig.h>
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/getargs.h>
X#include <schily/varargs.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include <schily/ctype.h>
X
X/*
X * Various return values
X */
X#define	RETMAX		  2	/* Max. value for getargerror()	*/
X#define	FLAGDELIM	  2	/* "--" stopped flag processing	*/
X#define	NOTAFLAG	  1	/* Not a flag type argument	*/
X#define	NOARGS		  0	/* No more args			*/
X#define	BADFLAG		(-1)	/* Not a valid flag argument	*/
X#define	BADFMT		(-2)	/* Error in format string	*/
X#define	NOTAFILE	(-3)	/* Seems to be a flag type arg	*/
X#define	RETMIN		(-3)	/* Min. value for getargerror()	*/
X
XLOCAL char	*retnames[] =  {
X	"NOTAFILE",
X	"BADFMT",
X	"BADFLAG",
X	"NOARGS",
X	"NOTAFLAG",
X	"FLAGDELIM",
X};
X#define	RNAME(a)	(retnames[(a)-RETMIN])
X
X#define	SCANONLY	0	/* Do not try to set argument values	*/
X#define	SETARGS		1	/* Set argument values from cmdline	*/
X#define	ARGVECTOR	2	/* Use vector instead of list interface	*/
X#define	NOEQUAL		4	/* -opt=val not allowed for -opt val	*/
X
X	int	_getargs __PR((int *, char *const **, void *,
X							int,
X							struct ga_props *,
X							va_list));
XLOCAL	int	dofile __PR((int *, char *const **, const char **,
X							struct ga_props *));
XLOCAL	int	doflag __PR((int *, char *const **, const char *,
X						void *, int, va_list));
XLOCAL	int	dosflags __PR((const char *, void *, int, va_list));
XLOCAL	int	checkfmt __PR((const char *));
XLOCAL	int	checkeql __PR((const char *));
X
XLOCAL	va_list	va_dummy;
X
XLOCAL	char	fmtspecs[] = "#?*&~+%";
X
X#define	isfmtspec(c)		(strchr(fmtspecs, c) != NULL)
X
XLOCAL	struct ga_props	props_default = { 0, 0, sizeof (struct ga_props) };
X
XEXPORT int
X_getarginit(props, size, flags)
X	struct ga_props	*props;
X	size_t		size;
X	UInt32_t	flags;
X{
X	if (size > sizeof (struct ga_props))
X		return (-1);
X
X	props->ga_flags = flags;
X	props->ga_oflags = 0;
X	props->ga_size = size;
X	return (0);
X}
X
X/*---------------------------------------------------------------------------
X|
X|	get flags until a non flag type argument is reached (old version)
X|
X+---------------------------------------------------------------------------*/
X/* VARARGS3 */
X#ifdef	PROTOTYPES
XEXPORT int
Xgetargs(int *pac, char *const **pav, const char *fmt, ...)
X#else
XEXPORT int
Xgetargs(pac, pav, fmt, va_alist)
X	int	*pac;
X	char	**pav[];
X	char	*fmt;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, fmt);
X#else
X	va_start(args);
X#endif
X	ret = _getargs(pac, pav, (void *)fmt, SETARGS, GA_NO_PROPS, args);
X	va_end(args);
X	return (ret);
X}
X
X
X/*---------------------------------------------------------------------------
X|
X|	get flags until a non flag type argument is reached (list version)
X|
X+---------------------------------------------------------------------------*/
X/* VARARGS4 */
X#ifdef	PROTOTYPES
XEXPORT int
Xgetlargs(int *pac, char *const **pav, struct ga_props *props, const char *fmt, ...)
X#else
XEXPORT int
Xgetlargs(pac, pav, props, fmt, va_alist)
X	int		*pac;
X	char		**pav[];
X	struct ga_props	*props;
X	char		*fmt;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, fmt);
X#else
X	va_start(args);
X#endif
X	ret = _getargs(pac, pav, (void *)fmt, SETARGS, props, args);
X	va_end(args);
X	return (ret);
X}
X
X
X/*---------------------------------------------------------------------------
X|
X|	get flags until a non flag type argument is reached (vector version)
X|
X+---------------------------------------------------------------------------*/
XEXPORT int
Xgetvargs(pac, pav, vfmt, props)
X	int	*pac;
X	char	* const *pav[];
X	struct ga_flags *vfmt;
X	struct ga_props	*props;
X{
X	return (_getargs(pac, pav, vfmt, SETARGS | ARGVECTOR, props, va_dummy));
X}
X
X
X/*---------------------------------------------------------------------------
X|
X|	get all flags on the command line, do not stop on files (old version)
X|
X+---------------------------------------------------------------------------*/
X/* VARARGS3 */
X#ifdef	PROTOTYPES
XEXPORT int
Xgetallargs(int *pac, char *const **pav, const char *fmt, ...)
X#else
XEXPORT int
Xgetallargs(pac, pav, fmt, va_alist)
X	int	*pac;
X	char	**pav[];
X	char	*fmt;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, fmt);
X#else
X	va_start(args);
X#endif
X	for (; ; (*pac)--, (*pav)++) {
X		if ((ret = _getargs(pac, pav, (void *)fmt, SETARGS, GA_NO_PROPS, args)) < NOTAFLAG)
X			break;
X	}
X	va_end(args);
X	return (ret);
X}
X
X
X/*---------------------------------------------------------------------------
X|
X|	get all flags on the command line, do not stop on files (list version)
X|
X+---------------------------------------------------------------------------*/
X/* VARARGS4 */
X#ifdef	PROTOTYPES
XEXPORT int
Xgetlallargs(int *pac, char *const **pav, struct ga_props *props, const char *fmt, ...)
X#else
XEXPORT int
Xgetlallargs(pac, pav, props, fmt, va_alist)
X	int		*pac;
X	char		**pav[];
X	struct ga_props	*props;
X	char		*fmt;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, fmt);
X#else
X	va_start(args);
X#endif
X	for (; ; (*pac)--, (*pav)++) {
X		if ((ret = _getargs(pac, pav, (void *)fmt, SETARGS, props, args)) < NOTAFLAG)
X			break;
X		if (ret == FLAGDELIM && props && (props->ga_flags & GAF_DELIM_DASHDASH))
X			break;
X	}
X	va_end(args);
X	return (ret);
X}
X
X
X/*---------------------------------------------------------------------------
X|
X|	get all flags on the command line, do not stop on files (vector version)
X|
X+---------------------------------------------------------------------------*/
XEXPORT int
Xgetvallargs(pac, pav, vfmt, props)
X	int	*pac;
X	char	* const *pav[];
X	struct ga_flags *vfmt;
X	struct ga_props	*props;
X{
X	int	ret;
X
X	for (; ; (*pac)--, (*pav)++) {
X		if ((ret = _getargs(pac, pav, vfmt, SETARGS | ARGVECTOR, props, va_dummy)) < NOTAFLAG)
X			break;
X		if (ret == FLAGDELIM && props && (props->ga_flags & GAF_DELIM_DASHDASH))
X			break;
X	}
X	return (ret);
X}
X
X
X/*---------------------------------------------------------------------------
X|
X|	get next non flag type argument (i.e. a file) (old version)
X|	getfiles() is a dry run getargs()
X|
X+---------------------------------------------------------------------------*/
XEXPORT int
Xgetfiles(pac, pav, fmt)
X	int		*pac;
X	char *const	*pav[];
X	const char	*fmt;
X{
X	return (_getargs(pac, pav, (void *)fmt, SCANONLY, GA_NO_PROPS, va_dummy));
X}
X
X
X/*---------------------------------------------------------------------------
X|
X|	get next non flag type argument (i.e. a file) (list version)
X|	getlfiles() is a dry run getlargs()
X|
X+---------------------------------------------------------------------------*/
XEXPORT int
Xgetlfiles(pac, pav, props, fmt)
X	int		*pac;
X	char *const	*pav[];
X	struct ga_props	*props;
X	const char	*fmt;
X{
X	return (_getargs(pac, pav, (void *)fmt, SCANONLY, props, va_dummy));
X}
X
X
X/*---------------------------------------------------------------------------
X|
X|	get next non flag type argument (i.e. a file) (vector version)
X|	getvfiles() is a dry run getvargs()
X|
X+---------------------------------------------------------------------------*/
XEXPORT int
Xgetvfiles(pac, pav, vfmt, props)
X	int		*pac;
X	char *const	*pav[];
X	struct ga_flags	*vfmt;
X	struct ga_props	*props;
X{
X	return (_getargs(pac, pav, vfmt, SCANONLY | ARGVECTOR, props, va_dummy));
X}
X
X
X/*---------------------------------------------------------------------------
X|
X|	check args until the next non flag type argmument is reached
X|	*pac is decremented, *pav is incremented so that the
X|	non flag type argument is at *pav[0]
X|
X|	return code:
X|		+2 FLAGDELIM	"--" stopped flag processing
X|		+1 NOTAFLAG	not a flag type argument (is a file)
X|		 0 NOARGS	no more args
X|		-1 BADFLAG	a non-matching flag type argument
X|		-2 BADFMT	bad syntax in format string
X|
X+---------------------------------------------------------------------------*/
X/*LOCAL*/ int
X_getargs(pac, pav, vfmt, flags, props, args)
X	register int		*pac;
X	register char	*const	**pav;
X		void		*vfmt;
X		int		flags;
X		struct ga_props	*props;
X		va_list		args;
X{
X	const	char	*argp;
X		int	ret;
X
X
X	if (props == GA_NO_PROPS)
X		props = &props_default;
X	props->ga_oflags = 0;
X	if (props->ga_flags & GAF_NO_EQUAL)
X		flags |= NOEQUAL;
X
X	for (; *pac > 0; (*pac)--, (*pav)++) {
X		argp = **pav;
X
X		ret = dofile(pac, pav, &argp, props);
X
X		if (ret != NOTAFILE)
X			return (ret);
X
X		ret = doflag(pac, pav, argp, vfmt, flags, args);
X
X		if (ret != NOTAFLAG)
X			return (ret);
X	}
X	return (NOARGS);
X}
X
X
X/*---------------------------------------------------------------------------
X|
X| check if *pargp is a file type argument
X|
X+---------------------------------------------------------------------------*/
XLOCAL int
Xdofile(pac, pav, pargp, props)
X	register int		*pac;
X	register char *const	**pav;
X		const char	**pargp;
X		struct ga_props	*props;
X{
X	register const char	*argp = *pargp;
X
X
X	if (argp[0] == '-') {
X		/*
X		 * "-"	is a special non flag type argument
X		 *	that usually means take stdin instead of a named file
X		 */
X		if (argp[1] == '\0')
X			return (NOTAFLAG);
X		/*
X		 * "--" is a prefix to take the next argument
X		 *	as non flag type argument
X		 * NOTE: POSIX requires "--" to indicate the end of the
X		 *	 flags on the command line. Programs that like to be
X		 *	 100% POSIX compliant call only get[lv]args() once
X		 *	 and then process the list of files from cav[0].
X		 */
X		if (argp[1] == '-' && argp[2] == '\0') {
X			if (--(*pac) > 0) {
X				(*pav)++;
X				return (FLAGDELIM);
X			} else {
X				return (NOARGS);
X			}
X		}
X	}
X
X	/*
X	 * Now check if it may be flag type argument at all.
X	 * Flag type arguments begin with a '-', a '+' or contain a '='
X	 * i.e. -flag +flag or flag=
X	 * The behavior here may be controlled by props->ga_flags to
X	 * allow getargs() to e.g. behave fully POSIX compliant.
X	 */
X	if (argp[0] != '-') {
X		if (argp[0] == '+' && (props->ga_flags & GAF_NO_PLUS) == 0)
X			return (NOTAFILE);	/* This is a flag type arg */
X
X		/*
X		 * If 'flag=value' is not allowed at all, speed things up
X		 * and do not call checkeql() to check for '='.
X		 */
X		if (props->ga_flags & GAF_NO_EQUAL)
X			return (NOTAFLAG);
X		if (checkeql(argp) && (props->ga_flags & GAF_NEED_DASH) == 0)
X			return (NOTAFILE);	/* This is a flag type arg */
X		return (NOTAFLAG);
X	}
X	return (NOTAFILE);			/* This is a flag type arg */
X}
X
X
X/*---------------------------------------------------------------------------
X|
X|	compare argp with the format string
X|	if a match is found store the result a la scanf in one of the
X|	arguments pointed to in the va_list
X|
X|	If (flags & SETARGS) == 0, only check arguments for getfiles()
X|	In case that (flags & SETARGS) == 0 or that (flags & ARGVECTOR) != 0,
X|	va_list may be a dummy argument.
X|
X+---------------------------------------------------------------------------*/
XLOCAL int
Xdoflag(pac, pav, argp, vfmt, flags, oargs)
X		int		*pac;
X		char	*const	**pav;
X	register const char	*argp;
X		void		*vfmt;
X		int		flags;
X		va_list		oargs;
X{
X	register const char	*fmt = (const char *)vfmt;
X	struct ga_flags		*flagp = vfmt;
X	const char	*fmtp;
X	long	val;
X	Llong	llval;
X	int	singlecharflag	= 0;
X	BOOL	isspec;
X	BOOL	hasdash		= FALSE;
X	BOOL	doubledash	= FALSE;
X	BOOL	haseql		= checkeql(argp);
X	const char	*sargp;
X	const char	*sfmt;
X	va_list	args;
X	char	*const	*spav	= *pav;
X	int		spac	= *pac;
X	void		*curarg	= (void *)0;
X
X	sfmt = fmt;
X	/*
X	 * flags beginning with '-' don't have to include the '-' in
X	 * the format string.
X	 * flags beginning with '+' have to include it in the format string.
X	 */
X	if (argp[0] == '-') {
X		argp++;
X		hasdash = TRUE;
X		/*
X		 * Implement legacy support for --longopt
X		 * If we find a double dash, we do not look for combinations
X		 * of boolean single char flags.
X		 */
X		if (argp[0] == '-') {
X			argp++;
X			doubledash = TRUE;
X			/*
X			 * Allow -- only for long options.
X			 */
X			if (argp[1] == '\0') {
X				return (BADFLAG);
X			}
X		}
X	}
X	sargp = argp;
X
X	/*
X	 * Initialize 'args' to the start of the argument list.
X	 * I don't know any portable way to copy an arbitrary
X	 * C object so I use a system-specific routine
X	 * (probably a macro) from stdarg.h.  (Remember that
X	 * if va_list is an array, 'args' will be a pointer
X	 * and '&args' won't be what I would need for memcpy.)
X	 * It is a system requirement for SVr4 compatibility
X	 * to be able to do this assgignement. If your system
X	 * defines va_list to be an array but does not define
X	 * va_copy() you are lost.
X	 * This is needed to make sure, that 'oargs' will not
X	 * be clobbered.
X	 */
X	va_copy(args, oargs);
X
X	if (flags & ARGVECTOR) {
X		sfmt = fmt = flagp->ga_format;
X		if (fmt == NULL)
X			sfmt = fmt = "";
X		if (flags & SETARGS)
X			curarg = flagp->ga_arg;
X	} else if (flags & SETARGS) {
X		curarg = va_arg(args, void *);
X	}
X	/*
X	 * check if the first flag in format string is a singlechar flag
X	 */
Xagain:
X	if (fmt[0] != '\0' &&
X	    (fmt[1] == ',' || fmt[1] == '+' || fmt[1] == '\0'))
X		singlecharflag++;
X	/*
X	 * check the whole format string for a match
X	 */
X	for (;;) {
X		for (; *fmt; fmt++, argp++) {
X			if (*fmt == '\\') {
X				/*
X				 * Allow "#?*&+" to appear inside a flag.
X				 * NOTE: they must be escaped by '\\' only
X				 *	 inside the the format string.
X				 */
X				fmt++;
X				isspec = FALSE;
X			} else {
X				isspec = isfmtspec(*fmt);
X			}
X			/*
X			 * If isspec is TRUE, the arg beeing checked starts
X			 * like a valid flag. Argp now points to the rest.
X			 */
X			if (isspec) {
X				/*
X				 * If *argp is '+' and we are on the
X				 * beginning of the arg that is currently
X				 * checked, this cannot be an inc type flag.
X				 */
X				if (*argp == '+' && argp == sargp)
X					continue;
X				/*
X				 * skip over to arg of flag
X				 */
X				if (*argp == '=') {
X					if (flags & NOEQUAL)
X						return (BADFLAG);
X					argp++;
X				} else if (*argp != '\0' && haseql) {
X					/*
X					 * Flag and arg are not separated by a
X					 * space.
X					 * Check here for:
X					 * xxxxx=yyyyy	match on '&'
X					 * Checked before:
X					 * abc=yyyyy	match on 'abc&'
X					 * 		or	 'abc*'
X					 * 		or	 'abc#'
X					 * We come here if 'argp' starts with
X					 * the same sequence as a valid flag
X					 * and contains an equal sign.
X					 * We have tested before if the text
X					 * before 'argp' matches exactly.
X					 * At this point we have no exact match
X					 * and we only allow to match
X					 * the special pattern '&'.
X					 * We need this e.g. for 'make'.
X					 * We allow any flag type argument to
X					 * match the format string "&" to set
X					 * up a function that handles all odd
X					 * stuff that getargs will not grok.
X					 * In addition, to allow getargs to be
X					 * used for CPP type flags we allow to
X					 * match -Dabc=xyz on 'D&'. Note that
X					 * Dabc=xyz will not match 'D&'.
X					 */
X					if ((!hasdash && argp != sargp) || *fmt != '&')
X						goto nextarg;
X				}
X
X				/*
X				 * The format string 'f* ' may be used
X				 * to disallow -ffoo for f*
X				 *
X				 * The same behavior is implemented for
X				 * 'f# '. 'f? ' and 'f& '.
X				 */
X				if (!haseql && *argp != '\0' &&
X				    (fmt[0] == '*' || fmt[0] == '#' ||
X				    fmt[0] == '?' || fmt[0] == '&') &&
X							fmt[1] == ' ') {
X					goto nextarg;
X				}
X
X				/*
X				 * *arpp == '\0' || !haseql
X				 * We come here if 'argp' starts with
X				 * the same sequence as a valid flag.
X				 * This will match on the following args:
X				 * -farg	match on 'f*'
X				 * -f12		match on 'f#'
X				 * +12		match on '+#'
X				 * -12		match on '#'
X				 * and all args that are separated from
X				 * their flags.
X				 * In the switch statement below, we check
X				 * if the text after 'argp' (if *argp != 0) or
X				 * the next arg is a valid arg for this flag.
X				 */
X				break;
X			} else if (*fmt == *argp) {
X				if (argp[1] == '\0' &&
X				    (fmt[1] == '\0' || fmt[1] == ',')) {
X
X					if (flags & SETARGS)
X						*((int *)curarg) = TRUE;
X
X
X					return (checkfmt(fmt)); /* XXX */
X				}
X			} else {
X				/*
X				 * skip over to next format identifier
X				 * & reset arg pointer
X				 */
X			nextarg:
X				while (*fmt != ',' && *fmt != '\0') {
X					/* function has extra arg on stack */
X					if ((*fmt == '&' || *fmt == '~') &&
X					    (flags & (SETARGS|ARGVECTOR)) == SETARGS) {
X						curarg = va_arg(args, void *);
X					}
X					fmt++;
X				}
X				argp = sargp;
X				break;
X			}
X		}
X		switch (*fmt) {
X
X		case '\0':
X			/*
X			 * Boolean type has been tested before.
X			 */
X			if (flags & ARGVECTOR) {
X				if (flagp[1].ga_format != NULL) {
X					flagp++;
X					sfmt = fmt = flagp->ga_format;
X					if (flags & SETARGS)
X						curarg = flagp->ga_arg;
X					argp = sargp;
X					goto again;
X				}
X			}
X			if (singlecharflag && !doubledash &&
X			    (val = dosflags(sargp, vfmt, flags & ~SETARGS,
X							va_dummy)) == BADFLAG) {
X				return (val);
X			}
X			if (singlecharflag && !doubledash &&
X			    (val = dosflags(sargp, vfmt, flags,
X							oargs)) != BADFLAG) {
X				return (val);
X			}
X			return (BADFLAG);
X
X		case ',':
X			fmt++;
X			if (fmt[0] == '\0')	/* Should we allow "a,b,c,"? */
X				return (BADFMT);
X			if (fmt[1] == ',' || fmt[1] == '+' || fmt[1] == '\0')
X				singlecharflag++;
X			if ((flags & (SETARGS|ARGVECTOR)) == SETARGS)
X				curarg = va_arg(args, void *);
X			continue;
X
X		case '*':
X			if (*argp == '\0' && fmt[1] != '_') {
X				if (*pac > 1) {
X					(*pac)--;
X					(*pav)++;
X					argp = **pav;
X				} else {
X					return (BADFLAG);
X				}
X			}
X			if (fmt[1] == '_')	/* To disallow -f foo for f* */
X				fmt++;
X			else if (fmt[1] == ' ')	/* To disallow -ffoo for f* */
X				fmt++;
X
X			if (flags & SETARGS)
X				*((const char **)curarg) = argp;
X
X
X			return (checkfmt(fmt));
X
X		case '?':
X			if (*argp == '\0' && fmt[1] != '_') {
X				if (*pac > 1) {
X					(*pac)--;
X					(*pav)++;
X					argp = **pav;
X				} else {
X					return (BADFLAG);
X				}
X			}
X			if (fmt[1] == '_')	/* To disallow -f c for f? */
X				fmt++;
X			else if (fmt[1] == ' ')	/* To disallow -fc for f? */
X				fmt++;
X
X			/*
X			 * Allow -f '' to specify a nul character.
X			 * If more than one char arg, it
X			 * cannot be a character argument.
X			 */
X			if (argp[0] != '\0' && argp[1] != '\0')
X				goto nextchance;
X
X			if (flags & SETARGS)
X				*((char *)curarg) = *argp;
X
X
X			return (checkfmt(fmt));
X
X		case '+':
X			/*
X			 * inc type is similar to boolean,
X			 * there is no arg in argp to convert.
X			 */
X			if (*argp != '\0')
X				goto nextchance;
X			/*
X			 * If *fmt is '+' and we are on the beginning
X			 * of the format desciptor that is currently
X			 * checked, this cannot be an inc type flag.
X			 */
X			if (fmt == sfmt || fmt[-1] == ',')
X				goto nextchance;
X
X			fmtp = fmt;
X			if (fmt[1] == 'l' || fmt[1] == 'L') {
X				if (fmt[2] == 'l' || fmt[2] == 'L') {
X					if (flags & SETARGS)
X						*((Llong *)curarg) += 1;
X					fmt += 2;
X				} else {
X					if (flags & SETARGS)
X						*((long *)curarg) += 1;
X					fmt++;
X				}
X			} else if (fmt[1] == 's' || fmt[1] == 'S') {
X				if (flags & SETARGS)
X					*((short *)curarg) += 1;
X				fmt++;
X			} else if (fmt[1] == 'c' || fmt[1] == 'C') {
X				if (flags & SETARGS)
X					*((char *)curarg) += 1;
X				fmt++;
X			} else {
X				if (fmt[1] == 'i' || fmt[1] == 'I')
X					fmt++;
X				if (flags & SETARGS)
X					*((int *)curarg) += 1;
X			}
X
X
X			return (checkfmt(fmt));
X
X		case '%':
X			/*
X			 * inc type is similar to boolean,
X			 * there is no arg in argp to convert.
X			 */
X			if (*argp != '\0')
X				goto nextchance;
X
X			fmt++;
X			if (*fmt == '1')
X				val = TRUE;
X			else if (*fmt == '0')
X				val = FALSE;
X			else
X				goto nextchance;
X
X			fmtp = fmt;
X			llval = (Llong)val;
X			if (fmt[1] == 'l' || fmt[1] == 'L') {
X				if (fmt[2] == 'l' || fmt[2] == 'L') {
X					if (flags & SETARGS)
X						*((Llong *)curarg) = llval;
X					fmt += 2;
X				} else {
X					if (flags & SETARGS)
X						*((long *)curarg) = val;
X					fmt++;
X				}
X			} else if (fmt[1] == 's' || fmt[1] == 'S') {
X				if (flags & SETARGS)
X					*((short *)curarg) = val;
X				fmt++;
X			} else if (fmt[1] == 'c' || fmt[1] == 'C') {
X				if (flags & SETARGS)
X					*((char *)curarg) = val;
X				fmt++;
X			} else {
X				if (fmt[1] == 'i' || fmt[1] == 'I')
X					fmt++;
X				if (flags & SETARGS)
X					*((int *)curarg) = val;
X			}
X
X
X			return (checkfmt(fmt));
X
X		case '#':
X			if (*argp == '\0' && fmt[1] != '_') {
X				if (*pac > 1) {
X					(*pac)--;
X					(*pav)++;
X					argp = **pav;
X				} else {
X					return (BADFLAG);
X				}
X			}
X			if (fmt[1] == '_')	/* To disallow -f 123 for f# */
X				fmt++;
X			else if (fmt[1] == ' ')	/* To disallow -f123 for f# */
X				fmt++;
X
X			if (*astoll(argp, &llval) != '\0') {
X				/*
X				 * arg is not a valid number!
X				 * go to next format in the format string
X				 * and check if arg matches any other type
X				 * in the format specs.
X				 */
X			nextchance:
X				while (*fmt != ',' && *fmt != '\0') {
X					if ((*fmt == '&' || *fmt == '~') &&
X					    (flags & (SETARGS|ARGVECTOR)) == SETARGS) {
X						curarg = va_arg(args, void *);
X					}
X					fmt++;
X				}
X				argp = sargp;
X				*pac = spac;
X				*pav = spav;
X				continue;
X			}
X			fmtp = fmt;
X			val = (long)llval;
X			if (fmt[1] == 'l' || fmt[1] == 'L') {
X				if (fmt[2] == 'l' || fmt[2] == 'L') {
X					if (flags & SETARGS)
X						*((Llong *)curarg) = llval;
X					fmt += 2;
X				} else {
X					if (flags & SETARGS)
X						*((long *)curarg) = val;
X					fmt++;
X				}
X			} else if (fmt[1] == 's' || fmt[1] == 'S') {
X				if (flags & SETARGS)
X					*((short *)curarg) = (short)val;
X				fmt++;
X			} else if (fmt[1] == 'c' || fmt[1] == 'C') {
X				if (flags & SETARGS)
X					*((char *)curarg) = (char)val;
X				fmt++;
X			} else {
X				if (fmt[1] == 'i' || fmt[1] == 'I')
X					fmt++;
X				if (flags & SETARGS)
X					*((int *)curarg) = (int)val;
X			}
X
X			return (checkfmt(fmt));
X
X		case '~':
X			if (*argp != '\0')
X				goto nextchance;
X			if (haseql) {
X				return (BADFLAG);
X			}
X			goto callfunc;
X
X		case '&':
X			if (*argp == '\0' && fmt[1] != '_') {
X				if (*pac > 1) {
X					(*pac)--;
X					(*pav)++;
X					argp = **pav;
X				} else {
X					return (BADFLAG);
X				}
X			}
X		callfunc:
X
X			if (*fmt == '&' && fmt[1] == '_') /* To disallow -f foo for f& */
X				fmt++;
X			else if (fmt[1] == ' ')	/* To disallow -ffoo for f& */
X				fmt++;
X			if ((val = checkfmt(fmt)) != NOTAFLAG)
X				return (val);
X
X			fmtp = sargp;
X			if (hasdash)
X				fmtp--;
X			if (doubledash)
X				fmtp--;
X			if ((flags & (SETARGS|ARGVECTOR)) == (SETARGS|ARGVECTOR)) {
X				int		ret;
X
X				if (flagp->ga_funcp == NULL)
X					return (BADFMT);
X
X				ret = ((*flagp->ga_funcp) (argp, flagp->ga_arg,
X								pac, pav, fmtp));
X				if (ret != NOTAFILE)
X					return (ret);
X				fmt++;
X			} else
X			if (flags & SETARGS) {
X				int	ret;
X				void	*funarg = va_arg(args, void *);
X
X				ret = ((*(getpargfun)curarg) (argp, funarg,
X								pac, pav, fmtp));
X				if (ret != NOTAFILE)
X					return (ret);
X				fmt++;
X			} else {
X				return (val);
X			}
X			/*
X			 * Called function returns NOTAFILE: try next format.
X			 */
X		}
X	}
X}
X
X
X/*---------------------------------------------------------------------------
X|
X|	parse args for combined single char flags
X|
X+---------------------------------------------------------------------------*/
Xtypedef struct {
X	void	*curarg;	/* The pointer to the arg to modify	 */
X	short	count;		/* The number of times a sc flag appears */
X	char	c;		/* The single char flag character	 */
X	char	type;		/* The type of the single char flag	 */
X} sflags;
X
XLOCAL int
Xdosflags(argp, vfmt, flags, oargs)
X	register const char	*argp;
X		void		*vfmt;
X		int		flags;
X		va_list		oargs;
X{
X	register const char	*fmt = (const char *)vfmt;
X	struct ga_flags		*flagp = vfmt;
X#define	MAXSF	32
X		sflags	sf[MAXSF];
X		va_list args;
X	register sflags	*rsf	= sf;
X	register int	nsf	= 0;
X	register const char *p	= argp;
X	register int	i;
X	register void	*curarg = (void *)0;
X		char	type;
X
X	/*
X	 * Initialize 'args' to the start of the argument list.
X	 * I don't know any portable way to copy an arbitrary
X	 * C object so I use a system-specific routine
X	 * (probably a macro) from stdarg.h.  (Remember that
X	 * if va_list is an array, 'args' will be a pointer
X	 * and '&args' won't be what I would need for memcpy.)
X	 * It is a system requirement for SVr4 compatibility
X	 * to be able to do this assgignement. If your system
X	 * defines va_list to be an array but does not define
X	 * va_copy() you are lost.
X	 * This is needed to make sure, that 'oargs' will not
X	 * be clobbered.
X	 */
X	va_copy(args, oargs);
X
X	if (flags & ARGVECTOR) {
X		fmt = flagp->ga_format;
X		if (fmt == NULL)
X			fmt = "";
X		if (flags & SETARGS)
X			curarg = flagp->ga_arg;
X	} else if (flags & SETARGS) {
X		curarg = va_arg(args, void *);
X	}
X
X	while (*p) {
X		for (i = 0; i < nsf; i++) {
X			if (rsf[i].c == *p)
X				break;
X		}
X		if (i >= MAXSF)
X			return (BADFLAG);
X		if (i == nsf) {
X			rsf[i].curarg = (void *)0;
X			rsf[i].count = 0;
X			rsf[i].c = *p;
X			rsf[i].type = (char)-1;
X			nsf++;
X		}
X		rsf[i].count++;
X		p++;
X	}
X
X	/*
X	 * XXX Single char Boolen type '~' flags cannot yet be combined
X	 */
Xagain:
X	while (*fmt) {
X		if (!isfmtspec(*fmt) &&
X		    (fmt[1] == ',' || fmt[1] == '+' || fmt[1] == '\0') &&
X		    strchr(argp, *fmt)) {
X			for (i = 0; i < nsf; i++) {
X				if (rsf[i].c == *fmt) {
X					if (fmt[1] == '+') {
X						fmt++;
X						if (fmt[1] == ',' ||
X						    fmt[1] == '\0') {
X							rsf[i].type = 'i';
X						} else if ((fmt[1] == 'l' ||
X							    fmt[1] == 'L') &&
X							    (fmt[2] == 'l' ||
X							    fmt[2] == 'L')) {
X							/*
X							 * Type 'Q'uad (ll)
X							 */
X							rsf[i].type = 'Q';
X							fmt++;
X						} else {
X							/*
X							 * Type 'l','i','s','c'
X							 */
X							rsf[i].type = fmt[1];
X						}
X					} else {
X						/*
X						 * ',' or '\0' for BOOL
X						 */
X						rsf[i].type = fmt[1];
X					}
X					rsf[i].curarg = curarg;
X					break;
X				}
X			}
X		}
X		while (*fmt != ',' && *fmt != '\0') {
X			/* function has extra arg on stack */
X			if ((*fmt == '&' || *fmt == '~') &&
X			    (flags & (SETARGS|ARGVECTOR)) == SETARGS) {
X				curarg = va_arg(args, void *);
X			}
X			fmt++;
X		}
X		if (*fmt != '\0')
X			fmt++;
X
X		if ((flags & (SETARGS|ARGVECTOR)) == SETARGS)
X			curarg = va_arg(args, void *);
X	}
X	if ((flags & ARGVECTOR) && flagp[1].ga_format != NULL) {
X		flagp++;
X		fmt = flagp->ga_format;
X		if (flags & SETARGS)
X			curarg = flagp->ga_arg;
X		goto again;
X	}
X
X	for (i = 0; i < nsf; i++) {
X		type = rsf[i].type;
X		if (type == (char)-1) {
X			return (BADFLAG);
X		}
X		if (rsf[i].curarg) {
X			if (type == ',' || type == '\0') {
X				*((int *)rsf[i].curarg) = TRUE;
X			} else if (type == 'i' || type == 'I') {
X				*((int *)rsf[i].curarg) += rsf[i].count;
X			} else if (type == 'l' || type == 'L') {
X				*((long *)rsf[i].curarg) += rsf[i].count;
X			} else if (type == 'Q') {
X				*((Llong *)rsf[i].curarg) += rsf[i].count;
X			} else if (type == 's' || type == 'S') {
X				*((short *)rsf[i].curarg) += rsf[i].count;
X			} else if (type == 'c' || type == 'C') {
X				*((char *)rsf[i].curarg) += rsf[i].count;
X			} else {
X				return (BADFLAG);
X			}
X		}
X	}
X	return (NOTAFLAG);
X}
X
X/*---------------------------------------------------------------------------
X|
X|	If the next format character is a comma or the string delimiter,
X|	there are no invalid format specifiers. Return success.
X|	Otherwise raise the getarg_bad_format condition.
X|
X+---------------------------------------------------------------------------*/
XLOCAL int
Xcheckfmt(fmt)
X	const char	*fmt;
X{
X	char	c;
X
X	c = *(++fmt);	/* non constant expression */
X
X
X	if (c == ',' || c == '\0') {
X		return (NOTAFLAG);
X	} else {
X		raisecond("getarg_bad_format", (long)fmt);
X		return (BADFMT);
X	}
X}
X
X/*---------------------------------------------------------------------------
X|
X|	Parse the string as long as valid characters can be found.
X|	Valid flag identifiers are chosen from the set of
X|	alphanumeric characters, '-' and '_'.
X|	If the next character is an equal sign the string
X|	contains a valid flag identifier.
X|
X+---------------------------------------------------------------------------*/
XLOCAL int
Xcheckeql(str)
X	register const char *str;
X{
X	register unsigned char c;
X
X	for (c = (unsigned char)*str;
X			isalnum(c) || c == '_' || c == '-' || c == '+';
X								c = *++str)
X		/* LINTED */
X		;
X	return (c == '=');
X}
X
XEXPORT char *
Xgetargerror(err)
X	int	err;
X{
X	if (err < RETMIN || err > RETMAX)
X		return ("Illegal arg error");
X	return (RNAME(err));
X}
END-of-smake-1.2.1/lib/getargs.c
echo x - smake-1.2.1/lib/getav0.c
sed 's/^X//' >smake-1.2.1/lib/getav0.c << 'END-of-smake-1.2.1/lib/getav0.c'
X/* @(#)getav0.c	1.23 09/07/08 Copyright 1985, 1995-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)getav0.c	1.23 09/07/08 Copyright 1985, 1995-2009 J. Schilling";
X#endif
X/*
X *	Get arg vector by scanning the stack
X *
X *	Copyright (c) 1985, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/sigblk.h>
X#include <schily/avoffset.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X#if	!defined(AV_OFFSET) || !defined(FP_INDIR)
X#	ifdef	HAVE_SCANSTACK
X#	undef	HAVE_SCANSTACK
X#	endif
X#endif
X
X#ifdef	HAVE_SCANSTACK
X
X#include <schily/stkframe.h>
X
X#define	is_even(p)	((((long)(p)) & 1) == 0)
X#define	even(p)		(((long)(p)) & ~1L)
X#ifdef	__future__
X#define	even(p)		(((long)(p)) - 1) /* will this work with 64 bit ?? */
X#endif
X
XEXPORT	char	**getmainfp	__PR((void));
XEXPORT	char	**getavp	__PR((void));
XEXPORT	char	*getav0		__PR((void));
X
X
XEXPORT char **
Xgetmainfp()
X{
X	register struct frame *fp;
X		char	**av;
X#if	FP_INDIR > 0
X	register int	i = 0;
X#endif
X
X	/*
X	 * As the SCO OpenServer C-Compiler has a bug that may cause
X	 * the first function call to getfp() been done before the
X	 * new stack frame is created, we call getfp() twice.
X	 */
X	(void) getfp();
X	fp = (struct frame *)getfp();
X	if (fp == NULL)
X		return (NULL);
X
X	while (fp->fr_savfp) {
X		if (fp->fr_savpc == 0)
X			break;
X
X		if (!is_even(fp->fr_savfp)) {
X			fp = (struct frame *)even(fp->fr_savfp);
X			if (fp == NULL)
X				break;
X			fp = (struct frame *)((SIGBLK *)fp)->sb_savfp;
X			continue;
X		}
X		fp = (struct frame *)fp->fr_savfp;
X
X#if	FP_INDIR > 0
X		i++;
X#endif
X	}
X
X#if	FP_INDIR > 0
X	i -= FP_INDIR;
X	fp = (struct frame *)getfp();
X	if (fp == NULL)
X		return (NULL);
X
X	while (fp->fr_savfp) {
X		if (fp->fr_savpc == 0)
X			break;
X
X		if (!is_even(fp->fr_savfp)) {
X			fp = (struct frame *)even(fp->fr_savfp);
X			if (fp == NULL)
X				break;
X			fp = (struct frame *)((SIGBLK *)fp)->sb_savfp;
X			continue;
X		}
X		fp = (struct frame *)fp->fr_savfp;
X
X		if (--i <= 0)
X			break;
X	}
X#endif
X
X	av = (char **)fp;
X	return (av);
X}
X
XEXPORT char **
Xgetavp()
X{
X	register struct frame *fp;
X		char	**av;
X
X	fp = (struct frame *)getmainfp();
X	if (fp == NULL)
X		return (NULL);
X
X	av = (char **)(((char *)fp) + AV_OFFSET);	/* aus avoffset.h */
X							/* -> avoffset.c  */
X	return (av);
X}
X
XEXPORT char *
Xgetav0()
X{
X	return (getavp()[0]);
X}
X
X#else
X
XEXPORT char **
Xgetmainfp()
X{
X	raisecond("getmainfp", 0);
X	return ((char **)0);
X}
X
XEXPORT char **
Xgetavp()
X{
X	raisecond("getavp", 0);
X	return ((char **)0);
X}
X
XEXPORT char *
Xgetav0()
X{
X	return ("???");
X}
X
X#endif	/* HAVE_SCANSTACK */
END-of-smake-1.2.1/lib/getav0.c
echo x - smake-1.2.1/lib/geterrno.c
sed 's/^X//' >smake-1.2.1/lib/geterrno.c << 'END-of-smake-1.2.1/lib/geterrno.c'
X/* @(#)geterrno.c	1.12 09/07/26 Copyright 1985, 1995-2003 J. Schilling */
X/*
X *	Get error number
X *
X *	Copyright (c) 1985, 1995-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	_TS_ERRNO		/* Solaris: get thread safe errno value */
X#define	_LIBC_REENTRANT		/* Linux: get thread safe errno value */
X#include <schily/errno.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X#ifdef	geterrno
X#undef	geterrno
X#endif
X
XEXPORT int
Xgeterrno()
X
X{
X	return (errno);
X}
END-of-smake-1.2.1/lib/geterrno.c
echo x - smake-1.2.1/lib/getfp.c
sed 's/^X//' >smake-1.2.1/lib/getfp.c << 'END-of-smake-1.2.1/lib/getfp.c'
X/* @(#)getfp.c	1.18 08/06/14 Copyright 1988-2008 J. Schilling */
X/*
X *	Get frame pointer
X *
X *	Copyright (c) 1988-2008 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X#ifndef	IS_AVOFFSET
X/*
X * We usually don't like to compile a getfp() that returns junk data in case
X * we cannot scan the stack.
X * The only way to find this out is by including avoffset.h. Unfortunately, we
X * need to be able to use getfp() from avoffset.c in order to check if the
X * return value is usable or junk. To be able to do this, we include getfp.c
X * from avoffset.c and define IS_AVOFFSET before.
X */
X#include <schily/avoffset.h>
X
X#if	!defined(AV_OFFSET) || !defined(FP_INDIR)
X#	ifdef	HAVE_SCANSTACK
X#	undef	HAVE_SCANSTACK
X#	endif
X#endif
X#endif
X
X#ifdef	HAVE_SCANSTACK
X#include <schily/stkframe.h>
X
X#define	MAXWINDOWS	32
X#define	NWINDOWS	7
X
X#if defined(sparc) && defined(__GNUC__)
X#	define	FP_OFF		0x10	/* some strange things on sparc gcc */
X#else
X#	define	FP_OFF		0
X#endif
X
XEXPORT	void	**___fpoff	__PR((char *cp));
X
XEXPORT void **
Xgetfp()
X{
X		long	**dummy[1];
X
X#ifdef	sparc
X	flush_reg_windows(MAXWINDOWS-2);
X#endif
X	return ((void **)((struct frame *)___fpoff((char *)&dummy[0]))->fr_savfp);
X}
X
X/*
X * Don't make it static to avoid inline optimization.
X *
X * We need this function to fool GCCs check for returning addresses
X * from outside the functions local address space.
X */
XEXPORT void **
X___fpoff(cp)
X	char	*cp;
X{
X	long ***lp;
X
X	lp = (long ***)(cp + FP_OFF);
X	lp++;
X	return ((void **)lp);
X}
X
X#ifdef	sparc
XEXPORT int
Xflush_reg_windows(n)
X	int	n;
X{
X	if (--n > 0)
X		flush_reg_windows(n);
X	return (0);
X}
X#endif
X
X#else	/* HAVE_SCANSTACK */
X
XEXPORT void **
Xgetfp()
X{
X	raisecond("getfp", 0);
X	return ((void **)0);
X}
X
X#endif	/* HAVE_SCANSTACK */
END-of-smake-1.2.1/lib/getfp.c
echo x - smake-1.2.1/lib/jsprintf.c
sed 's/^X//' >smake-1.2.1/lib/jsprintf.c << 'END-of-smake-1.2.1/lib/jsprintf.c'
X/* @(#)jsprintf.c	1.17 09/06/30 Copyright 1985, 1995-2009 J. Schilling */
X/*
X *	Copyright (c) 1985, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/stdio.h>
X#include <schily/types.h>
X#include <schily/varargs.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X#define	BFSIZ	256
X
Xtypedef struct {
X	short	cnt;
X	char	*ptr;
X	char	buf[BFSIZ];
X	int	count;
X	FILE	*f;
X} *BUF, _BUF;
X
XLOCAL	void	_bflush		__PR((BUF));
XLOCAL	void	_bput		__PR((char, long));
XEXPORT	int	js_fprintf	__PR((FILE *, const char *, ...));
XEXPORT	int	js_printf	__PR((const char *, ...));
X
XLOCAL void
X_bflush(bp)
X	register BUF	bp;
X{
X	bp->count += bp->ptr - bp->buf;
X	if (filewrite(bp->f, bp->buf, bp->ptr - bp->buf) < 0)
X		bp->count = EOF;
X	bp->ptr = bp->buf;
X	bp->cnt = BFSIZ;
X}
X
X#ifdef	PROTOTYPES
XLOCAL void
X_bput(char c, long l)
X#else
XLOCAL void
X_bput(c, l)
X		char	c;
X		long	l;
X#endif
X{
X	register BUF	bp = (BUF)l;
X
X	*bp->ptr++ = c;
X	if (--bp->cnt <= 0)
X		_bflush(bp);
X}
X
X/* VARARGS1 */
X#ifdef	PROTOTYPES
XEXPORT int
Xjs_printf(const char *form, ...)
X#else
XEXPORT int
Xjs_printf(form, va_alist)
X	char	*form;
X	va_dcl
X#endif
X{
X	va_list	args;
X	_BUF	bb;
X
X	bb.ptr = bb.buf;
X	bb.cnt = BFSIZ;
X	bb.count = 0;
X	bb.f = stdout;
X#ifdef	PROTOTYPES
X	va_start(args, form);
X#else
X	va_start(args);
X#endif
X	format(_bput, (long)&bb, form, args);
X	va_end(args);
X	if (bb.cnt < BFSIZ)
X		_bflush(&bb);
X	return (bb.count);
X}
X
X/* VARARGS2 */
X#ifdef	PROTOTYPES
XEXPORT int
Xjs_fprintf(FILE *file, const char *form, ...)
X#else
XEXPORT int
Xjs_fprintf(file, form, va_alist)
X	FILE	*file;
X	char	*form;
X	va_dcl
X#endif
X{
X	va_list	args;
X	_BUF	bb;
X
X	bb.ptr = bb.buf;
X	bb.cnt = BFSIZ;
X	bb.count = 0;
X	bb.f = file;
X#ifdef	PROTOTYPES
X	va_start(args, form);
X#else
X	va_start(args);
X#endif
X	format(_bput, (long)&bb, form, args);
X	va_end(args);
X	if (bb.cnt < BFSIZ)
X		_bflush(&bb);
X	return (bb.count);
X}
END-of-smake-1.2.1/lib/jsprintf.c
echo x - smake-1.2.1/lib/jssnprintf.c
sed 's/^X//' >smake-1.2.1/lib/jssnprintf.c << 'END-of-smake-1.2.1/lib/jssnprintf.c'
X/* @(#)jssnprintf.c	1.12 09/07/10 Copyright 1985, 1995-2004 J. Schilling */
X/*
X *	Copyright (c) 1985, 1995-2004 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/unistd.h>	/* include <sys/types.h> try to get size_t */
X#include <schily/stdio.h>	/* Try again for size_t	*/
X#include <schily/stdlib.h>	/* Try again for size_t	*/
X#include <schily/varargs.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
XEXPORT	int js_snprintf __PR((char *, size_t maxcnt, const char *, ...));
X
Xtypedef struct {
X	char	*ptr;
X	int	count;
X} *BUF, _BUF;
X
X#ifdef	PROTOTYPES
Xstatic void _cput(char c, long l)
X#else
Xstatic void _cput(c, l)
X	char	c;
X	long	l;
X#endif
X{
X	register BUF	bp = (BUF)l;
X
X	if (--bp->count > 0) {
X		*bp->ptr++ = c;
X	} else {
X		/*
X		 * Make sure that there will never be a negative overflow.
X		 */
X		bp->count++;
X	}
X}
X
X/* VARARGS2 */
X#ifdef	PROTOTYPES
XEXPORT int
Xjs_snprintf(char *buf, size_t maxcnt, const char *form, ...)
X#else
XEXPORT int
Xjs_snprintf(buf, maxcnt, form, va_alist)
X	char	*buf;
X	unsigned maxcnt;
X	char	*form;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	cnt;
X	_BUF	bb;
X
X	bb.ptr = buf;
X	bb.count = maxcnt;
X
X#ifdef	PROTOTYPES
X	va_start(args, form);
X#else
X	va_start(args);
X#endif
X	cnt = format(_cput, (long)&bb, form,  args);
X	va_end(args);
X	if (maxcnt > 0)
X		*(bb.ptr) = '\0';
X	if (bb.count < 0)
X		return (-1);
X
X	return (cnt);
X}
END-of-smake-1.2.1/lib/jssnprintf.c
echo x - smake-1.2.1/lib/jssprintf.c
sed 's/^X//' >smake-1.2.1/lib/jssprintf.c << 'END-of-smake-1.2.1/lib/jssprintf.c'
X/* @(#)jssprintf.c	1.16 06/09/13 Copyright 1985, 1995-2003 J. Schilling */
X/*
X *	Copyright (c) 1985, 1995-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/varargs.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X/*
X * Do not include stdio.h, BSD systems define sprintf the wrong way!
X */
XEXPORT	int js_sprintf __PR((char *, const char *, ...));
X
X#ifdef	PROTOTYPES
Xstatic void _cput(char c, long ba)
X#else
Xstatic void _cput(c, ba)
X	char	c;
X	long	ba;
X#endif
X{
X	*(*(char **) ba)++ = c;
X}
X
X/* VARARGS2 */
X#ifdef	PROTOTYPES
XEXPORT int
Xjs_sprintf(char *buf, const char *form, ...)
X#else
XEXPORT int
Xjs_sprintf(buf, form, va_alist)
X	char	*buf;
X	char	*form;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	cnt;
X	char	*bp = buf;
X
X#ifdef	PROTOTYPES
X	va_start(args, form);
X#else
X	va_start(args);
X#endif
X	cnt = format(_cput, (long)&bp, form,  args);
X	va_end(args);
X	*bp = '\0';
X
X	return (cnt);
X}
END-of-smake-1.2.1/lib/jssprintf.c
echo x - smake-1.2.1/lib/movebytes.c
sed 's/^X//' >smake-1.2.1/lib/movebytes.c << 'END-of-smake-1.2.1/lib/movebytes.c'
X/* @(#)movebytes.c	1.18 09/10/17 Copyright 1985, 1989, 1995-2009 J. Schilling */
X/*
X *	move data
X *
X *	Copyright (c) 1985, 1989, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/align.h>
X#include <schily/types.h>
X#include <schily/schily.h>
X
X#define	DO8(a)	a; a; a; a; a; a; a; a;
X
X/*
X * movebytes(from, to, cnt) is the same as memmove(to, from, cnt)
X */
XEXPORT char *
Xmovebytes(fromv, tov, cnt)
X	const void	*fromv;
X	void		*tov;
X	ssize_t		cnt;
X{
X	register const char	*from	= fromv;
X	register char		*to	= tov;
X	register ssize_t	n;
X
X	/*
X	 * If we change cnt to be unsigned, check for == instead of <=
X	 */
X	if ((n = cnt) <= 0)
X		return (to);
X
X	if (from >= to) {
X		/*
X		 * source is on higher addresses than destination:
X		 *	move bytes forwards
X		 */
X		if (n >= (ssize_t)(8 * sizeof (long))) {
X			if (l2aligned(from, to)) {
X				register const long *froml = (const long *)from;
X				register long *tol = (long *)to;
X				register ssize_t rem = n % (8 * sizeof (long));
X
X				n /= (8 * sizeof (long));
X				do {
X					DO8 (*tol++ = *froml++);
X				} while (--n > 0);
X
X				from = (const char *)froml;
X				to = (char *)tol;
X				n = rem;
X			}
X
X			if (n >= 8) {
X				n -= 8;
X				do {
X					DO8 (*to++ = *from++);
X				} while ((n -= 8) >= 0);
X				n += 8;
X			}
X
X			if (n > 0) do {
X				*to++ = *from++;
X			} while (--n > 0);
X			return (to);
X		}
X		if (n > 0) do {
X			*to++ = *from++;
X		} while (--n > 0);
X		return (to);
X	} else {
X		char *ep;
X
X		/*
X		 * source is on lower addresses than destination:
X		 *	move bytes backwards
X		 */
X		to += n;
X		from += n;
X		ep = to;
X		if (n >= (ssize_t)(8 * sizeof (long))) {
X			if (l2aligned(from, to)) {
X				register const long *froml = (const long *)from;
X				register long *tol = (long *)to;
X				register ssize_t rem = n % (8 * sizeof (long));
X
X				n /= (8 * sizeof (long));
X				do {
X					DO8 (*--tol = *--froml);
X				} while (--n > 0);
X
X				from = (const char *)froml;
X				to = (char *)tol;
X				n = rem;
X			}
X			if (n >= 8) {
X				n -= 8;
X				do {
X					DO8 (*--to = *--from);
X				} while ((n -= 8) >= 0);
X				n += 8;
X			}
X			if (n > 0) do {
X				*--to = *--from;
X			} while (--n > 0);
X			return (ep);
X		}
X		if (n > 0) do {
X			*--to = *--from;
X		} while (--n > 0);
X		return (ep);
X	}
X}
END-of-smake-1.2.1/lib/movebytes.c
echo x - smake-1.2.1/lib/raisecond.c
sed 's/^X//' >smake-1.2.1/lib/raisecond.c << 'END-of-smake-1.2.1/lib/raisecond.c'
X/* @(#)raisecond.c	1.22 09/07/10 Copyright 1985, 1989, 1995-2004 J. Schilling */
X/*
X *	raise a condition (software signal)
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X/*
X *	Check for installed condition handlers.
X *	If a handler is found, the function is called with the appropriate args.
X *	If no handler is found or no handler signals success,
X *	the program will be aborted.
X *
X *	Copyright (c) 1985, 1989, 1995-2004 J. Schilling
X */
X#include <schily/mconfig.h>
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/sigblk.h>
X#include <schily/unistd.h>
X#include <schily/stdlib.h>
X#include <schily/string.h>
X#include <schily/avoffset.h>
X#include <schily/schily.h>
X
X#if	!defined(AV_OFFSET) || !defined(FP_INDIR)
X#	ifdef	HAVE_SCANSTACK
X#	undef	HAVE_SCANSTACK
X#	endif
X#endif
X
X/*
X * Macros to print to stderr without stdio, to avoid screwing up.
X */
X#ifndef	STDERR_FILENO
X#define	STDERR_FILENO	2
X#endif
X#define	eprints(a)	(void)write(STDERR_FILENO, (a), sizeof (a)-1)
X#define	eprintl(a)	(void)write(STDERR_FILENO, (a), strlen(a))
X
X#define	is_even(p)	((((long)(p)) & 1) == 0)
X#define	even(p)		(((long)(p)) & ~1L)
X#ifdef	__future__
X#define	even(p)		(((long)(p)) - 1) /* will this work with 64 bit ?? */
X#endif
X
X
XLOCAL	void raiseabort  __PR((const char *));
X
X#ifdef	HAVE_SCANSTACK
X#include <schily/stkframe.h>
X#define	next_frame(vp)	do {						    \
X				if (((struct frame *)(vp))->fr_savfp == 0) { \
X					vp = (void *)0;			    \
X					break;				    \
X				}					    \
X				if (((struct frame *)(vp))->fr_savpc == 0) { \
X					vp = (void *)0;			    \
X					break;				    \
X				}					    \
X				vp =					    \
X				    (void *)((struct frame *)(vp))->fr_savfp; \
X			} while (vp != NULL && is_even(vp));		    \
X			vp = (struct frame *)even(vp);
X#else
X#if	defined(IS_MACOS_X)
X/*
X * The MAC OS X linker does not grok "common" varaibles.
X * Make __roothandle a "data" variable.
X */
XEXPORT	SIGBLK	*__roothandle = 0;
X#else
XEXPORT	SIGBLK	*__roothandle;
X#endif
X
X#define	next_frame(vp)	vp = (((SIGBLK *)(vp))->sb_savfp);
X#endif
X
XLOCAL	BOOL framehandle __PR((SIGBLK *, const char *, const char *, long));
X
X/*
X *	Loop through the chain of procedure frames on the stack.
X *
X *	Frame pointers normally have even values.
X *	Frame pointers of procedures with an installed handler are marked odd.
X *	The even base value, in this case actually points to a SIGBLK which
X *	holds the saved "real" frame pointer.
X *	The SIGBLK mentioned above may me the start of a chain of SIGBLK's,
X *	containing different handlers.
X */
XEXPORT void
Xraisecond(signame, arg2)
X	const char	*signame;
X	long		arg2;
X{
X	register void	*vp = NULL;
X
X#ifdef	HAVE_SCANSTACK
X	/*
X	 * As the SCO OpenServer C-Compiler has a bug that may cause
X	 * the first function call to getfp() been done before the
X	 * new stack frame is created, we call getfp() twice.
X	 */
X	(void) getfp();
X	vp = getfp();
X	next_frame(vp);
X#else
X	vp = __roothandle;
X#endif
X
X	while (vp) {
X		if (framehandle((SIGBLK *)vp, signame, signame, arg2))
X			return;
X		else if (framehandle((SIGBLK *)vp, "any_other", signame, arg2))
X			return;
X#ifdef	HAVE_SCANSTACK
X		vp = (struct frame *)((SIGBLK *)vp)->sb_savfp;
X#endif
X		next_frame(vp);
X	}
X	/*
X	 * No matching handler that signals success found.
X	 * Print error message and abort.
X	 */
X	raiseabort(signame);
X	/* NOTREACHED */
X}
X
X/*
X *	Loop through the handler chain for a procedure frame.
X *
X *	If no handler with matching name is found, return FALSE,
X *	otherwise the first handler with matching name is called.
X *	The return value in the latter case depends on the called function.
X */
XLOCAL BOOL
Xframehandle(sp, handlename, signame, arg2)
X	register SIGBLK *sp;
X	const char	*handlename;
X	const char	*signame;
X	long		arg2;
X{
X	for (; sp; sp = sp->sb_signext) {
X		if (sp->sb_signame != NULL &&
X		    streql(sp->sb_signame, handlename)) {
X			if (sp->sb_sigfun == NULL) {	/* deactivated */
X				return (FALSE);
X			} else {
X				return (*sp->sb_sigfun)(signame,
X							sp->sb_sigarg, arg2);
X			}
X		}
X	}
X	return (FALSE);
X}
X
XLOCAL void
Xraiseabort(signame)
X	const	char	*signame;
X{
X	eprints("Condition not caught: "); eprintl(signame); eprints(".\n");
X	abort();
X	/* NOTREACHED */
X}
END-of-smake-1.2.1/lib/raisecond.c
echo x - smake-1.2.1/lib/rename.c
sed 's/^X//' >smake-1.2.1/lib/rename.c << 'END-of-smake-1.2.1/lib/rename.c'
X/* @(#)rename.c	1.10 09/07/08 Copyright 1998-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)rename.c	1.10 09/07/08 Copyright 1998-2009 J. Schilling";
X#endif
X/*
X *	rename() for old systems that don't have it.
X *
X *	Copyright (c) 1998-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	rename	__nothing__
X#include <schily/mconfig.h>
X
X#ifndef	HAVE_RENAME
X
X#include <schily/stdio.h>	/* XXX not OK but needed for js_xx() in schily/schily.h */
X#include <schily/unistd.h>
X#include <schily/string.h>
X#include <schily/stat.h>
X#include <schily/maxpath.h>
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/schily.h>
X#include <schily/errno.h>
X#undef	rename
X#include <schily/libport.h>
X
X#ifndef	MAXPATHNAME
X#define	MAXPATHNAME	1024
X#endif
X
X#if	MAXPATHNAME < 1024
X#undef	MAXPATHNAME
X#define	MAXPATHNAME	1024
X#endif
X
X#define	MAXNAME	MAXPATHNAME
X
X#define	FILEDESC struct stat
X
X#ifndef	HAVE_LSTAT
X#define	lstat	stat
X#endif
X
XEXPORT int
Xrename(old, new)
X	const char	*old;
X	const char	*new;
X{
X	char	nname[MAXNAME];
X	char	bakname[MAXNAME];
X	char	strpid[32];
X	int	strplen;
X	BOOL	savpresent = FALSE;
X	BOOL	newpresent = FALSE;
X	int	serrno;
X	FILEDESC ostat;
X	FILEDESC xstat;
X
X	serrno = geterrno();
X
X	if (lstat(old, &ostat) < 0)
X		return (-1);
X
X	if (lstat(new, &xstat) >= 0) {
X		newpresent = TRUE;
X		if (ostat.st_dev == xstat.st_dev &&
X		    ostat.st_ino == xstat.st_ino)
X			return (0);		/* old == new we are done */
X	}
X
X	strplen = js_snprintf(strpid, sizeof (strpid), ".%lld",
X							(Llong)getpid());
X
X	if (strlen(new) <= (MAXNAME-strplen) ||
X	    strchr(&new[MAXNAME-strplen], '/') == NULL) {
X		/*
X		 * Save old version of file 'new'.
X		 */
X		strncpy(nname, new, MAXNAME-strplen);
X		nname[MAXNAME-strplen] = '\0';
X		js_snprintf(bakname, sizeof (bakname), "%s%s", nname, strpid);
X		unlink(bakname);
X		if (link(new, bakname) >= 0)
X			savpresent = TRUE;
X	}
X
X	if (newpresent) {
X		if (rmdir(new) < 0) {
X			if (geterrno() == ENOTDIR) {
X				if (unlink(new) < 0)
X					return (-1);
X			} else {
X				return (-1);
X			}
X		}
X	}
X
X	/*
X	 * Now add 'new' name to 'old'.
X	 */
X	if (link(old, new) < 0) {
X		serrno = geterrno();
X		/*
X		 * Make sure not to loose old version of 'new'.
X		 */
X		if (savpresent) {
X			unlink(new);
X			link(bakname, new);
X			unlink(bakname);
X		}
X		seterrno(serrno);
X		return (-1);
X	}
X	if (unlink(old) < 0)
X		return (-1);
X	unlink(bakname);		/* Fails in most cases...	*/
X	seterrno(serrno);		/* ...so restore errno		*/
X	return (0);
X}
X#endif	/* HAVE_RENAME */
END-of-smake-1.2.1/lib/rename.c
echo x - smake-1.2.1/lib/saveargs.c
sed 's/^X//' >smake-1.2.1/lib/saveargs.c << 'END-of-smake-1.2.1/lib/saveargs.c'
X/* @(#)saveargs.c	1.13 06/10/05 Copyright 1995-2003 J. Schilling */
X/*
X *	save argc, argv for command error printing routines
X *
X *	Copyright (c) 1995-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/standard.h>
X#include <schily/string.h>
X#include <schily/stdlib.h>
X#include <schily/avoffset.h>
X#include <schily/schily.h>
X
X#if	!defined(AV_OFFSET) || !defined(FP_INDIR)
X#	ifdef	HAVE_SCANSTACK
X#	undef	HAVE_SCANSTACK
X#	endif
X#endif
X
Xstatic	int	ac_saved;
Xstatic	char	**av_saved;
Xstatic	char	*av0_saved;
Xstatic	char	*progname_saved;
X
Xstatic	char	av0_sp[32];	/* av0 space, avoid malloc() in most cases */
Xstatic	char	prn_sp[32];	/* name space, avoid malloc() in most cases */
Xstatic	char	dfl_str[] = "?";
X
XEXPORT void
Xsave_args(ac, av)
X	int	ac;
X	char	*av[];
X{
X	int	slen;
X
X	ac_saved = ac;
X	av_saved = av;
X
X	if (av0_saved && av0_saved != av0_sp)
X		free(av0_saved);
X
X	slen = strlen(av[0]) + 1;
X
X	if (slen <= (int)sizeof (av0_sp))
X		av0_saved = av0_sp;
X	else
X		av0_saved = malloc(slen);
X
X	if (av0_saved)
X		strcpy(av0_saved, av[0]);
X}
X
XEXPORT int
Xsaved_ac()
X{
X	return (ac_saved);
X}
X
XEXPORT char **
Xsaved_av()
X{
X	return (av_saved);
X}
X
XEXPORT char *
Xsaved_av0()
X{
X	return (av0_saved);
X}
X
XEXPORT void
Xset_progname(name)
X	const char	*name;
X{
X	int	slen;
X
X	if (progname_saved && progname_saved != prn_sp)
X		free(progname_saved);
X
X	slen = strlen(name) + 1;
X
X	if (slen <= sizeof (prn_sp))
X		progname_saved = prn_sp;
X	else
X		progname_saved = malloc(slen);
X
X	if (progname_saved)
X		strcpy(progname_saved, name);
X}
X
XEXPORT char *
Xget_progname()
X{
X#ifdef	HAVE_SCANSTACK
X	char	*progname;
X#endif
X
X	if (progname_saved)
X		return (progname_saved);
X	if (av0_saved)
X		return (av0_saved);
X#ifdef	HAVE_SCANSTACK
X	progname = getav0();		/* scan stack to get argv[0] */
X	if (progname)
X		return (progname);
X#endif
X	return (dfl_str);
X}
END-of-smake-1.2.1/lib/saveargs.c
echo x - smake-1.2.1/lib/seterrno.c
sed 's/^X//' >smake-1.2.1/lib/seterrno.c << 'END-of-smake-1.2.1/lib/seterrno.c'
X/* @(#)seterrno.c	1.11 09/07/26 Copyright 1985, 1995-2003 J. Schilling */
X/*
X *	Set error number
X *
X *	Copyright (c) 1985, 1995-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	_TS_ERRNO		/* Solaris: get thread safe errno value */
X#define	_LIBC_REENTRANT		/* Linux: get thread safe errno value */
X#include <schily/standard.h>
X#include <schily/errno.h>
X#include <schily/schily.h>
X
X#ifdef	seterrno
X#undef	seterrno
X#endif
X
XEXPORT int
Xseterrno(err)
X	int	err;
X{
X	int	old = errno;
X
X	errno = err;
X	return (old);
X}
END-of-smake-1.2.1/lib/seterrno.c
echo x - smake-1.2.1/lib/libschily.mk
sed 's/^X//' >smake-1.2.1/lib/libschily.mk << 'END-of-smake-1.2.1/lib/libschily.mk'
X#ident @(#)libschily.mk	1.5 07/07/01 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
XVPATH=		.:stdio:$(ARCHDIR)
XINSDIR=		lib
XTARGETLIB=	schily
XCPPOPTS +=	-Istdio
XCPPOPTS +=	-DUSE_SCANSTACK	# Try to scan stack frames
XCPPOPTS +=	-DPORT_ONLY	# Add missing funcs line snprintf for porting
Xinclude		Targets
XLIBS=		
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lib
X###########################################################################
END-of-smake-1.2.1/lib/libschily.mk
echo x - smake-1.2.1/lib/strcatl.c
sed 's/^X//' >smake-1.2.1/lib/strcatl.c << 'END-of-smake-1.2.1/lib/strcatl.c'
X/* @(#)strcatl.c	1.13 06/09/13 Copyright 1985, 1989, 1995-2003 J. Schilling */
X/*
X *	list version of strcat()
X *
X *	concatenates all past first parameter until a NULL pointer is reached
X *
X *	WARNING: a NULL constant is not a NULL pointer, so a caller must
X *		cast a NULL constant to a pointer: (char *)NULL
X *
X *	returns pointer past last character (to '\0' byte)
X *
X *	Copyright (c) 1985, 1989, 1995-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/varargs.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X/* VARARGS3 */
X#ifdef	PROTOTYPES
XEXPORT char *
Xstrcatl(char *to, ...)
X#else
XEXPORT char *
Xstrcatl(to, va_alist)
X	char *to;
X	va_dcl
X#endif
X{
X		va_list	args;
X	register char	*p;
X	register char	*tor = to;
X
X#ifdef	PROTOTYPES
X	va_start(args, to);
X#else
X	va_start(args);
X#endif
X	while ((p = va_arg(args, char *)) != NULL) {
X		while ((*tor = *p++) != '\0') {
X			tor++;
X		}
X	}
X	*tor = '\0';
X	va_end(args);
X	return (tor);
X}
END-of-smake-1.2.1/lib/strcatl.c
echo x - smake-1.2.1/lib/libschily_p.mk
sed 's/^X//' >smake-1.2.1/lib/libschily_p.mk << 'END-of-smake-1.2.1/lib/libschily_p.mk'
X#ident @(#)libschily_p.mk	1.7 08/01/11 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XSUBARCHDIR=	/profiled
XSUBINSDIR=	/profiled
X.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
XVPATH=		.:stdio:$(ARCHDIR)
XINSDIR=		lib
XTARGETLIB=	schily
XCPPOPTS +=	-Istdio
XCPPOPTS +=	-DUSE_SCANSTACK	# Try to scan stack frames
XCPPOPTS +=	-DPORT_ONLY	# Add missing funcs line snprintf for porting
XCOPTS +=	$(COPTGPROF)
Xinclude		Targets
XLIBS=		
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lib
X###########################################################################
END-of-smake-1.2.1/lib/libschily_p.mk
echo x - smake-1.2.1/lib/streql.c
sed 's/^X//' >smake-1.2.1/lib/streql.c << 'END-of-smake-1.2.1/lib/streql.c'
X/* @(#)streql.c	1.10 09/06/07 Copyright 1985, 1995-2009 J. Schilling */
X/*
X *	Check if two strings are equal
X *
X *	Copyright (c) 1985, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/schily.h>
X
XEXPORT int
Xstreql(a, b)
X	const char	*a;
X	const char	*b;
X{
X	register const char	*s1 = a;
X	register const char	*s2 = b;
X
X	if (s1 == NULL || s2 ==  NULL)
X		return (FALSE);
X
X	if (s1 == s2)
X		return (TRUE);
X
X	while (*s1 == *s2++)
X		if (*s1++ == '\0')
X			return (TRUE);
X
X	return (FALSE);
X}
END-of-smake-1.2.1/lib/streql.c
echo x - smake-1.2.1/lib/strtod.c
sed 's/^X//' >smake-1.2.1/lib/strtod.c << 'END-of-smake-1.2.1/lib/strtod.c'
X/* @(#)strtod.c	1.4 09/08/27 joerg */
X
X/*	$NetBSD: strtod.c,v 1.23 1996/10/13 00:07:55 christos Exp $	*/
X
X/****************************************************************
X *
X * The author of this software is David M. Gay.
X *
X * Copyright (c) 1991 by AT&T.
X *
X * Permission to use, copy, modify, and distribute this software for any
X * purpose without fee is hereby granted, provided that this entire notice
X * is included in all copies of any software which is or includes a copy
X * or modification of this software and in all copies of the supporting
X * documentation for such software.
X *
X * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
X * WARRANTY.  IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY
X * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
X * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
X *
X ***************************************************************/
X
X/* Please send bug reports to
X	David M. Gay
X	AT&T Bell Laboratories, Room 2C-463
X	600 Mountain Avenue
X	Murray Hill, NJ 07974-2070
X	U.S.A.
X	dmg@research.att.com or research!dmg
X */
X
X/* strtod for IEEE-, VAX-, and IBM-arithmetic machines.
X *
X * This strtod returns a nearest machine number to the input decimal
X * string (or sets errno to ERANGE).  With IEEE arithmetic, ties are
X * broken by the IEEE round-even rule.  Otherwise ties are broken by
X * biased rounding (add half and chop).
X *
X * Inspired loosely by William D. Clinger's paper "How to Read Floating
X * Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101].
X *
X * Modifications:
X *
X *	1. We only require IEEE, IBM, or VAX double-precision
X *		arithmetic (not IEEE double-extended).
X *	2. We get by with floating-point arithmetic in a case that
X *		Clinger missed -- when we're computing d * 10^n
X *		for a small integer d and the integer n is not too
X *		much larger than 22 (the maximum integer k for which
X *		we can represent 10^k exactly), we may be able to
X *		compute (d*10^k) * 10^(e-k) with just one roundoff.
X *	3. Rather than a bit-at-a-time adjustment of the binary
X *		result in the hard case, we use floating-point
X *		arithmetic to determine the adjustment to within
X *		one bit; only in really hard cases do we need to
X *		compute a second residual.
X *	4. Because of 3., we don't need a large table of powers of 10
X *		for ten-to-e (just some small tables, e.g. of 10^k
X *		for 0 <= k <= 22).
X */
X
X/*
X * #define IEEE_LITTLE_ENDIAN for IEEE-arithmetic machines where the least
X *	significant byte has the lowest address.
X * #define IEEE_BIG_ENDIAN for IEEE-arithmetic machines where the most
X *	significant byte has the lowest address.
X * #define Long int on machines with 32-bit ints and 64-bit longs.
X * #define Sudden_Underflow for IEEE-format machines without gradual
X *	underflow (i.e., that flush to zero on underflow).
X * #define IBM for IBM mainframe-style floating-point arithmetic.
X * #define VAX for VAX-style floating-point arithmetic.
X * #define Unsigned_Shifts if >> does treats its left operand as unsigned.
X * #define No_leftright to omit left-right logic in fast floating-point
X *	computation of dtoa.
X * #define Check_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3.
X * #define RND_PRODQUOT to use rnd_prod and rnd_quot (assembly routines
X *	that use extended-precision instructions to compute rounded
X *	products and quotients) with IBM.
X * #define ROUND_BIASED for IEEE-format with biased rounding.
X * #define Inaccurate_Divide for IEEE-format with correctly rounded
X *	products but inaccurate quotients, e.g., for Intel i860.
X * #define Just_16 to store 16 bits per 32-bit Long when doing high-precision
X *	integer arithmetic.  Whether this speeds things up or slows things
X *	down depends on the machine and the number being converted.
X * #define KR_headers for old-style C function headers.
X * #define Bad_float_h if your system lacks a float.h or if it does not
X *	define some or all of DBL_DIG, DBL_MAX_10_EXP, DBL_MAX_EXP,
X *	FLT_RADIX, FLT_ROUNDS, and DBL_MAX.
X * #define MALLOC your_malloc, where your_malloc(n) acts like malloc(n)
X *	if memory is available and otherwise does something you deem
X *	appropriate.  If MALLOC is undefined, malloc will be invoked
X *	directly -- and assumed always to succeed.
X */
X
X#if defined(LIBC_SCCS) && !defined(lint)
Xstatic char *rcsid = "$NetBSD: strtod.c,v 1.23 1996/10/13 00:07:55 christos Exp $";
X#endif /* LIBC_SCCS and not lint */
X
X#include <schily/mconfig.h>
X#include <schily/btorder.h>
X
X#ifdef	__OLD_NETBSD_DEFINES__
X
X#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
X    defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \
X    defined(__powerpc__)
X#include <sys/types.h>
X#if BYTE_ORDER == BIG_ENDIAN
X#define IEEE_BIG_ENDIAN
X#else
X#define IEEE_LITTLE_ENDIAN
X#endif
X#endif
X
X#else	/* __OLD_NETBSD_DEFINES__ */
X
X#if !defined(__arm32__) && !defined(vax) && !defined(IBM)
X
X/*#ifdef	_BIG_ENDIAN*/
X#ifdef	WORDS_BIGENDIAN
X#define IEEE_BIG_ENDIAN
X#else
X#define IEEE_LITTLE_ENDIAN
X#endif
X
X#endif	/* !defined(__arm32__) && !defined(vax) && !defined(IBM) */
X
X#endif	/* __OLD_NETBSD_DEFINES__ */
X
X#ifdef __arm32__
X/*
X * Although the CPU is little endian the FP has different
X * byte and word endianness. The byte order is still little endian
X * but the word order is big endian.
X */
X#define IEEE_BIG_ENDIAN
X#endif
X
X#ifdef vax
X#define VAX
X#endif
X
X#include <schily/utypes.h>
X#define Long	Int32_t
X#define ULong	UInt32_t
X
X#ifdef DEBUG
X#include <schily/stdio.h>
X#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
X#endif
X
X#ifdef __cplusplus
X#include "malloc.h"
X#include "memory.h"
X#else
X#ifndef KR_headers
X#include "stdlib.h"
X#include "string.h"
X#include "locale.h"
X#else
X#include "malloc.h"
X#include "memory.h"
X#endif
X#endif
X
X#ifdef MALLOC
X#ifdef KR_headers
Xextern char *MALLOC();
X#else
Xextern void *MALLOC(size_t);
X#endif
X#else
X#define MALLOC malloc
X#endif
X
X#include <schily/ctype.h>
X#include <schily/errno.h>
X
X#ifdef Bad_float_h
X#undef __STDC__
X#ifdef IEEE_BIG_ENDIAN
X#define IEEE_ARITHMETIC
X#endif
X#ifdef IEEE_LITTLE_ENDIAN
X#define IEEE_ARITHMETIC
X#endif
X
X#ifdef IEEE_ARITHMETIC
X#define DBL_DIG 15
X#define DBL_MAX_10_EXP 308
X#define DBL_MAX_EXP 1024
X#define FLT_RADIX 2
X#define FLT_ROUNDS 1
X#define DBL_MAX 1.7976931348623157e+308
X#endif
X
X#ifdef IBM
X#define DBL_DIG 16
X#define DBL_MAX_10_EXP 75
X#define DBL_MAX_EXP 63
X#define FLT_RADIX 16
X#define FLT_ROUNDS 0
X#define DBL_MAX 7.2370055773322621e+75
X#endif
X
X#ifdef VAX
X#define DBL_DIG 16
X#define DBL_MAX_10_EXP 38
X#define DBL_MAX_EXP 127
X#define FLT_RADIX 2
X#define FLT_ROUNDS 1
X#define DBL_MAX 1.7014118346046923e+38
X#endif
X
X#ifndef LONG_MAX
X#define LONG_MAX 2147483647
X#endif
X
X#else	/* Bad_float_h */
X#include <schily/float.h>
X#endif	/* Bad_float_h */
X/*#ifndef __MATH_H__*/
X#include <schily/math.h>
X/*#endif*/
X
X#ifdef __cplusplus
Xextern "C" {
X#endif
X
X#ifndef CONST
X#ifdef KR_headers
X#define CONST /* blank */
X#else
X#define CONST const
X#endif
X#endif
X
X#ifdef Unsigned_Shifts
X#define Sign_Extend(a,b) if (b < 0) a |= 0xffff0000;
X#else
X#define Sign_Extend(a,b) /*no-op*/
X#endif
X
X#if defined(IEEE_LITTLE_ENDIAN) + defined(IEEE_BIG_ENDIAN) + defined(VAX) + \
X    defined(IBM) != 1
XExactly one of IEEE_LITTLE_ENDIAN IEEE_BIG_ENDIAN, VAX, or
XIBM should be defined.
X#endif
X
X#ifdef IEEE_LITTLE_ENDIAN
X#define word0(x) ((ULong *)&x)[1]
X#define word1(x) ((ULong *)&x)[0]
X#else
X#define word0(x) ((ULong *)&x)[0]
X#define word1(x) ((ULong *)&x)[1]
X#endif
X
X/* The following definition of Storeinc is appropriate for MIPS processors.
X * An alternative that might be better on some machines is
X * #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
X */
X#if defined(IEEE_LITTLE_ENDIAN) + defined(VAX) + defined(__arm32__)
X#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \
X((unsigned short *)a)[0] = (unsigned short)c, a++)
X#else
X#define Storeinc(a,b,c) (((unsigned short *)a)[0] = (unsigned short)b, \
X((unsigned short *)a)[1] = (unsigned short)c, a++)
X#endif
X
X/* #define P DBL_MANT_DIG */
X/* Ten_pmax = floor(P*log(2)/log(5)) */
X/* Bletch = (highest power of 2 < DBL_MAX_10_EXP) / 16 */
X/* Quick_max = floor((P-1)*log(FLT_RADIX)/log(10) - 1) */
X/* Int_max = floor(P*log(FLT_RADIX)/log(10) - 1) */
X
X#if defined(IEEE_LITTLE_ENDIAN) + defined(IEEE_BIG_ENDIAN)
X#define Exp_shift  20
X#define Exp_shift1 20
X#define Exp_msk1    0x100000
X#define Exp_msk11   0x100000
X#define Exp_mask  0x7ff00000
X#define P 53
X#define Bias 1023
X#define IEEE_Arith
X#define Emin (-1022)
X#define Exp_1  0x3ff00000
X#define Exp_11 0x3ff00000
X#define Ebits 11
X#define Frac_mask  0xfffff
X#define Frac_mask1 0xfffff
X#define Ten_pmax 22
X#define Bletch 0x10
X#define Bndry_mask  0xfffff
X#define Bndry_mask1 0xfffff
X#define LSB 1
X#define Sign_bit 0x80000000
X#define Log2P 1
X#define Tiny0 0
X#define Tiny1 1
X#define Quick_max 14
X#define Int_max 14
X#define Infinite(x) (word0(x) == 0x7ff00000) /* sufficient test for here */
X#else
X#undef  Sudden_Underflow
X#define Sudden_Underflow
X#ifdef IBM
X#define Exp_shift  24
X#define Exp_shift1 24
X#define Exp_msk1   0x1000000
X#define Exp_msk11  0x1000000
X#define Exp_mask  0x7f000000
X#define P 14
X#define Bias 65
X#define Exp_1  0x41000000
X#define Exp_11 0x41000000
X#define Ebits 8	/* exponent has 7 bits, but 8 is the right value in b2d */
X#define Frac_mask  0xffffff
X#define Frac_mask1 0xffffff
X#define Bletch 4
X#define Ten_pmax 22
X#define Bndry_mask  0xefffff
X#define Bndry_mask1 0xffffff
X#define LSB 1
X#define Sign_bit 0x80000000
X#define Log2P 4
X#define Tiny0 0x100000
X#define Tiny1 0
X#define Quick_max 14
X#define Int_max 15
X#else /* VAX */
X#define Exp_shift  23
X#define Exp_shift1 7
X#define Exp_msk1    0x80
X#define Exp_msk11   0x800000
X#define Exp_mask  0x7f80
X#define P 56
X#define Bias 129
X#define Exp_1  0x40800000
X#define Exp_11 0x4080
X#define Ebits 8
X#define Frac_mask  0x7fffff
X#define Frac_mask1 0xffff007f
X#define Ten_pmax 24
X#define Bletch 2
X#define Bndry_mask  0xffff007f
X#define Bndry_mask1 0xffff007f
X#define LSB 0x10000
X#define Sign_bit 0x8000
X#define Log2P 1
X#define Tiny0 0x80
X#define Tiny1 0
X#define Quick_max 15
X#define Int_max 15
X#endif
X#endif
X
X#ifndef IEEE_Arith
X#define ROUND_BIASED
X#endif
X
X#ifdef RND_PRODQUOT
X#define rounded_product(a,b) a = rnd_prod(a, b)
X#define rounded_quotient(a,b) a = rnd_quot(a, b)
X#ifdef KR_headers
Xextern double rnd_prod(), rnd_quot();
X#else
Xextern double rnd_prod(double, double), rnd_quot(double, double);
X#endif
X#else
X#define rounded_product(a,b) a *= b
X#define rounded_quotient(a,b) a /= b
X#endif
X
X#define Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1))
X#define Big1 0xffffffff
X
X#ifndef Just_16
X/* When Pack_32 is not defined, we store 16 bits per 32-bit Long.
X * This makes some inner loops simpler and sometimes saves work
X * during multiplications, but it often seems to make things slightly
X * slower.  Hence the default is now to store 32 bits per Long.
X */
X#ifndef Pack_32
X#define Pack_32
X#endif
X#endif
X
X#define Kmax 15
X
X#ifdef __cplusplus
Xextern "C" double strtod(const char *s00, char **se);
Xextern "C" char *__dtoa(double d, int mode, int ndigits,
X			int *decpt, int *sign, char **rve);
X#endif
X
X struct
XBigint {
X	struct Bigint *next;
X	int k, maxwds, sign, wds;
X	ULong x[1];
X	};
X
X typedef struct Bigint Bigint;
X
X static Bigint *freelist[Kmax+1];
X
X static Bigint *
XBalloc
X#ifdef KR_headers
X	(k) int k;
X#else
X	(int k)
X#endif
X{
X	int x;
X	Bigint *rv;
X
X	if (rv = freelist[k]) {
X		freelist[k] = rv->next;
X		}
X	else {
X		x = 1 << k;
X		rv = (Bigint *)MALLOC(sizeof(Bigint) + (x-1)*sizeof(Long));
X		rv->k = k;
X		rv->maxwds = x;
X		}
X	rv->sign = rv->wds = 0;
X	return rv;
X	}
X
X static void
XBfree
X#ifdef KR_headers
X	(v) Bigint *v;
X#else
X	(Bigint *v)
X#endif
X{
X	if (v) {
X		v->next = freelist[v->k];
X		freelist[v->k] = v;
X		}
X	}
X
X#define Bcopy(x,y) memcpy((char *)&x->sign, (char *)&y->sign, \
Xy->wds*sizeof(Long) + 2*sizeof(int))
X
X static Bigint *
Xmultadd
X#ifdef KR_headers
X	(b, m, a) Bigint *b; int m, a;
X#else
X	(Bigint *b, int m, int a)	/* multiply by m and add a */
X#endif
X{
X	int i, wds;
X	ULong *x, y;
X#ifdef Pack_32
X	ULong xi, z;
X#endif
X	Bigint *b1;
X
X	wds = b->wds;
X	x = b->x;
X	i = 0;
X	do {
X#ifdef Pack_32
X		xi = *x;
X		y = (xi & 0xffff) * m + a;
X		z = (xi >> 16) * m + (y >> 16);
X		a = (int)(z >> 16);
X		*x++ = (z << 16) + (y & 0xffff);
X#else
X		y = *x * m + a;
X		a = (int)(y >> 16);
X		*x++ = y & 0xffff;
X#endif
X		}
X		while(++i < wds);
X	if (a) {
X		if (wds >= b->maxwds) {
X			b1 = Balloc(b->k+1);
X			Bcopy(b1, b);
X			Bfree(b);
X			b = b1;
X			}
X		b->x[wds++] = a;
X		b->wds = wds;
X		}
X	return b;
X	}
X
X static Bigint *
Xs2b
X#ifdef KR_headers
X	(s, nd0, nd, y9) CONST char *s; int nd0, nd; ULong y9;
X#else
X	(CONST char *s, int nd0, int nd, ULong y9)
X#endif
X{
X	Bigint *b;
X	int i, k;
X	Long x, y;
X
X	x = (nd + 8) / 9;
X	for(k = 0, y = 1; x > y; y <<= 1, k++) ;
X#ifdef Pack_32
X	b = Balloc(k);
X	b->x[0] = y9;
X	b->wds = 1;
X#else
X	b = Balloc(k+1);
X	b->x[0] = y9 & 0xffff;
X	b->wds = (b->x[1] = y9 >> 16) ? 2 : 1;
X#endif
X
X	i = 9;
X	if (9 < nd0) {
X		s += 9;
X		do b = multadd(b, 10, *s++ - '0');
X			while(++i < nd0);
X		s++;
X		}
X	else
X		s += 10;
X	for(; i < nd; i++)
X		b = multadd(b, 10, *s++ - '0');
X	return b;
X	}
X
X static int
Xhi0bits
X#ifdef KR_headers
X	(x) register ULong x;
X#else
X	(register ULong x)
X#endif
X{
X	register int k = 0;
X
X	if (!(x & 0xffff0000)) {
X		k = 16;
X		x <<= 16;
X		}
X	if (!(x & 0xff000000)) {
X		k += 8;
X		x <<= 8;
X		}
X	if (!(x & 0xf0000000)) {
X		k += 4;
X		x <<= 4;
X		}
X	if (!(x & 0xc0000000)) {
X		k += 2;
X		x <<= 2;
X		}
X	if (!(x & 0x80000000)) {
X		k++;
X		if (!(x & 0x40000000))
X			return 32;
X		}
X	return k;
X	}
X
X static int
Xlo0bits
X#ifdef KR_headers
X	(y) ULong *y;
X#else
X	(ULong *y)
X#endif
X{
X	register int k;
X	register ULong x = *y;
X
X	if (x & 7) {
X		if (x & 1)
X			return 0;
X		if (x & 2) {
X			*y = x >> 1;
X			return 1;
X			}
X		*y = x >> 2;
X		return 2;
X		}
X	k = 0;
X	if (!(x & 0xffff)) {
X		k = 16;
X		x >>= 16;
X		}
X	if (!(x & 0xff)) {
X		k += 8;
X		x >>= 8;
X		}
X	if (!(x & 0xf)) {
X		k += 4;
X		x >>= 4;
X		}
X	if (!(x & 0x3)) {
X		k += 2;
X		x >>= 2;
X		}
X	if (!(x & 1)) {
X		k++;
X		x >>= 1;
X		if (!x & 1)
X			return 32;
X		}
X	*y = x;
X	return k;
X	}
X
X static Bigint *
Xi2b
X#ifdef KR_headers
X	(i) int i;
X#else
X	(int i)
X#endif
X{
X	Bigint *b;
X
X	b = Balloc(1);
X	b->x[0] = i;
X	b->wds = 1;
X	return b;
X	}
X
X static Bigint *
Xmult
X#ifdef KR_headers
X	(a, b) Bigint *a, *b;
X#else
X	(Bigint *a, Bigint *b)
X#endif
X{
X	Bigint *c;
X	int k, wa, wb, wc;
X	ULong carry, y, z;
X	ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0;
X#ifdef Pack_32
X	ULong z2;
X#endif
X
X	if (a->wds < b->wds) {
X		c = a;
X		a = b;
X		b = c;
X		}
X	k = a->k;
X	wa = a->wds;
X	wb = b->wds;
X	wc = wa + wb;
X	if (wc > a->maxwds)
X		k++;
X	c = Balloc(k);
X	for(x = c->x, xa = x + wc; x < xa; x++)
X		*x = 0;
X	xa = a->x;
X	xae = xa + wa;
X	xb = b->x;
X	xbe = xb + wb;
X	xc0 = c->x;
X#ifdef Pack_32
X	for(; xb < xbe; xb++, xc0++) {
X		if (y = *xb & 0xffff) {
X			x = xa;
X			xc = xc0;
X			carry = 0;
X			do {
X				z = (*x & 0xffff) * y + (*xc & 0xffff) + carry;
X				carry = z >> 16;
X				z2 = (*x++ >> 16) * y + (*xc >> 16) + carry;
X				carry = z2 >> 16;
X				Storeinc(xc, z2, z);
X				}
X				while(x < xae);
X			*xc = carry;
X			}
X		if (y = *xb >> 16) {
X			x = xa;
X			xc = xc0;
X			carry = 0;
X			z2 = *xc;
X			do {
X				z = (*x & 0xffff) * y + (*xc >> 16) + carry;
X				carry = z >> 16;
X				Storeinc(xc, z, z2);
X				z2 = (*x++ >> 16) * y + (*xc & 0xffff) + carry;
X				carry = z2 >> 16;
X				}
X				while(x < xae);
X			*xc = z2;
X			}
X		}
X#else
X	for(; xb < xbe; xc0++) {
X		if (y = *xb++) {
X			x = xa;
X			xc = xc0;
X			carry = 0;
X			do {
X				z = *x++ * y + *xc + carry;
X				carry = z >> 16;
X				*xc++ = z & 0xffff;
X				}
X				while(x < xae);
X			*xc = carry;
X			}
X		}
X#endif
X	for(xc0 = c->x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) ;
X	c->wds = wc;
X	return c;
X	}
X
X static Bigint *p5s;
X
X static Bigint *
Xpow5mult
X#ifdef KR_headers
X	(b, k) Bigint *b; int k;
X#else
X	(Bigint *b, int k)
X#endif
X{
X	Bigint *b1, *p5, *p51;
X	int i;
X	static int p05[3] = { 5, 25, 125 };
X
X	if (i = k & 3)
X		b = multadd(b, p05[i-1], 0);
X
X	if (!(k >>= 2))
X		return b;
X	if (!(p5 = p5s)) {
X		/* first time */
X		p5 = p5s = i2b(625);
X		p5->next = 0;
X		}
X	for(;;) {
X		if (k & 1) {
X			b1 = mult(b, p5);
X			Bfree(b);
X			b = b1;
X			}
X		if (!(k >>= 1))
X			break;
X		if (!(p51 = p5->next)) {
X			p51 = p5->next = mult(p5,p5);
X			p51->next = 0;
X			}
X		p5 = p51;
X		}
X	return b;
X	}
X
X static Bigint *
Xlshift
X#ifdef KR_headers
X	(b, k) Bigint *b; int k;
X#else
X	(Bigint *b, int k)
X#endif
X{
X	int i, k1, n, n1;
X	Bigint *b1;
X	ULong *x, *x1, *xe, z;
X
X#ifdef Pack_32
X	n = k >> 5;
X#else
X	n = k >> 4;
X#endif
X	k1 = b->k;
X	n1 = n + b->wds + 1;
X	for(i = b->maxwds; n1 > i; i <<= 1)
X		k1++;
X	b1 = Balloc(k1);
X	x1 = b1->x;
X	for(i = 0; i < n; i++)
X		*x1++ = 0;
X	x = b->x;
X	xe = x + b->wds;
X#ifdef Pack_32
X	if (k &= 0x1f) {
X		k1 = 32 - k;
X		z = 0;
X		do {
X			*x1++ = *x << k | z;
X			z = *x++ >> k1;
X			}
X			while(x < xe);
X		if (*x1 = z)
X			++n1;
X		}
X#else
X	if (k &= 0xf) {
X		k1 = 16 - k;
X		z = 0;
X		do {
X			*x1++ = *x << k  & 0xffff | z;
X			z = *x++ >> k1;
X			}
X			while(x < xe);
X		if (*x1 = z)
X			++n1;
X		}
X#endif
X	else do
X		*x1++ = *x++;
X		while(x < xe);
X	b1->wds = n1 - 1;
X	Bfree(b);
X	return b1;
X	}
X
X static int
Xcmp
X#ifdef KR_headers
X	(a, b) Bigint *a, *b;
X#else
X	(Bigint *a, Bigint *b)
X#endif
X{
X	ULong *xa, *xa0, *xb, *xb0;
X	int i, j;
X
X	i = a->wds;
X	j = b->wds;
X#ifdef DEBUG
X	if (i > 1 && !a->x[i-1])
X		Bug("cmp called with a->x[a->wds-1] == 0");
X	if (j > 1 && !b->x[j-1])
X		Bug("cmp called with b->x[b->wds-1] == 0");
X#endif
X	if (i -= j)
X		return i;
X	xa0 = a->x;
X	xa = xa0 + j;
X	xb0 = b->x;
X	xb = xb0 + j;
X	for(;;) {
X		if (*--xa != *--xb)
X			return *xa < *xb ? -1 : 1;
X		if (xa <= xa0)
X			break;
X		}
X	return 0;
X	}
X
X static Bigint *
Xdiff
X#ifdef KR_headers
X	(a, b) Bigint *a, *b;
X#else
X	(Bigint *a, Bigint *b)
X#endif
X{
X	Bigint *c;
X	int i, wa, wb;
X	Long borrow, y;	/* We need signed shifts here. */
X	ULong *xa, *xae, *xb, *xbe, *xc;
X#ifdef Pack_32
X	Long z;
X#endif
X
X	i = cmp(a,b);
X	if (!i) {
X		c = Balloc(0);
X		c->wds = 1;
X		c->x[0] = 0;
X		return c;
X		}
X	if (i < 0) {
X		c = a;
X		a = b;
X		b = c;
X		i = 1;
X		}
X	else
X		i = 0;
X	c = Balloc(a->k);
X	c->sign = i;
X	wa = a->wds;
X	xa = a->x;
X	xae = xa + wa;
X	wb = b->wds;
X	xb = b->x;
X	xbe = xb + wb;
X	xc = c->x;
X	borrow = 0;
X#ifdef Pack_32
X	do {
X		y = (*xa & 0xffff) - (*xb & 0xffff) + borrow;
X		borrow = y >> 16;
X		Sign_Extend(borrow, y);
X		z = (*xa++ >> 16) - (*xb++ >> 16) + borrow;
X		borrow = z >> 16;
X		Sign_Extend(borrow, z);
X		Storeinc(xc, z, y);
X		}
X		while(xb < xbe);
X	while(xa < xae) {
X		y = (*xa & 0xffff) + borrow;
X		borrow = y >> 16;
X		Sign_Extend(borrow, y);
X		z = (*xa++ >> 16) + borrow;
X		borrow = z >> 16;
X		Sign_Extend(borrow, z);
X		Storeinc(xc, z, y);
X		}
X#else
X	do {
X		y = *xa++ - *xb++ + borrow;
X		borrow = y >> 16;
X		Sign_Extend(borrow, y);
X		*xc++ = y & 0xffff;
X		}
X		while(xb < xbe);
X	while(xa < xae) {
X		y = *xa++ + borrow;
X		borrow = y >> 16;
X		Sign_Extend(borrow, y);
X		*xc++ = y & 0xffff;
X		}
X#endif
X	while(!*--xc)
X		wa--;
X	c->wds = wa;
X	return c;
X	}
X
X static double
Xulp
X#ifdef KR_headers
X	(x) double x;
X#else
X	(double x)
X#endif
X{
X	register Long L;
X	double a;
X
X	L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1;
X#ifndef Sudden_Underflow
X	if (L > 0) {
X#endif
X#ifdef IBM
X		L |= Exp_msk1 >> 4;
X#endif
X		word0(a) = L;
X		word1(a) = 0;
X#ifndef Sudden_Underflow
X		}
X	else {
X		L = -L >> Exp_shift;
X		if (L < Exp_shift) {
X			word0(a) = 0x80000 >> L;
X			word1(a) = 0;
X			}
X		else {
X			word0(a) = 0;
X			L -= Exp_shift;
X			word1(a) = L >= 31 ? 1 : 1 << 31 - L;
X			}
X		}
X#endif
X	return a;
X	}
X
X static double
Xb2d
X#ifdef KR_headers
X	(a, e) Bigint *a; int *e;
X#else
X	(Bigint *a, int *e)
X#endif
X{
X	ULong *xa, *xa0, w, y, z;
X	int k;
X	double d;
X#ifdef VAX
X	ULong d0, d1;
X#else
X#define d0 word0(d)
X#define d1 word1(d)
X#endif
X
X	xa0 = a->x;
X	xa = xa0 + a->wds;
X	y = *--xa;
X#ifdef DEBUG
X	if (!y) Bug("zero y in b2d");
X#endif
X	k = hi0bits(y);
X	*e = 32 - k;
X#ifdef Pack_32
X	if (k < Ebits) {
X		d0 = Exp_1 | y >> Ebits - k;
X		w = xa > xa0 ? *--xa : 0;
X		d1 = y << (32-Ebits) + k | w >> Ebits - k;
X		goto ret_d;
X		}
X	z = xa > xa0 ? *--xa : 0;
X	if (k -= Ebits) {
X		d0 = Exp_1 | y << k | z >> 32 - k;
X		y = xa > xa0 ? *--xa : 0;
X		d1 = z << k | y >> 32 - k;
X		}
X	else {
X		d0 = Exp_1 | y;
X		d1 = z;
X		}
X#else
X	if (k < Ebits + 16) {
X		z = xa > xa0 ? *--xa : 0;
X		d0 = Exp_1 | y << k - Ebits | z >> Ebits + 16 - k;
X		w = xa > xa0 ? *--xa : 0;
X		y = xa > xa0 ? *--xa : 0;
X		d1 = z << k + 16 - Ebits | w << k - Ebits | y >> 16 + Ebits - k;
X		goto ret_d;
X		}
X	z = xa > xa0 ? *--xa : 0;
X	w = xa > xa0 ? *--xa : 0;
X	k -= Ebits + 16;
X	d0 = Exp_1 | y << k + 16 | z << k | w >> 16 - k;
X	y = xa > xa0 ? *--xa : 0;
X	d1 = w << k + 16 | y << k;
X#endif
X ret_d:
X#ifdef VAX
X	word0(d) = d0 >> 16 | d0 << 16;
X	word1(d) = d1 >> 16 | d1 << 16;
X#else
X#undef d0
X#undef d1
X#endif
X	return d;
X	}
X
X static Bigint *
Xd2b
X#ifdef KR_headers
X	(d, e, bits) double d; int *e, *bits;
X#else
X	(double d, int *e, int *bits)
X#endif
X{
X	Bigint *b;
X	int de, i, k;
X	ULong *x, y, z;
X#ifdef VAX
X	ULong d0, d1;
X	d0 = word0(d) >> 16 | word0(d) << 16;
X	d1 = word1(d) >> 16 | word1(d) << 16;
X#else
X#define d0 word0(d)
X#define d1 word1(d)
X#endif
X
X#ifdef Pack_32
X	b = Balloc(1);
X#else
X	b = Balloc(2);
X#endif
X	x = b->x;
X
X	z = d0 & Frac_mask;
X	d0 &= 0x7fffffff;	/* clear sign bit, which we ignore */
X#ifdef Sudden_Underflow
X	de = (int)(d0 >> Exp_shift);
X#ifndef IBM
X	z |= Exp_msk11;
X#endif
X#else
X	if (de = (int)(d0 >> Exp_shift))
X		z |= Exp_msk1;
X#endif
X#ifdef Pack_32
X	if (y = d1) {
X		if (k = lo0bits(&y)) {
X			x[0] = y | z << 32 - k;
X			z >>= k;
X			}
X		else
X			x[0] = y;
X		i = b->wds = (x[1] = z) ? 2 : 1;
X		}
X	else {
X#ifdef DEBUG
X		if (!z)
X			Bug("Zero passed to d2b");
X#endif
X		k = lo0bits(&z);
X		x[0] = z;
X		i = b->wds = 1;
X		k += 32;
X		}
X#else
X	if (y = d1) {
X		if (k = lo0bits(&y))
X			if (k >= 16) {
X				x[0] = y | z << 32 - k & 0xffff;
X				x[1] = z >> k - 16 & 0xffff;
X				x[2] = z >> k;
X				i = 2;
X				}
X			else {
X				x[0] = y & 0xffff;
X				x[1] = y >> 16 | z << 16 - k & 0xffff;
X				x[2] = z >> k & 0xffff;
X				x[3] = z >> k+16;
X				i = 3;
X				}
X		else {
X			x[0] = y & 0xffff;
X			x[1] = y >> 16;
X			x[2] = z & 0xffff;
X			x[3] = z >> 16;
X			i = 3;
X			}
X		}
X	else {
X#ifdef DEBUG
X		if (!z)
X			Bug("Zero passed to d2b");
X#endif
X		k = lo0bits(&z);
X		if (k >= 16) {
X			x[0] = z;
X			i = 0;
X			}
X		else {
X			x[0] = z & 0xffff;
X			x[1] = z >> 16;
X			i = 1;
X			}
X		k += 32;
X		}
X	while(!x[i])
X		--i;
X	b->wds = i + 1;
X#endif
X#ifndef Sudden_Underflow
X	if (de) {
X#endif
X#ifdef IBM
X		*e = (de - Bias - (P-1) << 2) + k;
X		*bits = 4*P + 8 - k - hi0bits(word0(d) & Frac_mask);
X#else
X		*e = de - Bias - (P-1) + k;
X		*bits = P - k;
X#endif
X#ifndef Sudden_Underflow
X		}
X	else {
X		*e = de - Bias - (P-1) + 1 + k;
X#ifdef Pack_32
X		*bits = 32*i - hi0bits(x[i-1]);
X#else
X		*bits = (i+2)*16 - hi0bits(x[i]);
X#endif
X		}
X#endif
X	return b;
X	}
X#undef d0
X#undef d1
X
X static double
Xratio
X#ifdef KR_headers
X	(a, b) Bigint *a, *b;
X#else
X	(Bigint *a, Bigint *b)
X#endif
X{
X	double da, db;
X	int k, ka, kb;
X
X	da = b2d(a, &ka);
X	db = b2d(b, &kb);
X#ifdef Pack_32
X	k = ka - kb + 32*(a->wds - b->wds);
X#else
X	k = ka - kb + 16*(a->wds - b->wds);
X#endif
X#ifdef IBM
X	if (k > 0) {
X		word0(da) += (k >> 2)*Exp_msk1;
X		if (k &= 3)
X			da *= 1 << k;
X		}
X	else {
X		k = -k;
X		word0(db) += (k >> 2)*Exp_msk1;
X		if (k &= 3)
X			db *= 1 << k;
X		}
X#else
X	if (k > 0)
X		word0(da) += k*Exp_msk1;
X	else {
X		k = -k;
X		word0(db) += k*Exp_msk1;
X		}
X#endif
X	return da / db;
X	}
X
Xstatic CONST double
Xtens[] = {
X		1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
X		1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
X		1e20, 1e21, 1e22
X#ifdef VAX
X		, 1e23, 1e24
X#endif
X		};
X
X#ifdef IEEE_Arith
Xstatic CONST double bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 };
Xstatic CONST double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128, 1e-256 };
X#define n_bigtens 5
X#else
X#ifdef IBM
Xstatic CONST double bigtens[] = { 1e16, 1e32, 1e64 };
Xstatic CONST double tinytens[] = { 1e-16, 1e-32, 1e-64 };
X#define n_bigtens 3
X#else
Xstatic CONST double bigtens[] = { 1e16, 1e32 };
Xstatic CONST double tinytens[] = { 1e-16, 1e-32 };
X#define n_bigtens 2
X#endif
X#endif
X
X double
Xstrtod
X#ifdef KR_headers
X	(s00, se) CONST char *s00; char **se;
X#else
X	(CONST char *s00, char **se)
X#endif
X{
X	int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
X		 e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
X	CONST char *s, *s0, *s1;
X	double aadj, aadj1, adj, rv, rv0;
X	Long L;
X	ULong y, z;
X	Bigint *bb, *bb1, *bd, *bd0, *bs, *delta;
X
X#ifndef KR_headers
X	CONST char decimal_point = localeconv()->decimal_point[0];
X#else
X	CONST char decimal_point = '.';
X#endif
X
X	sign = nz0 = nz = 0;
X	rv = 0.;
X
X
X	for(s = s00; isspace((unsigned char) *s); s++)
X		;
X
X	if (*s == '-') {
X		sign = 1;
X		s++;
X	} else if (*s == '+') {
X		s++;
X	}
X
X	if (*s == '\0') {
X		s = s00;
X		goto ret;
X	}
X
X	if (*s == '0') {
X		nz0 = 1;
X		while(*++s == '0') ;
X		if (!*s)
X			goto ret;
X		}
X	s0 = s;
X	y = z = 0;
X	for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++)
X		if (nd < 9)
X			y = 10*y + c - '0';
X		else if (nd < 16)
X			z = 10*z + c - '0';
X	nd0 = nd;
X	if (c == decimal_point) {
X		c = *++s;
X		if (!nd) {
X			for(; c == '0'; c = *++s)
X				nz++;
X			if (c > '0' && c <= '9') {
X				s0 = s;
X				nf += nz;
X				nz = 0;
X				goto have_dig;
X				}
X			goto dig_done;
X			}
X		for(; c >= '0' && c <= '9'; c = *++s) {
X have_dig:
X			nz++;
X			if (c -= '0') {
X				nf += nz;
X				for(i = 1; i < nz; i++)
X					if (nd++ < 9)
X						y *= 10;
X					else if (nd <= DBL_DIG + 1)
X						z *= 10;
X				if (nd++ < 9)
X					y = 10*y + c;
X				else if (nd <= DBL_DIG + 1)
X					z = 10*z + c;
X				nz = 0;
X				}
X			}
X		}
X dig_done:
X	e = 0;
X	if (c == 'e' || c == 'E') {
X		if (!nd && !nz && !nz0) {
X			s = s00;
X			goto ret;
X			}
X		s00 = s;
X		esign = 0;
X		switch(c = *++s) {
X			case '-':
X				esign = 1;
X			case '+':
X				c = *++s;
X			}
X		if (c >= '0' && c <= '9') {
X			while(c == '0')
X				c = *++s;
X			if (c > '0' && c <= '9') {
X				L = c - '0';
X				s1 = s;
X				while((c = *++s) >= '0' && c <= '9')
X					L = 10*L + c - '0';
X				if (s - s1 > 8 || L > 19999)
X					/* Avoid confusion from exponents
X					 * so large that e might overflow.
X					 */
X					e = 19999; /* safe for 16 bit ints */
X				else
X					e = (int)L;
X				if (esign)
X					e = -e;
X				}
X			else
X				e = 0;
X			}
X		else
X			s = s00;
X		}
X	if (!nd) {
X		if (!nz && !nz0)
X			s = s00;
X		goto ret;
X		}
X	e1 = e -= nf;
X
X	/* Now we have nd0 digits, starting at s0, followed by a
X	 * decimal point, followed by nd-nd0 digits.  The number we're
X	 * after is the integer represented by those digits times
X	 * 10**e */
X
X	if (!nd0)
X		nd0 = nd;
X	k = nd < DBL_DIG + 1 ? nd : DBL_DIG + 1;
X	rv = y;
X	if (k > 9)
X		rv = tens[k - 9] * rv + z;
X	bd0 = 0;
X	if (nd <= DBL_DIG
X#ifndef RND_PRODQUOT
X		&& FLT_ROUNDS == 1
X#endif
X			) {
X		if (!e)
X			goto ret;
X		if (e > 0) {
X			if (e <= Ten_pmax) {
X#ifdef VAX
X				goto vax_ovfl_check;
X#else
X				/* rv = */ rounded_product(rv, tens[e]);
X				goto ret;
X#endif
X				}
X			i = DBL_DIG - nd;
X			if (e <= Ten_pmax + i) {
X				/* A fancier test would sometimes let us do
X				 * this for larger i values.
X				 */
X				e -= i;
X				rv *= tens[i];
X#ifdef VAX
X				/* VAX exponent range is so narrow we must
X				 * worry about overflow here...
X				 */
X vax_ovfl_check:
X				word0(rv) -= P*Exp_msk1;
X				/* rv = */ rounded_product(rv, tens[e]);
X				if ((word0(rv) & Exp_mask)
X				 > Exp_msk1*(DBL_MAX_EXP+Bias-1-P))
X					goto ovfl;
X				word0(rv) += P*Exp_msk1;
X#else
X				/* rv = */ rounded_product(rv, tens[e]);
X#endif
X				goto ret;
X				}
X			}
X#ifndef Inaccurate_Divide
X		else if (e >= -Ten_pmax) {
X			/* rv = */ rounded_quotient(rv, tens[-e]);
X			goto ret;
X			}
X#endif
X		}
X	e1 += nd - k;
X
X	/* Get starting approximation = rv * 10**e1 */
X
X	if (e1 > 0) {
X		if (i = e1 & 15)
X			rv *= tens[i];
X		if (e1 &= ~15) {
X			if (e1 > DBL_MAX_10_EXP) {
X ovfl:
X				errno = ERANGE;
X#ifdef __STDC__
X				rv = HUGE_VAL;
X#else
X				/* Can't trust HUGE_VAL */
X#ifdef IEEE_Arith
X				word0(rv) = Exp_mask;
X				word1(rv) = 0;
X#else
X				word0(rv) = Big0;
X				word1(rv) = Big1;
X#endif
X#endif
X				if (bd0)
X					goto retfree;
X				goto ret;
X				}
X			if (e1 >>= 4) {
X				for(j = 0; e1 > 1; j++, e1 >>= 1)
X					if (e1 & 1)
X						rv *= bigtens[j];
X			/* The last multiplication could overflow. */
X				word0(rv) -= P*Exp_msk1;
X				rv *= bigtens[j];
X				if ((z = word0(rv) & Exp_mask)
X				 > Exp_msk1*(DBL_MAX_EXP+Bias-P))
X					goto ovfl;
X				if (z > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) {
X					/* set to largest number */
X					/* (Can't trust DBL_MAX) */
X					word0(rv) = Big0;
X					word1(rv) = Big1;
X					}
X				else
X					word0(rv) += P*Exp_msk1;
X				}
X
X			}
X		}
X	else if (e1 < 0) {
X		e1 = -e1;
X		if (i = e1 & 15)
X			rv /= tens[i];
X		if (e1 &= ~15) {
X			e1 >>= 4;
X			if (e1 >= 1 << n_bigtens)
X				goto undfl;
X			for(j = 0; e1 > 1; j++, e1 >>= 1)
X				if (e1 & 1)
X					rv *= tinytens[j];
X			/* The last multiplication could underflow. */
X			rv0 = rv;
X			rv *= tinytens[j];
X			if (!rv) {
X				rv = 2.*rv0;
X				rv *= tinytens[j];
X				if (!rv) {
X undfl:
X					rv = 0.;
X					errno = ERANGE;
X					if (bd0)
X						goto retfree;
X					goto ret;
X					}
X				word0(rv) = Tiny0;
X				word1(rv) = Tiny1;
X				/* The refinement below will clean
X				 * this approximation up.
X				 */
X				}
X			}
X		}
X
X	/* Now the hard part -- adjusting rv to the correct value.*/
X
X	/* Put digits into bd: true value = bd * 10^e */
X
X	bd0 = s2b(s0, nd0, nd, y);
X
X	for(;;) {
X		bd = Balloc(bd0->k);
X		Bcopy(bd, bd0);
X		bb = d2b(rv, &bbe, &bbbits);	/* rv = bb * 2^bbe */
X		bs = i2b(1);
X
X		if (e >= 0) {
X			bb2 = bb5 = 0;
X			bd2 = bd5 = e;
X			}
X		else {
X			bb2 = bb5 = -e;
X			bd2 = bd5 = 0;
X			}
X		if (bbe >= 0)
X			bb2 += bbe;
X		else
X			bd2 -= bbe;
X		bs2 = bb2;
X#ifdef Sudden_Underflow
X#ifdef IBM
X		j = 1 + 4*P - 3 - bbbits + ((bbe + bbbits - 1) & 3);
X#else
X		j = P + 1 - bbbits;
X#endif
X#else
X		i = bbe + bbbits - 1;	/* logb(rv) */
X		if (i < Emin)	/* denormal */
X			j = bbe + (P-Emin);
X		else
X			j = P + 1 - bbbits;
X#endif
X		bb2 += j;
X		bd2 += j;
X		i = bb2 < bd2 ? bb2 : bd2;
X		if (i > bs2)
X			i = bs2;
X		if (i > 0) {
X			bb2 -= i;
X			bd2 -= i;
X			bs2 -= i;
X			}
X		if (bb5 > 0) {
X			bs = pow5mult(bs, bb5);
X			bb1 = mult(bs, bb);
X			Bfree(bb);
X			bb = bb1;
X			}
X		if (bb2 > 0)
X			bb = lshift(bb, bb2);
X		if (bd5 > 0)
X			bd = pow5mult(bd, bd5);
X		if (bd2 > 0)
X			bd = lshift(bd, bd2);
X		if (bs2 > 0)
X			bs = lshift(bs, bs2);
X		delta = diff(bb, bd);
X		dsign = delta->sign;
X		delta->sign = 0;
X		i = cmp(delta, bs);
X		if (i < 0) {
X			/* Error is less than half an ulp -- check for
X			 * special case of mantissa a power of two.
X			 */
X			if (dsign || word1(rv) || word0(rv) & Bndry_mask)
X				break;
X			delta = lshift(delta,Log2P);
X			if (cmp(delta, bs) > 0)
X				goto drop_down;
X			break;
X			}
X		if (i == 0) {
X			/* exactly half-way between */
X			if (dsign) {
X				if ((word0(rv) & Bndry_mask1) == Bndry_mask1
X				 &&  word1(rv) == 0xffffffff) {
X					/*boundary case -- increment exponent*/
X					word0(rv) = (word0(rv) & Exp_mask)
X						+ Exp_msk1
X#ifdef IBM
X						| Exp_msk1 >> 4
X#endif
X						;
X					word1(rv) = 0;
X					break;
X					}
X				}
X			else if (!(word0(rv) & Bndry_mask) && !word1(rv)) {
X drop_down:
X				/* boundary case -- decrement exponent */
X#ifdef Sudden_Underflow
X				L = word0(rv) & Exp_mask;
X#ifdef IBM
X				if (L <  Exp_msk1)
X#else
X				if (L <= Exp_msk1)
X#endif
X					goto undfl;
X				L -= Exp_msk1;
X#else
X				L = (word0(rv) & Exp_mask) - Exp_msk1;
X#endif
X				word0(rv) = L | Bndry_mask1;
X				word1(rv) = 0xffffffff;
X#ifdef IBM
X				goto cont;
X#else
X				break;
X#endif
X				}
X#ifndef ROUND_BIASED
X			if (!(word1(rv) & LSB))
X				break;
X#endif
X			if (dsign)
X				rv += ulp(rv);
X#ifndef ROUND_BIASED
X			else {
X				rv -= ulp(rv);
X#ifndef Sudden_Underflow
X				if (!rv)
X					goto undfl;
X#endif
X				}
X#endif
X			break;
X			}
X		if ((aadj = ratio(delta, bs)) <= 2.) {
X			if (dsign)
X				aadj = aadj1 = 1.;
X			else if (word1(rv) || word0(rv) & Bndry_mask) {
X#ifndef Sudden_Underflow
X				if (word1(rv) == Tiny1 && !word0(rv))
X					goto undfl;
X#endif
X				aadj = 1.;
X				aadj1 = -1.;
X				}
X			else {
X				/* special case -- power of FLT_RADIX to be */
X				/* rounded down... */
X
X				if (aadj < 2./FLT_RADIX)
X					aadj = 1./FLT_RADIX;
X				else
X					aadj *= 0.5;
X				aadj1 = -aadj;
X				}
X			}
X		else {
X			aadj *= 0.5;
X			aadj1 = dsign ? aadj : -aadj;
X#ifdef Check_FLT_ROUNDS
X			switch(FLT_ROUNDS) {
X				case 2: /* towards +infinity */
X					aadj1 -= 0.5;
X					break;
X				case 0: /* towards 0 */
X				case 3: /* towards -infinity */
X					aadj1 += 0.5;
X				}
X#else
X			if (FLT_ROUNDS == 0)
X				aadj1 += 0.5;
X#endif
X			}
X		y = word0(rv) & Exp_mask;
X
X		/* Check for overflow */
X
X		if (y == Exp_msk1*(DBL_MAX_EXP+Bias-1)) {
X			rv0 = rv;
X			word0(rv) -= P*Exp_msk1;
X			adj = aadj1 * ulp(rv);
X			rv += adj;
X			if ((word0(rv) & Exp_mask) >=
X					Exp_msk1*(DBL_MAX_EXP+Bias-P)) {
X				if (word0(rv0) == Big0 && word1(rv0) == Big1)
X					goto ovfl;
X				word0(rv) = Big0;
X				word1(rv) = Big1;
X				goto cont;
X				}
X			else
X				word0(rv) += P*Exp_msk1;
X			}
X		else {
X#ifdef Sudden_Underflow
X			if ((word0(rv) & Exp_mask) <= P*Exp_msk1) {
X				rv0 = rv;
X				word0(rv) += P*Exp_msk1;
X				adj = aadj1 * ulp(rv);
X				rv += adj;
X#ifdef IBM
X				if ((word0(rv) & Exp_mask) <  P*Exp_msk1)
X#else
X				if ((word0(rv) & Exp_mask) <= P*Exp_msk1)
X#endif
X					{
X					if (word0(rv0) == Tiny0
X					 && word1(rv0) == Tiny1)
X						goto undfl;
X					word0(rv) = Tiny0;
X					word1(rv) = Tiny1;
X					goto cont;
X					}
X				else
X					word0(rv) -= P*Exp_msk1;
X				}
X			else {
X				adj = aadj1 * ulp(rv);
X				rv += adj;
X				}
X#else
X			/* Compute adj so that the IEEE rounding rules will
X			 * correctly round rv + adj in some half-way cases.
X			 * If rv * ulp(rv) is denormalized (i.e.,
X			 * y <= (P-1)*Exp_msk1), we must adjust aadj to avoid
X			 * trouble from bits lost to denormalization;
X			 * example: 1.2e-307 .
X			 */
X			if (y <= (P-1)*Exp_msk1 && aadj >= 1.) {
X				aadj1 = (double)(int)(aadj + 0.5);
X				if (!dsign)
X					aadj1 = -aadj1;
X				}
X			adj = aadj1 * ulp(rv);
X			rv += adj;
X#endif
X			}
X		z = word0(rv) & Exp_mask;
X		if (y == z) {
X			/* Can we stop now? */
X			L = aadj;
X			aadj -= L;
X			/* The tolerances below are conservative. */
X			if (dsign || word1(rv) || word0(rv) & Bndry_mask) {
X				if (aadj < .4999999 || aadj > .5000001)
X					break;
X				}
X			else if (aadj < .4999999/FLT_RADIX)
X				break;
X			}
X cont:
X		Bfree(bb);
X		Bfree(bd);
X		Bfree(bs);
X		Bfree(delta);
X		}
X retfree:
X	Bfree(bb);
X	Bfree(bd);
X	Bfree(bs);
X	Bfree(bd0);
X	Bfree(delta);
X ret:
X	if (se)
X		*se = (char *)s;
X	return sign ? -rv : rv;
X	}
X
X static int
Xquorem
X#ifdef KR_headers
X	(b, S) Bigint *b, *S;
X#else
X	(Bigint *b, Bigint *S)
X#endif
X{
X	int n;
X	Long borrow, y;
X	ULong carry, q, ys;
X	ULong *bx, *bxe, *sx, *sxe;
X#ifdef Pack_32
X	Long z;
X	ULong si, zs;
X#endif
X
X	n = S->wds;
X#ifdef DEBUG
X	/*debug*/ if (b->wds > n)
X	/*debug*/	Bug("oversize b in quorem");
X#endif
X	if (b->wds < n)
X		return 0;
X	sx = S->x;
X	sxe = sx + --n;
X	bx = b->x;
X	bxe = bx + n;
X	q = *bxe / (*sxe + 1);	/* ensure q <= true quotient */
X#ifdef DEBUG
X	/*debug*/ if (q > 9)
X	/*debug*/	Bug("oversized quotient in quorem");
X#endif
X	if (q) {
X		borrow = 0;
X		carry = 0;
X		do {
X#ifdef Pack_32
X			si = *sx++;
X			ys = (si & 0xffff) * q + carry;
X			zs = (si >> 16) * q + (ys >> 16);
X			carry = zs >> 16;
X			y = (*bx & 0xffff) - (ys & 0xffff) + borrow;
X			borrow = y >> 16;
X			Sign_Extend(borrow, y);
X			z = (*bx >> 16) - (zs & 0xffff) + borrow;
X			borrow = z >> 16;
X			Sign_Extend(borrow, z);
X			Storeinc(bx, z, y);
X#else
X			ys = *sx++ * q + carry;
X			carry = ys >> 16;
X			y = *bx - (ys & 0xffff) + borrow;
X			borrow = y >> 16;
X			Sign_Extend(borrow, y);
X			*bx++ = y & 0xffff;
X#endif
X			}
X			while(sx <= sxe);
X		if (!*bxe) {
X			bx = b->x;
X			while(--bxe > bx && !*bxe)
X				--n;
X			b->wds = n;
X			}
X		}
X	if (cmp(b, S) >= 0) {
X		q++;
X		borrow = 0;
X		carry = 0;
X		bx = b->x;
X		sx = S->x;
X		do {
X#ifdef Pack_32
X			si = *sx++;
X			ys = (si & 0xffff) + carry;
X			zs = (si >> 16) + (ys >> 16);
X			carry = zs >> 16;
X			y = (*bx & 0xffff) - (ys & 0xffff) + borrow;
X			borrow = y >> 16;
X			Sign_Extend(borrow, y);
X			z = (*bx >> 16) - (zs & 0xffff) + borrow;
X			borrow = z >> 16;
X			Sign_Extend(borrow, z);
X			Storeinc(bx, z, y);
X#else
X			ys = *sx++ + carry;
X			carry = ys >> 16;
X			y = *bx - (ys & 0xffff) + borrow;
X			borrow = y >> 16;
X			Sign_Extend(borrow, y);
X			*bx++ = y & 0xffff;
X#endif
X			}
X			while(sx <= sxe);
X		bx = b->x;
X		bxe = bx + n;
X		if (!*bxe) {
X			while(--bxe > bx && !*bxe)
X				--n;
X			b->wds = n;
X			}
X		}
X	return q;
X	}
X
X/* dtoa for IEEE arithmetic (dmg): convert double to ASCII string.
X *
X * Inspired by "How to Print Floating-Point Numbers Accurately" by
X * Guy L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 92-101].
X *
X * Modifications:
X *	1. Rather than iterating, we use a simple numeric overestimate
X *	   to determine k = floor(log10(d)).  We scale relevant
X *	   quantities using O(log2(k)) rather than O(k) multiplications.
X *	2. For some modes > 2 (corresponding to ecvt and fcvt), we don't
X *	   try to generate digits strictly left to right.  Instead, we
X *	   compute with fewer bits and propagate the carry if necessary
X *	   when rounding the final digit up.  This is often faster.
X *	3. Under the assumption that input will be rounded nearest,
X *	   mode 0 renders 1e23 as 1e23 rather than 9.999999999999999e22.
X *	   That is, we allow equality in stopping tests when the
X *	   round-nearest rule will give the same floating-point value
X *	   as would satisfaction of the stopping test with strict
X *	   inequality.
X *	4. We remove common factors of powers of 2 from relevant
X *	   quantities.
X *	5. When converting floating-point integers less than 1e16,
X *	   we use floating-point arithmetic rather than resorting
X *	   to multiple-precision integers.
X *	6. When asked to produce fewer than 15 digits, we first try
X *	   to get by with floating-point arithmetic; we resort to
X *	   multiple-precision integer arithmetic only if we cannot
X *	   guarantee that the floating-point calculation has given
X *	   the correctly rounded result.  For k requested digits and
X *	   "uniformly" distributed input, the probability is
X *	   something like 10^(k-15) that we must resort to the Long
X *	   calculation.
X */
X
X char *
X__dtoa
X#ifdef KR_headers
X	(d, mode, ndigits, decpt, sign, rve)
X	double d; int mode, ndigits, *decpt, *sign; char **rve;
X#else
X	(double d, int mode, int ndigits, int *decpt, int *sign, char **rve)
X#endif
X{
X /*	Arguments ndigits, decpt, sign are similar to those
X	of ecvt and fcvt; trailing zeros are suppressed from
X	the returned string.  If not null, *rve is set to point
X	to the end of the return value.  If d is +-Infinity or NaN,
X	then *decpt is set to 9999.
X
X	mode:
X		0 ==> shortest string that yields d when read in
X			and rounded to nearest.
X		1 ==> like 0, but with Steele & White stopping rule;
X			e.g. with IEEE P754 arithmetic , mode 0 gives
X			1e23 whereas mode 1 gives 9.999999999999999e22.
X		2 ==> max(1,ndigits) significant digits.  This gives a
X			return value similar to that of ecvt, except
X			that trailing zeros are suppressed.
X		3 ==> through ndigits past the decimal point.  This
X			gives a return value similar to that from fcvt,
X			except that trailing zeros are suppressed, and
X			ndigits can be negative.
X		4-9 should give the same return values as 2-3, i.e.,
X			4 <= mode <= 9 ==> same return as mode
X			2 + (mode & 1).  These modes are mainly for
X			debugging; often they run slower but sometimes
X			faster than modes 2-3.
X		4,5,8,9 ==> left-to-right digit generation.
X		6-9 ==> don't try fast floating-point estimate
X			(if applicable).
X
X		Values of mode other than 0-9 are treated as mode 0.
X
X		Sufficient space is allocated to the return value
X		to hold the suppressed trailing zeros.
X	*/
X
X	int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1,
X		j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
X		spec_case, try_quick;
X	Long L;
X#ifndef Sudden_Underflow
X	int denorm;
X	ULong x;
X#endif
X	Bigint *b, *b1, *delta, *mlo, *mhi, *S;
X	double d2, ds, eps;
X	char *s, *s0;
X	static Bigint *result;
X	static int result_k;
X
X	if (result) {
X		result->k = result_k;
X		result->maxwds = 1 << result_k;
X		Bfree(result);
X		result = 0;
X		}
X
X	if (word0(d) & Sign_bit) {
X		/* set sign for everything, including 0's and NaNs */
X		*sign = 1;
X		word0(d) &= ~Sign_bit;	/* clear sign bit */
X		}
X	else
X		*sign = 0;
X
X#if defined(IEEE_Arith) + defined(VAX)
X#ifdef IEEE_Arith
X	if ((word0(d) & Exp_mask) == Exp_mask)
X#else
X	if (word0(d)  == 0x8000)
X#endif
X		{
X		/* Infinity or NaN */
X		*decpt = 9999;
X		s =
X#ifdef IEEE_Arith
X			!word1(d) && !(word0(d) & 0xfffff) ? "Infinity" :
X#endif
X				"NaN";
X		if (rve)
X			*rve =
X#ifdef IEEE_Arith
X				s[3] ? s + 8 :
X#endif
X						s + 3;
X		return s;
X		}
X#endif
X#ifdef IBM
X	d += 0; /* normalize */
X#endif
X	if (!d) {
X		*decpt = 1;
X		s = "0";
X		if (rve)
X			*rve = s + 1;
X		return s;
X		}
X
X	b = d2b(d, &be, &bbits);
X#ifdef Sudden_Underflow
X	i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1));
X#else
X	if (i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1))) {
X#endif
X		d2 = d;
X		word0(d2) &= Frac_mask1;
X		word0(d2) |= Exp_11;
X#ifdef IBM
X		if (j = 11 - hi0bits(word0(d2) & Frac_mask))
X			d2 /= 1 << j;
X#endif
X
X		/* log(x)	~=~ log(1.5) + (x-1.5)/1.5
X		 * log10(x)	 =  log(x) / log(10)
X		 *		~=~ log(1.5)/log(10) + (x-1.5)/(1.5*log(10))
X		 * log10(d) = (i-Bias)*log(2)/log(10) + log10(d2)
X		 *
X		 * This suggests computing an approximation k to log10(d) by
X		 *
X		 * k = (i - Bias)*0.301029995663981
X		 *	+ ( (d2-1.5)*0.289529654602168 + 0.176091259055681 );
X		 *
X		 * We want k to be too large rather than too small.
X		 * The error in the first-order Taylor series approximation
X		 * is in our favor, so we just round up the constant enough
X		 * to compensate for any error in the multiplication of
X		 * (i - Bias) by 0.301029995663981; since |i - Bias| <= 1077,
X		 * and 1077 * 0.30103 * 2^-52 ~=~ 7.2e-14,
X		 * adding 1e-13 to the constant term more than suffices.
X		 * Hence we adjust the constant term to 0.1760912590558.
X		 * (We could get a more accurate k by invoking log10,
X		 *  but this is probably not worthwhile.)
X		 */
X
X		i -= Bias;
X#ifdef IBM
X		i <<= 2;
X		i += j;
X#endif
X#ifndef Sudden_Underflow
X		denorm = 0;
X		}
X	else {
X		/* d is denormalized */
X
X		i = bbits + be + (Bias + (P-1) - 1);
X		x = i > 32  ? word0(d) << 64 - i | word1(d) >> i - 32
X			    : word1(d) << 32 - i;
X		d2 = x;
X		word0(d2) -= 31*Exp_msk1; /* adjust exponent */
X		i -= (Bias + (P-1) - 1) + 1;
X		denorm = 1;
X		}
X#endif
X	ds = (d2-1.5)*0.289529654602168 + 0.1760912590558 + i*0.301029995663981;
X	k = (int)ds;
X	if (ds < 0. && ds != k)
X		k--;	/* want k = floor(ds) */
X	k_check = 1;
X	if (k >= 0 && k <= Ten_pmax) {
X		if (d < tens[k])
X			k--;
X		k_check = 0;
X		}
X	j = bbits - i - 1;
X	if (j >= 0) {
X		b2 = 0;
X		s2 = j;
X		}
X	else {
X		b2 = -j;
X		s2 = 0;
X		}
X	if (k >= 0) {
X		b5 = 0;
X		s5 = k;
X		s2 += k;
X		}
X	else {
X		b2 -= k;
X		b5 = -k;
X		s5 = 0;
X		}
X	if (mode < 0 || mode > 9)
X		mode = 0;
X	try_quick = 1;
X	if (mode > 5) {
X		mode -= 4;
X		try_quick = 0;
X		}
X	leftright = 1;
X	switch(mode) {
X		case 0:
X		case 1:
X			ilim = ilim1 = -1;
X			i = 18;
X			ndigits = 0;
X			break;
X		case 2:
X			leftright = 0;
X			/* no break */
X		case 4:
X			if (ndigits <= 0)
X				ndigits = 1;
X			ilim = ilim1 = i = ndigits;
X			break;
X		case 3:
X			leftright = 0;
X			/* no break */
X		case 5:
X			i = ndigits + k + 1;
X			ilim = i;
X			ilim1 = i - 1;
X			if (i <= 0)
X				i = 1;
X		}
X	j = sizeof(ULong);
X	for(result_k = 0; sizeof(Bigint) - sizeof(ULong) + j <= i;
X		j <<= 1) result_k++;
X	result = Balloc(result_k);
X	s = s0 = (char *)result;
X
X	if (ilim >= 0 && ilim <= Quick_max && try_quick) {
X
X		/* Try to get by with floating-point arithmetic. */
X
X		i = 0;
X		d2 = d;
X		k0 = k;
X		ilim0 = ilim;
X		ieps = 2; /* conservative */
X		if (k > 0) {
X			ds = tens[k&0xf];
X			j = k >> 4;
X			if (j & Bletch) {
X				/* prevent overflows */
X				j &= Bletch - 1;
X				d /= bigtens[n_bigtens-1];
X				ieps++;
X				}
X			for(; j; j >>= 1, i++)
X				if (j & 1) {
X					ieps++;
X					ds *= bigtens[i];
X					}
X			d /= ds;
X			}
X		else if (j1 = -k) {
X			d *= tens[j1 & 0xf];
X			for(j = j1 >> 4; j; j >>= 1, i++)
X				if (j & 1) {
X					ieps++;
X					d *= bigtens[i];
X					}
X			}
X		if (k_check && d < 1. && ilim > 0) {
X			if (ilim1 <= 0)
X				goto fast_failed;
X			ilim = ilim1;
X			k--;
X			d *= 10.;
X			ieps++;
X			}
X		eps = ieps*d + 7.;
X		word0(eps) -= (P-1)*Exp_msk1;
X		if (ilim == 0) {
X			S = mhi = 0;
X			d -= 5.;
X			if (d > eps)
X				goto one_digit;
X			if (d < -eps)
X				goto no_digits;
X			goto fast_failed;
X			}
X#ifndef No_leftright
X		if (leftright) {
X			/* Use Steele & White method of only
X			 * generating digits needed.
X			 */
X			eps = 0.5/tens[ilim-1] - eps;
X			for(i = 0;;) {
X				L = d;
X				d -= L;
X				*s++ = '0' + (int)L;
X				if (d < eps)
X					goto ret1;
X				if (1. - d < eps)
X					goto bump_up;
X				if (++i >= ilim)
X					break;
X				eps *= 10.;
X				d *= 10.;
X				}
X			}
X		else {
X#endif
X			/* Generate ilim digits, then fix them up. */
X			eps *= tens[ilim-1];
X			for(i = 1;; i++, d *= 10.) {
X				L = d;
X				d -= L;
X				*s++ = '0' + (int)L;
X				if (i == ilim) {
X					if (d > 0.5 + eps)
X						goto bump_up;
X					else if (d < 0.5 - eps) {
X						while(*--s == '0');
X						s++;
X						goto ret1;
X						}
X					break;
X					}
X				}
X#ifndef No_leftright
X			}
X#endif
X fast_failed:
X		s = s0;
X		d = d2;
X		k = k0;
X		ilim = ilim0;
X		}
X
X	/* Do we have a "small" integer? */
X
X	if (be >= 0 && k <= Int_max) {
X		/* Yes. */
X		ds = tens[k];
X		if (ndigits < 0 && ilim <= 0) {
X			S = mhi = 0;
X			if (ilim < 0 || d <= 5*ds)
X				goto no_digits;
X			goto one_digit;
X			}
X		for(i = 1;; i++) {
X			L = d / ds;
X			d -= L*ds;
X#ifdef Check_FLT_ROUNDS
X			/* If FLT_ROUNDS == 2, L will usually be high by 1 */
X			if (d < 0) {
X				L--;
X				d += ds;
X				}
X#endif
X			*s++ = '0' + (int)L;
X			if (i == ilim) {
X				d += d;
X				if (d > ds || d == ds && L & 1) {
X bump_up:
X					while(*--s == '9')
X						if (s == s0) {
X							k++;
X							*s = '0';
X							break;
X							}
X					++*s++;
X					}
X				break;
X				}
X			if (!(d *= 10.))
X				break;
X			}
X		goto ret1;
X		}
X
X	m2 = b2;
X	m5 = b5;
X	mhi = mlo = 0;
X	if (leftright) {
X		if (mode < 2) {
X			i =
X#ifndef Sudden_Underflow
X				denorm ? be + (Bias + (P-1) - 1 + 1) :
X#endif
X#ifdef IBM
X				1 + 4*P - 3 - bbits + ((bbits + be - 1) & 3);
X#else
X				1 + P - bbits;
X#endif
X			}
X		else {
X			j = ilim - 1;
X			if (m5 >= j)
X				m5 -= j;
X			else {
X				s5 += j -= m5;
X				b5 += j;
X				m5 = 0;
X				}
X			if ((i = ilim) < 0) {
X				m2 -= i;
X				i = 0;
X				}
X			}
X		b2 += i;
X		s2 += i;
X		mhi = i2b(1);
X		}
X	if (m2 > 0 && s2 > 0) {
X		i = m2 < s2 ? m2 : s2;
X		b2 -= i;
X		m2 -= i;
X		s2 -= i;
X		}
X	if (b5 > 0) {
X		if (leftright) {
X			if (m5 > 0) {
X				mhi = pow5mult(mhi, m5);
X				b1 = mult(mhi, b);
X				Bfree(b);
X				b = b1;
X				}
X			if (j = b5 - m5)
X				b = pow5mult(b, j);
X			}
X		else
X			b = pow5mult(b, b5);
X		}
X	S = i2b(1);
X	if (s5 > 0)
X		S = pow5mult(S, s5);
X
X	/* Check for special case that d is a normalized power of 2. */
X
X	if (mode < 2) {
X		if (!word1(d) && !(word0(d) & Bndry_mask)
X#ifndef Sudden_Underflow
X		 && word0(d) & Exp_mask
X#endif
X				) {
X			/* The special case */
X			b2 += Log2P;
X			s2 += Log2P;
X			spec_case = 1;
X			}
X		else
X			spec_case = 0;
X		}
X
X	/* Arrange for convenient computation of quotients:
X	 * shift left if necessary so divisor has 4 leading 0 bits.
X	 *
X	 * Perhaps we should just compute leading 28 bits of S once
X	 * and for all and pass them and a shift to quorem, so it
X	 * can do shifts and ors to compute the numerator for q.
X	 */
X#ifdef Pack_32
X	if (i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0x1f)
X		i = 32 - i;
X#else
X	if (i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0xf)
X		i = 16 - i;
X#endif
X	if (i > 4) {
X		i -= 4;
X		b2 += i;
X		m2 += i;
X		s2 += i;
X		}
X	else if (i < 4) {
X		i += 28;
X		b2 += i;
X		m2 += i;
X		s2 += i;
X		}
X	if (b2 > 0)
X		b = lshift(b, b2);
X	if (s2 > 0)
X		S = lshift(S, s2);
X	if (k_check) {
X		if (cmp(b,S) < 0) {
X			k--;
X			b = multadd(b, 10, 0);	/* we botched the k estimate */
X			if (leftright)
X				mhi = multadd(mhi, 10, 0);
X			ilim = ilim1;
X			}
X		}
X	if (ilim <= 0 && mode > 2) {
X		if (ilim < 0 || cmp(b,S = multadd(S,5,0)) <= 0) {
X			/* no digits, fcvt style */
X no_digits:
X			k = -1 - ndigits;
X			goto ret;
X			}
X one_digit:
X		*s++ = '1';
X		k++;
X		goto ret;
X		}
X	if (leftright) {
X		if (m2 > 0)
X			mhi = lshift(mhi, m2);
X
X		/* Compute mlo -- check for special case
X		 * that d is a normalized power of 2.
X		 */
X
X		mlo = mhi;
X		if (spec_case) {
X			mhi = Balloc(mhi->k);
X			Bcopy(mhi, mlo);
X			mhi = lshift(mhi, Log2P);
X			}
X
X		for(i = 1;;i++) {
X			dig = quorem(b,S) + '0';
X			/* Do we yet have the shortest decimal string
X			 * that will round to d?
X			 */
X			j = cmp(b, mlo);
X			delta = diff(S, mhi);
X			j1 = delta->sign ? 1 : cmp(b, delta);
X			Bfree(delta);
X#ifndef ROUND_BIASED
X			if (j1 == 0 && !mode && !(word1(d) & 1)) {
X				if (dig == '9')
X					goto round_9_up;
X				if (j > 0)
X					dig++;
X				*s++ = dig;
X				goto ret;
X				}
X#endif
X			if (j < 0 || j == 0 && !mode
X#ifndef ROUND_BIASED
X							&& !(word1(d) & 1)
X#endif
X					) {
X				if (j1 > 0) {
X					b = lshift(b, 1);
X					j1 = cmp(b, S);
X					if ((j1 > 0 || j1 == 0 && dig & 1)
X					&& dig++ == '9')
X						goto round_9_up;
X					}
X				*s++ = dig;
X				goto ret;
X				}
X			if (j1 > 0) {
X				if (dig == '9') { /* possible if i == 1 */
X round_9_up:
X					*s++ = '9';
X					goto roundoff;
X					}
X				*s++ = dig + 1;
X				goto ret;
X				}
X			*s++ = dig;
X			if (i == ilim)
X				break;
X			b = multadd(b, 10, 0);
X			if (mlo == mhi)
X				mlo = mhi = multadd(mhi, 10, 0);
X			else {
X				mlo = multadd(mlo, 10, 0);
X				mhi = multadd(mhi, 10, 0);
X				}
X			}
X		}
X	else
X		for(i = 1;; i++) {
X			*s++ = dig = quorem(b,S) + '0';
X			if (i >= ilim)
X				break;
X			b = multadd(b, 10, 0);
X			}
X
X	/* Round off last digit */
X
X	b = lshift(b, 1);
X	j = cmp(b, S);
X	if (j > 0 || j == 0 && dig & 1) {
X roundoff:
X		while(*--s == '9')
X			if (s == s0) {
X				k++;
X				*s++ = '1';
X				goto ret;
X				}
X		++*s++;
X		}
X	else {
X		while(*--s == '0');
X		s++;
X		}
X ret:
X	Bfree(S);
X	if (mhi) {
X		if (mlo && mlo != mhi)
X			Bfree(mlo);
X		Bfree(mhi);
X		}
X ret1:
X	Bfree(b);
X	if (s == s0) {				/* don't return empty string */
X		*s++ = '0';
X		k = 0;
X	}
X	*s = 0;
X	*decpt = k + 1;
X	if (rve)
X		*rve = s;
X	return s0;
X	}
X#ifdef __cplusplus
X}
X#endif
END-of-smake-1.2.1/lib/strtod.c
echo x - smake-1.2.1/lib/Makefile
sed 's/^X//' >smake-1.2.1/lib/Makefile << 'END-of-smake-1.2.1/lib/Makefile'
X#ident "@(#)Makefile	1.5 06/07/21 "
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMK_FILES= libschily.mk libschily_p.mk $(NO_SHL)shlschily.mk
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.mks
X###########################################################################
END-of-smake-1.2.1/lib/Makefile
echo x - smake-1.2.1/lib/shlschily.mk
sed 's/^X//' >smake-1.2.1/lib/shlschily.mk << 'END-of-smake-1.2.1/lib/shlschily.mk'
X#ident @(#)shlschily.mk	1.7 07/07/01 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XSUBARCHDIR=	/pic
X.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
XVPATH=		.:stdio:$(ARCHDIR)
XINSDIR=		lib
XTARGETLIB=	schily
XCPPOPTS +=	-Istdio
XCPPOPTS +=	-DUSE_SCANSTACK	# Try to scan stack frames
XCPPOPTS +=	-DPORT_ONLY	# Add missing funcs line snprintf for porting
Xinclude		Targets
XLIBS=		-lc
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.shl
X###########################################################################
END-of-smake-1.2.1/lib/shlschily.mk
echo x - smake-1.2.1/lib/strlcpy.c
sed 's/^X//' >smake-1.2.1/lib/strlcpy.c << 'END-of-smake-1.2.1/lib/strlcpy.c'
X/* @(#)strlcpy.c	1.4 09/07/08 Copyright 2006-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)strlcpy.c	1.4 09/07/08 Copyright 2006-2009 J. Schilling";
X#endif
X/*
X *	strlcpy() to be used if missing in libc
X *
X *	Copyright (c) 2006-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/unistd.h>
X#include <schily/libport.h>
X
X#ifndef	HAVE_STRLCPY
X
XEXPORT size_t
Xstrlcpy(s1, s2, len)
X	register char		*s1;
X	register const char	*s2;
X	register size_t		len;
X{
X	const char		 *os2	= s2;
X
X	if (len > 0) {
X		while (--len > 0 && (*s1++ = *s2++) != '\0')
X			;
X		if (len == 0) {
X			*s1 = '\0';
X			while (*s2++ != '\0')
X				;
X		}
X	} else {
X		while (*s2++ != '\0')
X			;
X	}
X	return (--s2 - os2);
X}
X#endif	/* HAVE_STRLCPY */
END-of-smake-1.2.1/lib/strlcpy.c
echo x - smake-1.2.1/lib/strncpy.c
sed 's/^X//' >smake-1.2.1/lib/strncpy.c << 'END-of-smake-1.2.1/lib/strncpy.c'
X/* @(#)strncpy.c	1.4 09/07/08 Copyright 2006-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)strncpy.c	1.4 09/07/08 Copyright 2006-2009 J. Schilling";
X#endif
X/*
X *	strncpy() to be used if missing in libc
X *
X *	Copyright (c) 2006-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/unistd.h>
X#include <schily/libport.h>
X
X#ifndef	HAVE_STRNCPY
X
XEXPORT char *
Xstrncpy(s1, s2, len)
X	register char		*s1;
X	register const char	*s2;
X	register size_t		len;
X{
X	char	 *ret	= s1;
X
X	if (++len == 0) {	/* unsigned overflow */
X		--len;
X		while (len-- > 0 && (*s1++ = *s2++) != '\0')
X				;
X		len++;
X	} else {
X		while (--len > 0 && (*s1++ = *s2++) != '\0')
X				;
X	}
X	if (len > 0) {
X		while (--len > 0)
X			*s1++ = '\0';
X	}
X	return (ret);
X}
X#endif	/* HAVE_STRNCPY */
END-of-smake-1.2.1/lib/strncpy.c
echo x - smake-1.2.1/lib/noshlschily.mk
sed 's/^X//' >smake-1.2.1/lib/noshlschily.mk << 'END-of-smake-1.2.1/lib/noshlschily.mk'
X#ident "@(#)noshlschily.mk	1.1 06/07/21 "
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
Xall:
X	@echo "	==> NO shared libs on this platform (yet)"
END-of-smake-1.2.1/lib/noshlschily.mk
echo c - smake-1.2.1/libs
mkdir -p smake-1.2.1/libs > /dev/null 2>&1
echo c - smake-1.2.1/man
mkdir -p smake-1.2.1/man > /dev/null 2>&1
echo c - smake-1.2.1/man/man4
mkdir -p smake-1.2.1/man/man4 > /dev/null 2>&1
echo x - smake-1.2.1/man/man4/makefiles.4
sed 's/^X//' >smake-1.2.1/man/man4/makefiles.4 << 'END-of-smake-1.2.1/man/man4/makefiles.4'
X. \" @(#)makefiles.4	1.7 09/04/11 Copyr 1996 J. Schilling
X. \" User Manual page for makefile system
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U
X.if t .ds s \(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.\".TH makefiles 4L "14. February 1997" "J\*org Schilling" "Schily\'s FILE FORMATS"
X.TH makefiles 4L "14. February 1997" "J\*org Schilling" "GMD FOKUS FILE FORMATS"
X.SH NAME
Xmakefiles \- users guide for compiling projects on different platforms
X.SH SYNOPSIS
X.B "make [target]
X.br
X.B "gmake [target]
X.br
X.B "smake [target]
X.br
X.PP
XTarget may be one of:
X.TP 10
X\&.help
Xto get a list of possible targets and a short description.
X.TP
Xall
Xto make the default targets
X.TP
Xinstall
Xto make and install the default targets
X(see 
X.IR INS_BASE " and " INS_KBASE
Xto learn how to modify the installation path).
X.TP
Xibins
Xto make and install a target in 
X.I SRCROOT/bins
X.TP
Xdepend
Xto re-make dependency rules for all default targets.
XNote: All dependency files will automatically remade 
Xon the next run of make before they are included.
X.TP
Xclean
Xto remove 
X.I core 
Xfiles and all intermediate object files.
X.TP
Xclobber
Xto remove the targets from
X.IR clean ,
Xall dependency files and all final targets
X.TP
Xdistclean
Xto remove the targets from
X.IR clean " and " clobber 
Xand all made files for all architectures.
X.TP
Xtags
Xto make 
X.IR vi (1)
Xcompatible tags
X.TP
XTAGS
Xto make 
X.IR emacs (1)
Xcompatible tags
X.TP
Xconfig
Xreserved for future use.
X.TP
Xrmtarget
Xto remove the default target
X.TP
Xrelink
Xto remove the default target and remake it immediately. This can be
Xused to change .e.g LD_RUN_PATH in the executable.
X
X.SH DESCRIPTION
XMakefiles is a set of rules that allows compiling of structured
Xprojects with small and uniformly structured makefiles.
XAll rules are located in a central directory.
XCompiling the projects on different platforms can be done
Xsimultaneously without
Xthe need to modify any of the makefiles that are located
Xin the projects directories.
X.PP
XMakefiles is a set of high level portability tools superior to
X.B autoconf
Xand easier to use.
X.PP
XThree make programs are supported:
X.IR "Sunpro make" , 
X.I "GNU make"
Xand
X.IR smake .
X.PP
X.I BSDmake
Xcould be supported if it supports pattern matching rules correctly.
X.PP
XThe main design goal was to have a set of small and easy to read
Xmakefiles, each located in the project's leaf directory and therefore 
Xcalled
X.IR leaf -makefile.
X.PP
XEach of these 
X.IR leaf -makefiles,
Xin fact contains no rule at all. It simply defines some macros
Xfor the 
X.IR make -program
Xand includes two files from a central make rule depository.
XThe included files and the files that are recursively included 
Xdefine the rules that are needed to compile the project.
X.PP
XEach 
X.IR leaf -makefile
Xis formed in a really simple way:
X.TP
X\(bu
XIt first defines two macros that define the relative location
Xof the project's root directory and the name of the directory
Xthat contains the complete set of of rules and then includes
Xthe rule file 
X.I rules.top
Xfrom the directory that forms the central rule depository.
XYou only have to edit the macro
X.I SRCROOT
Xto reflect the relative location of the project's root directory.
X.TP
X\(bu
XThe next part of a 
X.IR leaf -makefile
Xdefines macros that describe the target and the source.
XYou can only have one target per 
X.IR leaf -makefile.
XOf course, there may be many source files, that are needed to create
Xthat target.
XIf you want to make more than one target in a specific directory,
Xyou have to put more than one makefile into that directory.
XThis is the part of a makefile that describes a unique target.
XEdit this part to contain all source files, all local include files
Xand all non global compile time flags that are needed for your target.
XFor a typical target this is as simple as filling in a form.
X.TP
X\(bu
XEach
X.IR leaf -makefile
Xfinally includes a file from the rules directory that contains
Xrules for the appropriate type of target that is to be made
Xfrom this 
X.IR leaf -makefile.
X.PP
XThe makefile in each directory has to be called
X.IR Makefile .
XIf you want to have more than one makefile in a specific directory,
Xyou have to choose different names for the other makefiles.
X.PP
XThere are rules for the following type of targets:
X.TP 20
Xcommands
XThe make rules for user level commands like
X.IR cat ", " ls 
Xetc. are located in the file 
X.I rules.cmd
X.TP
Xdrivers
XThe make rules for device drivers
Xare located in the file 
X.I rules.drv
X.TP
Xlibraries
XThe make rules for non shared libraries
Xare located in the file 
X.I rules.lib
X.TP
Xshared libraries
XThe make rules for shared libraries
Xare located in the file 
X.I rules.shl
X.TP
Xlocalized files
XThe make rules for localized files
Xare located in the file 
X.I rules.loc
X.TP
Xnonlocalized files
XThe make rules for non localized files
Xare located in the file 
X.I rules.aux
X.TP
Xshell scripts
XThe make rules for shell scripts (a variant of localized files)
Xare located in the file 
X.I rules.scr
X.TP
Xmanual pages
XThe make rules for manual pages (a variant of localized files)
Xare located in the file 
X.I rules.man
X.TP
Xdiverted makefiles
XThe make rules for projects that need to have more than
Xone makefile in a specific directory
Xare located in the file 
X.I rules.mks
XIt contains a rule that diverts to the listed sub makefiles.
XEach sub makefile may be of any type.
X.TP
Xdirectories
XThe make rules for sub directories
Xare located in the file 
X.I rules.dir
X
X.SH "Macros/Variables Used In Rules
X.PP
XThe following is a description of the most important macros
Xused within the make rules.
X.I NOTE: 
Xnot all of them might be changed in a specific makefile.
XCarefully read the description and change only those macros
Xthat are intended to be used to change the behavior of
Xthe compilation.
X
X.TP 13
XARCHDIR
Xcontains the location where object files and make targets will be placed.
XA typical name would be:
X.I "OBJ/sparc\-sunos5\-cc
X.br
XDo not change this macro.
X.
X.TP
XASFLAGS
XThe flags that are used with the assembler.
X.br
XDo not change this macro.
X.
X.TP
XASMFILES
Xa list of assembler source files, to be specified in a
Xleaf makefile.
X.
X.TP
XASOPTS
XThe internal macro that contains the flags for the assembler.
XChange this macro if you want to change the behavior.
XUse: 
X.B "ASOPTS= value"
XIf you want to override the default value. If you want to
Xoverride the default assembler flags from the command line
Xcall:
X.B "make 'ASOPTS=value'"
XUse: 
X.B "ASOPTS += value"
XIf you want to add flags to the default value from within a makefile.
X.
X.TP
XASOPTX
Xmay be used if you want to add flags to the assembler flags from the
Xcommand line. Use:
X.B "make 'ASOPTX=value'
X.
X.TP
XC_ARCH
Xthis macro contains the c-compiler architecture name.
X.br
XDo not change this macro.
X.
X.TP
XCCOM
XThis macro may be used from the command line to use a different
Xc-compiler than the default.
XUse:
X.B "make 'CCOM=gcc'
Xto use 
X.I gcc
Xfor the next run.
XNote: The value of 
X.I CCOM
Xmust not necessarily be identical to the real name of the c-compiler.
XIt refers to a filename which contains the definition for that
Xc-compiler. This hint applies as well to all other macros that deal with
Xthe name of the c-compiler.
XThe only macro, that contains the real invocation name of the c-compiler,
Xis 
X.IR CC .
X.I CC
Xis set inside the machine dependent configuration file in the central
Xrules depository and must not be changed elsewhere.
X.
X.TP
XCFILES
Xa list of C source files, to be specified in a
Xleaf makefile.
X.
X.TP
XCFLAGS
XThe flags that are used with the c-compiler.
XDo not use flags that belong to the c-preprocessor in the 
X.IR COPTOPT ", " COPTS " and " COPTX
Xmacros.
X.br
XDo not change this macro.
X.
X.TP
XCLEAN_FILES
XA list of files ( besides the object files ) that will be
Xremoved with
X.IR "make clean" .
X.br
XDo not change this macro.
X.
X.TP
XCLEAN_FILEX
Xthis macro may be used to define additional files that should
Xbe removed with
X.IR "make clean" .
X.
X.TP
XCLOBBER_FILEX
Xthis macro may be used to define additional files that should
Xbe removed with
X.IR "make clobber" .
X.
X.TP
XCOPTOPT
XThe c-compiler optimization flag. This flag is intended to 
Xbe overridden either from a makefile or from command line.
X.
X.TP
XCOPTS
XThe internal macro that contains the flags for the c-compiler.
XChange this macro if you want to change the behavior.
XUse: 
X.B "COPTS= value"
XIf you want to override the default value. If you want to
Xoverride the default c-compiler flags from the command line
Xcall:
X.B "make 'COPTS=value'"
XUse: 
X.B "COPTS += value"
XIf you want to add flags to the default value from within a makefile.
X.
X.TP
XCOPTX
Xmay be used if you want to add flags to the c-compiler flags from the
Xcommand line. Use:
X.B "make 'COPTX=value'
X.
X.TP
XCPPFLAGS
XThe flags that are used with the c-preprocessor.
XThis macro as well as:
X.IR CPPOPTS " and " CPPOPTX
Xare also used when compiling c-programs.
XThey should contain only the following flags:
X.IR "\-Dname=value ", " \-Uname " , " 
X.IR \-Idirectory " and " \-Ydirectory .
X.br
XDo not change this macro.
X.
X.TP
XCPPOPTS
XThe internal macro that contains the flags for the c-preprocessor.
XChange this macro if you want to change the behavior.
XUse: 
X.B "CPPOPTS= value"
XIf you want to override the default value. If you want to
Xoverride the default c-preprocessor flags from the command line
Xcall:
X.B "make 'CPPOPTS=value'"
XUse: 
X.B "CPPOPTS += value"
XIf you want to add flags to the default value from within a makefile.
X.
X.TP
XCPPOPTX
Xmay be used if you want to add flags to the c-preprocessor flags from the
Xcommand line. Use:
X.B "make 'CPPOPTX=value'
X.
X.TP
XCURDIR
XThis macro contains the name of the sub directory that is currently processed.
X.br
XDo not change this macro.
X.
X.TP
XCWARNOPTS
XThis macro may be set in
X.I $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults
Xor 
X.I $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH)
Xto overwrite the default c-compiler warn options.
X.
X.TP
XCWOPTS
XThis macro is set inside the machine dependent configuration file in the central
Xrules depository and must not be changed elsewhere.
XIt contains the flags that set the default warning level for the c-compiler.
X.
X.TP
XDEFINSGRP
Xthis macro may be set in the projects defaults file to set up the
Xdefault group id for installation 
X.TP
XDEFINSMODE
Xthis macro may be set in the projects defaults file to set up the
Xdefault file permission for installation 
X.TP
XDEFINSUSR
Xthis macro may be set in the projects defaults file to set up the
Xdefault user id for installation 
X.TP
XDEFUMASK
Xthis macro may be set in the projects defaults file to set up the
Xdefault 
X.I umask
Xvalue for creating sub directories
X.
X.TP
XDEFAULTSDIR
Xthis macro may be set from command line or from the shell environment
Xif the user wants to use a different set of 
X.I Defaults
Xfiles that is not located in the directory
X.B DEFAULTS
Xin the source root directory.
XThis may be used to hold two or more set of defaults that differ e.g. in the
Xinstallation path or the C-compiler.
X.
X.TP
XDEFAULTSROOT
Xthis macro may be set in a leaf makefile, if that makefile wants to use
Xa 
X.I Defaults
Xfile that is not located in 
X.I $(DEFAULTSDIR)
Xin the source root.
XThis may be used, if a sub tree in a big project needs a different setup.
X.
X.TP
XDEFLTSDIR
XThis is an internally used macro that is set from 
X.I $(DEFAULTSDIR) 
Xor from the internal defaults.
X.br
XDo not change this macro.
X.
X.TP
XDEFLTSROOT
XThis is an internally used macro that is set from 
X.I $(DEFAULTSROOT) 
Xor from the internal defaults.
X.br
XDo not change this macro.
X.
X.TP
XDEFCCOM
Xthe default name of the c-compiler. This is usually set in the file
X.I $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults
Xor 
X.IR $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH) .
X.
X.TP
XDEFINCDIRS
Xa list of directories that are searched by default in addition to 
Xthe system include directories. If this macro is not set, 
X.I $(SRCROOT)/include
Xis used.
X.
X.TP
XDIRNAME
Xthis macro needs to be set in the makefile that is located in
Xthe 
X.I "$(SRCROOT)
Xdirectory.
XThe value should be either set to the name of the directory
Xwhere the makefile is located or to 
X.BR SRCROOT .
XThe value of this macro is updated automatically 
Xto follow the directory hierarchy.
XDo not change this macro in a make file other than the make file
Xin the source root.
X.
X.TP
XDIRS
Xthis macro needs to be set in a makefile that is located in
Xa directory that contains diversion directories.
XIt must contain a list of directory names where the diversions
Xgo to e.g.
X.BR "DIRS= libfoo libbar libgarbage" .
X.
X.TP
XHFILES
Xfor normal operation, 
X.I makefiles 
Xwill automatically find which include files are needed
Xfor compilation.
XHowever, if you want to create a tag file that includes
Xtags for definitions that occur within include files, 
Xyou should set 
X.I HFILES
Xto be a list of include files containing such definitions.
X.
X.TP
XINCDIRS
Xthis macro will normally be a copy from 
X.IR DEFINCDIRS .
XYou may however specify a different value in a leaf makefile
Xor from command line. This will overwrite the defaults value.
X.
X.TP
XINS_BASE
Xthis macro has to be specified in the file
X.I $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults
Xor 
X.IR $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH) .
XIt must contain the path name of the root for installing 
Xgeneral targets of the project.
XSee
X.IR INSDIR . 
X.
X.TP
XINS_KBASE
Xthis macro has to be specified in the file
X.I $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults
Xor 
X.IR $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH) .
XIt must contain the path name of the root for installing 
Xkernel modules from the project.
XSee
X.IR INSDIR .
X.
X.TP
XINSDIR
Xthis macro has to be specified in the leaf makefile.
XIt must contain the path name of a directory relative to
X.IR INS_BASE " or " INS_KBASE .
XThe target will be installed into
X.I "$(INS_BASE)/$(INSDIR)" .
X.
X.TP
XINSGRP
Xthis macro may be set in a leaf makefile to set up the
Xgroup id for installation 
X.TP
XINSMODE
Xthis macro may be set in a leaf makefile to set up the
Xfile permission for installation 
X.TP
XINSUSR
Xthis macro may be set in a leaf makefile to set up the
Xuser id for installation 
X.
X.TP
XK_ARCH
Xthis macro contains the kernel/machine architecture for the
Xtarget machine (e.g.
X.IR "sun3 sun4c sun4m sun4u 9000\-725 aviion" ).
XIt is set to the output of
X.I "uname \-m
Xconverted to lower case.
X.br
XDo not change this macro.
X.
X.TP
XKARCH
Xthis macro contains the kernel/machine architecture for the
Xtarget machine (e.g.
X.IR "sun3 sun4c sun4m sun4u 9000\-725 aviion" ).
XIt is set to the output of
X.I "uname \-m
Xconverted to lower case.
X.br
XDo not change this macro unless you want to do a cross compilation.
X.
X.TP
XLDFLAGS
XThe flags that are used with the linker.
X.br
XDo not change this macro.
X.
X.TP
XLDLIBS
XThe internal macro that holds the 
Xlibraries that are used while linking the target.
X.br
XDo not change this macro.
X.
X.TP
XLDOPTS
XThe internal macro that contains the flags for the linker.
XChange this macro if you want to change the behavior.
XUse: 
X.B "LDOPTS= value"
XIf you want to override the default value. If you want to
Xoverride the default linker flags from the command line
Xcall:
X.B "make 'LDOPTS=value'"
XUse: 
X.B "LDOPTS += value"
XIf you want to add flags to the default value from within a makefile.
X.
X.TP
XLDOPTX
Xmay be used if you want to add flags to the linker flags from the
Xcommand line. Use:
X.B "make 'LDOPTX=value'
X.
X.TP
XLDPATH
Xthe default library search path for the linker. 
XThis is usually set in the file
X.I $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults
Xor 
X.IR $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH) .
X.
X.TP
XLIB_KVM
Xa predefined macro that contains the operating system dependent
Xname of a library
Xthat is needed by programs that read/write kernel virtual memory.
XAdd 
X.I "$(LIB_KVM)
Xto your list of libraries (e.g.
X.BR "LIBS= \-lintl $(LIB_KVM)" ),
Xif your target uses kvm.
X.
X.TP
XLIB_MATH
Xa predefined macro that contains the operating system dependent
Xname of a library
Xthat is needed by programs that use routines of the math library.
XAdd 
X.I "$(LIB_MATH)
Xto your list of libraries (e.g.
X.BR "LIBS= \-lintl $(LIB_MATH)" ),
Xif your target uses math subroutines.
X.
X.TP
XLIB_SOCKET
Xa predefined macro that contains the operating system dependent
Xname of a library
Xthat is needed by programs that use socket calls.
XAdd 
X.I "$(LIB_SOCKET)
Xto your list of libraries (e.g.
X.BR "LIBS= \-lintl $(LIB_SOCKET)" ),
Xif your target uses sockets. Note: this should (for portability reasons)
Xeven be done on systems that don't require a socket library because 
Xthey have the socket interface inside libc.
X.
X.TP
XLIBS_PATH
Xthis macro contains the path to a directory where those
Xlibraries are located, that have been build during
Xa make run inside the current project.
X.br
XDo not change this macro.
X.
X.TP
XM_ARCH
Xthis macro contains the machine architecture for the
Xtarget machine (e.g.
X.IR "sun3 sun4 ip22 i86pc i586 9000\-725 aviion" ).
XIt is set to the output of
X.I "arch
Xconverted to lower case.
XOn systems, where 
X.I M_ARCH
Xis not available, it is set to the content of 
X.IR K_ARCH .
X.br
XDo not change this macro.
X.
X.TP
XMK_FILES
Xmakefiles that divert into sub makes within the same directory
Xmust set 
X.I MK_FILES
Xto be a list of makefile names for the sub makes.
XMakefile names for sub makes should have a name that is build
Xby adding 
X.I .mk
Xto the base name of the target that is defined inside the
Xspecific makefile.
X.
X.TP
XMAKEPROG
XSet this macro to the name of your make program if it does
Xnot support the macro
X.IR MAKE_NAME .
XThe make program 
X.I smake
Xis able to identify itself.
XIf you want to use a make program that is not able
Xto identify itself
Xand it's name is not
X.IR make ,
Xset 
X.I MAKEPROG
Xto the name of the make program.
XCurrently only 
X.I gmake
Xis supported as alternate value for 
X.IR MAKEPROG .
XIf you want to use an unsupported make program
Xyou have to check if it supports the needed features
Xfor
X.IR makefiles .
XYou must write your own rule files for that make program.
XIf you want to use 
X.IR gmake ,
Xyou should do
X.B "setenv MAKEPROG gmake
Xbefore you start
X.I gmake
Xor use a shell script that does this job for you.
X.
X.TP
XMAKE
XThis macro is set up by the 
X.I make 
Xprogram.
XIt contains a path name that is sufficient to recursively
Xcall the same 
X.I make
Xprogram again (either that last path component or the full path
Xname of the make program).
X.br
XDo not change this macro.
X.
X.TP
XMAKEFLAGS
XThis macro is set up by the 
X.I make 
Xprogram.
XIt contains the command line flags,
X.I make
Xis called with.
X.br
XDo not change this macro.
X.
X.TP
XMAKE_ARCH
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the processor architecture of the target machine
X(e.g. mc68020, sparc, pentium).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_BRAND
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the brand of the target machine
X(e.g. Sun_Microsystems(e.g. ).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_HOST
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the host name of the target machine
X(e.g. duffy, sherwood, ghost).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_MACH
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the kernel architecture of the target machine
X(e.g. sun3, sun4c, sun4m, sun4u).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_MODEL
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the model name of the target machine
X(e.g. SUNW,SPARCstation-20).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_M_ARCH
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the machine architecture of the target machine
X(e.g. sun3, sun4).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_NAME
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the official name of the
Xmake program
X(e.g. make, smake, gmake).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_OS
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the operating system name of the target machine
X(e.g. sunos, linux, dgux).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_OSDEFS
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains operating system specific defines for the compiler
X(e.g. \-D__SVR4).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_OSREL
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the operating system release name of the target machine
X(e.g. 5.5, 4.1.1).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_OSVERSION
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the operating system version of the target machine
X(e.g. generic).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_SERIAL
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the serial number of the target machine
X(e.g. 1920098175).
X.br
XDo not change this macro.
X.
X.TP
XMANDIR
Xall makefiles for manual pages must set this macro to the
Xpath name relative to 
X.I INS_BASE
Xwhere the manual page root dir for the project should be.
XPossible values for english manual pages are
X.IR man " or " share/man ,
Xpossible values for german manual pages are
X.IR man/de " or " share/man/de .
X.
X.TP
XMANFILE
Xmakefiles for manual pages set this macro to the name of the 
Xtroff source file for the manual page
X.
X.TP
XMANSECT
Xmakefiles for manual pages set this macro to the macro name that
Xcontains the real section name for this manual page. This is 
Xnecessary because bsd based system have different naming conventions than
Xsystem V based systems. See below for a valid list of manual section
Xmacros.
X.TP
XMANSECT_ADMIN
XThis macro contains the name of the sub directory for administrative
Xcommands and maintenance procedures.
X.br
XDo not change this macro.
X.TP
XMANSECT_CMD
XThis macro contains the name of the sub directory for general 
Xuser commands.
X.br
XDo not change this macro.
X.TP
XMANSECT_DEMOS
XThis macro contains the name of the sub directory for demo
Xcommands.
X.br
XDo not change this macro.
X.TP
XMANSECT_DEVICE
XThis macro contains the name of the sub directory for 
Xuser level device interfaces.
X.br
XDo not change this macro.
X.TP
XMANSECT_DRIVER
XThis macro contains the name of the sub directory for 
Xkernel level device driver interfaces.
X.br
XDo not change this macro.
X.TP
XMANSECT_FILEFORM
XThis macro contains the name of the sub directory for 
Xfile formats.
X.br
XDo not change this macro.
X.TP
XMANSECT_GAMES
XThis macro contains the name of the sub directory for 
Xgames.
X.br
XDo not change this macro.
X.TP
XMANSECT_HDR
XThis macro contains the name of the sub directory for 
Xheader files.
X.br
XDo not change this macro.
X.TP
XMANSECT_LIB
XThis macro contains the name of the sub directory for 
Xlibrary function interfaces.
X.br
XDo not change this macro.
X.TP
XMANSECT_MACROS
XThis macro contains the name of the sub directory for 
Xtroff macros.
X.br
XDo not change this macro.
X.TP
XMANSECT_NETWORK
XThis macro contains the name of the sub directory for 
Xuser level network interfaces.
X.br
XDo not change this macro.
X.TP
XMANSECT_SYSCALL
XThis macro contains the name of the sub directory for 
Xsystem call interfaces.
XDo not change this macro.
X.TP
XMANSECT_TABLES
XThis macro contains the name of the sub directory for 
Xtables.
XDo not change this macro.
X.TP
XMANSTYLE
XThis macro contains the name that is used to find the right
Xordering conventions for manual pages.
XDo not change this macro.
X.TP
XMANSUFFIX
Xmakefiles for manual pages set this macro to the macro name that
Xcontains the real suffix for this manual page. This is 
Xnecessary because bsd based system have different naming conventions than
Xsystem V based systems. See below for a valid list of manual suffix
Xmacros.
X.TP
XMANSUFF_ADMIN
XThis macro contains the name of the file suffix for administrative
Xcommands and maintenance procedures.
X.br
XDo not change this macro.
X.TP
XMANSUFF_CMD
XThis macro contains the name of the file suffix for general 
Xuser commands.
X.br
XDo not change this macro.
X.TP
XMANSUFF_DEMOS
XThis macro contains the name of the file suffix for demo
Xcommands.
X.br
XDo not change this macro.
X.TP
XMANSUFF_DEVICE
XThis macro contains the name of the file suffix for 
Xuser level device interfaces.
X.br
XDo not change this macro.
X.TP
XMANSUFF_DRIVER
XThis macro contains the name of the file suffix for 
Xkernel level device driver interfaces.
X.br
XDo not change this macro.
X.TP
XMANSUFF_FILEFORM
XThis macro contains the name of the file suffix for 
Xfile formats.
X.br
XDo not change this macro.
X.TP
XMANSUFF_GAMES
XThis macro contains the name of the file suffix for 
Xgames.
X.br
XDo not change this macro.
X.TP
XMANSUFF_HDR
XThis macro contains the name of the file suffix for 
Xheader files.
X.br
XDo not change this macro.
X.TP
XMANSUFF_LIB
XThis macro contains the name of the file suffix for 
Xlibrary function interfaces.
X.br
XDo not change this macro.
X.TP
XMANSUFF_MACROS
XThis macro contains the name of the file suffix for 
Xtroff macros.
X.br
XDo not change this macro.
X.TP
XMANSUFF_NETWORK
XThis macro contains the name of the file suffix for 
Xuser level network interfaces.
X.br
XDo not change this macro.
X.TP
XMANSUFF_SYSCALL
XThis macro contains the name of the file suffix for 
Xsystem call interfaces.
XDo not change this macro.
X.TP
XMANSUFF_TABLES
XThis macro contains the name of the file suffix for 
Xtables.
XDo not change this macro.
X.TP
XMARCH
Xthis macro contains the machine architecture for the
Xtarget machine (e.g.
X.IR "sun3 sun4 ip22 i86pc i586 9000\-725 aviion" ).
XIt is set to the output of
X.I "arch
Xconverted to lower case.
XOn systems, where 
X.I M_ARCH
Xis not available, it is set to the content of 
X.IR K_ARCH .
X.br
XDo not change this macro unless you want to do a cross compilation.
X.
X.TP
XO_ARCH
Xthis macro contains the name of the operating system
Xconverted to lower case.
XIt is usually the output of:
X.IR "uname \-s" .
XIt may contain a modified name if the compilation rules
Xfor different version of the operating system differ (e.g.
Xon
X.IR SunOS " and " Solaris ,
Xthe official operation system name in both cases is
X.IR SunOS ).
X.br
XDo not change this macro.
X.
X.TP
XOARCH
Xthis macro contains the object architecture that is used
Xfor architecture dependent sub directories.
XIt is set to:
X.IR "$(PARCH)\-$(O_ARCH)\-$(C_ARCH)" .
X.br
XDo not change this macro.
X.
X.TP
XOARCHDIR
Xthis macro contains the concatenation of 
X.I OBJ/
Xand 
X.IR "$(OARCH)" .
X.br
XDo not change this macro.
X.
X.TP
XOFILES
Xthis macro contains the list of objects that are the
Xthe dependency list for the target.
XIt is constructed from the list of
Xassembler source files,
Xc source files,
Xlex source files and
Xyacc source files.
X.br
XDo not change this macro.
X.
X.TP
XOINCSDIR
Xthis macro contains the concatenation of 
X.I $(SRCROOT)/incs/
Xand 
X.IR "$(OARCH)" .
XIt is the location where include files that are made within a make run
Xand subject to global use will be placed.
X.br
XDo not change this macro.
X.TP
XOLIBSDIR
Xthis macro contains the concatenation of 
X.I $(SRCROOT)/libs/
Xand 
X.IR "$(OARCH)" .
XIt is the location where libraries that are made within a make run
Xwill be placed.
X.br
XDo not change this macro.
X.
X.TP
XOSDEFS
Xthis macro contains operating system specific c-preprocessor
Xdefinitions.
X.br
XDo not change this macro.
X.
X.TP
XOSNAME
Xthe unmodified name of the operating system converted to lower case.
XSee
X.IR O_ARCH .
X.br
XDo not change this macro.
X.
X.TP
XOSREL
Xthe release of the operating system.
X.br
XDo not change this macro.
X.
X.TP
XP_ARCH
Xthis macro contains the processor architecture for the
Xtarget machine (e.g.
X.IR "mc68020 mc88200 sparc pentium" ).
XIt is set to the output of
X.I "uname \-p
Xconverted to lower case.
XOn systems, where 
X.I P_ARCH
Xis not available, it is set to the content of 
X.IR K_ARCH .
X.br
XDo not change this macro.
X.
X.TP
XPARCH
Xthis macro contains the processor architecture for the
Xtarget machine (e.g.
X.IR "mc68020 mc88200 sparc pentium" ).
XIt is set to the output of
X.I "uname \-p
Xconverted to lower case.
XOn systems, where 
X.I P_ARCH
Xis not available, it is set to the content of 
X.IR K_ARCH .
X.br
XDo not change this macro unless you want to do a cross compilation.
X.
X.TP
XRULESDIR
Xthe value of this macro must be set before
Xthe rules file
X.I "$(SRCROOT)/$(RULESDIR/rules.top
Xis included.
XIf you want to test the behavior of a modified version
Xof the
X.I makefiles
Xin 
X.IR RULESDIR ,
Xput a copy into an alternate directory, modify one or more
Xfiles in it and then use make with a different value of
X.IR RULESDIR ,
Xthat points to the alternate directory.
X.
X.TP
XRUNPATH
Xis evaluated on systems, where 
X.I LD_RUN_PATH
Xis supported.
XIt contains the default library search path for dynamic linked targets
Xon runtime. 
XThis search path will be stored inside the target.
XThis is usually set in the file
X.I $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults
Xor 
X.IR $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH) .
XNote that older systems will use 
X.I LD_LIBRARY_PATH
Xfor this purpose too.
X.
X.TP
XSCRFILE
Xthis macro must be set in a leaf makefile for shell scripts to define
Xthe source for that script file.
X.
X.TP
XSRCFILE
Xthis macro must be set in a leaf makefile for localized files to define
Xthe source for that file.
X.
X.TP
XSRCROOT
Xthis macro contains the relative position to the project's
Xsource root directory.
XThe value of this macro must be set before
Xthe rules file
X.I "$(SRCROOT)/$(RULESDIR/rules.top
Xis included.
X.I SRCROOT
Xshould be set to
X.I ../..
Xif the appropriate leaf makefile is located two directory
Xlevels below the source route.
X.
X.TP
XSUBARCHDIR
Xmay be set to put the object files and the target into
Xa different directory than usual.
X.I SUBARCHDIR
Xwill modify the value of 
X.IR ARCHDIR .
XIf you want to make a target that is compiled for 
X.I dbx
Xyou may use:
X.IR "make COPTX=\-g SUBARCHDIR=\-dbx" .
X.
X.TP
XTARGET
Xall makefiles, that are not referring to library targets or
Xsub makes / sub dir makes,
Xmust define
X.I TARGET
Xto be the output file name of the final link operation.
X.
X.TP
XTARGETLIB
Xall makefiles that are used to make libraries
Xmust define
X.I TARGETLIB
Xto be the central part of the target library.
XIf you want to make e.g.
X.I libfoo
Xdefine
X.IR "TARGETLIB= foo" .
XThis is needed to allow operating systems to have different naming 
Xconventions for libraries.
XIf you are making a non shared library, the example above
Xwould result in a filename:
X.I libfoo.a
Xfor the real target.
X.
X.TP
XTARGETMAN
Xthis macro must be set in a leaf makefile for manual pages to define
Xthe base name for that manual page (not including the suffix).
X.
X.TP
XXMK_FILE
Xmakefiles that want to install manual pages should set 
X.I XMK_FILE
Xto 
X.B Makefile.man
Xto avoid having to install a diversion make file. 
XThe make file found in
X.I XMK_FILE
Xwill be processed only if 
X.I make
Xis called with the target 
X.IR install .
X
X.SH "GETTING STARTED
X.PP
XTo set up a new project, first copy the 
X.IR RULES " and " TEMPLATES
Xdirectories and all its content into the project's root directory.
X.PP
XThen copy a top level makefile, a 
X.I Defaults
Xfile and a 
X.I Targetdirs.archname
Xfile into the project's root directory.
X.PP
XThen create the following directories:
X.IR cmd ", " lib ", " include .
X.PP
XNow start creating target directories e.g below
X.IR cmd " and " lib .
XDon't forget to create a makefile and an appropriate
X.I Targetdirs.archname 
Xfile on each node directory.
X
X.SH EXAMPLES
X.PP
XIf you want to set up a private copy of parts of a project,
Xyou should choose a directory inside your directory tree that will become
Xthe shadow projects source root directory.
XThen create symbolic links named 
X.IR RULES " and " TEMPLATES
Xto the real source root.
XIf you don't want to modify the global include files,
Xcreate a symbolic link to the
X.I include
Xdirectory too, else copy the include directory and its content.
Xcopy the top level makefile, the 
X.I Defaults
Xfile and the
X.I Targetdirs.archname 
Xfile.
X.PP
XFinally copy the desired sub tree together with all
Xmakefiles and the 
X.I Targetdirs.archname 
Xfiles that are located in the directories above
Xyour part of the project that you want to have separately.
X
X.SH FILES
X\&.\|.\|./RULES/*
X.br
X\&.\|.\|./DEFAULTS/*
X.br
X\&.\|.\|./TARGETS/*
X.br
X\&.\|.\|./TEMPLATES/*
X
X.SH "SEE ALSO"
X.BR makerules (4),
X.BR make (1),
X.BR gmake (1),
X.BR smake (1).
X.PP
XIf you want to know, how to add new rules or how to add support
Xfor new operating systems or compilers look into 
X.BR makerules (4).
X
X.SH DIAGNOSTICS
XDiagnostic messages depend on the make program.
XHave a look at the appropriate man page.
X
X.SH NOTES
XThe scope of this manual is only the usage of 
X.BR "leaf makefiles" .
XIf you want to make changes to the 
X.B make rules
Xhave a look at
X.BR makerules (4).
X.PP
X.I makefiles
Xcan be used with 
X.IR "Sunpro make" ", " "Gnu make"
Xand 
X.IR smake .
XAlthough Gnu make runs on many platforms, it has no useful debug
Xoutput.
X.PP
XUse
X.IR "Sunpro make" " or " "smake"
Xif you have problems with a makefile.
X.IR "Sunpro make" " and " "smake" ,
Xboth have a \-D flag, that allows you to watch the makefiles
Xafter the first expansion. Use this option, if you are in doubt
Xif your makefile gets expanded the right way and if the right
Xrules are included.
XThere is also a \-d option that gives debugging output while 
Xmake is running. If you want more output, use \-dd, \-ddd and so on.
X.PP
X.I Smake
Xhas an option \-xM that shows you the include dependency for
Xmake rules.
X
X.PP
X.ne 20
XThe following is a list of all macros that are used in 
X.IR makefiles .
XDo not use them unless their meaning has been explained
Xbefore.
X.PP
X
X.BR \-O_ARCH ,
X.BR .OBJDIR ,
X.BR .SEARCHLIST ,
X.BR ALLTARGETS ,
X.BR AR ,
X.BR ARCH ,
X.BR ARCHDIR ,
X.BR ARCHDIRX ,
X.BR ARCH_DONE ,
X.BR ARFLAGS ,
X.BR AS ,
X.BR ASFLAGS ,
X.BR ASMFILES ,
X.BR ASOPTS ,
X.BR ASOPTX ,
X.BR CC ,
X.BR CCOM ,
X.BR CCOM_DEF ,
X.BR CFILES ,
X.BR CFLAGS ,
X.BR CHGRP ,
X.BR CHMOD ,
X.BR CHOWN ,
X.BR CLEAN_FILES ,
X.BR CLEAN_FILEX ,
X.BR CLOBBER_FILEX ,
X.BR COPTDYN ,
X.BR COPTGPROF ,
X.BR COPTOPT ,
X.BR COPTS ,
X.BR COPTX ,
X.BR CPP ,
X.BR CPPFLAGS ,
X.BR CPPOPTS ,
X.BR CPPOPTX ,
X.BR CTAGS ,
X.BR CURDIR ,
X.BR CWARNOPTS ,
X.BR CWOPTS ,
X.BR C_ARCH ,
X.BR DEFAULTSDIR ,
X.BR DEFAULTSROOT ,
X.BR DEFCCOM ,
X.BR DEFCCOM_DEF ,
X.BR DEFINCDIRS ,
X.BR DEFINCDIRS_DEF ,
X.BR DEFINSGRP ,
X.BR DEFINSMODE ,
X.BR DEFINSUSR ,
X.BR DEFUMASK ,
X.BR DEF_ROOT ,
X.BR DEP_DEP ,
X.BR DEP_FILE ,
X.BR DEP_SUFFIX ,
X.BR DIRNAME ,
X.BR DIRS ,
X.BR DYNLD ,
X.BR ETAGS ,
X.BR FLOAT_OPTIONS ,
X.BR HFILES ,
X.BR HOSTNAME ,
X.BR INCDIRS ,
X.BR INSDIR ,
X.BR INSGRP ,
X.BR INSGRP_DEF ,
X.BR INSMODE ,
X.BR INSMODE_DEF ,
X.BR INSTALL ,
X.BR INSUSR ,
X.BR INSUSR_DEF ,
X.BR INS_BASE ,
X.BR INS_KBASE ,
X.BR KARCH ,
X.BR KARCH_DEF ,
X.BR KDEFINES ,
X.BR K_ARCH ,
X.BR LD ,
X.BR LDCC ,
X.BR LDFLAGS ,
X.BR LDLIBS ,
X.BR LDOPTDYN ,
X.BR LDOPTS ,
X.BR LDOPTX ,
X.BR LDPATH ,
X.BR LIBS ,
X.BR LIBS_PATH ,
X.BR LIBX ,
X.BR LIB_KVM ,
X.BR LIB_MATH ,
X.BR LIB_PREFIX ,
X.BR LIB_SOCKET ,
X.BR LIB_SUFFIX ,
X.BR LN ,
X.BR LNDYNLIB ,
X.BR LOCALIZE ,
X.BR LORDER ,
X.BR MAKE ,
X.BR MK_FILES ,
X.BR MAKEPROG ,
X.BR MAKE_ARCH ,
X.BR MAKE_HOST ,
X.BR MAKE_MACH ,
X.BR MAKE_M_ARCH ,
X.BR MAKE_NAME ,
X.BR MAKE_OS ,
X.BR MAKE_OSDEFS ,
X.BR MAKE_OSREL ,
X.BR MANDIR ,
X.BR MANFILE ,
X.BR MANSECT ,
X.BR MANSECT_ADMIN ,
X.BR MANSECT_CMD ,
X.BR MANSECT_DEMOS ,
X.BR MANSECT_DEVICE ,
X.BR MANSECT_DRIVER ,
X.BR MANSECT_FILEFORM ,
X.BR MANSECT_GAMES ,
X.BR MANSECT_HDR ,
X.BR MANSECT_LIB ,
X.BR MANSECT_MACROS ,
X.BR MANSECT_NETWORK ,
X.BR MANSECT_SYSCALL ,
X.BR MANSECT_TABLES ,
X.BR MANSTYLE ,
X.BR MANSUFFIX ,
X.BR MANSUFF_ADMIN ,
X.BR MANSUFF_CMD ,
X.BR MANSUFF_DEMOS ,
X.BR MANSUFF_DEVICE ,
X.BR MANSUFF_DRIVER ,
X.BR MANSUFF_FILEFORM ,
X.BR MANSUFF_GAMES ,
X.BR MANSUFF_HDR ,
X.BR MANSUFF_LIB ,
X.BR MANSUFF_MACROS ,
X.BR MANSUFF_NETWORK ,
X.BR MANSUFF_SYSCALL ,
X.BR MANSUFF_TABLES ,
X.BR MARCH ,
X.BR MARCH_DEF ,
X.BR MKDEP ,
X.BR MKDEP_OUT ,
X.BR MKDIR ,
X.BR MV ,
X.BR M_ARCH ,
X.BR OARCH ,
X.BR OARCHDIR ,
X.BR OFILES ,
X.BR OINCSDIR ,
X.BR OLIBSDIR ,
X.BR OSDEFS ,
X.BR OSNAME ,
X.BR OSREL ,
X.BR O_ARCH ,
X.BR PALLDEP_FILE ,
X.BR PARCH ,
X.BR PARCH_DEF ,
X.BR PASMFILES ,
X.BR PDEP_FILE ,
X.BR PLOFILES ,
X.BR POFILES ,
X.BR PTARGET ,
X.BR PTARGET_BASE ,
X.BR PYOFILES ,
X.BR P_ARCH ,
X.BR RANLIB ,
X.BR RM ,
X.BR RMDEP ,
X.BR RMTARGET ,
X.BR RM_FORCE ,
X.BR RM_RECURS ,
X.BR RM_RF ,
X.BR RULESDIR ,
X.BR RUNPATH ,
X.BR SCRFILE ,
X.BR SHELL ,
X.BR SHL_SUFFIX ,
X.BR SRCFILE ,
X.BR SRCLIBS ,
X.BR SRCROOT ,
X.BR SUBARCH ,
X.BR SUBARCHDIR ,
X.BR SYMLINK ,
X.BR TAGS ,
X.BR TARGET ,
X.BR TARGETLIB ,
X.BR TARGETMAN ,
X.BR TARGET_BASE ,
X.BR TARGET_PATH ,
X.BR TSORT ,
X.BR UMASK ,
X.BR UMASK_DEF ,
X.BR UMASK_VAL ,
X.BR XARCH ,
X.BR XK_ARCH ,
X.BR XMK_FILE ,
X.BR XMAKEPROG ,
X.BR XM_ARCH ,
X.BR XP_ARCH ,
X.BR _CCOM ,
X.BR _DEFAULTSDIR ,
X.BR _DEFCCOM ,
X.BR _DEFINSGRP ,
X.BR _DEFINSMODE ,
X.BR _DEFINSUSR ,
X.BR _DEFUMASK ,
X.BR _DIRNAME ,
X.BR _INCDIRS ,
X.BR _MAKEPROG ,
X.BR _MARCH ,
X.BR _M_ARCH ,
X.BR _O_ARCH ,
X.BR _PARCH ,
X.BR _P_ARCH ,
X.BR _UNIQ ,
X.BR __CCOM ,
X.BR __DEFAULTSDIR ,
X.BR __DEFCCOM ,
X.BR __DEFINSGRP ,
X.BR __DEFINSMODE ,
X.BR __DEFINSUSR ,
X.BR __DEFUMASK ,
X.BR __DIRNAME ,
X.BR __INCDIRS ,
X.BR __MAKEPROG ,
X.BR __MARCH ,
X.BR __M_ARCH ,
X.BR __PARCH ,
X.BR __P_ARCH ,
X
X.SH BUGS
X
X.SH "Source Tree Hierarchy
X.LP
XThe following outline gives a quick tour through a typical
Xsource hierarchy:
X.LP
X.na
X.nh
X.PD 0
X.TP
X.B .../
Xroot directory of the source tree
X.
X.RS
X.TP
X.B Makefile
Xthe top Makefile
X.TP
X.B Targetdirs
Xa file containing a list of directories that are needed
Xfor that project.
XIf the system needs different target lists depending
Xon the target system architecture , use target specific files in
X.B .../TARGETS/
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../RULES/
Xthe location of makefiles (included rules)
X.
X.RS
X.TP
X.B rules.top
Xthe mandatory include rules (needed to setup basic rules)
X.TP
X.B rules.aux
Xrules needed to install a non localized auxiliary file
X.TP
X.B rules.cmd
Xrules needed to make an ordinary command (like /bin/sh)
X.TP
X.B rules.drv
Xrules needed to make a device driver
X.TP
X.B rules.lib
Xrules needed to make a standard (nonshared) library
X.TP
X.B rules.loc
Xrules needed to install a localized auxiliary file
X.TP
X.B rules.man
Xrules needed to install a localized manual page
X.TP
X.B rules.scr
Xrules needed to install a localized shell script
X.TP
X.B rules.shl
Xrules needed to make a shared library
X.TP
X.B rules.mks
Xrules needed to make more than one target in a specific directory
X.TP
X.B rules.dir
Xrules needed to make targets that are located in sub directories
Xto the current directory
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../DEFAULTS/
Xdefault definitions for various target architectures are
Xlocated in this directory. Templates for some architectures can
Xbe found in the
X.I .../TEMPLATES/
Xdirectory.
X.RS
X.TP
X.B Defaults
Xdefault definitions for that source tree. System dependent
Xdefinitions are in 
X.B .../DEFAULTS/Defaults.*
X.RE
X.TP
X.B .../TARGETS/
Xtarget list definitions for various target architectures are
Xlocated in this directory.
X.TP
X.B .../TEMPLATES/
Xtemplates that should be used inside the project
X(rename to Makefile, if it is the only makefile in that directory, 
Xrename to
X.I target.mk,
Xif there is more than one target in that directory)
X.
X.RS
X.TP
X.B Defaults
XDefaults file for the source root directory
X.TP
X.B Defaults.linux
XDefaults file for 
X.IR linux .
XThis should be installed in the 
X.B .../DEFAULTS/
Xdirectory.
X.TP
X.B Makefile.root
XMakefile for the source root directory
X.TP
X.B Makefile.aux
XMakefile for a non localized auxiliary file
X.TP
X.B Makefile.cmd
XMakefile for an ordinary command (like /bin/sh)
X.TP
X.B Makefile.lib
XMakefile for a standard (nonshared) library
X.TP
X.B Makefile.loc
XMakefile for a localized auxiliary file
X.TP
X.B Makefile.man
XMakefile for a localized manual page
X.TP
X.B Makefile_de.man
XMakefile for a localized manual page in the german locale
X.TP
X.B Makefile.scr
XMakefile for a localized shell script
X.TP
X.B Makefile.shl
XMakefile for a shared library
X.TP
X.B Makefile.drv
XMakefile for a device driver
X.TP
X.B Makefile.mks
XMakefile for more than one target in a specific directory
X.TP
X.B Makefile.dir
XMakefile for targets that are located in sub directories
Xto the current directory
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../cmd/
Xsource tree for normal commands
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I cmd 
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I myprog 
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B myprog/
Xdirectory where the sources for a specific command are located
X.
X.RS
X.TP
XMakefile
Xmakefile for
X.I myprog
X.TP
XMakefile.man
Xmakefile for the manual page of
X.I myprog
X.TP
Xmprog.c
Xsource for myprog
X.TP
Xmprog.tr
Xtroff source for the manual page of myprog
X.TP
X.B OBJ/
Xdirectory where system specific sub directories are located
X.
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for binaries that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.TP
X\&.\|.\|.
X.RE
X.br
X.TP
X\&.\|.\|.
X.RE
X.br
X.ne 5
X.TP
X.B .../lib/
Xdirectory where the sources for a libraries are located
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I lib 
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I libfoo
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B libfoo/
Xdirectory where all source files for libfoo are located
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../kernel
Xdirectory for kernel modules
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I kernel
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I drv 
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B drv/
Xdirectory where drivers are located
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I drv
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I mydrv
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B mydrv/
Xsource for a specific driver
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../include
Xdirectory for global include files that are used in that project
X.
X.TP
X.B .../bins
Xdirectory for binary programs that are created/needed while compiling
Xthe project
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for binaries that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../libs
Xdirectory for libraries that are created/needed while compiling
Xthe project
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for libraries that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../incs
Xdirectory for include files that are created/needed while compiling
Xthe project
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for include files that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.TP
X\&.\|.\|.
X.RE
X.
X.ad
X.PD
X
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xjoerg@schily.isdn.cs.tu-berlin.de
Xor
X.B
Xjs@cs.tu-berlin.de
Xor
X.B
Xjes@fokus.gmd.de
END-of-smake-1.2.1/man/man4/makefiles.4
echo x - smake-1.2.1/man/man4/makerules.4
sed 's/^X//' >smake-1.2.1/man/man4/makerules.4 << 'END-of-smake-1.2.1/man/man4/makerules.4'
X. \" @(#)makerules.4	1.3 01/04/29 Copyr 1996 J. Schilling
X. \" System Manual page for makefile system
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U
X.if t .ds s \(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.\".TH makefiles 4L "14. February 1997" "J\*org Schilling" "Schily\'s FILE FORMATS"
X.TH makerules 4L "14. February 1997" "J\*org Schilling" "GMD FOKUS FILE FORMATS"
X.SH NAME
Xmakerules \- system programmers guide for compiling projects on different platforms
X.SH SYNOPSIS
X.B "SRCROOT=	.\|.
X.br
X.B "RULESDIR=	RULES
X.br
X.B "include		$(SRCROOT)/$(RULESDIR)/rules.top
X.br
X.I "local defines are here
X.br
X.B "include		$(SRCROOT)/$(RULESDIR)/rules.*
X.PP
XSee chapter CURRENTLY SUPPORTED TARGET TYPES for possible values of
X.BR "rules.*" .
X
X.SH DESCRIPTION
XMakerules is a set of rules that allows compiling of structured
Xprojects with small and uniformly structured makefiles.
XAll rules are located in a central directory.
XCompiling the projects on different platforms can be done
Xsimultaneously without
Xthe need to modify any of the makefiles that are located
Xin the projects directories.
X.PP
XMakerules is a set of high level portability tools superior to
X.B autoconf
Xand easier to use.
X.PP
XThree make programs are currently supported:
X.IR "Sunpro make" , 
X.I "GNU make"
Xand
X.IR smake .
XIf you want to add support for other make programs, read the 
Xsections about the minimum requirements for a make program
Xand about the structure of the 
X.B "make rule 
Xsystem.
X.PP
XThis manual will help programmers who need to make modifications
Xon the make rule system itself. If you want to know something 
Xon how to use the 
X.B "makefile system
Xhave a look at 
X.BR makefiles (4).
X.PP
XThe main design goal was to have no definition on more than place
Xin the make rules. This implies that system programmers who
Xwant to add or modify rules must follow this goal in order not to
Xdestroy functionality in other places.
X.PP
XThe visible result for the user is a set of small and easy to read
Xmakefiles, each located in the project's leaf directory and therefore 
Xcalled
X.IR leaf -makefile.
X.PP
XEach of these 
X.IR leaf -makefiles,
Xin fact contains no rule at all. It simply defines some macros
Xfor the 
X.IR make -program
Xand includes two files from a central make rule depository.
XThese included files define the rules that are needed to compile
Xthe project.
X.PP
XEach 
X.IR leaf -makefile
Xis formed in a really simple way:
X.TP
X\(bu
XIt first defines two macros that define the relative location
Xof the project's root directory and the name of the directory
Xthat contains the complete set of of rules and then includes
Xthe rule file 
X.I rules.top
Xfrom the directory that forms the central rule depository.
XYou only have to edit the macro
X.I SRCROOT
Xto reflect the relative location of the project's root directory.
X.TP
X\(bu
XThe next part of a 
X.IR leaf -makefile
Xdefines macros that describe the target and the source.
XYou can only have one target per 
X.IR leaf -makefile.
XOf course, there may be many source files, that are needed to create
Xthat target.
XIf you want to make more than one target in a specific directory,
Xyou have to put more than one makefile into that directory.
XThis is the part of a makefile that describes a unique target.
XEdit this part to contain all source files, all local include files
Xand all non global compile time flags that are needed for your target.
XFor a typical target this is as simple as filling in a form.
X.TP
X\(bu
XEach
X.IR leaf -makefile
Xfinally includes a file from the rules directory that contains
Xrules for the appropriate type of target that is to be made
Xfrom this 
X.IR leaf -makefile.
X.PP
XThe makefile in each directory has to be called
X.IR Makefile .
XIf you want to have more than one makefile in a specific directory,
Xyou have to choose different names for the other makefiles.
X
X.SH "Currently Supported Target Types
X.PP
XThere are rules for the following type of targets:
X.TP 20
Xcommands
XThe make rules for user level commands like
X.IR cat ", " ls 
Xetc. are located in the file 
X.I rules.cmd
X.TP
Xdrivers
XThe make rules for device drivers
Xare located in the file 
X.I rules.drv
X.TP
Xlibraries
XThe make rules for non shared libraries
Xare located in the file 
X.I rules.lib
X.TP
Xshared libraries
XThe make rules for shared libraries
Xare located in the file 
X.I rules.shl
X.TP
Xlocalized files
XThe make rules for localized files
Xare located in the file 
X.I rules.loc
X.TP
Xnonlocalized files
XThe make rules for non localized files
Xare located in the file 
X.I rules.aux
X.TP
Xshell scripts
XThe make rules for shell scripts (a variant of localized files)
Xare located in the file 
X.I rules.scr
X.TP
Xmanual pages
XThe make rules for manual pages (a variant of localized files)
Xare located in the file 
X.I rules.man
X.TP
Xdiverted makefiles
XThe make rules for projects that need to have more than
Xone makefile in a specific directory
Xare located in the file 
X.I rules.mks
XIt contains a rule that diverts to the listed sub makefiles.
XEach sub makefile may be of any type.
X.TP
Xdirectories
XThe make rules for sub directories
Xare located in the file 
X.I rules.dir
X
X.SH "Minimum Requirements For A Make Program
XThe make rules currently have support for
X.IR "Sunpro make" , 
X.I "GNU make"
Xand
X.IR smake .
XIf you like to add support for other make programs, 
Xthey need to have some minimal features that go
Xbeyond the capabilities of the standard 
X.SM "UNIX
X.B make
Xprogram.
X.I BSDmake
Xcould be supported if it supports pattern matching rules correctly.
X.TP 20
Xinclude
XThe make program must be able to recursively include other files
Xfrom within a 
X.I makefile.
XThe name if the file to include must be allowed to be a macro.
XThe make program must be able to do this in a way that
Xif the file that should be included may be a result of make rule.
Xe.g if the file to be included does not exist or is outdated,
Xit should be built before an attempt is made to actually include it.
X.TP
Xappending to a macro
XA macro reference of the form:
X.sp
X.B "macro += addval
X.sp
Xshould append
X.B addval
Xto the string that is currently in
X.BR macro .
X.TP
Xsuffix macro replacement
XA macro reference of the form:
X.sp
X.B "out= $(macro\|:\|string1\|=\|string2)
X.sp
Xshould replace a suffix
X.I string1
Xto
X.I string2
Xin all words that are in
X.BR macro ,
Xwhere string1 is either a suffix, or a word to be replaced
Xin the macro definition, and string2 is the replacement 
Xsuffix or word.
X.I String1
Xand
X.I string2
Xmust be replaced correctly even if they are macros themselves.
XWords in a macro value are separated by SPACE, 
XTAB, and escaped NEWLINE characters.
X.TP
Xpattern macro replacement
XA macro reference of the form:
X.sp
X.B "out= $(macro\|:\|op%os\|=\|np%ns)
X.sp
Xshould replace a central pattern in 
X.BR macro ,
Xwhere 
X.B op 
Xis the existing (old) prefix and 
X.B os
Xis the existing
X(old) suffix,
X.B np 
Xand 
X.B ns 
Xare the new prefix and new suffix,
Xrespectively, and the pattern matched by % (a string of zero
Xor more characters), is carried forward from the value being
Xreplaced.
XFor example:
X.sp
X.B "PROGRAM=fabricate
X.br
X.B "DEBUG= $(PROGRAM:%=tmp/%\-g)
X.sp
Xsets the value of DEBUG to tmp/fabricate\-g.
X.IR Op ", " os ", " 
X.IR np " and " ns
Xmust be replaced correctly even if they are macros themselves.
X
X.SH "Understanding Basic Algorithms
XOne of the basic algorithms used in the make rule system
Xis needed to set an undefined macro to a guaranteed default value.
XBecause not all make programs have support for
X.I "if then else
Xstructures, a different method has to be used.
X.PP
XThe method used in
X.B "make rules
Xis implemented by using
X.B "suffix macro replacement
Xand
X.BR "pattern macro replacement" .
X.PP
X.ne 5
XFirst, a macro that contains a unique suffix is defined:
X.sp
X.B " # Define magic unique cookie
X.br
X.B " _UNIQ= 		.XxZzy\-
X.sp
XThis macro is used for all places where it is necessary to have
Xa macro with a guaranteed default value.
XThe following example shows the basic algorithm that is used to
Ximplement the phrase:
X.B If 
X.I $(MAKE_NAME)
Xcontains a value, 
X.B then
X.I $(XMAKEPROG)
Xwill be set to
X.I $(MAKE_NAME)
X.B else
X.I $(XMAKEPROG)
Xwill be set to
X.IR $(MAKEPROG) .
X.sp
X.B " _MAKEPROG=	$(_UNIQ)$(MAKE_NAME)
X.br
X.B " __MAKEPROG=	$(_MAKEPROG:$(_UNIQ)=$(MAKEPROG))
X.br
X.B " XMAKEPROG=	$(__MAKEPROG:$(_UNIQ)%=%)
X.sp
XThe first line in this example, sets the macro
X.I _MAKEPROG
Xto the concatenation of the value of
X.I MAKE_NAME
Xand
X.BR .XxZzy\- .
XIf the macro
X.I MAKE_NAME
Xis empty at this time, 
X.I _MAKEPROG
Xwill contain only 
X.BR .XxZzy\- .
X.PP
XIn the second line, 
X.I __MAKEPROG
Xis set to the value of
X.IR _MAKEPROG .
XIf 
X.I _MAKEPROG
Xcontains only 
X.B .XxZzy\-
Xthis implies, that
X.B .XxZzy\-
Xis the suffix. This suffix is then replaced
Xby the value of
X.IR MAKEPROG ,
Xin this case
X.I __MAKEPROG
Xwill contain the unmodified value of
X.IR MAKEPROG .
XIf 
X.I _MAKEPROG
Xcontains a concatenation of
X.B .XxZzy\-
Xand something else, 
X.B .XxZzy\-
Xwill not be a suffix, but a prefix of 
X.I _MAKEPROG
Xand for this reason
X.I __MAKEPROG
Xwill contain the unmodified value of
X.IR _MAKEPROG ,
Xwhich is a concatenation of
X.B .XxZzy\-
Xand the value of
X.IR MAKE_NAME .
X.PP
XIn the third line, 
X.I XMAKEPROG
Xis set to the value of
X.IR __MAKEPROG .
XIf 
X.I __MAKEPROG
Xhas the prefix
X.B .XxZzy\- 
Xat this time, 
X.B .XxZzy\-
Xis stripped of.
X
X.SH "The Structure in Make Macro names
X.PP
XThe names used for 
X.B "make macros
Xare structured in a way that allows to use 
X.BR grep (1)
Xto look for the names in the 
X.B make rules.
XTo allow this, no name must be a substring of another name.
X.PP
XIf a command needs options that have to be specified
Xin macros, there is a 
X.B "make macro
Xthat is named
X.I XXXFLAGS.
XThis is compliant to usual make file rules.
XThe are internal 
X.B "make macros
Xcalled
X.I XXXOPTS
Xand
X.I XXXOPTX
Xthat will be combined for 
X.IR XXXFLAGS :
X.sp
X.B "LDFLAGS= $(LDOPTS) $(LDOPTX)
X.sp
XWhere 
X.I XXXOPTS
Xis the name of the macro that is used internally
Xand 
X.I XXXOPTX
Xis the name of the macro that may be used from the
Xcommand line of the make program.
X.I XXXOPTX
Xtherefore is used to append to the content of 
X.I XXXFLAGS
XIf the value of
X.I XXXFLAGS
Xneed to be overwritten, 
X.I XXXOPTS
Xmay be used within the command line flags of the make program.
X
X.SH "The Structure Of The Make Rule System
X.SH "The Structure Of The Basic Rules in rules.top
XThe file 
X.B RULES/rules.top
Xfirst includes a rule file that depends on the 
Xmake program that is used.
XThe name of this file is
X.BI RULES/mk\- makeprog .id
Xwhere
X.I makeprog
Xhas to be replaced by the real name of
Xthe makeprogram e.g.
X.BR make ", " gmake ", " smake .
XThe purpose of this file is to set up a list of macros
Xthat identify the system where the project is currently built.
XThese macros have values that contain only lower case letters and define:
X.TP 28
Xthe processor architecture
XIf two systems run the same operating system, this
Xis a unique value if a simple user level program will
Xnot need to be recompiled in order to run on the other system.
XPossible values are 
X.BR sparc ", " mc68020 ", " pentium .
XThis is the output of
X.BR "uname \-p" .
XThe value is stored in
X.BR P_ARCH .
X.TP
Xthe kernel architecture
XIf two systems may use the same value for 
X.B P_ARCH
Xbut a heavily system dependent user level program
Xneed to be recompiled in order to run on the other
Xsystem, These two systems have different 
Xkernel architectures.
XThis is the output of
X.BR "uname \-m" .
XPossible values are 
X.BR sun3 ", " sun4c ", " sun4m .
XThe value is stored in
X.BR K_ARCH .
X.TP
Xthe machine architecture
XAn outdated macro that is useful only on sun systems.
XDo not use this, use 
X.B P_ARCH 
Xinstead.
XThis is the output of
X.BR arch .
XPossible values are 
X.BR sun3 ", " sun4 .
XThe value is stored in
X.BR M_ARCH .
X.TP
Xthe hostname
XThe name of the machine where the compilation takes place.
XThis is the output of
X.BR "uname \-n" .
XThe value is stored in
X.BR HOSTNAME .
X.TP
Xthe name of the operating system
XThis is the output of
X.BR "uname \-s" .
XPossible values are 
X.BR sunos ", " dgux ", " hp\-ux ", " irix .
XThe value is stored in
X.BR OSNAME .
X.TP
Xthe release of the operating system
XThis is the output of
X.BR "uname \-r" .
XPossible values are 
X.BR 5.5 ", " 4.1.4 .
XThe value is stored in
X.BR OSREL .
X.PP
XThe next file to be included from
X.B RULES/rules.top
Xis
X.BI RULES/os\- "operating system" .id .
XIt defines the macros
X.B O_ARCH
Xand
X.B \-O_ARCH 
Xand may modify one of the macros that are defined
Xin
X.BI RULES/mk\- makeprog .id .
XThe macros
X.B O_ARCH
Xand
X.B \-O_ARCH 
Xare used to distinguish between different operating systems.
XThe names of the compiler configuration files have
X.B \-O_ARCH 
Xas a central part.
XOn some operating systems e.g. 
X.B SunOS
Xand
X.B DG\-UX
Xit is necessary to distinguish between 
X.B "SunOS 4.x
Xand
X.B "SunOS 5.x
Xor
X.B "DG\-UX 3.x
Xand 
X.B "DG\-UX 4.x.
X.PP
XThe next file to be included from
X.B RULES/rules.top
Xis
X.BR Defaults .
XIt defines the macros
X.B DEFCCOM
X,
X.B DEFINCDIRS
X,
X.B LDPATH
X,
X.B RUNPATH
X,
X.B INS_BASE
Xand 
X.BR INS_KBASE .
XIf the definitions have to be different on
Xdifferent systems, this file may contain a line int the form:
X.sp
X.BI include  " $(SRCROOT)" /Defaults. $(O_ARCH)
X.sp
XThe actual definitions then have to be moved into
Xthese files.
X.PP
XNext, after setting up some internal defaults,
X.B RULES/rules.top
Xincludes the compiler configuration file with
Xthe name:
X.sp
X.I $(SRCROOT)/$(RULESDIR)/$(XARCH).rul
X.sp
XThis file contains all necessary 
X.B system dependent 
Xstuff that is needed to configure the C-compiler 
Xon the appropriate system.
XIt is a bad idea to create a new one from scratch.
XHave a look at the other compiler configuration
Xfiles and modify a similar file for your needs.
XNote that there are basically two criterias to
Xthat are important in a compiler configuration file.
XOne is whether the system uses the
X.I ELF
Xheader format or not. 
XThe other is whether the system uses
X.I shared libraries
Xor not.
X
X.SH "The Structure Of The Application Specific Rules
X.PP
XThe application specific rule files are designed in
Xsuch a way that they include all necessary stuff that
Xis needed for that specific task. The application specific
Xrule files are:
X.TP 25
X$(RULES)/rules.aux
XRules for installing non localized auxiliary files.
X.TP
X$(RULES)/rules.cmd
XRules for commands like 
X.I sh.
X.TP
X$(RULES)/rules.dir
XRules for sub directories.
X.TP
X$(RULES)/rules.drv
XRules for lodable drivers.
X.TP
X$(RULES)/rules.lib
XRules for static libraries.
X.TP
X$(RULES)/rules.loc
XRules for installing localized auxiliary files.
X.TP
X$(RULES)/rules.man
XRules for installing localized manual pages.
X.TP
X$(RULES)/rules.mks
XRules for sub makefiles.
X.TP
X$(RULES)/rules.mod
XRules for lodable stream modules.
X.TP
X$(RULES)/rules.scr
XRules for installing localized shell scripts.
X.TP
X$(RULES)/rules.shl
XRules for shared libraries.
X
X.SH "Understanding The Structure Of The Make Rule System
X.PP
XTo understand the structure of the 
X.B "make rule
Xsystem while doing changes, try to use the 
X.B \-xM
Xflag
Xin the
X.B smake
Xprogram.
XThis flag will print out the include dependency list
X(i.e. a list that tell you which make rules is included
Xfrom which other rule).
X.PP
XNote that some of the rules are make program dependent.
XIf you want to make changes to these rules you may need to
Xplace the definitions into separate rule files
Xeach for the appropriate make program.
XHave a look into the
X.B RULES
Xdirectory
Xfor some examples.
X
X.SH FILES
X\&.\|.\|./RULES/*
X.br
X\&.\|.\|./DEFAULTS/*
X.br
X\&.\|.\|./TARGETS/*
X.br
X\&.\|.\|./TEMPLATES/*
X
X.SH "SEE ALSO"
X.BR makefiles (4),
X.BR make (1),
X.BR gmake (1),
X.BR smake (1).
X
X.SH DIAGNOSTICS
XDiagnostic messages depend on the make program.
XHave a look at the appropriate man page.
X
X.SH NOTES
X.PP
XThe make rules
Xcan be used with 
X.IR "Sunpro make" ", " "Gnu make"
Xand 
X.IR smake .
XAlthough Gnu make runs on many platforms, it has no useful debug
Xoutput.
X.PP
XUse
X.IR "Sunpro make" " or " "smake"
Xif you have problems with a makefile.
X.IR "Sunpro make" " and " "smake" ,
Xboth have a \-D flag, that allows you to watch the makefiles
Xafter the first expansion. Use this option, if you are in doubt
Xif your makefile gets expanded the right way and if the right
Xrules are included.
XThere is also a \-d option that gives debugging output while 
Xmake is running. If you want more output, use \-dd, \-ddd and so on.
X.PP
X.I Smake
Xhas an option \-xM that shows you the include dependency for
Xmake rules.
X
X.SH BUGS
X
X.SH "Source Tree Hierarchy
X.LP
XThe following outline gives a quick tour through a typical
Xsource hierarchy:
X.LP
X.na
X.nh
X.PD 0
X.TP
X.B .../
Xroot directory of the source tree
X.
X.RS
X.TP
X.B Makefile
Xthe top Makefile
X.TP
X.B Defaults
Xdefault definitions for that source tree. System dependent
Xdefinitions are in 
X.B .../DEFAULTS/
X.TP
X.B Targetdirs
Xa file containing a list of directories that are needed
Xfor that project.
XIf the system needs different target lists depending
Xon the target system architecture , use target specific files in
X.B .../TARGETS/
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../RULES/
Xthe location of makefiles (included rules)
X.
X.RS
X.TP
X.B rules.top
Xthe mandatory include rules (needed to setup basic rules)
X.TP
X.B rules.aux
Xrules needed to install a non localized auxiliary file
X.TP
X.B rules.cmd
Xrules needed to make an ordinary command (like /bin/sh)
X.TP
X.B rules.drv
Xrules needed to make a device driver
X.TP
X.B rules.lib
Xrules needed to make a standard (nonshared) library
X.TP
X.B rules.loc
Xrules needed to install a localized auxiliary file
X.TP
X.B rules.man
Xrules needed to install a localized manual page
X.TP
X.B rules.scr
Xrules needed to install a localized shell script
X.TP
X.B rules.shl
Xrules needed to make a shared library
X.TP
X.B rules.mks
Xrules needed to make more than one target in a specific directory
X.TP
X.B rules.dir
Xrules needed to make targets that are located in sub directories
Xto the current directory
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../DEFAULTS/
Xdefault definitions for various target architectures are
Xlocated in this directory. Templates for some architectures can
Xbe found in the
X.I .../TEMPLATES/
Xdirectory.
X.TP
X.B .../TARGETS/
Xtarget list definitions for various target architectures are
Xlocated in this directory.
X.TP
X.B .../TEMPLATES/
Xtemplates that should be used inside the project
X(rename to Makefile, if it is the only makefile on that directory, 
Xrename to
X.I target.mk,
Xif there is more than one target in that directory)
X.
X.RS
X.TP
X.B Defaults
XDefaults file for the source root directory
X.TP
X.B Defaults.linux
XDefaults file for 
X.IR linux .
XThis sould be installed in the 
X.B .../DEFAULTS/
Xdirectory.
X.TP
X.B Makefile.root
XMakefile for the source root directory
X.TP
X.B Makefile.aux
XMakefile for a non localized auxiliary file
X.TP
X.B Makefile.cmd
XMakefile for an ordinary command (like /bin/sh)
X.TP
X.B Makefile.lib
XMakefile for a standard (nonshared) library
X.TP
X.B Makefile.loc
XMakefile for a localized auxiliary file
X.TP
X.B Makefile.man
XMakefile for a localized manual page
X.TP
X.B Makefile_de.man
XMakefile for a localized manual page in the german locale
X.TP
X.B Makefile.scr
XMakefile for a localized shell script
X.TP
X.B Makefile.shl
XMakefile for a shared library
X.TP
X.B Makefile.drv
XMakefile for a device driver
X.TP
X.B Makefile.mks
XMakefile for more than one target in a specific directory
X.TP
X.B Makefile.dir
XMakefile for targets that are located in sub directories
Xto the current directory
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../cmd/
Xsource tree for normal commands
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I cmd 
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I myprog 
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B myprog/
Xdirectory where the sources for a specific command are located
X.
X.RS
X.TP
XMakefile
Xmakefile for
X.I myprog
X.TP
XMakefile.man
Xmakefile for the manual page of
X.I myprog
X.TP
Xmprog.c
Xsource for myprog
X.TP
Xmprog.tr
Xtroff source for the manual page of myprog
X.TP
X.B OBJ/
Xdirectory where system specific sub directories are located
X.
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for binaries that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.TP
X\&.\|.\|.
X.RE
X.br
X.TP
X\&.\|.\|.
X.RE
X.br
X.ne 5
X.TP
X.B .../lib/
Xdirectory where the sources for a libraries are located
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I lib 
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I libfoo
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B libfoo/
Xdirectory where all source files for libfoo are located
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../kernel
Xdirectory for kernel modules
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I kernel
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I drv 
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B drv/
Xdirectory where drivers are located
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I drv
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I mydrv
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B mydrv/
Xsource for a specific driver
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../include
Xdirectory for global include files that are used in that project
X.
X.TP
X.B .../bins
Xdirectory for binary programs that are created/needed while compiling
Xthe project
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for binaries that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../libs
Xdirectory for libraries that are created/needed while compiling
Xthe project
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for libraries that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../incs
Xdirectory for include files that are created/needed while compiling
Xthe project
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for include files that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.TP
X\&.\|.\|.
X.RE
X.
X.ad
X.PD
X
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xjoerg@schily.isdn.cs.tu-berlin.de
Xor
X.B
Xjs@cs.tu-berlin.de
Xor
X.B
Xjes@fokus.gmd.de
END-of-smake-1.2.1/man/man4/makerules.4
echo x - smake-1.2.1/man/man4/makefiles.mk
sed 's/^X//' >smake-1.2.1/man/man4/makefiles.mk << 'END-of-smake-1.2.1/man/man4/makefiles.mk'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	makefiles
XMANSECT=	$(MANSECT_FILEFORM)
XMANSUFFIX=	$(MANSUFF_FILEFORM)
XMANFILE=	makefiles.4
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-smake-1.2.1/man/man4/makefiles.mk
echo x - smake-1.2.1/man/man4/makerules.mk
sed 's/^X//' >smake-1.2.1/man/man4/makerules.mk << 'END-of-smake-1.2.1/man/man4/makerules.mk'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	makerules
XMANSECT=	$(MANSECT_FILEFORM)
XMANSUFFIX=	$(MANSUFF_FILEFORM)
XMANFILE=	makerules.4
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-smake-1.2.1/man/man4/makerules.mk
echo x - smake-1.2.1/man/man4/Makefile
sed 's/^X//' >smake-1.2.1/man/man4/Makefile << 'END-of-smake-1.2.1/man/man4/Makefile'
X#ident "%W% %E% %Q%"
X###########################################################################
X# Sample makefile for sub-makes in one directory
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMK_FILES=	makefiles.mk makerules.mk
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.mks
X###########################################################################
END-of-smake-1.2.1/man/man4/Makefile
echo x - smake-1.2.1/man/Makefile
sed 's/^X//' >smake-1.2.1/man/Makefile << 'END-of-smake-1.2.1/man/Makefile'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for sub directory makes
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XDIRS=	man4
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dir
X###########################################################################
END-of-smake-1.2.1/man/Makefile
echo x - smake-1.2.1/Makefile
sed 's/^X//' >smake-1.2.1/Makefile << 'END-of-smake-1.2.1/Makefile'
X#
X# This is only the bootstrap makefile.
X# The 'real' makefile is called 'SMakefile'. It is used in the special
X# case of compiling 'smake' to help to make the compiling as simple
X# as possible. Smake first looks for 'SMakefile' and thus the 
X# command 'psmake/smake $@' will use 'SMakefile' to read rules.
X#
X.PHONY: all clean clobber distclean install ibins depend rmdep config TAGS tags rmtarget relink
X
Xall clean clobber distclean install ibins depend rmdep config TAGS tags rmtarget relink:
X	@echo "NOTICE: Using bootstrap 'Makefile' to make '$@'"
X	cd psmake && sh ./MAKE-all
X	./psmake/smake -r $@
END-of-smake-1.2.1/Makefile
echo c - smake-1.2.1/inc
mkdir -p smake-1.2.1/inc > /dev/null 2>&1
echo x - smake-1.2.1/inc/align_test.c
sed 's/^X//' >smake-1.2.1/inc/align_test.c << 'END-of-smake-1.2.1/inc/align_test.c'
X/* @(#)align_test.c	1.26 09/11/07 Copyright 1995-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef	lint
Xstatic	UConst char sccsid[] =
X	"@(#)align_test.c	1.26 09/11/07 Copyright 1995-2009 J. Schilling";
X#endif
X/*
X *	Generate machine dependant align.h
X *
X *	Copyright (c) 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#undef	NO_LONGLONG	/* Make sure that Llong wil be long long */
X#include <schily/utypes.h>
X
X/*
X * Be very careful here as MSVC does not implement long long but rather __int64
X * and once someone makes 'long long' 128 bits on a 64 bit machine, we need to
X * check for a MSVC __int128 type.
X */
X
X/*
X * CHECK_ALIGN needs SIGBUS, but DJGPP has no SIGBUS
X */
X/*#define	FORCE_ALIGN*/
X/*#define	OFF_ALIGN*/
X/*#define	CHECK_ALIGN*/
X
XEXPORT	int	main	__PR((int ac, char **av));
X
X#if	!defined(FORCE_ALIGN) && !defined(OFF_ALIGN) &&	!defined(CHECK_ALIGN)
X#define	OFF_ALIGN
X#endif
X
Xchar	buf[8192+1024];
Xchar	*buf_aligned;
X
X#ifdef	FORCE_ALIGN
X#	undef	CHECK_ALIGN
X#	undef	OFF_ALIGN
X#endif
X
X#ifdef	CHECK_ALIGN
X#	undef	FORCE_ALIGN
X#	undef	OFF_ALIGN
X#endif
X
X#ifdef	OFF_ALIGN
X#	undef	FORCE_ALIGN
X#	undef	CHECK_ALIGN
X#endif
X
X
X#ifdef	FORCE_ALIGN
X
X#define	ALIGN_short	sizeof (short)
X#define	ALIGN_int	sizeof (int)
X#define	ALIGN_long	sizeof (long)
X#define	ALIGN_longlong	sizeof (Llong)
X#define	ALIGN_float	sizeof (float)
X#define	ALIGN_double	sizeof (double)
X#define	ALIGN_ldouble	sizeof (long double)
X#define	ALIGN_ptr	sizeof (char *)
X
X#endif
X
X#ifdef	CHECK_ALIGN
X
X#include <schily/signal.h>
X#include <schily/setjmp.h>
XLOCAL	jmp_buf	jb;
X
XLOCAL	int	check_align	__PR((int (*)(char *, int),
X					void (*)(char *, int), int));
XLOCAL	int	check_short	__PR((char *, int));
XLOCAL	int	check_int	__PR((char *, int));
XLOCAL	int	check_long	__PR((char *, int));
XLOCAL	int	check_longlong	__PR((char *, int));
XLOCAL	int	check_float	__PR((char *, int));
XLOCAL	int	check_double	__PR((char *, int));
X#ifdef	HAVE_LONGDOUBLE
XLOCAL	int	check_ldouble	__PR((char *, int));
X#endif
XLOCAL	int	check_ptr	__PR((char *, int));
X
XLOCAL	int	speed_check	__PR((char *,
X					void (*)(char *, int), int));
XLOCAL	void	speed_short	__PR((char *, int));
XLOCAL	void	speed_int	__PR((char *, int));
XLOCAL	void	speed_long	__PR((char *, int));
XLOCAL	void	speed_longlong	__PR((char *, int));
XLOCAL	void	speed_float	__PR((char *, int));
XLOCAL	void	speed_double	__PR((char *, int));
X#ifdef	HAVE_LONGDOUBLE
XLOCAL	void	speed_ldouble	__PR((char *, int));
X#endif
XLOCAL	void	speed_ptr	__PR((char *, int));
X
X#define	ALIGN_short	check_align(check_short, speed_short, sizeof (short))
X#define	ALIGN_int	check_align(check_int, speed_int, sizeof (int))
X#define	ALIGN_long	check_align(check_long, speed_long, sizeof (long))
X#define	ALIGN_longlong	check_align(check_longlong, speed_longlong, sizeof (Llong))
X#define	ALIGN_float	check_align(check_float, speed_float, sizeof (float))
X#define	ALIGN_double	check_align(check_double, speed_double, sizeof (double))
X#define	ALIGN_ldouble	check_align(check_ldouble, speed_ldouble, sizeof (long double))
X#define	ALIGN_ptr	check_align(check_ptr, speed_ptr, sizeof (char *))
X
X#endif
X
X#ifdef	OFF_ALIGN
X
X#define	sm_off(s, m)	((size_t)&((s)0)->m)
X
XLOCAL	int	off_short	__PR((void));
XLOCAL	int	off_int		__PR((void));
XLOCAL	int	off_long	__PR((void));
XLOCAL	int	off_longlong	__PR((void));
XLOCAL	int	off_float	__PR((void));
XLOCAL	int	off_double	__PR((void));
X#ifdef	HAVE_LONGDOUBLE
XLOCAL	int	off_ldouble	__PR((void));
X#endif
XLOCAL	int	off_ptr		__PR((void));
X
X#define	ALIGN_short	off_short()
X#define	ALIGN_int	off_int()
X#define	ALIGN_long	off_long()
X#define	ALIGN_longlong	off_longlong()
X#define	ALIGN_float	off_float()
X#define	ALIGN_double	off_double()
X#define	ALIGN_ldouble	off_ldouble()
X#define	ALIGN_ptr	off_ptr()
X
X#endif
X
XLOCAL	void	printmacs	__PR((void));
X
X#ifdef	CHECK_ALIGN
XLOCAL	void	sig		__PR((int));
X
XLOCAL void
Xsig(signo)
X	int	signo;
X{
X	signal(signo, sig);
X	longjmp(jb, 1);
X}
X#endif
X
X#if defined(mc68000) || defined(mc68020)
X#define	MIN_ALIGN	2
X#else
X#define	MIN_ALIGN	2
X#endif
X
X
X#define	min_align(i)	(((i) < MIN_ALIGN) ? MIN_ALIGN : (i))
X
X/*
X * Make it LOCAL MacOS-X by default links against libcurses and
X * so we totherwise have a double defined "al".
X */
XLOCAL	char	al[] = "alignment value for ";
XLOCAL	char	ms[] = "alignment mask  for ";
XLOCAL	char	so[] = "sizeof ";
XLOCAL	char	sh[] = "short";
XLOCAL	char	in[] = "int";
XLOCAL	char	lo[] = "long";
XLOCAL	char	ll[] = "long long";
XLOCAL	char	fl[] = "float";
XLOCAL	char	db[] = "double";
XLOCAL	char	ld[] = "long double";
XLOCAL	char	pt[] = "pointer";
XLOCAL	char	mt[] = "max type";
X
X#define	xalign(x, a, m)		(((char *)(x)) + ((a) - (((UIntptr_t)(x))&(m))))
X
XEXPORT int
Xmain(ac, av)
X	int	ac;
X	char	**av;
X{
X	char	*p;
X	int	i;
X	int	s;
X	int	amax = 0;
X	int	smax = 0;
X
X#ifdef	CHECK_ALIGN
X#ifdef	SIGBUS
X	signal(SIGBUS, sig);
X#endif
X#endif
X
X	i = ((size_t)buf) % 1024;
X	i = 1024 - i;
X	p = &buf[i];
X	buf_aligned = p;
X
X#ifdef	DEBUG
X	fprintf(stderr, "buf: 0x%lX 0x%lX\n",
X		(unsigned long)buf, (unsigned long)xalign(buf, 1024, 1023));
X#endif
X
X	printf("/*\n");
X	printf(" * This file has been generated automatically\n");
X	printf(" * by %s\n", sccsid);
X	printf(" * do not edit by hand.\n");
X	printf(" */\n");
X
X	s = sizeof (short);
X	i  = ALIGN_short;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X	printf("\n");
X	printf("#define	ALIGN_SHORT	%d\t/* %s(%s *)\t*/\n", i, al, sh);
X	printf("#define	ALIGN_SMASK	%d\t/* %s(%s *)\t*/\n", i-1, ms, sh);
X	printf("#define	SIZE_SHORT	%d\t/* %s(%s)\t\t\t*/\n", s, so, sh);
X
X	s = sizeof (int);
X	i  = ALIGN_int;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X	printf("\n");
X	printf("#define	ALIGN_INT	%d\t/* %s(%s *)\t\t*/\n", i, al, in);
X	printf("#define	ALIGN_IMASK	%d\t/* %s(%s *)\t\t*/\n", i-1, ms, in);
X	printf("#define	SIZE_INT	%d\t/* %s(%s)\t\t\t\t*/\n", s, so, in);
X
X	s = sizeof (long);
X	i  = ALIGN_long;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X	printf("\n");
X	printf("#define	ALIGN_LONG	%d\t/* %s(%s *)\t\t*/\n", i, al, lo);
X	printf("#define	ALIGN_LMASK	%d\t/* %s(%s *)\t\t*/\n", i-1, ms, lo);
X	printf("#define	SIZE_LONG	%d\t/* %s(%s)\t\t\t*/\n", s, so, lo);
X
X#ifdef	HAVE_LONGLONG
X	s = sizeof (Llong);
X	i  = ALIGN_longlong;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X#endif
X	printf("\n");
X	printf("#define	ALIGN_LLONG	%d\t/* %s(%s *)\t*/\n", i, al, ll);
X	printf("#define	ALIGN_LLMASK	%d\t/* %s(%s *)\t*/\n", i-1, ms, ll);
X	printf("#define	SIZE_LLONG	%d\t/* %s(%s)\t\t\t*/\n", s, so, ll);
X
X	s = sizeof (float);
X	i  = ALIGN_float;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X	printf("\n");
X	printf("#define	ALIGN_FLOAT	%d\t/* %s(%s *)\t*/\n", i, al, fl);
X	printf("#define	ALIGN_FMASK	%d\t/* %s(%s *)\t*/\n", i-1, ms, fl);
X	printf("#define	SIZE_FLOAT	%d\t/* %s(%s)\t\t\t*/\n", s, so, fl);
X
X	s = sizeof (double);
X	i  = ALIGN_double;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X	printf("\n");
X	printf("#define	ALIGN_DOUBLE	%d\t/* %s(%s *)\t*/\n", i, al, db);
X	printf("#define	ALIGN_DMASK	%d\t/* %s(%s *)\t*/\n", i-1, ms, db);
X	printf("#define	SIZE_DOUBLE	%d\t/* %s(%s)\t\t\t*/\n", s, so, db);
X
X#ifdef	HAVE_LONGDOUBLE
X	s = sizeof (long double);
X	i  = ALIGN_ldouble;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X#endif
X	printf("\n");
X	printf("#define	ALIGN_LDOUBLE	%d\t/* %s(%s *)\t*/\n", i, al, ld);
X	printf("#define	ALIGN_LDMASK	%d\t/* %s(%s *)\t*/\n", i-1, ms, ld);
X	printf("#define	SIZE_LDOUBLE	%d\t/* %s(%s)\t\t\t*/\n", s, so, ld);
X
X	s = sizeof (char *);
X	i  = ALIGN_ptr;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X	printf("\n");
X	printf("#define	ALIGN_PTR	%d\t/* %s(%s *)\t*/\n", i, al, pt);
X	printf("#define	ALIGN_PMASK	%d\t/* %s(%s *)\t*/\n", i-1, ms, pt);
X	printf("#define	SIZE_PTR	%d\t/* %s(%s)\t\t\t*/\n", s, so, pt);
X
X	printf("\n");
X	printf("#define	ALIGN_TMAX	%d\t/* %s(%s *)\t*/\n", amax, al, mt);
X	printf("#define	ALIGN_TMMASK	%d\t/* %s(%s *)\t*/\n", amax-1, ms, mt);
X	printf("#define	SIZE_TMAX	%d\t/* %s(%s)\t\t\t*/\n", smax, so, mt);
X
X	printmacs();
X	return (0);
X}
X
XLOCAL void
Xprintmacs()
X{
Xprintf("\n\n");
Xprintf("/*\n * There used to be a cast to an int but we get a warning from GCC.\n");
Xprintf(" * This warning message from GCC is wrong.\n");
Xprintf(" * Believe me that this macro would even be usable if I would cast to short.\n");
Xprintf(" * In order to avoid this warning, we are now using UIntptr_t\n */\n");
X/*printf("\n");*/
X/*printf("\n");*/
Xprintf("#define	xaligned(a, s)		((((UIntptr_t)(a)) & (s)) == 0 )\n");
Xprintf("#define	x2aligned(a, b, s)	(((((UIntptr_t)(a)) | ((UIntptr_t)(b))) & (s)) == 0 )\n");
Xprintf("\n");
Xprintf("#define	saligned(a)		xaligned(a, ALIGN_SMASK)\n");
Xprintf("#define	s2aligned(a, b)		x2aligned(a, b, ALIGN_SMASK)\n");
Xprintf("\n");
Xprintf("#define	ialigned(a)		xaligned(a, ALIGN_IMASK)\n");
Xprintf("#define	i2aligned(a, b)		x2aligned(a, b, ALIGN_IMASK)\n");
Xprintf("\n");
Xprintf("#define	laligned(a)		xaligned(a, ALIGN_LMASK)\n");
Xprintf("#define	l2aligned(a, b)		x2aligned(a, b, ALIGN_LMASK)\n");
Xprintf("\n");
Xprintf("#define	llaligned(a)		xaligned(a, ALIGN_LLMASK)\n");
Xprintf("#define	ll2aligned(a, b)	x2aligned(a, b, ALIGN_LLMASK)\n");
Xprintf("\n");
Xprintf("#define	faligned(a)		xaligned(a, ALIGN_FMASK)\n");
Xprintf("#define	f2aligned(a, b)		x2aligned(a, b, ALIGN_FMASK)\n");
Xprintf("\n");
Xprintf("#define	daligned(a)		xaligned(a, ALIGN_DMASK)\n");
Xprintf("#define	d2aligned(a, b)		x2aligned(a, b, ALIGN_DMASK)\n");
Xprintf("\n");
Xprintf("#define	ldaligned(a)		xaligned(a, ALIGN_LDMASK)\n");
Xprintf("#define	ld2aligned(a, b)	x2aligned(a, b, ALIGN_LDMASK)\n");
Xprintf("\n");
Xprintf("#define	paligned(a)		xaligned(a, ALIGN_PMASK)\n");
Xprintf("#define	p2aligned(a, b)		x2aligned(a, b, ALIGN_PMASK)\n");
Xprintf("\n");
Xprintf("#define	maligned(a)		xaligned(a, ALIGN_TMMASK)\n");
Xprintf("#define	m2aligned(a, b)		x2aligned(a, b, ALIGN_TMMASK)\n");
X
Xprintf("\n\n");
Xprintf("/*\n * There used to be a cast to an int but we get a warning from GCC.\n");
Xprintf(" * This warning message from GCC is wrong.\n");
Xprintf(" * Believe me that this macro would even be usable if I would cast to short.\n");
Xprintf(" * In order to avoid this warning, we are now using UIntptr_t\n */\n");
Xprintf("#define	xalign(x, a, m)		( ((char *)(x)) + ( (a) - 1 - ((((UIntptr_t)(x))-1)&(m))) )\n");
Xprintf("\n");
Xprintf("#define	salign(x)		xalign((x), ALIGN_SHORT, ALIGN_SMASK)\n");
Xprintf("#define	ialign(x)		xalign((x), ALIGN_INT, ALIGN_IMASK)\n");
Xprintf("#define	lalign(x)		xalign((x), ALIGN_LONG, ALIGN_LMASK)\n");
Xprintf("#define	llalign(x)		xalign((x), ALIGN_LLONG, ALIGN_LLMASK)\n");
Xprintf("#define	falign(x)		xalign((x), ALIGN_FLOAT, ALIGN_FMASK)\n");
Xprintf("#define	dalign(x)		xalign((x), ALIGN_DOUBLE, ALIGN_DMASK)\n");
Xprintf("#define	ldalign(x)		xalign((x), ALIGN_LDOUBLE, ALIGN_LDMASK)\n");
Xprintf("#define	palign(x)		xalign((x), ALIGN_PTR, ALIGN_PMASK)\n");
Xprintf("#define	malign(x)		xalign((x), ALIGN_TMAX, ALIGN_TMMASK)\n");
X}
X
X#ifdef	CHECK_ALIGN
X/*
X * Routines to compute the alignement by checking if the assignement
X * causes a bus error.
X * Some systems (e.g. Linux on DEC Aplha) will allow to fetch any
X * type from any address. On these systems we must check the speed
X * because unaligned fetches will take more time.
X */
XLOCAL int
Xcheck_align(cfunc, sfunc, tsize)
X	int	(*cfunc)();
X	void	(*sfunc)();
X	int	tsize;
X{
X		int	calign;
X		int	align;
X		int	tcheck;
X		int	t;
X	register int	i;
X	register char	*p = buf_aligned;
X
X	for (i = 1; i < 128; i++) {
X		if (!setjmp(jb)) {
X			(cfunc)(p, i);
X			break;
X		}
X	}
X#ifdef	DEBUG
X	fprintf(stderr, "i: %d tsize: %d\n", i, tsize);
X#endif
X	if (i == tsize)
X		return (i);
X
X	align = calign = i;
X	tcheck = speed_check(p, sfunc, i);
X#ifdef	DEBUG
X	fprintf(stderr, "tcheck: %d\n", tcheck);
X#endif
X
X	for (i = calign*2; i <= tsize; i *= 2) {
X		t = speed_check(p, sfunc, i);
X#ifdef	DEBUG
X		fprintf(stderr, "tcheck: %d t: %d i: %d\n", tcheck, t, i);
X		fprintf(stderr, "tcheck - t: %d ... * 3: %d\n",  (tcheck - t), (tcheck - t) * 3);
X#endif
X		if (((tcheck - t) > 0) && ((tcheck - t) * 3) > tcheck) {
X#ifdef	DEBUG
X			fprintf(stderr, "kleiner\n");
X#endif
X			align = i;
X			tcheck = t;
X		}
X	}
X	return (align);
X}
X
XLOCAL int
Xcheck_short(p, i)
X	char	*p;
X	int	i;
X{
X	short	*sp;
X
X	sp = (short *)&p[i];
X	*sp = 1;
X	return (0);
X}
X
XLOCAL int
Xcheck_int(p, i)
X	char	*p;
X	int	i;
X{
X	int	*ip;
X
X	ip = (int *)&p[i];
X	*ip = 1;
X	return (0);
X}
X
XLOCAL int
Xcheck_long(p, i)
X	char	*p;
X	int	i;
X{
X	long	*lp;
X
X	lp = (long *)&p[i];
X	*lp = 1;
X	return (0);
X}
X
X#ifdef	HAVE_LONGLONG
XLOCAL int
Xcheck_longlong(p, i)
X	char	*p;
X	int	i;
X{
X	Llong	*llp;
X
X	llp = (Llong *)&p[i];
X	*llp = 1;
X	return (0);
X}
X#endif
X
XLOCAL int
Xcheck_float(p, i)
X	char	*p;
X	int	i;
X{
X	float	*fp;
X
X	fp = (float *)&p[i];
X	*fp = 1.0;
X	return (0);
X}
X
XLOCAL int
Xcheck_double(p, i)
X	char	*p;
X	int	i;
X{
X	double	*dp;
X
X	dp = (double *)&p[i];
X	*dp = 1.0;
X	return (0);
X}
X
X#ifdef	HAVE_LONGDOUBLE
XLOCAL int
Xcheck_ldouble(p, i)
X	char	*p;
X	int	i;
X{
X	long double	*dp;
X
X	dp = (long double *)&p[i];
X	*dp = 1.0;
X	return (0);
X}
X#endif
X
XLOCAL int
Xcheck_ptr(p, i)
X	char	*p;
X	int	i;
X{
X	char	**pp;
X
X	pp = (char  **)&p[i];
X	*pp = (char *)1;
X	return (0);
X}
X
X/*
X * Routines to compute the alignement by checking the speed of the
X * assignement.
X * Some systems (e.g. Linux on DEC Aplha) will allow to fetch any
X * type from any address. On these systems we must check the speed
X * because unaligned fetches will take more time.
X */
XLOCAL void
Xspeed_short(p, n)
X	char	*p;
X	int	n;
X{
X	short	*sp;
X	int	i;
X
X	sp = (short *)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*sp = i;
X}
X
XLOCAL void
Xspeed_int(p, n)
X	char	*p;
X	int	n;
X{
X	int	*ip;
X	int	i;
X
X	ip = (int *)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*ip = i;
X}
X
XLOCAL void
Xspeed_long(p, n)
X	char	*p;
X	int	n;
X{
X	long	*lp;
X	int	i;
X
X	lp = (long *)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*lp = i;
X}
X
X#ifdef	HAVE_LONGLONG
XLOCAL void
Xspeed_longlong(p, n)
X	char	*p;
X	int	n;
X{
X	Llong *llp;
X	int	i;
X
X	llp = (Llong *)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*llp = i;
X}
X#endif
X
XLOCAL void
Xspeed_float(p, n)
X	char	*p;
X	int	n;
X{
X	float	*fp;
X	int	i;
X
X	fp = (float *)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*fp = i;
X}
X
XLOCAL void
Xspeed_double(p, n)
X	char	*p;
X	int	n;
X{
X	double	*dp;
X	int	i;
X
X	dp = (double *)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*dp = i;
X}
X
X#ifdef	HAVE_LONGDOUBLE
XLOCAL void
Xspeed_ldouble(p, n)
X	char	*p;
X	int	n;
X{
X	long double	*dp;
X	int	i;
X
X	dp = (long double *)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*dp = i;
X}
X#endif
X
XLOCAL void
Xspeed_ptr(p, n)
X	char	*p;
X	int	n;
X{
X	char	**pp;
X	int	i;
X
X	pp = (char **)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*pp = (char *)i;
X}
X
X#include <schily/time.h>
X#include <schily/times.h>
XLOCAL int
Xspeed_check(p, sfunc, n)
X	char	*p;
X	void	(*sfunc)();
X	int	n;
X{
X	struct tms tm1;
X	struct tms tm2;
X
X	times(&tm1);
X	(*sfunc)(p, n);
X	times(&tm2);
X
X#ifdef	DEBUG
X	fprintf(stderr, "t1: %ld\n", (long) tm2.tms_utime-tm1.tms_utime);
X#endif
X
X	return ((int) tm2.tms_utime-tm1.tms_utime);
X}
X
X#endif	/* CHECK_ALIGN */
X
X#ifdef	OFF_ALIGN
X/*
X * Routines to compute the alignement by using the knowledge
X * of the C-compiler.
X * We define a structure and check the padding that has been inserted
X * by the compiler to keep the apropriate type on a properly aligned
X * address.
X */
XLOCAL int
Xoff_short()
X{
X	struct ss {
X		char	c;
X		short	s;
X	} ss;
X	ss.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct ss *, s));
X}
X
XLOCAL int
Xoff_int()
X{
X	struct si {
X		char	c;
X		int	i;
X	} si;
X	si.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct si *, i));
X}
X
XLOCAL int
Xoff_long()
X{
X	struct sl {
X		char	c;
X		long	l;
X	} sl;
X	sl.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct sl *, l));
X}
X
X#ifdef	HAVE_LONGLONG
XLOCAL int
Xoff_longlong()
X{
X	struct sll {
X		char	c;
X		Llong	ll;
X	} sll;
X	sll.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct sll *, ll));
X}
X#endif
X
XLOCAL int
Xoff_float()
X{
X	struct sf {
X		char	c;
X		float	f;
X	} sf;
X	sf.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct sf *, f));
X}
X
XLOCAL int
Xoff_double()
X{
X	struct sd {
X		char	c;
X		double	d;
X	} sd;
X	sd.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct sd *, d));
X}
X
X#ifdef	HAVE_LONGDOUBLE
XLOCAL int
Xoff_ldouble()
X{
X	struct sd {
X		char		c;
X		long double	ld;
X	} sd;
X	sd.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct sd *, ld));
X}
X#endif
X
XLOCAL int
Xoff_ptr()
X{
X	struct sp {
X		char	c;
X		char	*p;
X	} sp;
X	sp.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct sp *, p));
X}
X
X#endif	/* OFF_ALIGN */
END-of-smake-1.2.1/inc/align_test.c
echo x - smake-1.2.1/inc/avoffset.c
sed 's/^X//' >smake-1.2.1/inc/avoffset.c << 'END-of-smake-1.2.1/inc/avoffset.c'
X/* @(#)avoffset.c	1.30 09/07/10 Copyright 1987, 1995-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)avoffset.c	1.30 09/07/10 Copyright 1987, 1995-2009 J. Schilling";
X#endif
X/*
X * This program is a tool to generate the file "avoffset.h".
X * It is used by functions that trace the stack to get to the top of the stack.
X *
X * It generates two defines:
X *	AV_OFFSET	- offset of argv relative to the main() frame pointer
X *	FP_INDIR	- number of stack frames above main()
X *			  before encountering a NULL pointer.
X *
X *	Copyright (c) 1987, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X#include <schily/stdlib.h>
X#include <schily/signal.h>
X
X#ifdef	HAVE_SCANSTACK
X#	include <schily/stkframe.h>
X#endif
X
XLOCAL	RETSIGTYPE	handler 	__PR((int signo));
XEXPORT	int		main		__PR((int ac, char **av));
XLOCAL	int		stack_direction	__PR((long *lp));
X
XLOCAL	RETSIGTYPE
Xhandler(signo)
X	int	signo;
X{
X	fprintf(stderr, "Warning: Cannot scan stack on this environment.\n");
X	exit(0);
X}
X
X
Xint
Xmain(ac, av)
X	int	ac;
X	char	**av;
X{
X	int		stdir;
X#ifdef	HAVE_SCANSTACK
X	register struct frame *fp;
X	register int	i = 0;
X	register int	o = 0;
X
X	/*
X	 * As the SCO OpenServer C-Compiler has a bug that may cause
X	 * the first function call to getfp() been done before the
X	 * new stack frame is created, we call getfp() twice.
X	 */
X	(void) getfp();
X	fp = (struct frame *)getfp();
X#endif
X
X#ifdef	SIGBUS
X	signal(SIGBUS, handler);
X#endif
X	signal(SIGSEGV, handler);
X#ifdef	SIGILL
X	signal(SIGILL, handler);	/* For gcc -m64/sparc on FreeBSD */
X#endif
X
X	printf("/*\n");
X	printf(" * This file has been generated automatically\n");
X	printf(" * by %s\n", sccsid);
X	printf(" * do not edit by hand.\n");
X	printf(" *\n");
X	printf(" * This file includes definitions for AV_OFFSET and FP_INDIR.\n");
X	printf(" * FP_INDIR is the number of fp chain elements above 'main'.\n");
X	printf(" * AV_OFFSET is the offset of &av[0] relative to the frame pointer in 'main'.\n");
X	printf(" *\n");
X	printf(" * If getav0() does not work on a specific architecture\n");
X	printf(" * the program which generated this include file may dump core.\n");
X	printf(" * In this case, the generated include file does not include\n");
X	printf(" * definitions for AV_OFFSET and FP_INDIR but ends after this comment.\n");
X	printf(" * If AV_OFFSET or FP_INDIR are missing in this file, all programs\n");
X	printf(" * which use the definitions are automatically disabled.\n");
X	printf(" */\n");
X	stdir = stack_direction(0);
X	printf("#define	STACK_DIRECTION	%d\n", stdir);
X	fflush(stdout);
X
X#ifdef	HAVE_SCANSTACK
X	/*
X	 * Note: Scanning the stack to look for argc/argv
X	 *	 works only in the main thread.
X	 */
X	while (fp->fr_savfp) {
X		if (fp->fr_savpc == 0)
X			break;
X
X		fp = (struct frame *)fp->fr_savfp;
X
X		i++;
X	}
X	/*
X	 * Do not add any printf()'s before this line to allow avoffset
X	 * to abort without printing more than the comment above.
X	 */
X	fp = (struct frame *)getfp();
X	o = ((char *)av) - ((char *)fp);
X	if ((o % sizeof (char *)) != 0) {
X		fprintf(stderr, "AV_OFFSET value (%d) not a multiple of pointer size.\n", o);
X		fprintf(stderr, "Disabling scanning the stack.\n");
X		exit(0);
X	}
X	if (o < -1000 || o > 1000) {
X		fprintf(stderr, "AV_OFFSET value (%d) does not look reasonable.\n", o);
X		fprintf(stderr, "Disabling scanning the stack.\n");
X		exit(0);
X	}
X	printf("#define	AV_OFFSET	%d\n", o);
X	printf("#define	FP_INDIR	%d\n", i);
X#endif
X	exit(0);
X	return (0);	/* keep lint happy */
X}
X
XLOCAL int
Xstack_direction(lp)
X	long	*lp;
X{
X	auto long	*dummy[4];
X	int		i;
X
X	for (i = 0; i < 4; i++)
X		dummy[i] = lp;
X
X	if (lp == 0) {
X		return (stack_direction((long *)dummy));
X	} else {
X		if ((long *)dummy == lp)
X			return (0);
X		return (((long *)dummy > lp) ? 1 : -1);
X	}
X}
X
X#ifdef	HAVE_SCANSTACK
X#define	IS_AVOFFSET
X#include "getfp.c"
X#endif
END-of-smake-1.2.1/inc/avoffset.c
echo x - smake-1.2.1/inc/getfp.c
sed 's/^X//' >smake-1.2.1/inc/getfp.c << 'END-of-smake-1.2.1/inc/getfp.c'
X/* @(#)getfp.c	1.18 08/06/14 Copyright 1988-2008 J. Schilling */
X/*
X *	Get frame pointer
X *
X *	Copyright (c) 1988-2008 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X#ifndef	IS_AVOFFSET
X/*
X * We usually don't like to compile a getfp() that returns junk data in case
X * we cannot scan the stack.
X * The only way to find this out is by including avoffset.h. Unfortunately, we
X * need to be able to use getfp() from avoffset.c in order to check if the
X * return value is usable or junk. To be able to do this, we include getfp.c
X * from avoffset.c and define IS_AVOFFSET before.
X */
X#include <schily/avoffset.h>
X
X#if	!defined(AV_OFFSET) || !defined(FP_INDIR)
X#	ifdef	HAVE_SCANSTACK
X#	undef	HAVE_SCANSTACK
X#	endif
X#endif
X#endif
X
X#ifdef	HAVE_SCANSTACK
X#include <schily/stkframe.h>
X
X#define	MAXWINDOWS	32
X#define	NWINDOWS	7
X
X#if defined(sparc) && defined(__GNUC__)
X#	define	FP_OFF		0x10	/* some strange things on sparc gcc */
X#else
X#	define	FP_OFF		0
X#endif
X
XEXPORT	void	**___fpoff	__PR((char *cp));
X
XEXPORT void **
Xgetfp()
X{
X		long	**dummy[1];
X
X#ifdef	sparc
X	flush_reg_windows(MAXWINDOWS-2);
X#endif
X	return ((void **)((struct frame *)___fpoff((char *)&dummy[0]))->fr_savfp);
X}
X
X/*
X * Don't make it static to avoid inline optimization.
X *
X * We need this function to fool GCCs check for returning addresses
X * from outside the functions local address space.
X */
XEXPORT void **
X___fpoff(cp)
X	char	*cp;
X{
X	long ***lp;
X
X	lp = (long ***)(cp + FP_OFF);
X	lp++;
X	return ((void **)lp);
X}
X
X#ifdef	sparc
XEXPORT int
Xflush_reg_windows(n)
X	int	n;
X{
X	if (--n > 0)
X		flush_reg_windows(n);
X	return (0);
X}
X#endif
X
X#else	/* HAVE_SCANSTACK */
X
XEXPORT void **
Xgetfp()
X{
X	raisecond("getfp", 0);
X	return ((void **)0);
X}
X
X#endif	/* HAVE_SCANSTACK */
END-of-smake-1.2.1/inc/getfp.c
echo x - smake-1.2.1/inc/Makefile
sed 's/^X//' >smake-1.2.1/inc/Makefile << 'END-of-smake-1.2.1/inc/Makefile'
X#ident "@(#)Makefile	1.3 08/09/10 "
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMK_FILES= align_test.mk avoffset.mk
X
Xalign_test.c:
X	@echo "	==> MAKING SYMLINKS in ." && sh ./MKLINKS
X$(ALLTARGETS): align_test.c
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.mks
X###########################################################################
END-of-smake-1.2.1/inc/Makefile
echo x - smake-1.2.1/inc/align_test.mk
sed 's/^X//' >smake-1.2.1/inc/align_test.mk << 'END-of-smake-1.2.1/inc/align_test.mk'
X#ident @(#)align_test.mk	1.2 06/10/31 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily/$(OARCH)
XTARGET=		align.h
XTARGETC=	align_test
XCPPOPTS +=	-D__OPRINTF__
XCFILES=		align_test.c
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.inc
X###########################################################################
END-of-smake-1.2.1/inc/align_test.mk
echo x - smake-1.2.1/inc/avoffset.mk
sed 's/^X//' >smake-1.2.1/inc/avoffset.mk << 'END-of-smake-1.2.1/inc/avoffset.mk'
X#ident @(#)avoffset.mk	1.2 06/10/31 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily/$(OARCH)
XTARGET=		avoffset.h
XTARGETC=	avoffset
XCPPOPTS +=	-DUSE_SCANSTACK
XCPPOPTS +=	-D__OPRINTF__
XCFILES=		avoffset.c
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.inc
X###########################################################################
END-of-smake-1.2.1/inc/avoffset.mk
echo x - smake-1.2.1/inc/README
sed 's/^X//' >smake-1.2.1/inc/README << 'END-of-smake-1.2.1/inc/README'
XThe programs 'smake and 'star' are of strategic importance for portability.
X
XAt least for these programs, getfp.c should be a copy rather than a link.
X
XOnce you have star running on a system with no symlinks, you may use star
Xto create copies rather than links.
END-of-smake-1.2.1/inc/README
echo x - smake-1.2.1/inc/MKLINKS
sed 's/^X//' >smake-1.2.1/inc/MKLINKS << 'END-of-smake-1.2.1/inc/MKLINKS'
X#!/bin/sh
X###########################################################################
X#ident "@(#)MKLINKS	1.1 08/07/31 "
X###########################################################################
X# Written 2008 by J. Schilling
X###########################################################################
X# Copyright (c) 2008 J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xsymlink="ln -s"
Xrm -f xxzzy.123 xxzzy.345
Xecho test > xxzzy.123
X$symlink xxzzy.123 xxzzy.345
Xtest $? = 0 || symlink=cp
Xtest -r xxzzy.345 || symlink=cp
Xrm -f xxzzy.123 xxzzy.345
X###########################################################################
X
X$symlink	../lib/align_test.c	.
X$symlink	../lib/avoffset.c	.
X$symlink	../lib/getfp.c		.
END-of-smake-1.2.1/inc/MKLINKS
echo x - smake-1.2.1/README.linux
sed 's/^X//' >smake-1.2.1/README.linux << 'END-of-smake-1.2.1/README.linux'
XWARNING: Do not use 'mc' to extract the tar file!
XAll mc versions before 4.0.14 cannot extract symbolic links correctly.
X
XLinux is the most self incompatible OS I know. If you have any problem,
Xfirst carefully read this file.
X
XLinux includes the gnu make program by default but it is called 'make' on linux.
XYou will definitely need the shell script Gmake.linux to use gmake
Xon a linux system.
X
XInstall it as /usr/bin/Gmake with:
X
Xcp Gmake.linux /usr/bin/Gmake
X
XThen compile the system by calling:
X
X/usr/bin/Gmake
Xor ./Gmake.linux
X
XNOTE for all Linux 2.5.x versions and all Linux versions before 2.6.8:
X
X	Linux did ship with defective kernel include files starting
X	with 2.5.x. These defective kernel include files did prevent
X	compilation. If you have problems compiling software and see
X	error messages related to include/scsi/scsi.h & include/scsi/sg.h
X	either upgrade to Linux-2.6.8 or newer or remove /usr/src/linux
X
XNOTE for all Linux versions using libc.so.6:
X
X	Libc.so.6 is definitely a big problem in binary compatibility.
X	First you should note that Linux is not a OS but only a kernel.
X
X	Creating a OS from kernel, libraries and applications is done
X	by various companies that create "Linux distributions". It seems
X	that these companies (e.g. SuSE and Red Hat) are fighting wars
X	against each other.
X
X	There is no guarantee that a binary that has been compiled
X	on one Linux distribution will run correctly on a different
X	release of the same vendor or on a distribution from a different 
X	vendor. You cannot copy binaries between different Linux
X	versions, always compile the sources by yourself.
X
X	We should consider that the name libc.so.6 is burned out for
X	these incompatibility reasons. But stop: Don't be too fast.
X	The dynamic linker on Linux does not work correctly. It has
X	been derived from the SunOS 4.x linker (which worked correctly)
X	but  the Linux version does not even warn if it could not
X	find a library with the right major version number. Until
X	this is fixed it makes no sense to switch to libc.so.7
X
X	See below for more information.
X
X
XNOTES for S.u.S.E distributions: If the "make" run aborts with strange messages,
Xthen you need to unset an environment variable called PROMPT_COMMAND
XIt contains illegal values for a make file system.
X
X		I M P O R T A N T
X
X	please carefully read all notes:
X
XNewer Linux kernels (from 2.3.51) moved SVSv shared memory into a filesystem.
XIf you get messages with error code EINVAL related to shared memory, you 
Xmost likely installed a newer kernel on an old system that does not mount
Xthe new shared memory filesystem.
XFor information on this filesystem please read README.linux-shm
X
XIf you have any problems to access a device on the SCSI bus, check your
X/dev/sg devices first. Your system should either only have /dev/sga...
Xor /dev/sg0... The newer Linux kernel use /dev/sg0... so the actual
XSCSI transport code checks for /dev/sg0... first. Many Linux installations
Xhave too few /dev/sg* device nodes. This is because of the funny device 
Xmapping. It may be possible that one SCSI device eats up 8 /dev/sg* entries.
XI recommend to have at least 20 /dev/sg* device nodes.
X
XIn any case: first read the man page for hints how to specify the device.
XIf nothing helps, first run e.g. cdrecord -scanbus. If this does not find
Xyour device, the problem is in your kernel or system installation.
XIf scanning the bus finds the device, you are using the wrong device name.
XIf nothing help try to call e.g. strace cdrecord 
X
XLinux ATAPI hints:
X
XRead README.ATAPI to learn how to use ATAPI drives with the SCSI transport
Xlibrary.
X
XLinux SCSI hints:
X
XIf you want to use the user SCSI library on a target that is connected
Xto a SCSI hostadapter which is not the first, you need to apply a patch
Xto your Linux kernel code. This patch is located in the file 
X
XLinux.scsi-patch
X
XPlease chdir to /usr/src, call
Xpatch  < Linux.scsi-patch
Xand re-compile and re-install your kernel.
X
XLinux kernels past 2.0.30 will probably already have this patch included.
X
XI recommend to use Linux 2.0.35 or later or Linux 2.1.115 or later.
XThese versions of Linux will include ATAPI support in a way needed by cdrecord.
XLinux 2.1.115 or newer will in addition support the Parallel Port / ATAPI
Xadapters found in some CD-R or CD-RW drives.
X
XIMPORTANT:
X
X-	Linux driver design oddities ******************************************
X	Although cdrecord supports to use dev=/dev/sgc, it is not recommended
X	and it is unsupported.
X
X	The /dev/sg* device mapping in Linux is not stable! Using dev=/dev/sgc
X	in a shell script may fail after a reboot because the device you want
X	to talk to has moved to /dev/sgd. For the proper and OS independent
X	dev=<bus>,<tgt>,<lun> syntax read the man page of cdrecord.
X
X-	Linux Kernel bug ******************************************************
X	In some architectures (at least on sparc / alpha / ppc) kernels prior
X	to 2.0.32 are not usable because the call to mlockall() kills cdrecord.
X
X-	You configured you kernel the wrong way *******************************
X	If you get a message like:
X
X		cdrecord: Function not implemented. shmget failed
X
X	You need to look for three possible reasons:
X
X	-	You are using a Linux Kernel 2.3.51 or newer.
X		Read README.linux-shm
X
X	-	You removed SVSv IPC from your kernel. You need to enable it again.
X		Run a Linux kernel config and recompile with SYSv IPC.
X
X	-	The allowed amount of shared memory in the kernel is
X		not sufficient. See next main point for a solution:
X
X-	Linux kernel oddities *************************************************
X	You may need to edit /usr/src/linux/include/asm*/shmparam.h to allow at least 
X	4 MB of shared memory for your architecture by modifying SHMMAX
X	and re-compile/re-install Linux !
X	(note that Linux for Intel by default allows 16 MB) 
X
X	Do this by e.g. changing the #define for SHMMAX to:
X
X	#define SHMMAX 0x1000000                /* max shared seg size (bytes) */
X
X	This will allow 16 MB for shared memory.
X
X-	Linux kernel memory management ****************************************
X	If you get the message: "Cannot allocate memory. Cannot send SCSI cmd via ioctl"
X	Your kernel/include files are inconsistent.
X
X		This seems to be the case with most actual Linux kernels!!!!!!
X
X	Make sure, that the include file /usr/src/linux/include/scsi/sg.h
X	reflects the actual kernel. Usually, the files /usr/include/scsi/sg.h
X	and /usr/src/linux/include/scsi/sg.h should be identical.
X
X	**** Never change the content of /usr/src/linux/include/scsi/sg.h without
X	properly recompiling the kernel. Cdrecord depends on the fact that
X	the value of the define SG_BIG_BUFF uses the same value as the actual
X	kernel. Use cdrecord -scanbus -debug to get the value of SG_BIG_BUFF
X	with cdrecord has been compiled. An output of:
X
X		scsi_getbuf: 32768 bytes
X
X	indicates that cdrecord has been compiled with 32k SG_BIG_BUF
X
X	The Linux 'sg' driver is the worst driver design, I've ever seen.
X
X-	Linux Binary incompatibility *****************************************
X	If any of the options that take a equal sign ('=') in the middle does
X	not work correctly (e.g. dev= or if=) you are using a binary that
X	does not work correctly on your current OS distribution.
X
X	If dev=0,0,0 does not work but -dev=0,0,0 works you found this
X	incompatibility. This problem is caused by an incompatibility
X	in ctype.h and it seems that there are other compatibility problems
X	e.g. with reading /etc/default/cdrecord.
X
X	You cannot copy binaries between different Linux versions,
X	always compile the sources by yourself. 
X
X	If a hint from a user is correct then even a RPM binary built for
X	RH-6.2 did not work on RH-6.2 because of these binary incompatibilities.
X
X
XJoerg
END-of-smake-1.2.1/README.linux
echo c - smake-1.2.1/conf
mkdir -p smake-1.2.1/conf > /dev/null 2>&1
echo x - smake-1.2.1/conf/makeinc
sed 's/^X//' >smake-1.2.1/conf/makeinc << 'END-of-smake-1.2.1/conf/makeinc'
X#!/bin/sh
X#
X# @(#)makeinc	1.5 08/10/12 Copyright 1998 J. Schilling
X###########################################################################
X# Copyright 1998 by J. Schilling
X###########################################################################
X#
X# Automake script for the Schily (SING) makefile system
X#
X###########################################################################
X#
X#	Creates the following files:
X#
X#	./RULES/os-sunos.id
X#	./RULES/os-sunos.def
X#	./DEFAULTS/Defaults.sunos
X#	./RULES/sun4c-sunos-gcc.rul
X#
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMAILADDR=joerg.schilling@fokus.fraunhofer.de
X
X###########################################################################
X# Option processing
X###########################################################################
Xcase $1 in
X
X-r)
X	shift
X	SRCROOT=$1
X	shift
X	;;
Xesac
X
Xif [ $# -lt 1 ]; then
X	echo 'Usage: makeinc [-r srcroot] filename'	1>&2
X	exit 1
Xfi
X
X###########################################################################
X# Find SRCROOT if not specified via option
X###########################################################################
Xif [ .$SRCROOT = . ]; then
X	SRCROOT=.
X	loop=1
X	while [ $loop -lt 100 ]; do
X		if [ ! -d $SRCROOT ]; then
X			# Abort on ENAMETOOLONG
X			break
X		fi
X		if [ -r $SRCROOT/RULES/rules.top ]; then
X			break
X		fi
X		if [ "$SRCROOT" = . ]; then
X			SRCROOT=".."
X		else
X			SRCROOT="$SRCROOT/.."
X		fi
X		loop="`expr $loop + 1`"
X	done
X	if [ ! -r $SRCROOT/RULES/rules.top ]; then
X		echo "Cannot find SRCROOT directory" 1>&2
X		exit 1
X	fi
Xfi
X
X###########################################################################
X# Real start of automake script
X###########################################################################
Xecho 'NOTICE:		Automake script called'
Xif [ -r $1 ]; then
X	echo "WARNING:	requested file '$1' already exists"
X	exit
Xfi
Xecho "IMPORTANT:	Please report your architecture to $MAILADDR"
Xecho
Xecho "Trying to create missing rule file '$1'"
Xsleep 1
Xecho
X
XCC=cc
Xgcc -v 2> /dev/null && CC=gcc
Xecho "CC:		$CC"
X
XMANSTYLE=sysv
Xif [ -r /usr/man/*man7*/man* -o -r /usr/share/man/*man7*/man* \
X	-o -r /usr/man/*man7*/ascii* -o -r /usr/share/man/*man7*/ascii* ]; then 
X	MANSTYLE=bsd
Xfi
Xecho "MANSTYLE:	$MANSTYLE"
X
X	case $1 in
X
X	*os-*.id)
X		echo $1
X		OSNAME=`echo $1 | sed -e 's;\(.*\)os-\(.*\)\.id;\2;'`
X		echo '###########################################################################' > $1
X		echo "# OS specific MACRO definitions for $OSNAME"	>> $1
X		echo "# This file is auto generated and may be wrong"	>> $1
X		echo '###########################################################################' >> $1
X		echo "O_ARCH=		$OSNAME"	>> $1 
X		echo '-O_ARCH=	-$(O_ARCH)'		>> $1 
X		;;
X	
X	*os-*.def)
X		echo $1
X		OSNAME=`echo $1 | sed -e 's;\(.*\)os-\(.*\)\.def;\2;'`
X		echo '###########################################################################' > $1
X		echo "# Global os definitions for $OSNAME"		>> $1
X		echo "# This file is auto generated and may be wrong"	>> $1
X		echo '###########################################################################' >> $1
X		echo "MANSTYLE=	$MANSTYLE"		>> $1 
X		;;
X	
X	*Defaults.*)
X		echo $1
X		OSNAME=`echo $1 | sed -e 's;\(.*\)\.\(.*\);\2;'`
X		echo '###########################################################################' > $1
X		echo "# global definitions for $OSNAME Systems"		>> $1
X		echo "# This file is auto generated and may be wrong"	>> $1
X		echo '###########################################################################' >> $1
X		if [ $CC = gcc ]; then
X			cat $SRCROOT/TEMPLATES/Defaults.gcc >> $1
X		else
X			cat $SRCROOT/TEMPLATES/Defaults.xcc >> $1
X		fi
X		echo							>> $1
X		echo '###########################################################################' >> $1
X		echo "# Do compilattion with minimal warnings"		>> $1
X		echo '###########################################################################' >> $1
X		echo "CWARNOPTS="					>> $1
X		;;
X	
X	*-*-*cc.rul)
X		ARCH=`echo $1 | sed -e 's;\(.*\)/\(.*\)-\(.*\)-\(.*\).rul;\2;'`
X		OSNAME=`echo $1 | sed -e 's;\(.*\)/\(.*\)-\(.*\)-\(.*\).rul;\3;'`
X		CCOM=`echo $1 | sed -e 's;\(.*\)/\(.*\)-\(.*\)-\(.*\).rul;\4;'`
X		DIR=`echo $1 | sed -e "s;\(.*\)/$ARCH-$OSNAME-$CCOM.rul;\1;"`
X		echo "ARCH:		$ARCH"
X		echo "OSNAME:		$OSNAME"
X		echo "CCOM:		$CCOM"
X		echo "DIR:		$DIR"
X		echo $1
X		echo "Trying to find similar architecture for '$1'"
X		similar=`ls $DIR/*-$OSNAME-$CCOM.rul 2>/dev/null| head -1`
X		SARCH=`echo $similar | sed -e "s;\(.*\)/\(.*\)-$OSNAME-$CCOM.rul;\2;"`
X
X		if [ .$similar != . ]; then
X			echo 'Found similar architecture             ' "'$similar'"
X			echo 'creating symlink:' ln -s $SARCH-$OSNAME-$CCOM.rul $1
X			echo "Please send a mail to $MAILADDR to report whether this works or not"
X			sleep 10
X			ln -s $SARCH-$OSNAME-$CCOM.rul $1 || cp $SARCH-$OSNAME-$CCOM.rul $1
X			exit
X		else
X			echo '###########################################################################' > $1
X			echo "# global definitions for $OSNAME Systems"		>> $1
X			echo "# This file is auto generated and may be wrong"	>> $1
X			echo '###########################################################################' >> $1
X
X			if [ $CCOM = gcc ]; then
X				echo 'Using generic GCC machine configuration file' 
X				cat $SRCROOT/TEMPLATES/temp-gcc.rul >> $1
X			else
X				echo 'Using generic dumb cc machine configuration file' 
X				cat $SRCROOT/TEMPLATES/temp-xcc.rul >> $1
X			fi
X		fi
X		;;
X
X	#######################################################################
X	# This entry is not really needed...
X	#######################################################################
X	*TARGETS/Targetdirs*)
X		echo "Linking $1 to $SRCROOT/TARGETS/Targetdirs"
X		ln -s Targetdirs $1
X		;;
X	*)
X		echo "Unknown rule to build: '$1'."
X		exit 1
X		;;
X	
X	esac
X
Xecho "Please send a mail to $MAILADDR to report whether this works or not"
Xsleep 10
END-of-smake-1.2.1/conf/makeinc
echo x - smake-1.2.1/conf/install-sh
sed 's/^X//' >smake-1.2.1/conf/install-sh << 'END-of-smake-1.2.1/conf/install-sh'
X#! /bin/sh
X#
X# @(#)install-sh	1.11 09/01/29 1999-2009 J. Schilling
X#
X# install - install a program, script, or datafile
X# This comes from X11R5 (mit/util/scripts/install.sh).
X# Mods to make install-sh behave reasonable when called by
X# non root user by J. Schilling
X#
X# Copyright 1991 by the Massachusetts Institute of Technology
X# Copyright 1999-2009 by J. Schilling
X#
X# Permission to use, copy, modify, distribute, and sell this software and its
X# documentation for any purpose is hereby granted without fee, provided that
X# the above copyright notice appear in all copies and that both that
X# copyright notice and this permission notice appear in supporting
X# documentation, and that the name of M.I.T. not be used in advertising or
X# publicity pertaining to distribution of the software without specific,
X# written prior permission.  M.I.T. makes no representations about the
X# suitability of this software for any purpose.  It is provided "as is"
X# without express or implied warranty.
X#
X# Calling this script install-sh is preferred over install.sh, to prevent
X# `make' implicit rules from creating a file called install from it
X# when there is no Makefile.
X#
X# This script is compatible with the BSD install script, but was written
X# from scratch.  It can only install one file at a time, a restriction
X# shared with many OS's install programs.
X
X# on BSDi chown is in /usr/sbin
X
XPATH="${PATH}:/usr/sbin"
X
X# set DOITPROG to echo to test this script
X
X# Don't use :- since 4.3BSD and earlier shells don't like it.
Xdoit="${DOITPROG-}"
X
X
X# put in absolute paths if you don't have them in your path; or use env. vars.
X
Xmvprog="${MVPROG-mv}"
Xcpprog="${CPPROG-cp}"
Xchmodprog="${CHMODPROG-chmod}"
Xchownprog="${CHOWNPROG-chown}"
Xchgrpprog="${CHGRPPROG-chgrp}"
Xstripprog="${STRIPPROG-strip}"
Xrmprog="${RMPROG-rm}"
Xmkdirprog="${MKDIRPROG-mkdir}"
X
Xtransformbasename=""
Xtransform_arg=""
Xinstcmd="$mvprog"
Xchmodcmd="$chmodprog 0755"
Xchowncmd=""
Xchgrpcmd=""
Xstripcmd=""
Xrmcmd="$rmprog -f"
Xmvcmd="$mvprog"
Xsrc=""
Xdst=""
Xdir_arg=""
Xnoclobber=""
X
X#
X# Check if we are 'root' to avoid chown as non root user
X#
Xrootflag=FALSE
Xdstdir=/tmp/xd.$$
Xdsttmp=${dstdir}/xx.$$
Xtrap "rm -f ${dsttmp}; rm -rf ${dstdir}" 0
Xmkdir ${dstdir}
X${chmodcmd} ${dstdir}
Xecho > ${dsttmp}
X${chownprog} root ${dsttmp} 2> /dev/null && ${chmodcmd} ${dsttmp} 2> /dev/null && rootflag=TRUE
X#
X# Win95 has no user 'root' and chown succeeds always.
X# Unfortunately, there is also no user 'bin' and chown complains about
X# user 'bin' being non-existant.
X# Check if the file is now really owned by 'root' to avoid the Win95 probems
X#
Xif [ $rootflag = TRUE ]; then
X	ls -l ${dsttmp} 2> /dev/null | grep root > /dev/null || rootflag=FALSE
Xfi
Xrm -f ${dsttmp}
Xrm -rf ${dstdir}
X
Xwhile [ x"$1" != x ]; do
X    case $1 in
X	-help)
X	    echo "Usage:	install-sh [options] srcfile dstfile"
X	    echo "	install-sh [options] srcfile dstdir"
X	    echo "	install-sh [options] -d dstdir"
X	    echo "Options:"
X	    echo "	-c		copy srcfile rather than renaming it"
X	    echo "	-d dir		create dir"
X	    echo "	-noclobber	do not replace existing files"
X	    echo "	-m mode		install new files with 'mode'"
X	    echo "	-o owner	install new files with 'owner'"
X	    echo "	-g group	install new files with 'group'"
X	    echo "	-s		strip file after installing"
X	    echo "	-t=sed-cmd	sed command to transform the basename"
X	    echo "	-b=suff		file name suffix for -t"
X	    exit
X	    continue;;
X
X	-c) instcmd="$cpprog"
X	    shift
X	    continue;;
X
X	-d) dir_arg=true
X	    shift
X	    continue;;
X
X	-noclobber) noclobber=true
X	    shift
X	    continue;;
X
X	-m) chmodcmd="$chmodprog $2"
X	    Asuidflag=FALSE
X	    Ssuidflag=FALSE
X	    if [ $rootflag = FALSE ] ; then
X		echo "$2" | grep '[1-7][0-7][0-7][0-7]$' > /dev/null && Asuidflag=TRUE
X		echo "$2" | grep '[st]' > /dev/null && Ssuidflag=TRUE
X	    fi
X	    if [ $Asuidflag = TRUE ]; then
X		nmode=`echo "$2" | sed 's/\(.*\)\([0-7][0-7][0-7]\)/\2/'`
X		chmodcmd="$chmodprog $nmode"
X		echo "install: -m option with suid/sticky available only to root -- ignored"
X	    fi
X	    if [ $Ssuidflag = TRUE ]; then
X		nmode=`echo "$2" | sed 's/\(.*\)/\1,a-st/'`
X		chmodcmd="$chmodprog $nmode"
X		echo "install: -m option with suid/sticky available only to root -- ignored"
X	    fi
X	    shift
X	    shift
X	    continue;;
X
X	-o) if [ $rootflag = TRUE ]
X	    then
X		chowncmd="$chownprog $2"
X	    else
X		echo "install: -o option available only to root -- ignored"
X	    fi
X	    shift
X	    shift
X	    continue;;
X
X	-g) if [ $rootflag = TRUE ]
X	    then
X		chgrpcmd="$chgrpprog $2"
X	    else
X		echo "install: -g option available only to root -- ignored"
X	    fi
X	    shift
X	    shift
X	    continue;;
X
X	-s) stripcmd="$stripprog"
X	    shift
X	    continue;;
X
X	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
X	    shift
X	    continue;;
X
X	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
X	    shift
X	    continue;;
X
X	*)  if [ x"$src" = x ]
X	    then
X		src=$1
X	    else
X		# this colon is to work around a 386BSD /bin/sh bug
X		:
X		dst=$1
X	    fi
X	    shift
X	    continue;;
X    esac
Xdone
X
Xif [ x"$src" = x ]
Xthen
X	echo "install:	no input file specified"
X	exit 1
Xelse
X	true
Xfi
X
Xif [ x"$dir_arg" != x ]; then
X	dst=$src
X	src=""
X	
X	if [ -d $dst ]; then
X		instcmd=:
X	else
X		instcmd=mkdir
X	fi
Xelse
X
X# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
X# might cause directories to be created, which would be especially bad 
X# if $src (and thus $dsttmp) contains '*'.
X
X	if [ -f $src -o -d $src ]
X	then
X		true
X	else
X		echo "install:  $src does not exist"
X		exit 1
X	fi
X	
X	if [ x"$dst" = x ]
X	then
X		echo "install:	no destination specified"
X		exit 1
X	else
X		true
X	fi
X
X# If destination is a directory, append the input filename; if your system
X# does not like double slashes in filenames, you may need to add some logic
X
X	if [ -d $dst ]
X	then
X		dst="$dst"/`basename $src`
X	else
X		true
X	fi
Xfi
X
X## this sed command emulates the dirname command
Xdstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
X
X# Make sure that the destination directory exists.
X#  this part is taken from Noah Friedman's mkinstalldirs script
X
X# Skip lots of stat calls in the usual case.
Xif [ ! -d "$dstdir" ]; then
XdefaultIFS='	
X'
XIFS="${IFS-${defaultIFS}}"
X
XoIFS="${IFS}"
X# Some sh's can't handle IFS=/ for some reason.
XIFS='%'
Xset - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
XIFS="${oIFS}"
X
Xpathcomp=''
X
Xwhile [ $# -ne 0 ] ; do
X	pathcomp="${pathcomp}${1}"
X	shift
X
X	if [ ! -d "${pathcomp}" ] ;
X        then
X		$mkdirprog "${pathcomp}"
X	else
X		true
X	fi
X
X	pathcomp="${pathcomp}/"
Xdone
Xfi
X
Xif [ x"$dir_arg" != x ]
Xthen
X	$doit $instcmd $dst &&
X
X	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
X	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
X	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
X	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
Xelse
X
X# If we're going to rename the final executable, determine the name now.
X
X	if [ x"$transformarg" = x ] 
X	then
X		dstfile=`basename $dst`
X	else
X		dstfile=`basename $dst $transformbasename | 
X			sed $transformarg`$transformbasename
X	fi
X
X# don't allow the sed command to completely eliminate the filename
X
X	if [ x"$dstfile" = x ] 
X	then
X		dstfile=`basename $dst`
X	else
X		true
X	fi
X
X# Check whether we might clobber an existing file
X
X	if [ "$noclobber" -a -r "$dstdir/$dstfile" ]; then
X		echo "File '$dstdir/$dstfile' exists"
X		echo "Will not overwrite '$dstdir/$dstfile'."
X		exit
X	fi
X
X# Make a temp file name in the proper directory.
X
X	dsttmp=$dstdir/#inst.$$#
X
X# Move or copy the file name to the temp name
X
X	$doit $instcmd $src $dsttmp &&
X
X	trap "rm -f ${dsttmp}" 0 &&
X
X# and set any options; do chmod last to preserve setuid bits
X
X# If any of these fail, we abort the whole thing.  If we want to
X# ignore errors from any of these, just make sure not to ignore
X# errors from the above "$doit $instcmd $src $dsttmp" command.
X
X	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
X	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
X	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
X	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
X
X# Now rename the file to the real destination.
X
X	$doit $rmcmd -f $dstdir/$dstfile &&
X	$doit $mvcmd $dsttmp $dstdir/$dstfile 
X
Xfi &&
X
X
Xexit 0
END-of-smake-1.2.1/conf/install-sh
echo x - smake-1.2.1/conf/src-get
sed 's/^X//' >smake-1.2.1/conf/src-get << 'END-of-smake-1.2.1/conf/src-get'
X#!/bin/sh
X# @(#)src-get  1.21 09/12/22 Copyright 2005-2009 J. Schilling
X###########################################################################
X# Written 2005-2009 by J. Schilling
X###########################################################################
X# A source package controlling system which should behave similar to
X# the Debian apt-get command.
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X#
X# Set up server URL for package description files.
X# Must have a slash at the end.
X#
Xserver_url=http://sps.berlios.de/pkg/testing/
X
X#
X# If you do not have write access to a server, you may set up a local copy
X#
X#server_url=file:///tmp/pkg/
X
X#
X# Set up default pager.
X#
XPAGER=${PAGER-more}
X
X#
X# Set up default wget.
X#
XWGET=${WGET-sh_wget}
X
Xcase $PATH in
X	*/usr/sfw/bin*)
X		;;
X	*)
X		if [ -d /usr/sfw/bin ]; then
X			XPATH=/usr/sfw/bin:${XPATH-}
X		fi
X		;;
Xesac
X
XPATH=${XPATH-}${PATH}
X
Xusage() {
X	echo "Usage: src-get [cmd] [target]..."
X	echo "Possible commands are:"
X	echo "	init	initialize skeleton makefile system in empty directory"
X	echo "	setup	setup platform dependent build commands in bins/<archdir>/*"
X	echo "	install	install a source package"
X	echo "	list	list installable packages"
X	echo "	shell	start a SHELL with a clean environment"
X	echo "	compile	do a full compilation from SRCROOT with a clean environment"
X	echo "	version	print the 'srg-get' version"
X}
X
Xif [ $# -lt 1 ]; then
X	usage
X	exit 1
Xfi
Xcmd=$1
Xshift
X
Xcase "$cmd" in
X	*version*)
X		;;
X
X	*)
X		echo "cmd:  $cmd"
X		echo "args: $@"
X		;;
Xesac
X
Xexcode=255
Xtrap 'rm -rf /tmp/.d.$$; if [ -f ./$do_wget_file ]; then rm -f ./$do_wget_file; fi; exit 1' 1 2 15
Xtrap 'rm -rf /tmp/.d.$$; exit $excode' 0
X
XZIP_SUFFIX=
XZIP=cat
XUNZIP=cat
X
Xif bzip2 --help > /dev/null 2>&1; then
X	UNZIP="bzip2 -d"
X	ZIP=bzip2
X	ZIP_SUFFIX=.bz2
Xelif gzip --help > /dev/null 2>&1; then
X	UNZIP="gzip -d"
X	ZIP=gzip
X	ZIP_SUFFIX=.gz
Xfi
X
Xget_srcroot() {
X	SRCROOT=.
X	loop=1
X	while [ $loop -lt 100 ]; do
X		if [ ! -d $SRCROOT ]; then
X			# Abort on ENAMETOOLONG
X			break
X		fi
X		if [ -r $SRCROOT/RULES/rules.top ]; then
X			break
X		fi
X		if [ "$SRCROOT" = . ]; then
X			SRCROOT=".."
X		else
X			SRCROOT="$SRCROOT/.."
X		fi
X		loop="`expr $loop + 1`"
X	done
X	if [ ! -r $SRCROOT/RULES/rules.top ]; then
X		echo "Cannot find SRCROOT directory" 1>&2
X		return 1
X	fi
X	return 0
X}
X
Xcd_srcroot() {
X	if [ ".$SRCROOT" = ".$NO_SRCROOT" ]; then
X		echo "SRCROOT not known."			1>&2
X		exit 1
X	fi
X	cd "$SRCROOT" || (echo "Cannot chdir to $SRCROOT"	1>&2; exit 1)
X	SRCROOT=.
X}
X
Xset_binspath() {
X	PWD=`pwd`
X	if [ "$SRCROOT" = . ];then
X		PATH="${PWD}/${BINS}:${PWD}/conf:${PATH}"
X	else
X		PATH="${PWD}/${SRCROOT}/${BINS}:${PWD}/${SRCROOT}/conf:${PATH}"
X	fi
X	export PATH
X	unset PWD
X}
X
Xget_bins() {
X	if [ ".$SRCROOT" = ".$NO_SRCROOT" ]; then
X		return 1
X	fi
X	OARCH=`${SRCROOT}/conf/oarch.sh`
X	BINS=bins/"$OARCH"
X}
X
Xneed_mfs() {
X	if [ ! -r ${SRCROOT}/RULES/rules.top ]; then
X		echo "A makefile system is not installed."	1>&2
X		echo "Run 'src-get init' first."		1>&2
X		exit 1
X	fi
X}
X
Xcheck_bins() {
X	if [	-r ${SRCROOT}/${BINS}/bzip2 -a	\
X		-r ${SRCROOT}/${BINS}/gzip -a	\
X		-r ${SRCROOT}/${BINS}/lndir -a	\
X		-r ${SRCROOT}/${BINS}/patch -a	\
X		-r ${SRCROOT}/${BINS}/smake -a	\
X		-r ${SRCROOT}/${BINS}/star -a	\
X		-r ${SRCROOT}/${BINS}/wget	]; then
X			if [ "$WGET" = sh_wget ]; then
X				WGET="wget --passive-ftp"
X			fi
X			return 0
X	fi
X	return 1
X}
X
Xneed_bins() {
X	need_mfs
X	get_bins
X	if check_bins; then
X		return 0
X	else
X		echo "Setup for $OARCH not yet done."	1>&2
X		echo "Run 'src-get setup' first."	1>&2
X		exit 1
X	fi
X}
X
X
Xsh_wget() {
X	excode=255
X
X	if [ $# -lt 1 ]; then
X		echo "Usage: wget.sh URL"			1>&2
X		echo "Only ftp:// type URLs are supported"	1>&2
X		return 1
X	fi
X
X	wget_url="$1"
X	wget_rest=`echo "$wget_url" | sed -e 's,^ftp://,,'`
X	if [ "$wget_url" = "$wget_rest" ]; then
X		echo "Unsupported protocol in" "$wget_url"	1>&2
X		return 1
X	fi
X	wget_host=`echo "$wget_rest" | sed -e 's,/.*,,'`
X	wget_file=`echo "$wget_rest" | sed -e 's,^[^/]*/,,'`
X	wget_dname=`echo "$wget_file" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
X	wget_fname=`echo "$wget_file" | sed -e 's,.*/,,'`
X
X	mkdir /tmp/.d.$$
X	cat <<-	EOF > /tmp/.d.$$/.netrc
X		machine "$wget_host"  login ftp password wget.sh@Makefiles.Schily.build
X	EOF
X	chmod 600 /tmp/.d.$$/.netrc
X
X	HOME=/tmp/.d.$$ ftp "$wget_host" <<- EOF
X		bin
X		passive on
X		cd "$wget_dname"
X		dir "$wget_fname"
X		hash on
X		verbose on
X		get "$wget_fname"
X		bye
X	EOF
X	excode=$?
X	rm -fr /tmp/.d.$$
X	return $excode
X}
X
Xdo_wget() {
X	do_wget_url="$1"
X	case "$1" in
X	file:///*)
X		do_wget_rest=`echo "$do_wget_url" | sed -e 's,^file://,,'`
X		do_wget_file=`echo "$do_wget_url" | sed -e 's,.*/,,'`
X		rm -rf "$do_wget_file"
X		cp "$do_wget_rest" "$do_wget_file"
X		return $?
X		;;
X	esac
X	loop=0
X	wget_retries=10
X	while [ $loop -lt $wget_retries ]; do
X		do_wget_file=`echo "$do_wget_url" | sed -e 's,.*/,,'`
X		rm -rf "$do_wget_file"
X		$WGET "$do_wget_url"
X
X		if [ -f "$do_wget_file" ]; then
X			break
X		fi
X		echo
X		echo Retrying in 10 seconds
X		sleep 10
X		loop="`expr $loop + 1`"
X	done
X	if [ $loop -ge $wget_retries ]; then
X		echo "Wget retry count exhausted - giving up."	1>&2
X		exit 1
X	fi
X	do_wget_file=
X}
X
Xget_catalog() {
X	mkdir -p src-list
X	cd src-list
X	rm -f catalog
X	do_wget ${server_url}catalog
X	cd ..
X}
X
Xdo_dep() {
X	deps="$@"
X
X	if [ ."$@" = . ]; then
X		return
X	fi
X	echo "Fetching dependencies: $deps"
X	src-get install $deps
X}
X
Xdo_patch() {
X	(
X		cd $1
X		if [ -r patches/patch.sh ]; then
X			patches/patch.sh
X		fi
X	)
X}
X
Xdo_install() {
X	target="$1"
X	echo "Searching for target:" $target
X	mkdir -p src-list
X	cd src-list
X	# target already installed?
X	#rm $target
X	TGT=`grep "$target" < ../src-list/catalog`
X	#echo TGT $TGT
X	nmatches=`echo "$TGT" | wc -w`
X	#echo MATCHES $nmatches
X	if [ $nmatches = 0 ]; then
X		echo "No matching source for" $target
X		exit
X	fi
X	if [ $nmatches -gt 1 ]; then
X		echo "Too many matching sources for" $target
X		echo "Select one from:" $TGT
X		exit
X	fi
X	echo "Matching target:     " "$TGT"
X	#
X	# Retrieve Target desciption file that contains:
X	#
X	#	PKG=	The URL of the tar archive containing the wrappers
X	#	DIR=	The directory in local tree where to put the target dir
X	#	URL=	The URL where to fetch the source from upstream
X	#	DEP=	A list of package names the current target depends on
X	#
X	do_wget ${server_url}"$TGT"
X	PKG=
X	DIR=
X	URL=
X	DEP=
X	. ./$TGT
X	echo PKG "'$PKG'"
X	echo DIR "'$DIR'"
X	echo URL "'$URL'"
X	echo DEP "'$DEP'"
X	do_dep "$DEP"
X
X	if [ ."$URL" = . ]; then
X		cd ..
X		return
X	fi
X	do_wget ${server_url}"$PKG"
X	cd ..
X	pkg_fname=`echo "$PKG" | sed -e 's,.*/,,'`
X	url_fname=`echo "$URL" | sed -e 's,.*/,,'`
X	conf/mkdir.sh -p -T "$DIR"/"$TGT"
X	star -x -C "$DIR" < src-list/"$pkg_fname"
X	(cd "$DIR"/"$TGT" && ( do_wget $URL; star -x < "$url_fname" ) )
X	do_patch "$DIR"/"$TGT"
X}
X
XNO_SRCROOT=no-SRCROOT-directory-found
Xif get_srcroot; then
X	case "$cmd" in
X
X		*version*)	;;
X
X		*)		echo SRCROOT: $SRCROOT;;
X	esac
Xelse
X	SRCROOT="$NO_SRCROOT"
Xfi
X
Xcase $cmd in
X
X	init)	
X			if [ -r RULES/rules.top ]; then
X				echo "A makefile system is already installed in the current directory."	1>&2
X				exit 1
X			fi
X			if [ ! -z "`ls`" ]; then
X				if [ "`ls`" != src-get ]; then
X					echo "Current directory not empty."		1>&2
X					echo "Will not install makefile system."	1>&2
X					exit 1
X				fi
X			fi
X			do_wget ftp://ftp.berlios.de/pub/makefiles/testing/makefiles.tar${ZIP_SUFFIX}
X			${UNZIP} < makefiles.tar${ZIP_SUFFIX} | tar xf -
X			#
X			# tar on HP-UX-10.x does not like tar xpf
X			#
X			if [ ! -r RULES/rules.top ]; then
X				echo "The installation of the makefile system did fail."		1>&2
X				exit 1
X			fi
X			echo
X			echo "*********"
X			echo "The installation of Makefiles was successful."
X			echo
X			echo "Do not forget to run 'src-get setup' for all platforms."
X			echo "*********"
X			echo
X			exit
X			;;
X
X	setup)
X			need_mfs
X			# $BINS not set up
X			#
X			if [ ! -r RULES/rules.top ]; then
X				echo "A makefile system is not installed in the current directory."	1>&2
X				echo "Run 'src-get init' first"						1>&2
X				exit 1
X			fi
X			sh conf/setup.sh
X			;;
X
X	list)
X			need_bins
X			set_binspath
X			cd_srcroot
X			get_catalog
X			$PAGER src-list/catalog
X			;;
X
X	install)
X			need_bins
X			set_binspath
X			cd_srcroot
X			get_catalog
X			for i in "$@"; do
X				echo $i
X				do_install "$i"
X			done
X			;;
X
X	shell)
X			need_bins
X			unset LD_LIBRARY_PATH
X			unset LD_RUN_PATH
X			SHELL=${SHELL-/bin/sh}
X			set_binspath
X			echo "Note that 'smake' is the preferred make program."
X			echo "Starting ${SHELL}..."
X			exec ${SHELL}
X			echo "Cannot exec ${SHELL}"	1>&2
X			exit 1
X			;;
X
X	compile)
X			need_bins
X			unset LD_LIBRARY_PATH
X			unset LD_RUN_PATH
X			SHELL=${SHELL-/bin/sh}
X			set_binspath
X			cd_srcroot
X			echo "Starting compilation..."
X			exec smake "$@"
X			echo "Cannot exec smake $@"	1>&2
X			exit 1
X			;;
X
X	version|-version|--version)
X			echo "src-get  1.21 09/12/22 Copyright 2005-2009 J. Schilling"
X			exit 0
X			;;
X
X	-help|*)	echo "@(#)src-get  1.21 09/12/22 Copyright 2005-2009 J. Schilling"
X			usage
X			exit 0
X			;;
X
Xesac
X
END-of-smake-1.2.1/conf/src-get
echo x - smake-1.2.1/conf/oarch.sh
sed 's/^X//' >smake-1.2.1/conf/oarch.sh << 'END-of-smake-1.2.1/conf/oarch.sh'
X#!/bin/sh
X# @(#)oarch.sh  1.15 09/10/31 Copyright 2005-2009 J. Schilling
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X# A simulation of $(OARCH) from the Schily Makefile system
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X#
X# Processor	P_ARCH	MAKE_ARCH	Instruction Set Architecture or Processor type
X# Kernel	K_ARCH	MAKE_MACH	Machine hardware class
X# Machine	M_ARCH	MAKE_M_ARCH	ISA or Processor type
X#
X# P	mach	== * uname -p			(i386/mc68020/sparc/powerpc
X# K	arch -k ==   uname -m			(i86pc/sun3x/sun4u/power-macintosh
X# M	arch	== * uname -p + map sparc->sun4	(i86pc/sun3/sun4/ppc
X#
X#	* Not available on vanilla SVr4
X#
X# If P_ARCH or M_ARCH are not set, K_ARCH us used.
X#
X# P_ARCH -> OARCH (sparc-sunos5-cc) used as default OBJ arch subdir
X# K_ARCH -> XARCH (sun4u-sunos5-cc) used as OBJ arch subdir for kernel modules
X
Xdbgflag=FALSE
Xxflag=FALSE
Xcflag=FALSE
Xoflag=FALSE
Xpflag=FALSE
Xif [ .$1 = .-help ]; then
X	echo "Usage: oarch.sh [options]"
X	echo "Options:"
X	echo "	-debug	Print debugging information"
X	echo "	-c	Print C_ARCH instrad of OARCH"
X	echo "	-o	Print O_ARCH instrad of OARCH"
X	echo "	-p	Print PARCH instrad of OARCH"
X	echo "	-x	Print XARCH instrad of OARCH"
X	exit
Xfi
Xif [ .$1 = .-debug ]; then
X	dbgflag=TRUE
Xfi
Xif [ .$1 = .-x ]; then
X	xflag=TRUE
Xfi
Xif [ .$1 = .-c ]; then
X	cflag=TRUE
Xfi
Xif [ .$1 = .-o ]; then
X	oflag=TRUE
Xfi
Xif [ .$1 = .-p ]; then
X	pflag=TRUE
Xfi
X
X#
X# '((' does not work because of a parser bug in ksh on Interix.
X# This is why we use '( (' here.
X#
XMACHCMD="( (mach || uname -p || true)		2> /dev/null)"
XARCHCMD="( (arch || /usr/ucb/arch || true)	2> /dev/null)"
X
XXP_ARCH=`eval ${MACHCMD} | tr '[A-Z]' '[a-z]' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'`
XXK_ARCH=`uname -m        | tr '[A-Z]' '[a-z]' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'`
XXM_ARCH=`eval ${ARCHCMD} | tr '[A-Z]' '[a-z]' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'`
X
X#echo XP_ARCH $XP_ARCH
X#echo XK_ARCH $XK_ARCH
X#echo XM_ARCH $XM_ARCH
X
XP_ARCH="${XP_ARCH}"
XK_ARCH="${XK_ARCH}"
XM_ARCH="${XM_ARCH}"
X
Xif [ ."$XP_ARCH" = .unknown ]; then
X	P_ARCH="${K_ARCH}"
Xfi
Xif [ ."$XP_ARCH" = . ]; then
X	P_ARCH="${K_ARCH}"
Xfi
X
Xif [ ."${XM_ARCH}" = . ]; then
X	M_ARCH="${K_ARCH}"
Xfi
X
XOSNAME=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'`
XOSHOST=`uname -n | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'`
XOSREL=`uname -r | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'`
XOSVERS=`uname -v | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'`
X
XO_ARCH="$OSNAME"
X
Xcase "$OSREL" in
X	cygwin*) O_ARCH=cygwin32_nt;;
Xesac
Xif [ ."$OSNAME" = .bsd-os ]; then
X	case "$OSREL" in
X		3.*)	O_ARCH=bsd-os3;;
X		4.*)	O_ARCH=bsd-os;;
X	esac
Xfi
Xif [ ."$OSNAME" = .bsd-os ]; then
X	case "$OSREL" in
X		3.*)	O_ARCH=bsd-os3;;
X		4.*)	O_ARCH=bsd-os;;
X	esac
Xfi
Xif [ ."$OSNAME" = .dgux ]; then
X	case "$OSREL" in
X		r4.*)	O_ARCH=dgux4;;
X		5.4r3*)	O_ARCH=dgux3;;
X	esac
Xfi
Xif [ ."$OSNAME" = .irix64 ]; then
X	O_ARCH=irix
Xfi
Xif [ ."$OSNAME" = .mac-os ]; then
X	case "$OSREL" in
X		9.*)	O_ARCH=mac-os9;;
X		10.*)	O_ARCH=mac-os10;;
X	esac
Xfi
Xcase "$OSREL" in
X	mingw*) O_ARCH= mingw32_nt;;
Xesac
Xif [ ."$OSNAME" = .newsos ]; then
X	case "$OSREL" in
X		5.*)	O_ARCH=newsos5;;
X		6.*)	O_ARCH=newsos6;;
X	esac
Xfi
Xif [ ."$OSNAME" = .openunix ]; then
X	O_ARCH=unixware
Xfi
Xif [ ."$OSNAME" = .os-2 ]; then
X	O_ARCH=os2
Xfi
Xif [ ."$OSNAME" = .sco_sv ]; then
X	O_ARCH=openserver
Xfi
Xif [ ."$OSNAME" = .sunos ]; then
X	case "$OSREL" in
X		4.*)	O_ARCH=sunos4;;
X		5.*)	O_ARCH=sunos5;;
X	esac
Xfi
Xif [ ."$OSNAME" = .unix_sv ]; then
X	O_ARCH=unixware
Xfi
X
X###########################################################################
X#
X# Interix: Avoid to have something like "Intel_x86_Family15_Model4_Stepping1"
X# in $(OARCH), we rather use $(K_ARCH) which is e.g. "x86".
X# XXX If this is changed, both files in DEFAULTS/ and DEFAULTS_ENG as
X# XXX well as the file conf/oarch.sh need to be changed.
X#
X###########################################################################
Xif [ ."$OSNAME" = .interix ]; then
X	P_ARCH=${K_ARCH}
Xfi
X
XMARCH="$M_ARCH"
Xif [ ."$ARCH" != . ]; then
X	MARCH="$ARCH"
Xfi
X
XPARCH="$P_ARCH"
Xif [ ."$ARCH" != . ]; then
X	PARCH="$ARCH"
Xfi
X
XKARCH="$K_ARCH"
Xif [ ."$ARCH" != . ]; then
X	KARCH="$ARCH"
Xfi
X
Xconfdir=
Xif [ -z "$confdir" ]; then
X	#
X	# Try the directory containing this script.
X	#
X	prog=$0 
X	confdir=`echo $prog|sed 's,/[^/][^/]*$,,'` 
X	test ".$confdir" = ".$prog" && confdir=. 
X	confdir=$confdir
Xfi 
X
XCC="`grep '^DEFCCOM' $confdir/../incs/Dcc.${PARCH}-${O_ARCH} 2>/dev/null | sed -e 's,^DEFCCOM=[      ]*,,'`"
Xif [ ".$CC" = . ]; then
X	CC="`grep '^DEFCCOM' $confdir/../DEFAULTS/Defaults.${O_ARCH} 2>/dev/null | sed -e 's,^DEFCCOM=[ 	]*,,'`"
Xfi
Xif [ ".$CC" = . ]; then
X	CC=cc
Xfi
X
XC_ARCH="`sh $confdir/../conf/cc-config.sh -echo $CC $CC ${O_ARCH}`"
X
XOARCH="${PARCH}-${O_ARCH}-${C_ARCH}"
XXARCH="${KARCH}-${O_ARCH}-${C_ARCH}"
X
Xif [ $dbgflag = TRUE ]; then
X#echo xx"$P_ARCH"
X	echo C_ARCH "	$C_ARCH"
X	echo P_ARCH "	$P_ARCH"
X	echo K_ARCH "	$K_ARCH"
X	echo M_ARCH "	$M_ARCH"
X	echo OSNAME "	$OSNAME"
X	echo OSHOST "	$OSHOST"
X	echo OSREL  "	$OSREL"
X	echo OSVERS "	$OSVERS"
X	echo OARCH  "	$OARCH"
X	echo XARCH  "	$XARCH"
X	exit
Xfi
Xif [ $cflag = TRUE ]; then
X	echo "${C_ARCH}"
X	exit
Xfi
Xif [ $oflag = TRUE ]; then
X	echo "${O_ARCH}"
X	exit
Xfi
Xif [ $pflag = TRUE ]; then
X	echo "${PARCH}"
X	exit
Xfi
Xif [ $xflag = TRUE ]; then
X	echo "${XARCH}"
X	exit
Xfi
Xecho "$OARCH"
END-of-smake-1.2.1/conf/oarch.sh
echo x - smake-1.2.1/conf/Makefile
sed 's/^X//' >smake-1.2.1/conf/Makefile << 'END-of-smake-1.2.1/conf/Makefile'
X#ident @(#)Makefile	1.6 07/10/24 
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X# Makefile for local dynamic configuration
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XCONFFILES=	Inull rules.cnf xconfig.h
X
XPCONFFILES=	$(CONFFILES:%=$(OINCSDIR)/%)
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
XINSDIR=		include/schily/$(OARCH)
XTARGET=		xconfig.h
XPTARGET=	../incs/$(OARCH)/xconfig.h
X
Xall: config
X
Xclobber:
X	$(RM_F) $(PCONFFILES)
X
Xdistclean:
X		$(RM) $(RM_RF)		$(PCONFFILES) \
X						.vedtmp* *.bak OBJ/* \
X						$(SRCROOT)/libs/* $(SRCROOT)/incs/*
X
XXMK_FILE=	xconfig.mk
X
X###########################################################################
X# Now done in rules.top
X#include		$(SRCROOT)/$(RULESDIR)/rules.cnf
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
X###########################################################################
X
XOTHERTARGETS=	clean ibins depend rmdep \
X		TAGS tags rmtarget relink
X
X$(OTHERTARGETS):
X	@echo "$@: nothing to make"
END-of-smake-1.2.1/conf/Makefile
echo x - smake-1.2.1/conf/mkdep-aix.sh
sed 's/^X//' >smake-1.2.1/conf/mkdep-aix.sh << 'END-of-smake-1.2.1/conf/mkdep-aix.sh'
X#!/bin/sh
X#ident "@(#)mkdep-aix.sh	1.2 09/12/31 "
X###########################################################################
X# Copyright 2002 by J. Schilling
X###########################################################################
X#
X# Create dependency list with AIX cc
X#
X###########################################################################
X#
X# This script will probably not work correctly with a list of C-files
X# but as we don't need it with 'smake' or 'gmake' it seems to be sufficient.
X#
X# Note that AIX cc will create a file foo.u for every foo.c file. The file
X# foo.u is located in the directory where cc is run.
X# For this reason, there may be problems of other software likes to create
X# foo.u during compilation. Please report problems.
X#
X# In former times, we used -E but this calls the C-preprocessor that complains
X# about #pragma weak a = b entries. We thus now use -qsyntaxonly in hope
X# that all IBM compiler versions support it.
X#
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XFILES=
XUFILES=
Xtrap 'rm -f $UFILES ; exit 1' 1 2 15
X
Xfor i in "$@"; do
X
X	case "$i" in
X
X	-*)	# ignore options
X		;;
X	*.c)	if [ ! -z "$FILES" ]; then
X			FILES="$FILES "
X		fi
X		b=`basename $i ''`
X		FILES="$FILES$b"
X		;;
X	esac
Xdone
X
XUFILES=`echo "$FILES" | sed -e 's;\([^.]*\)\.c;\1.u;g'`
X
Xrm -f $UFILES
X#cc -M -E > /dev/null "$@"
Xcc -M -qsyntaxonly > /dev/null "$@"
Xcat $UFILES
Xrm -f $UFILES
END-of-smake-1.2.1/conf/mkdep-aix.sh
echo x - smake-1.2.1/conf/mkdir-sh
sed 's/^X//' >smake-1.2.1/conf/mkdir-sh << 'END-of-smake-1.2.1/conf/mkdir-sh'
X#!/bin/sh
X#
X# Replacement for mkdir -p ... functionality.
X#
X# BSD-4.3, NeXT Step <= 3.x and similar don't accept the -p flag
X#
X# @(#)mkdir-sh	1.2 98/12/14 Copyright 1998 J. Schilling
X#
X# Copyright Jörg Schilling. All rights reserved.
X#
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# See the file CDDL.Schily.txt in this distribution or
X# http://opensource.org/licenses/cddl1.php for details.
X
Xif [ $# -lt 1 ]; then
X	echo "Usage: mkdir-sh [-p] dir ...."
X	exit 1
Xfi
X
Xdop=false
Xcase $1 in
X-p)
X	dop=true
X	shift
X	;;
Xesac
X
Xif [ $dop = false ]; then
X	for i in "$@"; do
X		mkdir "$i"
X	done
Xelse
X	for i in "$@"; do
X		if [ -d "$i" ]; then
X			continue
X		fi
X		# Don't use ${i:-.}, BSD4.3 doen't like it
X		#
X		fullname="$i"
X		if [ ."$i" = . ]; then
X			fullname=.
X		fi
X		dirname=`expr \
X			"$fullname/" : '\(/\)/*[^/]*//*$'  \| \
X			"$fullname/" : '\(.*[^/]\)//*[^/][^/]*//*$' \| \
X			.`
X		sh $0 -p "$dirname"
X		mkdir "$i"
X	done
Xfi
END-of-smake-1.2.1/conf/mkdir-sh
echo x - smake-1.2.1/conf/cc-config.sh
sed 's/^X//' >smake-1.2.1/conf/cc-config.sh << 'END-of-smake-1.2.1/conf/cc-config.sh'
X#!/bin/sh
X# @(#)cc-config.sh	1.8 07/02/13 Copyright 2002 J. Schilling
X###########################################################################
X# Written 2002 by J. Schilling
X###########################################################################
X# Configuration script called to verify system default C-compiler.
X# It tries to fall back to GCC if the system default could not be found.
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X#
X# Usage:
X#	sh ./conf/cc-config.sh cc default-cc incs/Dcc.<platform>
X#
Xif [ $# -lt 3 ]; then
X	echo 'Usage: sh ./conf/cc-config.sh [-echo] <cc> <default-cc> incs/Dcc.<platform>'
X	echo 'Options:'
X	echo '	-echo	Do not write into incs/Dcc.<platform> but echo to stdout'
X	echo
X	echo 'The "cc"         parameter is the name of the preferred C-compiler'
X	echo 'The "default-cc" parameter is the name of the default   C-compiler'
X	exit 1
Xfi
X
Xecho=echo
Xif [ ".$1" = .-echo ]; then
X	echo=:
X	shift
Xfi
X
X#
X# Try to make sure all error messages are in english.
X#
XLC_ALL=C
XLANG=C
X
XCC=$1
XARG_CC=$1
XDEF_CC=$2
XPLATFORM_FILE=$3
X${echo} "Trying to find $CC"
X
X#
X# Check if we are on SunOS-5.x and /usr/ucb is in PATH before /opt/SUNWspro/bin
X# /usr/ucb/cc will not work correctly to compile things on Solaris.
X#
X# This check will also catch the case where no Sun C-compiler is installed and
X# calling cc results in the message:
X#	/usr/ucb/cc:  language optional software package not installed
X#
Xxos=`echo "$PLATFORM_FILE" | grep sunos5 `
Xif [ -n "$xos" ]; then
X	#
X	# On Solaris, the type builtin is working.
X	#
X	xcc=`type "$CC" | grep '/usr/ucb/*cc' `
X	if [ -n "$xcc" ]; then
X		#
X		# We did find /usr/ucb/cc
X		#
X		echo											1>&2
X		echo 'Warning:' "$xcc"									1>&2
X		echo '         You should not have "/usr/ucb" in your PATH if you like to compile.'	1>&2
X		echo '         "/usr/ucb/cc" is not working correclty on Solaris.'			1>&2
X		echo '         If you did install a C-compiler in /opt/SUNWspro/bin, abort'		1>&2
X		echo '         fix your PATH and start again.'						1>&2
X		echo '         Otherwise GCC will be used.'						1>&2
X		echo											1>&2
X		sleep 60
X		CC=do-no-use-ucb-cc
X	fi
Xfi
X
X#
X# There are old shells that don't support the 'type' builtin.
X# For this reason it is not a simple task to find out whether
X# this compiler exists and works.
X#
X# First try to run the default C-compiler without args
X#
Xeval "$CC > /dev/null 2>&1" 2> /dev/null
Xif [ $? = 0 ]; then
X	${echo} "Found $CC"
X	if [  ".$CC" = ".$DEF_CC" ]; then
X		${echo} "Creating empty '$PLATFORM_FILE', using $DEF_CC as default compiler"
X		if [ ${echo} = echo ]; then
X			:> $PLATFORM_FILE
X		else
X			echo "$DEF_CC"
X		fi
X	else
X		${echo} "Making $CC the default compiler in '$PLATFORM_FILE'"
X		if [ ${echo} = echo ]; then
X			:> $PLATFORM_FILE
X			echo DEFCCOM=$CC > $PLATFORM_FILE
X		else
X			echo "$CC"
X		fi
X	fi
X	exit
Xfi
X
X#
X# Now try to run the default C-compiler and check whether it creates
X# any output (usually an error message).
X#
X# This test will fail if the shell does redirect the error message
X# "cc: not found". All shells I tested (except ksh) send this message to
X# the stderr stream the shell itself is attached to and only redirects the
X# output from the command. As there may no output if there is no binary,
X# this proves the existence of the default compiler.
X#
Xccout=`eval "$CC 2>&1" 2>/dev/null`
Xret=$?
X
Xnf=`echo "$ccout" | grep 'not found' `
Xif [ $ret = 127 -a -n "$nf" ]; then
X	#
X	# ksh redirects even the error message from the shell, but we
X	# see that there is no executable because the exit code is 127
X	# we detect "command not found" if exit code is 127 and
X	# the message contains 'not found'
X	#
X	ccout=""
Xfi
X
Xif [ -n "$ccout" ]; then
X	${echo} "Found $CC"
X	if [  ".$CC" = ".$DEF_CC" ]; then
X		${echo} "Creating empty '$PLATFORM_FILE', using $DEF_CC as default compiler"
X		if [ ${echo} = echo ]; then
X			:> $PLATFORM_FILE
X		else
X			echo "$DEF_CC"
X		fi
X	else
X		${echo} "Making $CC the default compiler in '$PLATFORM_FILE'"
X		if [ ${echo} = echo ]; then
X			:> $PLATFORM_FILE
X			echo DEFCCOM=$CC > $PLATFORM_FILE
X		else
X			echo "$CC"
X		fi
X	fi
X	exit
Xfi
X
X#
X# If the current default is gcc or anything != cc, try cc.
X# Last resort: try gcc.
X#
Xif [ ".$CC" = ".gcc" -o ".$CC" != ".cc" ]; then
X	XCC=cc
X	${echo} 'Trying to find cc'
X	ccout=`eval "$XCC -c tt.$$.c 2>&1" 2> /dev/null`
X	ret=$?
X	nf=`echo "$ccout" | grep 'not found' `
X	if [ $ret = 127 -a -n "$nf" ]; then
X		#
X		# ksh redirects even the error message from the shell, but we
X		# see that there is no executable because the exit code is 127
X		# we detect "command not found" if exit code is 127 and
X		# the message contains 'not found'
X		#
X		ccout=""
X	fi
X	xos=`echo "$PLATFORM_FILE" | grep sunos5 `
X	if [ -n "$xos" ]; then
X		xcc=`type "$XCC" | grep '/usr/ucb/*cc' `
X		if [ -n "$xcc" -a  -n "$ccout" ]; then
X			echo "Cannot use $XCC because $XCC is /usr/ucb/cc"
X		fi
X		if [ -z "$xcc" -a  -n "$ccout" ]; then
X			CC="$XCC"
X		fi
X	fi
Xfi
Xif [ ".$CC" = ".$ARG_CC" ]; then
X	XCC=gcc
X	${echo} 'Trying to find GCC'
X	eval "gcc -v" 2> /dev/null && CC=gcc
Xfi
X
Xif [ ".$CC" = ".$DEF_CC" ]; then
X	${echo} "$XCC not found, keeping current global default"
X	${echo} "Creating empty '$PLATFORM_FILE', using $DEF_CC as default compiler"
X	if [ ${echo} = echo ]; then
X		:> $PLATFORM_FILE
X	else
X		echo "$DEF_CC"
X	fi
Xelse
X	${echo} "Found $CC"
X	${echo} "Making $CC the default compiler in '$PLATFORM_FILE'"
X	if [ ${echo} = echo ]; then
X		echo DEFCCOM=$CC > $PLATFORM_FILE
X	else
X		echo "$CC"
X	fi
Xfi
END-of-smake-1.2.1/conf/cc-config.sh
echo x - smake-1.2.1/conf/mkdep-hpux.sh
sed 's/^X//' >smake-1.2.1/conf/mkdep-hpux.sh << 'END-of-smake-1.2.1/conf/mkdep-hpux.sh'
X#!/bin/sh
X#ident "@(#)mkdep-hpux.sh	1.1 02/10/10 "
X###########################################################################
X# Copyright 2002 by J. Schilling
X###########################################################################
X#
X# Create dependency list with the HP-UX bundled cc
X#
X###########################################################################
X#
X# This script will probably not work correctly with a list of C-files
X# but as we don't need it with 'smake' or 'gmake' it seems to be sufficient.
X#
X# Due to a design bug in the compiler interface we cannot tell the compiler
X# to output the list on stdout, -Wp,-M- does not work. As the default
X# output is on stderr and the output is even completely confused with
X# error messages and warnings, we cannot just grep away the warnings
X# like we do on SCO unix.
X#
X###########################################################################
X# Copyright Jörg Schilling. All rights reserved.
X#
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# See the file CDDL.Schily.txt in this distribution or
X# http://opensource.org/licenses/cddl1.php for details.
X###########################################################################
X
Xtrap 'rm -fr /tmp/cpp-m.$$ ; exit 1' 1 2 15
X
Xcc -Wp,-M/tmp/cpp-m.$$ -E > /dev/null "$@" 
X
Xcat /tmp/cpp-m.$$
X
Xrm -f /tmp/cpp-m.$$
END-of-smake-1.2.1/conf/mkdep-hpux.sh
echo x - smake-1.2.1/conf/mkdep-sco.sh
sed 's/^X//' >smake-1.2.1/conf/mkdep-sco.sh << 'END-of-smake-1.2.1/conf/mkdep-sco.sh'
X#!/bin/sh
X#ident "@(#)mkdep-sco.sh	1.5 03/03/05 "
X###########################################################################
X# Copyright 1999 by J. Schilling
X###########################################################################
X#
X# Create dependency list with SCO's cc
X#
X###########################################################################
X#
X# This script will probably not work correctly with a list of C-files
X# but as we don't need it with 'smake' or 'gmake' it seems to be sufficient.
X#
X###########################################################################
X# Copyright Jörg Schilling. All rights reserved.
X#
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# See the file CDDL.Schily.txt in this distribution or
X# http://opensource.org/licenses/cddl1.php for details.
X###########################################################################
XFILES=
X
Xfor i in "$@"; do
X
X	case "$i" in
X
X	-*)	# ignore options
X		;;
X	*.c)	if [ ! -z "$FILES" ]; then
X			FILES="$FILES "
X		fi
X		# base name from $i
X		base=`echo $i | sed -e 's;[^/]*/;;'`
X		FILES="$FILES$base"
X		;;
X	esac
Xdone
X
XOFILES=`echo "$FILES" | sed -e 's;\([^.]*\)\.c;\1.o;g'`
X
Xcc -H -E 2>&1 > /dev/null "$@" | grep -hv '^"' | grep -hv '^UX:' | sed -e "s;^;$OFILES: ;"
END-of-smake-1.2.1/conf/mkdep-sco.sh
echo x - smake-1.2.1/conf/wget.sh
sed 's/^X//' >smake-1.2.1/conf/wget.sh << 'END-of-smake-1.2.1/conf/wget.sh'
X#!/bin/sh
X# @(#)wget.sh  1.3 05/05/30 Copyright 2005 J. Schilling
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X# A simulation of wget using ftp
X###########################################################################
X# Copyright Jörg Schilling. All rights reserved.
X#
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# See the file CDDL.Schily.txt in this distribution or
X# http://opensource.org/licenses/cddl1.php for details.
X###########################################################################
X
Xexcod=255
X
Xtrap 'rm -fr /tmp/.d.$$ ; exit 1' 1 2 15
Xtrap 'rm -fr /tmp/.d.$$ ; exit $excode' 0
X
Xif [ $# -lt 1 ]; then
X	echo "Usage: wget.sh [-d] URL"
X	echo "Options:"
X	echo "	-d	Print a listing of the dir part and exit"
X	echo
X	echo "Only ftp:// type URLs are supported"
X	exit 1
Xfi
X
Xdodir=FALSE
Xif [ ."$1" = .-d ]; then
X	dodir=TRUE
X	shift
Xfi
XURL="$1"
Xrest=`echo "$URL" | sed -e 's,^ftp://,,'`
Xif [ "$URL" = "$rest" ]; then
X	echo "Unsupported protocol in" "$URL"
X	exit 1
Xfi
X
XHOST=`echo "$rest" | sed -e 's,/.*,,'`
XFILE=`echo "$rest" | sed -e 's,^[^/]*/,,'`
X#echo HOST "$HOST"
X#echo FILE "$FILE"
X
XDNAME=`echo "$FILE" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
XFNAME=`echo "$FILE" | sed -e 's,.*/,,'`
X#echo DNAME "$DNAME"
X#echo FNAME "$FNAME"
X
Xmkdir /tmp/.d.$$
Xcat <<EOF > /tmp/.d.$$/.netrc
Xmachine "$HOST"  login ftp password wget.sh@Makefiles.Schily.build
XEOF
Xchmod 600 /tmp/.d.$$/.netrc
X
Xif [ $dodir = TRUE ]; then
X	HOME=/tmp/.d.$$ ftp "$HOST" <<EOF
X	bin
X	passive on
X	cd "$DNAME"
X	dir
X	bye
XEOF
Xexcode=$?
X
Xelse
X
X	HOME=/tmp/.d.$$ ftp "$HOST" <<EOF
X	bin
X	passive on
X	cd "$DNAME"
X	dir "$FNAME"
X	hash on
X	verbose on
X	get "$FNAME"
X	bye
XEOF
Xexcode=$?
Xfi
END-of-smake-1.2.1/conf/wget.sh
echo x - smake-1.2.1/conf/srcroot.sh
sed 's/^X//' >smake-1.2.1/conf/srcroot.sh << 'END-of-smake-1.2.1/conf/srcroot.sh'
X#!/bin/sh
X# @(#)srcroot.sh  1.3 05/05/01 Copyright 2005 J. Schilling
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X# Find and print SRCROOT
X###########################################################################
X# Copyright Jörg Schilling. All rights reserved.
X#
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# See the file CDDL.Schily.txt in this distribution or
X# http://opensource.org/licenses/cddl1.php for details.
X###########################################################################
X
XSRCROOT=.
Xloop=1
Xwhile [ $loop -lt 100 ]; do
X	#echo "$SRCROOT"
X	if [ ! -d $SRCROOT ]; then
X		# Abort on ENAMETOOLONG
X		break
X	fi
X	if [ -r $SRCROOT/RULES/rules.top ]; then
X		break
X	fi
X	if [ "$SRCROOT" = . ]; then
X		SRCROOT=".."
X	else
X		SRCROOT="$SRCROOT/.."
X	fi
X	loop="`expr $loop + 1`"
Xdone
Xif [ ! -r $SRCROOT/RULES/rules.top ]; then
X	echo "Cannot find SRCROOT" 1>&2
X	exit 1
Xfi
Xecho "$SRCROOT"
END-of-smake-1.2.1/conf/srcroot.sh
echo x - smake-1.2.1/conf/setup.sh
sed 's/^X//' >smake-1.2.1/conf/setup.sh << 'END-of-smake-1.2.1/conf/setup.sh'
X#!/bin/sh
X# @(#)setup.sh  1.16 05/11/11 Copyright 2005 J. Schilling
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X# Set up bins/<archdir>/{bzip2}!{gzip}!{patch}!{smake}!{star}!{wget}
X###########################################################################
X# Copyright Jörg Schilling. All rights reserved.
X#
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# See the file CDDL.Schily.txt in this distribution or
X# http://opensource.org/licenses/cddl1.php for details.
X###########################################################################
X
X# Benoetigte Kommandos:
X#
X#	makefiles	ftp://ftp.berlios.de/pub/makefiles/
X#	makefiles	ftp://ftp.berlios.de/pub/makefiles/testing/makefiles.tar
X#	smake		ftp://ftp.berlios.de/pub/smake/alpha/
X#	star		ftp://ftp.berlios.de/pub/star/alpha/
X#	gzip		ftp://wuarchive.wustl.edu/mirrors/gnu/gzip/gzip-1.2.4.tar
X#	wget		ftp://ftp.gnu.org/gnu/wget/wget-1.9.1.tar.gz
X#	wget		ftp://ftp.berlios.de/pub/makefiles/testing/wget-1.9.1-1.tar
X#	gzip		http://www.gzip.org/gzip-1.3.3.tar.gz
X#	gzip		ftp://ftp.berlios.de/pub/makefiles/testing/gzip-1.3.3.tar.gz
X#	bzip2		ftp://sources.redhat.com/pub/bzip2/v102/bzip2-1.0.2.tar.gz
X#	bzip2		http://www.bzip.org/1.0.3/bzip2-1.0.3.tar.gz
X#	bzip2		ftp://ftp.berlios.de/pub/makefiles/testing/bzip2-1.0.3.tar.gz
X#	patch		ftp://ftp.gnu.org/pub/gnu/patch/patch-2.5.4.tar.gz
X#	patch		ftp://ftp.berlios.de/pub/makefiles/testing/patch-2.5.4-1.tar.bz2
X
Xtrap 'if [ -f ./$xfile ]; then rm -f ./$xfile; fi; rm -rf /tmp/i.$$/; exit 1' 1 2 15
X
XSRCROOT=.
Xloop=1
Xwhile [ $loop -lt 100 ]; do
X	#echo "$SRCROOT"
X	if [ ! -d $SRCROOT ]; then
X		# Abort on ENAMETOOLONG
X		break
X	fi
X	if [ -r $SRCROOT/RULES/rules.top ]; then
X		break
X	fi
X	if [ "$SRCROOT" = . ]; then
X		SRCROOT=".."
X	else
X		SRCROOT="$SRCROOT/.."
X	fi
X	loop="`expr $loop + 1`"
Xdone
Xif [ ! -r $SRCROOT/RULES/rules.top ]; then
X	echo "Cannot find SRCROOT" 1>&2
X	exit 1
Xfi
X
Xcd "$SRCROOT"
X
Xif [ ! -r RULES/rules.top ]; then
X	echo "Cannot chdir to SRCROOT" 1>&2
X	exit 1
Xfi
X
XOARCH=`conf/oarch.sh`
XBINS=bins/"$OARCH"
XPWD=`pwd`
Xmkdir -p "$BINS"
XPATH="${PWD}/${BINS}:${PATH}"
Xexport PATH
XMAKE="make"
X
Xif [	-r ${BINS}/bzip2 -a	\
X	-r ${BINS}/gzip -a	\
X	-r ${BINS}/lndir -a	\
X	-r ${BINS}/patch -a	\
X	-r ${BINS}/smake -a	\
X	-r ${BINS}/star -a	\
X	-r ${BINS}/wget		]; then
X	echo "Setup for $OARCH already done." 1>&2
X	exit
Xfi
X
XCC="${CC-`conf/oarch.sh -c`}"
X
XZIP_SUFFIX=
XZIP=cat
XUNZIP=cat
X
Xif bzip2 --help > /dev/null 2>&1; then
X	UNZIP="bzip2 -d"
X	ZIP=bzip2
X	ZIP_SUFFIX=.bz2
Xelif gzip --help > /dev/null 2>&1; then
X	UNZIP="gzip -d"
X	ZIP=gzip
X	ZIP_SUFFIX=.gz
Xfi
X
XWGET="${WGET-sh conf/wget.sh}"
X
Xdo_wget() {
X	URL="$1"
X	while true; do
X		xfile=`echo "$URL" | sed -e 's,.*/,,'`
X		$WGET "$URL"
X
X		if [ -f "$xfile" ]; then
X			break
X		fi
X		echo
X		echo Retrying in 10 seconds
X		sleep 10
X	done
X	xfile=
X}
X
Xdo_wget ftp://ftp.berlios.de/pub/smake/testing/smake.tar${ZIP_SUFFIX}
X${UNZIP} < smake.tar${ZIP_SUFFIX} | tar xf -
X#
X# tar on HP-UX-10.x does not like tar xpf
X#
Xcd smake-1.2/psmake/
Xsh ./MAKE-all
Xcd ..
Xpsmake/smake -r DESTDIR=/tmp/i.$$/ COPTX=-DDEFAULTS_PATH_SEARCH_FIRST install
Xcd ..
Xecho "Configuring Makefile system"
Xcd conf
X/tmp/i.$$/opt/schily/bin/smake -r
Xcd ..
Xcd inc
X/tmp/i.$$/opt/schily/bin/smake -r
Xcd ..
Xstrip /tmp/i.$$/opt/schily/bin/smake
Xrm -f "$BINS"/smake
Xcp -p /tmp/i.$$/opt/schily/bin/smake "$BINS"
Xmkdir -p "$BINS"/lib
Xrm -f "$BINS"/lib/defaults.smk
Xcp -p /tmp/i.$$/opt/schily/lib/defaults.smk "$BINS"/lib
Xrm -rf smake-1.2* smake.tar*
XMAKE="${PWD}/${BINS}/smake"
X
Xif [ $ZIP = cat ]; then
X	#do_wget ftp://wuarchive.wustl.edu/mirrors/gnu/gzip/gzip-1.2.4.tar
X	do_wget ftp://ftp.berlios.de/pub/makefiles/testing/gzip-1.2.4.tar
X	tar xf gzip-1.2.4.tar
X	#
X	# tar on HP-UX-10.x does not like tar xpf
X	#
X	cd gzip-1.2.4
X	CC="$CC" MAKE="$MAKE" CFLAGS=-O ./configure
X	smake
X	cd ..
X	strip gzip-1.2.4/gzip
X	rm -f "${BINS}"/gzip
X	cp -p gzip-1.2.4/gzip "${BINS}"
X	rm -rf gzip-1.2.4*
X	UNZIP="gzip -d"
X	ZIP=gzip
X	ZIP_SUFFIX=.gz
Xfi
X
Xdo_wget ftp://ftp.berlios.de/pub/star/testing/star.tar${ZIP_SUFFIX}
X${UNZIP} < star.tar${ZIP_SUFFIX} | tar xf -
X#
X# tar on HP-UX-10.x does not like tar xpf
X#
Xcd star-1.5/
Xsmake DESTDIR=/tmp/i.$$/ install
Xcd ..
Xstrip /tmp/i.$$/opt/schily/bin/star
Xrm -f "${BINS}"/star
Xcp -p /tmp/i.$$/opt/schily/bin/star "$BINS"
Xrm -rf star-1.5* star.tar*
X
Xdo_compile() {
X	url="$1"
X	dir="$2"
X	binpath="$3"
X	fname=`echo "$url" | sed -e 's,.*/,,'`
X	do_wget "$url"
X	star xpf "$fname"
X	cd "$dir"
X	if [ -r ./configure ]; then
X		CC="$CC" MAKE="$MAKE" CFLAGS=-O ./configure
X	elif [ -r ./Configure ]; then
X		CC="$CC" MAKE="$MAKE" CFLAGS=-O ./Configure
X	fi
X	smake CC="$CC" CFLAGS=-O
X	cd ..
X	if [ ! -r "$binpath" ]; then
X		echo "Cound not make $binpath"	1>&2
X	fi
X	fname=`echo "$binpath" | sed -e 's,.*/,,'`
X	strip "$binpath"
X	rm -f "${BINS}"/"$fname"
X	cp -p "$binpath" "${BINS}"
X	rm -rf "$dir"*
X}
X
Xdo_install() {
X	url="$1"
X	dir="$2"
X
X	fname=`echo "$url" | sed -e 's,.*/,,'`
X	do_wget "$url"
X	star xpf "$fname"
X	cd "$dir"
X	smake
X	smake ibins
X	cd ..
X	rm -rf "$dir"*
X}
X
Xdo_compile 	ftp://ftp.berlios.de/pub/makefiles/testing/wget-1.9.1-2.tar${ZIP_SUFFIX} \
X		wget-1.9.1 \
X		wget-1.9.1/src/wget
X
XWGET="${BINS}/wget --passive-ftp"
X
Xdo_compile	ftp://ftp.berlios.de/pub/makefiles/testing/gzip-1.3.3.tar.gz \
X		gzip-1.3.3 \
X		gzip-1.3.3/gzip
X
Xdo_compile	ftp://ftp.berlios.de/pub/makefiles/testing/bzip2-1.0.3.tar.gz \
X		bzip2-1.0.3 \
X		bzip2-1.0.3/bzip2
X
Xdo_compile	ftp://ftp.berlios.de/pub/makefiles/testing/patch-2.5.4-1.tar.bz2 \
X		patch-2.5.4 \
X		patch-2.5.4/patch
Xln -s patch ${BINS}/gpatch
X
Xdo_install	ftp://ftp.berlios.de/pub/makefiles/testing/lndir.tar.bz2 \
X		lndir
X
Xrm -rf /tmp/i.$$/
END-of-smake-1.2.1/conf/setup.sh
echo x - smake-1.2.1/conf/mkdir.sh
sed 's/^X//' >smake-1.2.1/conf/mkdir.sh << 'END-of-smake-1.2.1/conf/mkdir.sh'
X#!/bin/sh
X# @(#)mkdir.sh	1.5 09/12/22 Copyright 1998 J. Schilling
X###########################################################################
X# Written 1998-2005 by J. Schilling
X###########################################################################
X#
X# Schily Makefile slottable source high level mkdir -p command
X# Creates TARGETS/ and needed content
X#
X# Replacement for mkdir -p ... functionality.
X#
X# mkdir(1) on BSD-4.3, NeXT Step <= 3.x and similar don't accept the -p flag
X#
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xdop=false
XdoT=false
Xok=true
Xwhile test $# -ne 0; do
X	case $1 in
X	-p)
X		dop=true
X		shift
X		;;
X	-T)
X		doT=true
X		shift
X		;;
X	-*)
X		echo "Unknown Option '$1'"	1>&2
X		ok=false
X		break
X		;;
X	*)
X		break
X		;;
X	esac
Xdone
X
Xif [ $doT = true -a $dop = false ]; then
X	echo "Option -T needs -p in addition"      1>&2
X	ok=false
Xfi
X
Xif [ $# -lt 1 ]; then
X	echo "Missing <dir> parameter"      1>&2
Xfi
Xif [ $# -lt 1 -o $ok = false ]; then
X	echo "Usage: $0 [-p] [-T] dir ...."
X	echo "Options:"
X	echo "	-p	Create <dir> and including all non existing parent directories"
X	echo "	-T	Add Schily Makefile directory template files"
X	exit 1
Xfi
X
Xif [ $doT = true -a ."$SRCROOT" = . ]; then
X	SRCROOT=.
X	loop=1
X	while [ $loop -lt 100 ]; do
X		if [ ! -d $SRCROOT ]; then
X			# Abort on ENAMETOOLONG
X			break
X		fi
X		if [ -r $SRCROOT/RULES/rules.top ]; then
X			break
X		fi
X		if [ "$SRCROOT" = . ]; then
X			SRCROOT=".."
X		else
X			SRCROOT="$SRCROOT/.."
X		fi
X		loop="`expr $loop + 1`"
X	done
X	if [ ! -r $SRCROOT/RULES/rules.top ]; then
X		echo "Cannot find SRCROOT directory" 1>&2
X		exit 1
X	fi
X	export SRCROOT
Xfi
X
Xif [ $dop = false ]; then
X	for i in "$@"; do
X		mkdir "$i"
X	done
Xelse
X	for i in "$@"; do
X		# Don't use ${i:-.}, BSD4.3 doen't like it
X		#
X		fullname="$i"
X		if [ ."$i" = . ]; then
X			fullname=.
X		fi
X		if [ "$fullname" = . ]; then
X			continue
X		fi
X		dirname=`expr \
X			"$fullname/" : '\(/\)/*[^/]*//*$'  \| \
X			"$fullname/" : '\(.*[^/]\)//*[^/][^/]*//*$' \| \
X			.`
X
X		if [ $doT = false ]; then 
X			sh $0 -p "$dirname"
X			if [ ! -d "$i" ]; then
X				mkdir "$i"
X			fi
X			continue
X		else
X			sh $0 -p -T "$dirname"
X		fi
X
X		if [ ! -d "$dirname"/TARGETS ]; then
X			mkdir "$dirname"/TARGETS
X		fi
X		if [ ! -r "$dirname"/TARGETS/__slot ]; then
X			echo 'This file enables the "slot" feature of the Schily SING makefile system' > "$dirname"/TARGETS/__slot
X		fi
X		dirbase=`echo "$i" | sed -e 's,/*$,,;s,.*/\([^/]*\),\1,'`
X		if [ ! -r "$dirname"/TARGETS/55"$dirbase" ]; then
X			: > "$dirname"/TARGETS/55"$dirbase"
X		fi
X		if [ ! -r "$dirname"/Makefile ]; then
X			srcroot=`echo "$dirname" | sed -e 's,[^/][^/]*,..,g'`
X			srcroot=`echo "$SRCROOT/$srcroot" | sed -e 's,^\./,,'`
X
X			echo '#ident %'W'% %'E'% %'Q'%'								 > "$dirname"/Makefile
X			echo '###########################################################################'	>> "$dirname"/Makefile
X			echo '# Sample makefile for sub directory makes'					>> "$dirname"/Makefile
X			echo '###########################################################################'	>> "$dirname"/Makefile
X			echo "SRCROOT=	$srcroot"								>> "$dirname"/Makefile
X			echo 'RULESDIR=	RULES'									>> "$dirname"/Makefile
X			echo 'include		$(SRCROOT)/$(RULESDIR)/rules.top'				>> "$dirname"/Makefile
X			echo '###########################################################################'	>> "$dirname"/Makefile
X			echo											>> "$dirname"/Makefile
X			echo '###########################################################################'	>> "$dirname"/Makefile
X			echo 'include		$(SRCROOT)/$(RULESDIR)/rules.dir'				>> "$dirname"/Makefile
X			echo '###########################################################################'	>> "$dirname"/Makefile
X		fi
X
X		if [ ! -d "$i" ]; then
X			mkdir "$i"
X		fi
X	done
Xfi
END-of-smake-1.2.1/conf/mkdir.sh
echo x - smake-1.2.1/conf/mkdep-msc.sh
sed 's/^X//' >smake-1.2.1/conf/mkdep-msc.sh << 'END-of-smake-1.2.1/conf/mkdep-msc.sh'
X#!/bin/sh
X#ident "@(#)mkdep-msc.sh	1.2 06/10/10 "
X###########################################################################
X# Copyright 1999,2006 by J. Schilling
X###########################################################################
X#
X# Create dependency list with Microsoft's cl
X#
X###########################################################################
X#
X# This script will probably not work correctly with a list of C-files
X# but as we don't need it with 'smake' or 'gmake' it seems to be sufficient.
X#
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XFILES=
X
Xfor i in "$@"; do
X
X	case "$i" in
X
X	-*)	# ignore options
X		;;
X
X	*.c | *.C | *.cc | *.cxx | *.cpp)
X
X		if [ ! -z "$FILES" ]; then
X			FILES="$FILES "
X		fi
X		# base name from $i
X		base=`echo $i | sed -e 's;[^/]*/;;'`
X		FILES="$FILES$base"
X		;;
X	esac
Xdone
X
XOFILES=`echo "$FILES" | sed -e 's;\([^.]*\)\.[cC]$;\1.obj;g' -e 's;\([^.]*\)\.cc$;\1.obj;g' -e 's;\([^.]*\)\.c..$;\1.obj;g' `
X
Xecho ".SPACE_IN_NAMES: true"
Xcl -E -nologo 2> /dev/null "$@" | grep '^\#line' | cut -d\" -f2 | sort -u | sed 's/\([^\]\) /\1\\ /g' | sed -e "s;^;$OFILES: ;"
Xecho ".SPACE_IN_NAMES:"
END-of-smake-1.2.1/conf/mkdep-msc.sh
echo x - smake-1.2.1/conf/xconfig.mk
sed 's/^X//' >smake-1.2.1/conf/xconfig.mk << 'END-of-smake-1.2.1/conf/xconfig.mk'
X#ident @(#)xconfig.mk	1.1 06/10/31 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X.SEARCHLIST:	../incs/$(OARCH) ../incs/$(OARCH)
XVPATH=		../incs/$(OARCH)
X
XINSDIR=		include/schily/$(OARCH)
XTARGET=		xconfig.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
XPTARGET=	../incs/$(OARCH)/xconfig.h
END-of-smake-1.2.1/conf/xconfig.mk
echo x - smake-1.2.1/conf/post.html
sed 's/^X//' >smake-1.2.1/conf/post.html << 'END-of-smake-1.2.1/conf/post.html'
X<p><hr>
X<a href="http://www.fraunhofer.de/"><IMG SRC="fhglogr.gif" ALT="FhG " BORDER=0></a>
X<a href="http://www.fokus.fraunhofer.de/home/"><IMG SRC="fhlogo.gif" ALT="FhG FOKUS " BORDER=0></a>
X<a href="http://www.berlios.de/"><IMG SRC="berliOS_logo.jpg" ALT="BerliOS " BORDER=0 WIDTH=159 HEIGHT=41></a>
X<a href="http://cdrecord.berlios.de/private/index.html">
X<IMG SRC="schilling.gif" ALT="Schily " BORDER=0 WIDTH=41 HEIGHT=54></a>
X<a href="http://cdrecord.berlios.de/private/index.html">Schily's Home</a>
X<a href="ftp://ftp.berlios.de/pub/ved/"><IMG SRC="vedpowered.gif" ALT="VED powered " BORDER=0 ></a>
X
X</body>
X</html>
END-of-smake-1.2.1/conf/post.html
echo x - smake-1.2.1/conf/pre.html
sed 's/^X//' >smake-1.2.1/conf/pre.html << 'END-of-smake-1.2.1/conf/pre.html'
X<html>
X<head>
X<title>Manpage for XXX</title>
X<META name="description" content="A html version of the manpage for XXX">
X<META name="keywords" content="XXX">
X</head>
X<body background=corrugated_xxxxxlight_metal.gif>
END-of-smake-1.2.1/conf/pre.html
echo x - smake-1.2.1/conf/mkdep-msc-interix.sh
sed 's/^X//' >smake-1.2.1/conf/mkdep-msc-interix.sh << 'END-of-smake-1.2.1/conf/mkdep-msc-interix.sh'
X#!/bin/sh
X#ident "@(#)mkdep-msc-interix.sh	1.4 07/04/24 "
X###########################################################################
X# Copyright 1999,2006-2007 by J. Schilling
X###########################################################################
X#
X# Create dependency list with Microsoft's cl from Interix
X#
X###########################################################################
X#
X# This script will probably not work correctly with a list of C-files
X# but as we don't need it with 'smake' or 'gmake' it seems to be sufficient.
X#
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XFILES=
X
Xfor i in "$@"; do
X
X	case "$i" in
X
X	-*)	# ignore options
X		;;
X
X	*.c | *.C | *.cc | *.cxx | *.cpp)
X
X		if [ ! -z "$FILES" ]; then
X			FILES="$FILES "
X		fi
X		# base name from $i
X		base=`echo $i | sed -e 's;[^/]*/;;'`
X		FILES="$FILES$base"
X		;;
X	esac
Xdone
X
XOFILES=`echo "$FILES" | sed -e 's;\([^.]*\)\.[cC]$;\1.obj;g' -e 's;\([^.]*\)\.cc$;\1.obj;g' -e 's;\([^.]*\)\.c..$;\1.obj;g' `
X
Xecho ".SPACE_IN_NAMES: true"
Xcl.exe -E -nologo 2> /dev/null "$@" | grep '^\#line' | cut -d\" -f2 | sort -u | \
X	sed '
Xs,^a:,/dev/fs/A,
Xs,^b:,/dev/fs/B,
Xs,^c:,/dev/fs/C,
Xs,^d:,/dev/fs/D,
Xs,^e:,/dev/fs/E,
Xs,^f:,/dev/fs/F,
Xs,^g:,/dev/fs/G,
Xs,^h:,/dev/fs/H,
Xs,^i:,/dev/fs/I,
Xs,^j:,/dev/fs/J,
Xs,^k:,/dev/fs/K,
Xs,^l:,/dev/fs/L,
Xs,^m:,/dev/fs/M,
Xs,^n:,/dev/fs/N,
Xs,^o:,/dev/fs/O,
Xs,^p:,/dev/fs/P,
Xs,^q:,/dev/fs/Q,
Xs,^r:,/dev/fs/R,
Xs,^s:,/dev/fs/S,
Xs,^t:,/dev/fs/T,
Xs,^u:,/dev/fs/U,
Xs,^v:,/dev/fs/V,
Xs,^w:,/dev/fs/W,
Xs,^x:,/dev/fs/X,
Xs,^y:,/dev/fs/Y,
Xs,^z:,/dev/fs/Z,
Xs,\([A-Z]\):,/dev/fs/\1,
Xs,\\\\,/,g
Xs/\([^\]\) /\1\\ /g' | sed -e "s;^;$OFILES: ;"
Xecho ".SPACE_IN_NAMES:"
END-of-smake-1.2.1/conf/mkdep-msc-interix.sh
echo c - smake-1.2.1/psmake
mkdir -p smake-1.2.1/psmake > /dev/null 2>&1
echo x - smake-1.2.1/psmake/Makefile
sed 's/^X//' >smake-1.2.1/psmake/Makefile << 'END-of-smake-1.2.1/psmake/Makefile'
X# @(#)Makefile	1.6 07/02/13 Copyright 1999 J. Schilling
X
X#CFLAGS=	-Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO -DNO_SYSINFO $(CDEFS)
X
XCFLAGS=	-Iinclude -I. -DSCHILY_BUILD -DSCHILY_PRINT -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO $(CDEFS)
X
Xo=o
X
XOFILES=make.$o readfile.$o parse.$o update.$o rules.$o archconf.$o memory.$o \
X	astoi.$o astoll.$o comerr.$o error.$o \
X	format.$o \
X	jsprintf.$o jssnprintf.$o \
X	saveargs.$o strcatl.$o \
X	streql.$o getargs.$o geterrno.$o seterrno.$o \
X	movebytes.$o fillbytes.$o raisecond.$o rename.$o \
X	fileopen.$o fcons.$o cvmod.$o flag.$o dat.$o \
X	filewrite.$o fileread.$o fileseek.$o niread.$o
X
Xsmake: $(OFILES)
X	$(CC) -o $@ $(OFILES)
X
X.SUFFIXES: .obj
X.c.o:
X	$(CC) -c $(CFLAGS) $<
X
X.c.obj:
X	$(CC) -c $(CFLAGS) $<
X
Xclean:
X	rm -f xconfig.h rules.cnf *.$o config.cache config.log config.status
END-of-smake-1.2.1/psmake/Makefile
echo x - smake-1.2.1/psmake/cpfiles
sed 's/^X//' >smake-1.2.1/psmake/cpfiles << 'END-of-smake-1.2.1/psmake/cpfiles'
X#!/bin/sh
X# @(#)cpfiles	1.16 09/11/14 Copyright 1999 J. Schilling
X
Xcp='cp -p'
Xsmake=smake
Xlib=libschily
Xincsrc=..
Xif [ -r ${incsrc}/${smake}/make.c ]; then
X	:
Xelse
X	if [ -r ${incsrc}/build/make.c ]; then
X		smake=build
X	else
X		incsrc=../..
X		if [ -r ${incsrc}/build/make.c ]; then
X			smake=build
X		fi
X	fi
Xfi
Xif [ -r ${incsrc}/${lib}/error.c ]; then
X	:
Xelse
X	lib=lib
Xfi
X
Xif [ ! -d include/schily ]; then
X	mkdir include/schily
Xfi
X
X$cp ${incsrc}/${smake}/archconf.c	archconf.c
X$cp ${incsrc}/${smake}/make.c		make.c
X$cp ${incsrc}/${smake}/make.h		make.h
X$cp ${incsrc}/${smake}/memory.c		memory.c
X$cp ${incsrc}/${smake}/parse.c		parse.c
X$cp ${incsrc}/${smake}/readfile.c	readfile.c
X$cp ${incsrc}/${smake}/rules.c		rules.c
X$cp ${incsrc}/${smake}/update.c		update.c
X$cp ${incsrc}/include/schily/archdefs.h	include/schily/archdefs.h
X$cp ${incsrc}/include/schily/ccomdefs.h	include/schily/ccomdefs.h
X$cp ${incsrc}/include/schily/ctype.h	include/schily/ctype.h
X$cp ${incsrc}/include/schily/dirent.h	include/schily/dirent.h
X$cp ${incsrc}/include/schily/fcntl.h	include/schily/fcntl.h
X$cp ${incsrc}/include/schily/getargs.h	include/schily/getargs.h
X$cp ${incsrc}/include/schily/getcwd.h	include/schily/getcwd.h
X$cp ${incsrc}/include/schily/hostname.h	include/schily/hostname.h
X$cp ${incsrc}/include/schily/libport.h	include/schily/libport.h
X$cp ${incsrc}/include/schily/limits.h	include/schily/limits.h
X$cp ${incsrc}/include/schily/maxpath.h	include/schily/maxpath.h
X$cp ${incsrc}/include/schily/mconfig.h	include/schily/mconfig.h
X$cp ${incsrc}/include/schily/xconfig.h	include/schily/xconfig.h
X$cp ${incsrc}/include/schily/xmconfig.h	include/schily/xmconfig.h
X$cp ${incsrc}/include/schily/prototyp.h	include/schily/prototyp.h
X$cp ${incsrc}/include/schily/sigblk.h	include/schily/sigblk.h
X$cp ${incsrc}/include/schily/signal.h	include/schily/signal.h
X$cp ${incsrc}/include/schily/standard.h	include/schily/standard.h
X$cp ${incsrc}/include/schily/stat.h		include/schily/stat.h
X$cp ${incsrc}/include/schily/stdio.h	include/schily/stdio.h
X$cp ${incsrc}/include/schily/stdlib.h	include/schily/stdlib.h
X$cp ${incsrc}/include/schily/stkframe.h	include/schily/stkframe.h
X$cp ${incsrc}/include/schily/string.h	include/schily/string.h
X$cp ${incsrc}/include/schily/systeminfo.h	include/schily/systeminfo.h
X$cp ${incsrc}/include/schily/time.h		include/schily/time.h
X$cp ${incsrc}/include/schily/unistd.h	include/schily/unistd.h
X$cp ${incsrc}/include/schily/utime.h	include/schily/utime.h
X$cp ${incsrc}/include/schily/utsname.h	include/schily/utsname.h
X$cp ${incsrc}/include/schily/utypes.h	include/schily/utypes.h
X$cp ${incsrc}/include/schily/types.h	include/schily/types.h
X$cp ${incsrc}/include/schily/param.h	include/schily/param.h
X$cp ${incsrc}/include/schily/varargs.h	include/schily/varargs.h
X$cp ${incsrc}/include/schily/vfork.h		include/schily/vfork.h
X$cp ${incsrc}/include/schily/wait.h		include/schily/wait.h
X$cp ${incsrc}/include/schily/schily.h	include/schily/schily.h
X$cp ${incsrc}/include/schily/errno.h	include/schily/errno.h
X$cp ${incsrc}/include/schily/align.h	include/schily/align.h
X$cp ${incsrc}/include/schily/avoffset.h	include/schily/avoffset.h
X$cp ${incsrc}/autoconf/config.guess	config.guess
X$cp ${incsrc}/autoconf/config.sub	config.sub
X$cp ${incsrc}/autoconf/configure	configure
Xif [ -r ${incsrc}/autoconf/rules.cnf.in ]; then
X	$cp ${incsrc}/autoconf/rules.cnf.in	rules.cnf.in
Xfi
Xif [ -r ${incsrc}/autoconf/xconfig.h.in ]; then
X	$cp ${incsrc}/autoconf/xconfig.h.in	xconfig.h.in
Xfi
Xif [ -r ${incsrc}/autoconf/rules.cnf_in ]; then
X	$cp ${incsrc}/autoconf/rules.cnf_in	rules.cnf_in
Xfi
Xif [ -r ${incsrc}/autoconf/xconfig.h_in ]; then
X	$cp ${incsrc}/autoconf/xconfig.h_in	xconfig.h_in
Xfi
X$cp ${incsrc}/conf/install-sh		install-sh
X$cp ${incsrc}/${lib}/stdio/schilyio.h	schilyio.h
X$cp ${incsrc}/${lib}/astoi.c		astoi.c
X$cp ${incsrc}/${lib}/astoll.c		astoll.c
X$cp ${incsrc}/${lib}/comerr.c		comerr.c
X$cp ${incsrc}/${lib}/error.c		error.c
X$cp ${incsrc}/${lib}/format.c		format.c
X#$cp ${incsrc}/${lib}/printf.c		printf.c
X#$cp ${incsrc}/${lib}/sprintf.c		sprintf.c
X#$cp ${incsrc}/${lib}/snprintf.c		snprintf.c
X$cp ${incsrc}/${lib}/saveargs.c		saveargs.c
X$cp ${incsrc}/${lib}/seterrno.c		seterrno.c
X$cp ${incsrc}/${lib}/strcatl.c		strcatl.c
X$cp ${incsrc}/${lib}/strlcpy.c		strlcpy.c
X$cp ${incsrc}/${lib}/strncpy.c		strncpy.c
X$cp ${incsrc}/${lib}/streql.c		streql.c
X$cp ${incsrc}/${lib}/fillbytes.c		fillbytes.c
X$cp ${incsrc}/${lib}/getargs.c		getargs.c
X$cp ${incsrc}/${lib}/geterrno.c		geterrno.c
X$cp ${incsrc}/${lib}/movebytes.c		movebytes.c
X$cp ${incsrc}/${lib}/raisecond.c		raisecond.c
X$cp ${incsrc}/${lib}/rename.c		rename.c
X$cp ${incsrc}/${lib}/jsprintf.c		jsprintf.c
X$cp ${incsrc}/${lib}/jssnprintf.c		jssnprintf.c
X$cp ${incsrc}/${lib}/stdio/cvmod.c	cvmod.c
X$cp ${incsrc}/${lib}/stdio/fcons.c	fcons.c
X$cp ${incsrc}/${lib}/stdio/fileopen.c	fileopen.c
X$cp ${incsrc}/${lib}/stdio/dat.c		dat.c
X$cp ${incsrc}/${lib}/stdio/fileread.c	fileread.c
X$cp ${incsrc}/${lib}/stdio/fileseek.c	fileseek.c
X$cp ${incsrc}/${lib}/stdio/filewrite.c	filewrite.c
X$cp ${incsrc}/${lib}/stdio/flag.c		flag.c
X$cp ${incsrc}/${lib}/stdio/niread.c	niread.c
X$cp ${incsrc}/${lib}/stdio/niwrite.c	niwrite.c
END-of-smake-1.2.1/psmake/cpfiles
echo x - smake-1.2.1/psmake/rmlinks
sed 's/^X//' >smake-1.2.1/psmake/rmlinks << 'END-of-smake-1.2.1/psmake/rmlinks'
X#!/bin/sh
X# @(#)rmlinks	1.13 09/11/14 Copyright 1999 J. Schilling
X
Xrm -f archconf.c
Xrm -f make.c
Xrm -f make.h
Xrm -f memory.c
Xrm -f parse.c
Xrm -f readfile.c
Xrm -f rules.c
Xrm -f update.c
Xrm -f include/schily/archdefs.h
Xrm -f include/schily/ccomdefs.h
Xrm -f include/schily/ctype.h
Xrm -f include/schily/dirent.h
Xrm -f include/schily/fcntl.h
Xrm -f include/schily/getargs.h
Xrm -f include/schily/getcwd.h
Xrm -f include/schily/hostname.h
Xrm -f include/schily/libport.h
Xrm -f include/schily/limits.h
Xrm -f include/schily/maxpath.h
Xrm -f include/schily/mconfig.h
Xrm -f include/schily/xconfig.h
Xrm -f include/schily/xmconfig.h
Xrm -f include/schily/prototyp.h
Xrm -f include/schily/sigblk.h
Xrm -f include/schily/signal.h
Xrm -f include/schily/standard.h
Xrm -f include/schily/stat.h
Xrm -f include/schily/stdio.h
Xrm -f include/schily/stdlib.h
Xrm -f include/schily/stkframe.h
Xrm -f include/schily/string.h
Xrm -f include/schily/systeminfo.h
Xrm -f include/schily/time.h
Xrm -f include/schily/unistd.h
Xrm -f include/schily/utime.h
Xrm -f include/schily/utsname.h
Xrm -f include/schily/utypes.h
Xrm -f include/schily/types.h
Xrm -f include/schily/param.h
Xrm -f include/schily/varargs.h
Xrm -f include/schily/vfork.h
Xrm -f include/schily/wait.h
Xrm -f include/schily/schily.h
Xrm -f include/schily/errno.h
Xrm -f include/schily/align.h
Xrm -f include/schily/avoffset.h
Xrm -f schilyio.h
Xrm -f config.guess
Xrm -f config.sub
Xrm -f configure
Xif [ -r rules.cnf.in ]; then
X	rm -f rules.cnf.in
Xfi
Xif [ -r rules.cnf_in ]; then
X	rm -f rules.cnf_in
Xfi
Xif [ -r xconfig.h.in ]; then
X	rm -f xconfig.h.in
Xfi
Xif [ -r xconfig.h_in ]; then
X	rm -f xconfig.h_in
Xfi
Xrm -f install-sh
Xrm -f astoi.c
Xrm -f astoll.c
Xrm -f comerr.c
Xrm -f error.c
Xrm -f format.c
Xrm -f printf.c
Xrm -f sprintf.c
Xrm -f saveargs.c
Xrm -f seterrno.c
Xrm -f strcatl.c
Xrm -f strlcpy.c
Xrm -f strncpy.c
Xrm -f streql.c
Xrm -f fillbytes.c
Xrm -f getargs.c
Xrm -f geterrno.c
Xrm -f jsprintf.c
Xrm -f jssnprintf.c
Xrm -f snprintf.c
Xrm -f movebytes.c
Xrm -f raisecond.c
Xrm -f rename.c
Xrm -f cvmod.c
Xrm -f fcons.c
Xrm -f fileopen.c
Xrm -f dat.c
Xrm -f fileread.c
Xrm -f fileseek.c
Xrm -f filewrite.c
Xrm -f flag.c
Xrm -f niread.c
Xrm -f niwrite.c
END-of-smake-1.2.1/psmake/rmlinks
echo x - smake-1.2.1/psmake/lnfiles
sed 's/^X//' >smake-1.2.1/psmake/lnfiles << 'END-of-smake-1.2.1/psmake/lnfiles'
X#!/bin/sh
X# @(#)lnfiles	1.16 09/11/14 Copyright 1999 J. Schilling
X
Xcp='ln -s'
Xsmake=smake
Xlib=libschily
Xincsrc=..
Xif [ -r ${incsrc}/${smake}/make.c ]; then
X	:
Xelse
X	if [ -r ${incsrc}/build/make.c ]; then
X		smake=build
X	else
X		incsrc=../..
X		if [ -r ${incsrc}/build/make.c ]; then
X			smake=build
X		fi
X	fi
Xfi
Xif [ -r ${incsrc}/${lib}/error.c ]; then
X	:
Xelse
X	lib=lib
Xfi
X
Xif [ ! -d include/schily ]; then
X	mkdir include/schily
Xfi
X
X$cp ${incsrc}/${smake}/archconf.c	archconf.c
X$cp ${incsrc}/${smake}/make.c		make.c
X$cp ${incsrc}/${smake}/make.h		make.h
X$cp ${incsrc}/${smake}/memory.c		memory.c
X$cp ${incsrc}/${smake}/parse.c		parse.c
X$cp ${incsrc}/${smake}/readfile.c	readfile.c
X$cp ${incsrc}/${smake}/rules.c		rules.c
X$cp ${incsrc}/${smake}/update.c		update.c
X$cp ${incsrc}/../../include/schily/archdefs.h	include/schily/archdefs.h
X$cp ${incsrc}/../../include/schily/ccomdefs.h	include/schily/ccomdefs.h
X$cp ${incsrc}/../../include/schily/ctype.h	include/schily/ctype.h
X$cp ${incsrc}/../../include/schily/dirent.h		include/schily/dirent.h
X$cp ${incsrc}/../../include/schily/fcntl.h		include/schily/fcntl.h
X$cp ${incsrc}/../../include/schily/getargs.h	include/schily/getargs.h
X$cp ${incsrc}/../../include/schily/getcwd.h		include/schily/getcwd.h
X$cp ${incsrc}/../../include/schily/hostname.h		include/schily/hostname.h
X$cp ${incsrc}/../../include/schily/libport.h	include/schily/libport.h
X$cp ${incsrc}/../../include/schily/limits.h	include/schily/limits.h
X$cp ${incsrc}/../../include/schily/maxpath.h	include/schily/maxpath.h
X$cp ${incsrc}/../../include/schily/mconfig.h	include/schily/mconfig.h
X$cp ${incsrc}/../../include/schily/xconfig.h	include/schily/xconfig.h
X$cp ${incsrc}/../../include/schily/xmconfig.h	include/schily/xmconfig.h
X$cp ${incsrc}/../../include/schily/prototyp.h	include/schily/prototyp.h
X$cp ${incsrc}/../../include/schily/sigblk.h		include/schily/sigblk.h
X$cp ${incsrc}/../../include/schily/signal.h		include/schily/signal.h
X$cp ${incsrc}/../../include/schily/standard.h	include/schily/standard.h
X$cp ${incsrc}/../../include/schily/stat.h		include/schily/stat.h
X$cp ${incsrc}/../../include/schily/stdio.h		include/schily/stdio.h
X$cp ${incsrc}/../../include/schily/stdlib.h		include/schily/stdlib.h
X$cp ${incsrc}/../../include/schily/stkframe.h		include/schily/stkframe.h
X$cp ${incsrc}/../../include/schily/string.h		include/schily/string.h
X$cp ${incsrc}/../../include/schily/systeminfo.h		include/schily/systeminfo.h
X$cp ${incsrc}/../../include/schily/time.h		include/schily/time.h
X$cp ${incsrc}/../../include/schily/unistd.h		include/schily/unistd.h
X$cp ${incsrc}/../../include/schily/utime.h		include/schily/utime.h
X$cp ${incsrc}/../../include/schily/utsname.h		include/schily/utsname.h
X$cp ${incsrc}/../../include/schily/utypes.h		include/schily/utypes.h
X$cp ${incsrc}/../../include/schily/types.h		include/schily/types.h
X$cp ${incsrc}/../../include/schily/param.h		include/schily/param.h
X$cp ${incsrc}/../../include/schily/varargs.h	include/schily/varargs.h
X$cp ${incsrc}/../../include/schily/vfork.h		include/schily/vfork.h
X$cp ${incsrc}/../../include/schily/wait.h		include/schily/wait.h
X$cp ${incsrc}/../../include/schily/schily.h		include/schily/schily.h
X$cp ${incsrc}/../../include/schily/errno.h		include/schily/errno.h
X$cp ${incsrc}/../../include/schily/align.h		include/schily/align.h
X$cp ${incsrc}/../../include/schily/avoffset.h	include/schily/avoffset.h
X$cp ${incsrc}/autoconf/config.guess	config.guess
X$cp ${incsrc}/autoconf/config.sub	config.sub
X$cp ${incsrc}/autoconf/configure	configure
Xif [ -r ${incsrc}/autoconf/rules.cnf.in ]; then
X	$cp ${incsrc}/autoconf/rules.cnf.in	rules.cnf.in
Xfi
Xif [ -r ${incsrc}/autoconf/xconfig.h.in ]; then
X	$cp ${incsrc}/autoconf/xconfig.h.in	xconfig.h.in
Xfi
Xif [ -r ${incsrc}/autoconf/rules.cnf_in ]; then
X	$cp ${incsrc}/autoconf/rules.cnf_in	rules.cnf_in
Xfi
Xif [ -r ${incsrc}/autoconf/xconfig.h_in ]; then
X	$cp ${incsrc}/autoconf/xconfig.h_in	xconfig.h_in
Xfi
X$cp ${incsrc}/conf/install-sh	install-sh
X$cp ${incsrc}/${lib}/stdio/schilyio.h	schilyio.h
X$cp ${incsrc}/${lib}/astoi.c		astoi.c
X$cp ${incsrc}/${lib}/astoll.c		astoll.c
X$cp ${incsrc}/${lib}/comerr.c		comerr.c
X$cp ${incsrc}/${lib}/error.c		error.c
X$cp ${incsrc}/${lib}/format.c		format.c
X#$cp ${incsrc}/${lib}/printf.c		printf.c
X#$cp ${incsrc}/${lib}/sprintf.c		sprintf.c
X#$cp ${incsrc}/${lib}/snprintf.c	snprintf.c
X$cp ${incsrc}/${lib}/saveargs.c	saveargs.c
X$cp ${incsrc}/${lib}/seterrno.c	seterrno.c
X$cp ${incsrc}/${lib}/strcatl.c		strcatl.c
X$cp ${incsrc}/${lib}/strlcpy.c		strlcpy.c
X$cp ${incsrc}/${lib}/strncpy.c		strncpy.c
X$cp ${incsrc}/${lib}/streql.c		streql.c
X$cp ${incsrc}/${lib}/fillbytes.c	fillbytes.c
X$cp ${incsrc}/${lib}/getargs.c		getargs.c
X$cp ${incsrc}/${lib}/geterrno.c	geterrno.c
X$cp ${incsrc}/${lib}/movebytes.c	movebytes.c
X$cp ${incsrc}/${lib}/raisecond.c	raisecond.c
X$cp ${incsrc}/${lib}/rename.c		rename.c
X$cp ${incsrc}/${lib}/jsprintf.c	jsprintf.c
X$cp ${incsrc}/${lib}/jssnprintf.c	jssnprintf.c
X$cp ${incsrc}/${lib}/stdio/cvmod.c	cvmod.c
X$cp ${incsrc}/${lib}/stdio/fcons.c	fcons.c
X$cp ${incsrc}/${lib}/stdio/fileopen.c	fileopen.c
X$cp ${incsrc}/${lib}/stdio/dat.c	dat.c
X$cp ${incsrc}/${lib}/stdio/fileread.c	fileread.c
X$cp ${incsrc}/${lib}/stdio/fileseek.c	fileseek.c
X$cp ${incsrc}/${lib}/stdio/filewrite.c	filewrite.c
X$cp ${incsrc}/${lib}/stdio/flag.c	flag.c
X$cp ${incsrc}/${lib}/stdio/niread.c	niread.c
X$cp ${incsrc}/${lib}/stdio/niwrite.c	niwrite.c
END-of-smake-1.2.1/psmake/lnfiles
echo x - smake-1.2.1/psmake/MAKE-sh
sed 's/^X//' >smake-1.2.1/psmake/MAKE-sh << 'END-of-smake-1.2.1/psmake/MAKE-sh'
X#!/bin/sh
X#ident "@(#)MAKE-sh	1.9 09/10/30 "
X###############################################################################
X#
X# The shell variables CFLAGS & LDFLAGS may be used to pass additional flags
X# to the compile and link process.
X#
X###############################################################################
X
Xforceconfig="no"
X
Xwhile [ x"$1" != x ]; do
X    case $1 in
X	-help)
X	    echo "Usage:	$0 [options]"
X	    echo "Options:"
X	    echo "	-force-config	Force a new 'configure' run"
X	    echo ""
X	    echo "Environment variables:"
X	    echo "CC=		The C-compiler to use"
X	    echo "CC_OPT=		The Options for the C-compiler (e.g. -O)"
X	    echo "CFLAGS=		Additional C-compiler flags"
X	    echo "LDFLAGS=	Additional Linker flags"
X	    exit
X	    continue;;
X
X	-force-config) forceconfig="yes"
X	    shift
X	    continue;;
X
X	*)  echo "$0: Illegal parameter '$1'."
X	    exit 1
X	    continue;;
X    esac
Xdone
X
X#
X# Check whether the configure script is present. If we are compiling from a
X# clean SCCS tree, this file is missing because configure is a compilation
X# result created by autoconf.
X#
Xsrcroot=..
Xif [ -d ${srcroot}/autoconf ]; then
X	:
Xelse
X		srcroot=../..
Xfi
Xif [ ! -r ${srcroot}/autoconf/configure ]; then
X	(cd ${srcroot}/autoconf; sh ./autoconf)
Xfi
Xif [ ! -d ${srcroot}/RULES/. ]; then
X	(cd ${srcroot}; sh ./MKLINKS)
Xfi
Xif [ ! -r ${srcroot}/RULES/ldummy.lnk ]; then
X	(cd ${srcroot}/RULES/.; sh ./MKLINKS)
Xfi
X
X#
X# Check whether the source files are present. If we are compiling from a
X# clean SCCS tree, these files are missing because they are links to the
X# original source at the original location.
X#
Xecho "Checking for source files..."
Xif [ ! -r make.c ]; then
X	echo "Source files are not present..."
X
X	#
X	# Check if the current system allows to create symlinks
X	#
X	lnfiles="sh lnfiles"
X	rm -f xxzzy.123 xxzzy.345
X	echo test > xxzzy.123
X	ln -s xxzzy.123 xxzzy.345
X	test $? = 0 || lnfiles="sh cpfiles"
X	test -r xxzzy.345 || lnfiles="sh cpfiles"
X	rm -f xxzzy.123 xxzzy.345
X
X	echo "Creating links to source files..."
X	sh rmlinks
X	${lnfiles}
Xfi
X
X#
X# Check if the current system allows to create symlinks
X# If not, it seems that all symlinks appear to be plain files of size 0
X#
Xecho "Checking for rotten symlinks..."
Xif [ ! -s make.c ]; then
X	echo "Copying files because symlinks do not work..."
X	sh rmlinks
X	sh cpfiles
Xfi
X
XSYSTEM=unknown
Xecho 'testing for uname...'
Xuname > /dev/null 2> /dev/null
Xif [ $? = 0 ]; then
X	SYSTEM=`uname -s`
Xfi
X
XENV_CC=${CC-none}
XCC=${CC-cc}
XCF=
XLF=
XINCLUDE="-Iinclude -I."
XDEFINES="-DSCHILY_BUILD -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO"
Xo=o
X
Xif [ $ENV_CC = none ]; then
X	echo 'Trying to find GCC'
X
X	gcc -v 2> /dev/null && CC=gcc
Xfi
Xif [ $CC = gcc ]; then
X	GCC_OPT=-O
X	OPT=${CC_OPT-$GCC_OPT}
Xelse
X	OPT=${CC_OPT-}
X	if [ $SYSTEM = HP-UX ]; then
X		CF=-Ae
X	fi
Xfi
Xif [ $CC = cl ]; then
X	o=obj
Xfi
X#
X# Set dynamic linking and auto .exe suffix for OS/2
X#
Xif [ "$SYSTEM" = OS/2 ]; then
X	LF="-Zexe -Zcrtdll"
Xfi
X#
X# Set stack size to 256k on QNX
X#
Xif [ "$SYSTEM" = QNX -a $CC != gcc ]; then 
X	LF="-N 256k"
Xfi 
X#
X# VMS does not like -Iinclude, catch "OpenVMS" case also
X#
Xcase "$SYSTEM" in
X
X*VMS*)
X	#
X	# Default to cc on VMS
X	#
X	if [ $ENV_CC = none ]; then
X		CC=cc
X	fi
X	INCLUDE="-I./include -I."
X	DEFINES="$DEFINES -D_USE_STD_STAT -DNO_OPENFD_SRC"
X	if [ ! -r config.cache ]; then
X		: > config.cache
X	fi
X	if [ ! -r xconfig.h ]; then
X		: > xconfig.h
X	fi
X	;;
Xesac
X
Xecho "SYSTEM:		$SYSTEM"
Xecho "CC:		$CC"
Xecho "OPT:		$OPT"
Xecho "CFLAGS:		$CF"
Xecho "INCLUDE:	$INCLUDE"
Xecho
X
Xif [ "$forceconfig" = "yes" ]; then
X	echo "Removing old configure run results..."
X	rm -f config.cache xconfig.h
Xfi
Xif [ -r config.cache ]; then
X	echo "Using old configure run results..."
Xelse
X	if [ .$CF != . ]; then
X		eval CC=$CC CFLAGS=$CF CONFIG_NOFAIL=TRUE sh ./configure
X	else
X		eval CC=$CC CONFIG_NOFAIL=TRUE sh ./configure
X	fi
Xfi
X
X#
X# Check whether "configure" worked or whether there is a compiler problem
X#
Xif [ ! -r xconfig.h ]; then
X	echo
X	echo "Configure did not create 'xconfig.h'. Check for Compiler problems."
X	echo "Cannot continue..."
X	exit 1
Xfi
X
Xset -x
X
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES -DSCHILY_PRINT   make.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES -DSCHILY_PRINT   readfile.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES -DSCHILY_PRINT   parse.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES -DSCHILY_PRINT   update.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES -DSCHILY_PRINT   rules.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES -DSCHILY_PRINT   archconf.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES -DSCHILY_PRINT   memory.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   astoi.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   astoll.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   comerr.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   error.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   format.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   jsprintf.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   jssnprintf.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   saveargs.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   seterrno.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   strcatl.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   strlcpy.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   strncpy.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   streql.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   getargs.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   geterrno.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   movebytes.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   fillbytes.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   raisecond.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   rename.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   fileopen.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   fcons.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   cvmod.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   flag.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   dat.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   filewrite.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   fileread.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   fileseek.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   niread.c
X$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES   niwrite.c
X$CC $LF $LDFLAGS -o smake make.$o readfile.$o parse.$o update.$o rules.$o archconf.$o memory.$o  astoi.$o astoll.$o comerr.$o error.$o format.$o jsprintf.$o jssnprintf.$o saveargs.$o seterrno.$o strcatl.$o strlcpy.$o strncpy.$o streql.$o getargs.$o geterrno.$o movebytes.$o fillbytes.$o raisecond.$o rename.$o fileopen.$o fcons.$o cvmod.$o flag.$o dat.$o filewrite.$o fileread.$o fileseek.$o niread.$o niwrite.$o
END-of-smake-1.2.1/psmake/MAKE-sh
echo c - smake-1.2.1/psmake/include
mkdir -p smake-1.2.1/psmake/include > /dev/null 2>&1
echo c - smake-1.2.1/psmake/include/schily
mkdir -p smake-1.2.1/psmake/include/schily > /dev/null 2>&1
echo x - smake-1.2.1/psmake/include/align.h
sed 's/^X//' >smake-1.2.1/psmake/include/align.h << 'END-of-smake-1.2.1/psmake/include/align.h'
X/*
X * This file has been generated automatically
X * by @(#)align_test.c	1.5 96/02/04 Copyright 1995 J. Schilling
X * do not edit by hand.
X */
X
X#define	ALIGN_SHORT	2	/* alignement value for (short *)	*/
X#define	ALIGN_SMASK	1	/* alignement mask  for (short *)	*/
X
X#define	ALIGN_INT	4	/* alignement value for (int *)		*/
X#define	ALIGN_IMASK	3	/* alignement mask  for (int *)		*/
X
X#define	ALIGN_LONG	8	/* alignement value for (long *)	*/
X#define	ALIGN_LMASK	7	/* alignement mask  for (long *)	*/
X
X#define	ALIGN_LLONG	8	/* alignement value for (long long *)	*/
X#define	ALIGN_LLMASK	7	/* alignement mask  for (long long *)	*/
X
X#define	ALIGN_DOUBLE	4	/* alignement value for (double *)	*/
X#define	ALIGN_DMASK	3	/* alignement mask  for (double *)	*/
X
X#define	xaligned(a, s)		((((int)(a)) & s) == 0 )
X#define	x2aligned(a, b, s)	(((((int)(a)) | ((int)(b))) & s) == 0 )
X
X#define	saligned(a)		xaligned(a, ALIGN_SMASK)
X#define	s2aligned(a, b)		x2aligned(a, b, ALIGN_SMASK)
X
X#define	ialigned(a)		xaligned(a, ALIGN_IMASK)
X#define	i2aligned(a, b)		x2aligned(a, b, ALIGN_IMASK)
X
X#define	laligned(a)		xaligned(a, ALIGN_LMASK)
X#define	l2aligned(a, b)		x2aligned(a, b, ALIGN_LMASK)
X
X#define	llaligned(a)		xaligned(a, ALIGN_LLMASK)
X#define	ll2aligned(a, b)	x2aligned(a, b, ALIGN_LLMASK)
X
X#define	daligned(a)		xaligned(a, ALIGN_DMASK)
X#define	d2aligned(a, b)		x2aligned(a, b, ALIGN_DMASK)
X
X
X#define	xalign(x, a, m)		( ((char *)(x)) + ( (a) - (((int)(x))&(m))) )
X
X#define	salign(x)		xalign((x), ALIGN_SHORT, ALIGN_SMASK)
X#define	ialign(x)		xalign((x), ALIGN_INT, ALIGN_IMASK)
X#define	lalign(x)		xalign((x), ALIGN_LONG, ALIGN_LMASK)
X#define	llalign(x)		xalign((x), ALIGN_LLONG, ALIGN_LLMASK)
X#define	dalign(x)		xalign((x), ALIGN_DOUBLE, ALIGN_DMASK)
END-of-smake-1.2.1/psmake/include/align.h
echo x - smake-1.2.1/psmake/include/avoffset.h
sed 's/^X//' >smake-1.2.1/psmake/include/avoffset.h << 'END-of-smake-1.2.1/psmake/include/avoffset.h'
END-of-smake-1.2.1/psmake/include/avoffset.h
echo x - smake-1.2.1/psmake/.clean
sed 's/^X//' >smake-1.2.1/psmake/.clean << 'END-of-smake-1.2.1/psmake/.clean'
X#!/bin/sh
X
Xecho 'Removing old objects...'
Xrm -f *.o *.obj
X
Xecho 'Removing old config cache files...'
Xrm -f config.status config.cache config.log xconfig.h rules.cnf
X
Xif [ $# -gt 0 ]; then
X	echo 'Removing old smake binary...'
X	rm -f smake smake.exe
Xfi
X
Xecho 'done.'
END-of-smake-1.2.1/psmake/.clean
echo x - smake-1.2.1/psmake/MAKE-all
sed 's/^X//' >smake-1.2.1/psmake/MAKE-all << 'END-of-smake-1.2.1/psmake/MAKE-all'
X#!/bin/sh
X# @(#)MAKE-all	1.4 09/11/01 Copyright 1998-2008 J. Schilling
X
X#
X# Check if there already is a working 'smake' in the current directory
X#
Xecho "Checking for working bootstrap make..."
X./smake -version
Xif [ $? = 0 ]; then
X	exit
Xfi
Xecho "Creating bootstrap make..."
X
Xsh ./.clean
X
X#
X# Now start the actual make precedure...
X#
Xsh ./MAKE-sh
END-of-smake-1.2.1/psmake/MAKE-all
echo c - smake-1.2.1/TEMPLATES
mkdir -p smake-1.2.1/TEMPLATES > /dev/null 2>&1
echo x - smake-1.2.1/TEMPLATES/Defaults.gcc
sed 's/^X//' >smake-1.2.1/TEMPLATES/Defaults.gcc << 'END-of-smake-1.2.1/TEMPLATES/Defaults.gcc'
X#ident "%W% %E% %Q%"
X###########################################################################
X#
X# global definitions for unknown Systems using CC=gcc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
XRUNPATH=	-R $(INS_BASE)/lib -R /opt/schily/lib -R $(OLIBSDIR)
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	bin
XDEFINSGRP=	bin
END-of-smake-1.2.1/TEMPLATES/Defaults.gcc
echo x - smake-1.2.1/TEMPLATES/Defaults.xcc
sed 's/^X//' >smake-1.2.1/TEMPLATES/Defaults.xcc << 'END-of-smake-1.2.1/TEMPLATES/Defaults.xcc'
X#ident "%W% %E% %Q%"
X###########################################################################
X#
X# global definitions for unknown Systems using CC=cc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R $(INS_BASE)/lib -R /opt/schily/lib -R $(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	bin
XDEFINSGRP=	bin
END-of-smake-1.2.1/TEMPLATES/Defaults.xcc
echo x - smake-1.2.1/TEMPLATES/Makefile.aux
sed 's/^X//' >smake-1.2.1/TEMPLATES/Makefile.aux << 'END-of-smake-1.2.1/TEMPLATES/Makefile.aux'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		etc
XTARGET=		help.dat
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/Makefile.aux
echo x - smake-1.2.1/TEMPLATES/Makefile.cmd
sed 's/^X//' >smake-1.2.1/TEMPLATES/Makefile.cmd << 'END-of-smake-1.2.1/TEMPLATES/Makefile.cmd'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for general application programs
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		bin
XTARGET=		cfform
X#CPPOPTS +=	-Ispecincl
XCFILES=		cfform.c
XLIBS=		-lat
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cmd
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/Makefile.cmd
echo x - smake-1.2.1/TEMPLATES/Makefile.dir
sed 's/^X//' >smake-1.2.1/TEMPLATES/Makefile.dir << 'END-of-smake-1.2.1/TEMPLATES/Makefile.dir'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for sub directory makes
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X#
X# include Targetdirs no longer needed, we use SSPM
X#include		Targetdirs.$(M_ARCH)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dir
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/Makefile.dir
echo x - smake-1.2.1/TEMPLATES/Makefile.drv
sed 's/^X//' >smake-1.2.1/TEMPLATES/Makefile.drv << 'END-of-smake-1.2.1/TEMPLATES/Makefile.drv'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for general device drivers
X###########################################################################
XSRCROOT=	../../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		usr/kernel/drv
XTARGET=		ga
XCPPOPTS +=	-DFOKUS -DATMNA -DBROKEN_PROM -DTPI_COMPAT \
X		-DGADEBUG -DGADEBUG_MASK=0x0 
XCFILES=		ga.c
XSRCLIBS=
XLIBS=		
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.drv
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/Makefile.drv
echo x - smake-1.2.1/TEMPLATES/Makefile.inc
sed 's/^X//' >smake-1.2.1/TEMPLATES/Makefile.inc << 'END-of-smake-1.2.1/TEMPLATES/Makefile.inc'
X#ident %W% %E% %Q%
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include
XTARGET=		align.h
XTARGETC=	align_test
XCFILES=		align_test.c
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.inc
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/Makefile.inc
echo x - smake-1.2.1/TEMPLATES/Makefile.lib
sed 's/^X//' >smake-1.2.1/TEMPLATES/Makefile.lib << 'END-of-smake-1.2.1/TEMPLATES/Makefile.lib'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for non-shared libraries
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		lib
XTARGETLIB=	aal
XCPPOPTS +=	-DFOKUS
XCFILES=		aallib.c
XLIBS=
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lib
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/Makefile.lib
echo x - smake-1.2.1/TEMPLATES/Makefile.loc
sed 's/^X//' >smake-1.2.1/TEMPLATES/Makefile.loc << 'END-of-smake-1.2.1/TEMPLATES/Makefile.loc'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		etc
XTARGET=		test
XSRCFILE=	test
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.loc
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/Makefile.loc
echo x - smake-1.2.1/TEMPLATES/Makefile.man
sed 's/^X//' >smake-1.2.1/TEMPLATES/Makefile.man << 'END-of-smake-1.2.1/TEMPLATES/Makefile.man'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	test
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	test.tr
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/Makefile.man
echo x - smake-1.2.1/TEMPLATES/Makefile.mks
sed 's/^X//' >smake-1.2.1/TEMPLATES/Makefile.mks << 'END-of-smake-1.2.1/TEMPLATES/Makefile.mks'
X#ident "%W% %E% %Q%"
X###########################################################################
X# Sample makefile for sub-makes in one directory
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X#MK_FILES=	cfform.mk cfget20.mk cfhec11.mk cfinfo20.mk cfpld.mk cfput20.mk
XMK_FILES=	cfform.mk
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.mks
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/Makefile.mks
echo x - smake-1.2.1/TEMPLATES/Makefile.mod
sed 's/^X//' >smake-1.2.1/TEMPLATES/Makefile.mod << 'END-of-smake-1.2.1/TEMPLATES/Makefile.mod'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for loadable streams modules
X###########################################################################
XSRCROOT=	../../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		usr/kernel/strmod
XTARGET=		ga
XCPPOPTS +=	-DFOKUS -DATMNA -DBROKEN_PROM -DTPI_COMPAT \
X		-DGADEBUG -DGADEBUG_MASK=0x0 
XCFILES=		ga.c
XSRCLIBS=
XLIBS=		
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.mod
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/Makefile.mod
echo x - smake-1.2.1/TEMPLATES/Makefile.root
sed 's/^X//' >smake-1.2.1/TEMPLATES/Makefile.root << 'END-of-smake-1.2.1/TEMPLATES/Makefile.root'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for the source root
X###########################################################################
XSRCROOT=	.
XDIRNAME=	SRCROOT
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X#
X# include Targetdirs no longer needed, we use SSPM
X#include		Targetdirs.$(M_ARCH)
X
X###########################################################################
X# Due to a bug in SunPRO make we need special rules for the root makefile
X#
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.rdi
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/Makefile.root
echo x - smake-1.2.1/TEMPLATES/Makefile.scr
sed 's/^X//' >smake-1.2.1/TEMPLATES/Makefile.scr << 'END-of-smake-1.2.1/TEMPLATES/Makefile.scr'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing localized shell scripts
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		bin
XTARGET=		test
XSCRFILE=	test.sh
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.scr
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/Makefile.scr
echo x - smake-1.2.1/TEMPLATES/Makefile.shl
sed 's/^X//' >smake-1.2.1/TEMPLATES/Makefile.shl << 'END-of-smake-1.2.1/TEMPLATES/Makefile.shl'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for shared libraries
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		lib
XTARGETLIB=	aal
XCPPOPTS +=	-DFOKUS
XCFILES=		aallib.c
XLIBS=
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.shl
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/Makefile.shl
echo x - smake-1.2.1/TEMPLATES/Makefile_de.man
sed 's/^X//' >smake-1.2.1/TEMPLATES/Makefile_de.man << 'END-of-smake-1.2.1/TEMPLATES/Makefile_de.man'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing non english manual pages
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X# Rules for German manual pages (replace de with your locale)
X###########################################################################
X
XMANDIR=		man/de
XTARGETMAN=	test
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	test-de.tr
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/Makefile_de.man
echo x - smake-1.2.1/TEMPLATES/cmd.mk
sed 's/^X//' >smake-1.2.1/TEMPLATES/cmd.mk << 'END-of-smake-1.2.1/TEMPLATES/cmd.mk'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for general application programs
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		bin
XTARGET=		cfform
X#CPPOPTS +=	-Ispecincl
XCFILES=		cfform.c
XLIBS=		-lat
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cmd
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/cmd.mk
echo x - smake-1.2.1/TEMPLATES/inc.mk
sed 's/^X//' >smake-1.2.1/TEMPLATES/inc.mk << 'END-of-smake-1.2.1/TEMPLATES/inc.mk'
X#ident %W% %E% %Q%
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include
XTARGET=		align.h
XTARGETC=	align_test
XCFILES=		align_test.c
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.inc
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/inc.mk
echo x - smake-1.2.1/TEMPLATES/lib.mk
sed 's/^X//' >smake-1.2.1/TEMPLATES/lib.mk << 'END-of-smake-1.2.1/TEMPLATES/lib.mk'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for non-shared libraries
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		lib
XTARGETLIB=	aal
XCPPOPTS +=	-DFOKUS
XCFILES=		aallib.c
XLIBS=
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lib
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/lib.mk
echo x - smake-1.2.1/TEMPLATES/shl.mk
sed 's/^X//' >smake-1.2.1/TEMPLATES/shl.mk << 'END-of-smake-1.2.1/TEMPLATES/shl.mk'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for shared libraries
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		lib
XTARGETLIB=	aal
XCPPOPTS +=	-DFOKUS
XCFILES=		aallib.c
XLIBS=
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.shl
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/shl.mk
echo x - smake-1.2.1/TEMPLATES/temp-gcc.rul
sed 's/^X//' >smake-1.2.1/TEMPLATES/temp-gcc.rul << 'END-of-smake-1.2.1/TEMPLATES/temp-gcc.rul'
X#ident "@(#)temp-gcc.rul	1.3 09/07/26 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for unknown GCC systems
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XSHL_SUFFIX=	.so.1.0
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
XARFLAGS=	cr
X#LORDER=		lorder
X#TSORT=		tsort
XLORDER=		echo
XTSORT=		cat
X
XMKDIR=		$(MKDIR_SH)
END-of-smake-1.2.1/TEMPLATES/temp-gcc.rul
echo x - smake-1.2.1/TEMPLATES/MKLINKS
sed 's/^X//' >smake-1.2.1/TEMPLATES/MKLINKS << 'END-of-smake-1.2.1/TEMPLATES/MKLINKS'
X#!/bin/sh
X###########################################################################
X#ident "@(#)MKLINKS	1.1 09/08/16 "
X###########################################################################
X# Written 2008 by J. Schilling
X###########################################################################
X# Copyright (c) 2008 J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xsymlink="ln -s"
Xrm -f xxzzy.123 xxzzy.345
Xecho test > xxzzy.123
X$symlink xxzzy.123 xxzzy.345
Xtest $? = 0 || symlink=cp
Xtest -r xxzzy.345 || symlink=cp
Xrm -f xxzzy.123 xxzzy.345
X###########################################################################
X
X$symlink Makefile.cmd	cmd.mk
X$symlink Makefile.inc	inc.mk
X$symlink Makefile.lib	lib.mk
X$symlink Makefile.shl	shl.mk
END-of-smake-1.2.1/TEMPLATES/MKLINKS
echo x - smake-1.2.1/TEMPLATES/temp-xcc.rul
sed 's/^X//' >smake-1.2.1/TEMPLATES/temp-xcc.rul << 'END-of-smake-1.2.1/TEMPLATES/temp-xcc.rul'
X#ident "@(#)temp-xcc.rul	1.3 09/07/26 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for unknown systems systems with dumb cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-dumb.rul
X
XOSDEFS=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XARFLAGS=	cr
X#LORDER=		lorder
X#TSORT=		tsort
XLORDER=		echo
XTSORT=		cat
END-of-smake-1.2.1/TEMPLATES/temp-xcc.rul
echo x - smake-1.2.1/TEMPLATES/Makefile.wrap
sed 's/^X//' >smake-1.2.1/TEMPLATES/Makefile.wrap << 'END-of-smake-1.2.1/TEMPLATES/Makefile.wrap'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for wrapping makes
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
X#CCOM=	gcc
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XSRC_DIR=	wget-1.9.1
X#CONF_OPTS=	--prefix=$(INS_BASE)
X#CONF_OPTS=	--prefix=$(INS_BASE) --program-prefix=g
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.sps
X###########################################################################
END-of-smake-1.2.1/TEMPLATES/Makefile.wrap
echo x - smake-1.2.1/TEMPLATES/noshlxxx.mk
sed 's/^X//' >smake-1.2.1/TEMPLATES/noshlxxx.mk << 'END-of-smake-1.2.1/TEMPLATES/noshlxxx.mk'
X#ident "%W% %E% %Q%"
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
Xall:
X	@echo "	==> NO shared libs on this platform (yet)"
END-of-smake-1.2.1/TEMPLATES/noshlxxx.mk
echo x - smake-1.2.1/COPYING
sed 's/^X//' >smake-1.2.1/COPYING << 'END-of-smake-1.2.1/COPYING'
XThe software in this directory tree is free software and uses
Xlicenses that are aproved be the OpenSource Initative
X
X	http://www.opensource.org/
X
XNot all sub-projects use the same license. Here is a list of
Xsub-directories and it's related licenses:
X
Xautoconf/
X	Files from the Schily Autoconf system (GPL)
Xconf/
X	Support shell scripts for the Schily Makefile system (CDDL)
XDEFAULTS/
X	Default files for the Schily Makefile system (CDDL)
XDEFAULTS_ENG/
X	Default files for the Schily Makefile system (CDDL)
Xinc/
X	Support C-Files for the Schily Makefile system (CDDL)
Xinclude/
X	Support H-Files for the Schily Makefile system (CDDL)
XRULES/
X	The main part of the Schily Makefilesystem (CDDL)
XTARGETS/
X	Slot support for the Schily Makefile system (CDDL)
XTEMPLATES/
X	Template support for the Schily Makefile system (CDDL)
X
Xlib/
X	parts of libschily (CDDL)
Xsmake/
X	The smake program (CDDL)
X
X
XFor more information on the CDDL read the file	CDDL.Schily.txt
XFor more information on the GPL read the file	GPL-2.0.txt
XFor more information on the LGPL read the file	LGPL-2.1.txt
END-of-smake-1.2.1/COPYING
echo x - smake-1.2.1/AN-1.2
sed 's/^X//' >smake-1.2.1/AN-1.2 << 'END-of-smake-1.2.1/AN-1.2'
XNEW features of smake-1.2:
X
X-	Autodetection of rotten symlinks in the psmake/ directory.
X	If links are files of size 0, remove the files and create copies.
X	This allows smake to be ompiled on OS/2
X
X-	Use rename() if possible to make smake run on OS/2 too.
X
X-	modified autoconf to allow configure to run on OS/2
X
X-	Better recognition of old versions of the makefilesystem
X	Old versions of the makefilesystems don't define pattern
X	matching rules for smake. This may give problems with newer
X	smake's if (higher priorized) POSIX suffix rules are preent.
X
X-	Now compiles on QNX
X
X-	Now compiles in HP-UX when using the 
X	boundled K&R compiler
X
X-	Fixed a malloc() related coredump problem in setmakeenv() that 
X	could be observed on SCO Openserver when compiling
X	cdrecord.
X
X-	Better rules for SCO Openserver & UnixWare
X
X-	changed shlicc2 to shlicc for BSD/OS
X
X-	Better autoconf fconv.c code for isinf()/isnan()
X
X-	Made working for the new Mac OS X version
X
X-	Using a recent version of fconv.c to make it copile
X	again on FreeBSD and HP-UX.
X
X-	Allow compilation on Rhapsody 5.6 (Mac OS X)
X
X-	Allow compilation on Darvin (Mac OS X)
X
X-	Allow compilation on Apollo Domain/OS
X
X-	Additional warnings for printf() alike functions.
X
X-	Workaround for rotten PROMPT environment
X	on Cygwin.
X
X-	Workaround for GCC-3.0 on Linux oddities.
X
X-	make floating point printf() code compile again
X	on True64
X
X-	Better portability
X
X-	MacOS X 10.1 (Darwin-1.4 support)
X
X-	True64 support
X
X-	Support for QNX Neutrino
X
X-	Support for SCO/Caldera OpenUNIX
X	Fixed a bug in fconv.c
X
X-	Warn if a target has modification time in the future
X
X-	Avoid endless loop if the makefile hass an EOF after
X	certain synxtax errors.
X
X-	Better error messages for badly formed Makefiles
X	(TAB at wrong place).
X
X-	Large File support for IRIX-6.2 (added autoconf test for -n32 cc option)
X
X-	Large File support for IRIX-6.5 now everything works correctly if the
X	OS supports Large Files by default in 32 bit mode (uses fseeko()/ftello()
X	if present. This could only be done by massively changing the autoconf code
X	stolen from GNUtar.
X
X-	Support for SGI IRIX platform ip17-irix
X
X-	Try to support recent BeOS (again)
X
X	-	Workaround in libschily/comerr.c for the nonstandard 
X		big negative errno values on BeOS
X
X-	AmigaOS Support added
X
X-	Better support for exotic time_t typedefs
X
X-	Added missing files fcons64.c fileopen64.c fileseek64.c for
X	large File support
X
X-	New supported architectures:
X
X	s390-linux-cc.rul parisc-linux-cc.rul parisc64-linux-cc.rul
X
X-	New rule allows automatic fallback to GCC if the configured
X	default compiler could not be found.
X
X-	New autoconf test HAVE_SIGSET
X
X-	comerr() now correctly prints error texts on BeOS.
X
X-	New supported architectures:
X
X	os-cygwin_nt-5.1.id NT-5.1 == Win XP
X
X-	Workaround for a GNUmake bug 
X
X	When compiling smake on OS/2 or on Cygwin,
X	GNUmake is used to compile the first stage of smake.
X	When GNUmake then calls psmake/smake to compile the second
X	stage, the following error message is printed:
X	
X	smake: Missing object name in line 1 col 7 of 'Environment defs'
X	smake: Current read buffer is: '(NULL POINTER)'
X	smake: Bad syntax in 'Environment defs'.
X
X	This is caused by the fact that GNUmake puts non POSIX compliant
X	strings into the MAKEFLAGS environment. In our case '--unix'
X
X	Smake now warns and skips illegal options found in MAKEFLAGS=
X
X-	Fixed a bug in the error printing routine from smake that caused
X	'(NULL POINTER)' to be printed in the example above.
X	Smake now will print
X		smake: Current read buffer is: '--unix'
X	in similar situations.
X
X-	Make it compile on OS/2 out of the box
X
X-	add CONFIG_NOFAIL=TRUE in psmake/MAKE.sh to allow compilation
X	of the portable bootstrap make on unknown platforms
X
X-	fillbytes.c corrected
X
X-	Added links for ia64-linux to the Make RULES to allow users of GNUmake
X	to compile cdrtools on IA64. Note that "smake" includes automake
X	features and will auto-create the missing links.
X
X-	make some printf() formats 64 bit clean
X
X-	gfileid() now returns Llong and thus is a better file hash.
X
X-	Added support for GNU Hurd to the Schily Makefilesystem
X
X-	HP-HX "make" calls us with MAKEFLAGS=b
X	Make smake more robust against buggy environment.
X
X-	Allow to create make Dependencies with AIX-cc and HP-UX-cc
X
X-	Some fixes for Dependency creation with compilers that
X	output "foo.o :" instead of "foo.o:"
X
X-	Change makefile system $(MAKE) -> "$(MAKE)"  to allow
X	compilation inside directories that contain spaces in the path.
X
X-	config.sub now supports IA-64
X
X-	align_test.c now creates correct brackets
X
X-	comerr() now deals with strange POSIX rules for strerror()
X
X-	Printf() handling for %X vs. %x fixed
X
X-	Renamed psmake/MAKE to psmake/MAKE-all to avoid endless recursion on
X	OS with non-POSIX filesystem semantics (case-sensitivity) e.g. OS/2
X	and MacOS X with non-UNIX FS.
X
X-	Renamed psmake/MAKE.sh to psmake/MAKE-sh to avoid problems with buggu shells
X	like PDKSH which illegaly call 'MAKE.sh' if you type 'MAKE'.
X
X-	Changed a Makefile line from 'cd psmake; sh MAKE-all' to
X	'cd psmake && sh MAKE-all' to work around a bug in either the shell or GNU make
X	on OS/2
X
X-	New platforms:
X
X	9000-831-hp-ux sparc64-freebsd macppc-netbsd sparc-bsd-os sparc-bsd-os3
X	i786-cygwin32_nt i486-unixware i586-unixware pentium-iii-unixware
X	pentium-pro-unixware
X
X-	New install rules for hardlinks
X
X-	Use +DAportable for HP-UX cc
X
X-	BSD-OS-3.x does not need 'shlicc' anymore
X
X-	Add $(RANLIB) -> true for OS/2
X
X-	Added some prototypes for non ANSI-C OS in include/unixstd.h
X
X-	fixed typo in include/fctldefs.h for O_ACCMODE
X
X-	include/strdefs.h for better AIX compatibility
X
X-	correctly evaluating HAVE_UNION_WAIT in include/waitdefs.h for
X	vanilla BSD-4.2 systems like Next-Step
X
X-	nanosecond access macros for include/statdefs.h
X
X-	dependency generation script conf/mkdep-sco.sh for SCO unix fixed
X
X-	Using spawnl(P_NOWAIT, ...) on OS/2 EMX instead of fork()/exec()
X
X-	include ctypes.h -> past schily.h for OpenBSD #define EOF BUG
X
X-	fcons.c changed because FI_APPEND problem in SCO UnixWare and
X	fileopen("/dev/null", "wca")
X
X-	Changed -pg (profiling compile option) to -p on SCO UnixWare because there
X	is no -pg on this platform.
X
X-	Changes related to the now portable software signal system handlecond()/raisecond()
X
X-	Trying to better follow the 'cstyle' indentation conventions
X
X-	Changes conf/cc-config.sh to better find out that a user is incorrectly
X	calling 'make' on Solaris with /usr/ucb in PATH and with no real C-compiler
X
X-	strcatl()/execl() now cast NULL in last Arg to (char *)NULL
X	This avoids problems on platforms where sizeof(int) is != sizeof (ptr)
X
X-	Completely converted to use the rename() emulation from libschily
X	in case a OS does not support rename()
X
X-	Trying to support a compilation on DOS (32 Bit) with DJGPP
X	As GNU make does not work correctly on DOS, this allows Schily SING
X	programs to be compiled on DOS/DJGPP
X
X-	use #ifdef SIGBUS in avoffset.c as DOS/DJGPP does not have SIGBUS
X
X-	Indented to be closer to official Cstyle indentation
X
X-	Support for the special .PHONY: target.
X
X	This helps to deal with files like INSTALL operating systems
X	like Win32 and Mac OS that don't honor file name case and prevents
X	the file named INSTALL to get into trouble with 'make install'
X
X-	install-sh extended to avoid unremovable files /tmp/xx.$$ on SCO UNIX
X	that are a result of the root test. They are unremovable because
X	SCO UNIX allows to give away files to root ans sets the sticky bit on /tmp.
X
X-	'make install' now works on operating systems that require a '.exe'
X	suffix for executable binaries
X
X-	Fixed a bug in the parser that caused macro expansions not to
X	work in target lists, e.g.:
X
X	$(TEST:a=b): foo
X
X	because the parser did stop reading the name at: "$(TEST"
X	believing that the colon is always a target list terminator.
X
X	Now, ${} & $() macro expansions are handled correctly even when nested.
X
X-	Add a workaround for a SCO OpenServer C-compiler bug.
X	The bug causes the first function in a function to be called
X	before the new stack frame has been established and did cause
X	scanning the stack frame to fail.
X
X-	made snprintf() POSIX compliant
X
X-	Try to find sh.exe from PATH on DJGPP
X	Thanks to Alex Kopylov <reanimatolog@yandex.ru>
X
X-	We now call caommands again via sh -ce 'cmd' instead of
X	sh -c 'cmd' (which is what POSIX requires).
X	It turned out that POSIX is wrong and causes complex commands
X	(e.g. commands that use ';') that fail not to cause smake
X	to stop on this error.
X
X	Note that smake originally has been correct and did use sh -ce.
X	Missleaded by the fact that GNU make (at this point) follows
X	the POSIX standard, smake has been changed to use sh -c.
X	We now correct our misstake.
X
X-	.POSIX target documented in the man page
X
X-	Command execution now finally has been fixed:
X
X	/bin/sh -ce cmd is called by default to abort on error
X	/bin/sh -c cmd is called is for 'smake -i'
X	
X-	Checking vor valid time in dyn macro expansion (e.g. $?)
X	because the time stamp of a not yet existent target may
X	have been intermediately set to RESURCETIME. This would
X	have caused $? to be incorrectly expanded.
X
X-	Try to add a workaround for broken Makefiles like:
X
X	all: $(SUBDIRS)
X
X	$(SUBDIRS): FORCE
X		cd $@ && $(MAKE) $(MAKEDEFS)
X
X	FORCE:
X
X	The target FORCE is not only completely unneeded; it would
X	cause the Sub directories not to be made except when smake
X	introduces a special implict behavior that treats FORCE:
X	as a target that could be correctly made altohough there is
X	no implicit dependency FORCE.c as there is neither an 
X	explicit dependency not an explicit command list.
X
X-	Support for Linux on amd64 has been added
X
X-	smake now should be useful as a general make utility
X	as it now includes all needed default rules required by POSIX
X
X-	Starting to implement Termination pattern rules
X	using :: as Terminator (not yet ready).
X
X-	Syntax errors now are less verbose again, but
X	smake -d will turn on printing the read buffer
X	of the parser to help to debug the problem.
X
X-	Simple Suffix Rules are no longer allowed to start with "./"
X	as this is a valid target name.
X
X-	Better EOF checking in the parser to avoid infinite loops.
X
X-	A parser bug has been fixed that did cause smake not
X	to stop parsing macro definitions in dependency lists
X	if not surrounded by () or {}.
X
X-	default_cmd() now returns NOTIME in case no default
X	rule could be found and the target has no prerequisites.
X	This avoids superfluous "all is up to date" messages
X	in case that no suffix rules have been defined.
X
X-	Switch from our own "Simple Pattern Rules" for implicit rules
X	to POSIX Single and Double suffix Rules.
X
X-	smake -p now includes comment headlines that allow for better
X	identification of the various sections in the output.
X
X-	The directory rules for the Schily makefile system have
X	been modified to work around a bug in /bin/sh on BSDi 
X	systems.
X
X-	smake now has been tested with various makefiles from various
X	software and is expected to be able to be used to compile
X	any piece of software that does not rely on bugs found in specific
X	make implementeations. The following problems are currently known:
X
X	-	GNU make comes with two files called 'SMakefile' and
X		thus feeds two files with the preferred Makefile name
X		into smake. Unfortunately, these two file in GNU make do
X		not contain valid make syntax.
X
X		Solution: Before you like to compile GNU make using smake,
X		you need to remove "SMakefile" and "glob/SMakefile".
X
X
X	-	Samba comes with a Makefile that illegally useses the '$<'
X		dynamic macro in commands for explicit rules. The '$<'
X		dynamic macro is only expanded in case that an
X		implicit (inference) rule is processed. As samba uses '$<'
X		inside an explicit rule where this dynamic macro has no
X		meaning (see POSIX make standard) it is expanded to nothing
X		but space by smake.
X
X		Solution: change '$<' to a manual copy of the source file
X		for explicit rules.
X
X
X	-	Samba comes with a Makefile that illegally useses the '$*'
X		dynamic macro in commands for explicit rules. The '$*'
X		dynamic macro is only expanded in case that an
X		implicit (inference) rule is processed. As samba uses '$*'
X		inside an explicit rule where this dynamic macro has no useful
X		meaning (see POSIX make standard) and smake cannot know the
X		'right' suffix, '$*' is expanded to the part of '$@' being
X		left to the rightmost '.' character in '$@' by smake.
X
X		Solution: change something like '$*.po.o' to '$@'
X		for explicit rules.
X
X	-	If you find other problems, plese report and let us find
X		the reason..... It is most likely that the related
X		Makefile is buggy.
X
X
X-	smake -d now prints make level (in case of recursive make calls)
X	and the working directory for smake.
X
X-	smake -d now prints .OBJDIR .OBJSEARCH .SEARCHLIST (needed -dd before)
X
X-	The parser has been fixed so that white space at the end of a list
X	will no longer be expanded into a Null ('') object name:
X
X	DUMMY=
X	LIST= 1 2 3 4 $(DUMMY)
X
X	target: $(LIST)
X
X	Did create such a problem.
X
X-	Better source comments for FORCE: target type special treatment.
X
X-	FORCE: Target type special treatment is now done even when
X	the target in question is the current default target.
X
X-	Print the .PHONY: state of a target in various debug output
X
X-	smake -t does no longer touch targets marked
X	as .PHONY:
X
X-	Debug print of default target is now also included if the default
X	target is explicitly named via arvg[] from main().
X
X-	Smake no longer strips off the directory name for targets
X	when expanding the '$*' Dynamic macro.
X
X	Smake did previously expand '$*' for dir/name.o -> name
X	Smake now           expands '$*' for dir/name.o -> dir/name
X
X-	make sure a rule like:
X
X	../somedir/target: ../somedir/source
X
X	will not be falsely detected as Simple Suffix rule
X
X-	Expand the right side if a VPATH= statement
X	to allow VPATH=$(srcdir) to work.
X
X-	.SUFFIXES Target will no longer be overwritten
X	but appended if asigned in a new Makefile.
X	This allows a .SIFFIXES: .suf line in Makefile
X	to append to the likst of the internal makefile.
X
X-	CFLAGS += now works again (parser fixed).
X
X-	The dynamic macro $O (.OBJDIR or "." if .OBJDIR
X	has not been defined) may now be overwritten.
X	This makes smake more POSIX compliant as POSIX
X	does not include a dynamic macro $O.
X
X-	Print the current directory in case it a exitcode != 0
X
X-	Support for :: rules added.
X	This is not POSIX but historic use in makefiles.
X
X-	Intermediate target nodes are now fully initialized.
X
X-	Smake now appends to dependency lists even when the new definition
X	is found in a new makefile (-f option). Before, smake did overwrite
X	such definitions.
X
X-	Smake now changes the type from environment macro definitions into
X	target definitions if the same name is later found in a Makefile.
X	This is eg. needed if the environment contains host=foo and the
X	Makefile contains host: host.c
X
X-	If a second explicit rule for a target is found and it contains
X	command definitions, smake now no longer overwrites the list of 
X	command line definitions with the new list but keeps the first 
X	definition.
X
X-	If a second explicit rule for a target is found and it contains
X	no command definitions, smake now no longer kills the old definitions.
X
X-	Smake now warns if the dynamic macros '$*' & '$<' are used on commands
X	for explicit Target Rules. Note that Sun Make as well as GNU make are
X	broken in this area (*) and smake's behavor is the best a make program
X	may do.
X
X	*) 
X	Sun Make calls (even though this is an _explicit_ rule) the implicit
X	rule check and looks for possible implicit sources. If a possible
X	implicit source file exists, '$<' is set to that name even though it
X	is completely unrelated to the explicit rule. If a fitting entry from 
X	.SUFFIXES: exists, '$@' is stripped to create '$*'.
X
X	GNU make returns the first name from the dependency list for '$<' and
X	strips '$@' using a fitting entry from .SUFFIXES: to create '$*'.
X
X
X-	smake no longer tries to "make" the content from o_list of
X	a NAME=val type object.
X	
X-	smake no longer has a command line macro limit of 64, the
X	command line macros are now inside allocated memory
X
X-	smake no longer has a -f makefile option limit of 32, the
X	makefile names are now inside allocated memory
X
X-	The top level Makefile in SRCROOT now calls
X	psmake/smake -r to make sure that no broken
X	internal rules (that could be loaded from
X	a file) may be active.
X
X-	Support for the ':=' assignement oparator that
X	may be used with make macros:
X
X	CFLAGS := $(OTHER_VAR)
X
X	Will not assign the text "$(OTHER_VAR)" to
X	CFLAGS but the content if the macro $(OTHER_VAR)
X
X	As this feature is nonportable, smake warns
X	when the feature is used. (Note that Sun make
X	uses := for conditional macro assignement).
X
X-	Smake now detects endless recursions from bad
X	default rules.
X
X-	Smake now supports Termination pattern matching
X	rules
X		target:: source
X			command
X
X	If a Termination rule is found, smake does not
X	search for possible sources for intermediate
X	source file names. This allows to e.g. create 
X	a pattern rule for fetching SCCS files from 
X	the repository:
X
X		%:: s.%
X			sccs get $@
X
X	Note that this rule would otherwise result
X	in a endless recusion.
X
X-	Smake now prints Command line Exit messages for
X	failed commaned even if not in debug mode.
X
X-	Better messages when exiting with exit code != 0
X
X-	Makefile fixed to search for the make default rules
X	in $(INS_DIR)/lib/defaults.smk instead of
X	$(INS_DIR)/lib/default.smk
X
X-	New configure #ifdef DEFAULTS_PATH_SEARCH_FIRST
X	tells smake to search for lib/default.smk in
X	PATH first.
X
X-	Smake now also searches for lib/default.smk in
X	case av[0] contains a path name with slashes.
X
X-	Add snprintf.c to allow compilation on HP-UX-10.x
X
X-	-k / -S Option implemented according to POSIX
X
X-	.s.o: Assembly rules added to default rules and
X	to .SUFFIXES
X
X-	...move and ...touch messages now go to stdout as
X	the command verbose messages
X
X-	messages from exit handler now only if
X		excode != 0 && Mlevel > 0
X		Debug > 0   && Mlevel > 0
X
X-	Check for NAMEMAX in getln() deactivated
X
X-	Do not check for default rules in case of 
X	final :: rules
X
X-	install-sh updated to know that 
X	BSDi chown is in /usr/sbin
X
X-	Smake now may be used to compile Xorg.
X
X-	New option -N
X	Continue if no source for nonexistent dependencies found.
X
X-	Evaluate the SHELL macro acording to POSIX.
X	SHELL has been previously ignored completely.
X
X-	Do not allow names with a SLASH inside at the right
X	side of a Simple Suffix Default Rule.
X	This helps smake to ignore the junk at the end of some
X	POSIX Suffix rules found in the makefiles of Xorg.
X
X-	Let smake warn about junk at the end of POSIX
X	suffix rules. This helps to flag broken makefiles
X	like those found in the Xorg tree.
X
X-	The dynmac expander now correctly handles the case when
X	the growable buffer has to be relocated when it grows.
X
X-	The dynmac expander now does no longer add unneded spaces
X	in lists. This allows smake to be used to compile Xorg.
X
X-	Smake now gives better warnings with illegal dynmac usage.
X	This helps to locate illegal dynmac usage in highly complex
X	projects like Xorg.
X
X-	Make sure that $(VAR:%=PREFIX/%) does expand to nothing
X	in case that $(VAR) is empty.
X
X-	export VAR now expands the content of the make macro "VAR"
X	before putting the content into the environment.
X
X-	print a better warning message when smake finds too many
X	target items (targets left to a ':') for a rule.
X
X-	Now using recent a makefiles-1.5 alpha
X
X	-	Avoid an endless loop with 'tr' on Solaris if 
X		/usr/ucb/ is before /usr/bin in PATH
X
X-	Let fileopen() flose the fd in case that it could not
X	get a FILE * struct for fd.
X
X-	Added support to compile 64 bit versions by calling
X
X		smake CCOM=cc64
X
X-	Search for additional matching pattern rules in case the
X	first rule match did not result in a matching file name.
X
X-	Many new features from a newer makefile system:
X
X	-	armv5teb-linux new
X
X	-	i386-darwin new (Macos X)
X
X	-	i386-dragonfly
X
X	-	mips64-linux
X
X	-	sun4v-sunos5
X
X	-	Better BeOS/Zeta support
X
X	-	UID/GID used for installation changed to match Cygwin
X		and Mac OS X
X
X-	psmake/Makefile updated to include seterrno.c although this
X	makefile usually is not needed.
X
X-	Various modifications to allow compiling with MSVC
X
X	-	Suport for compiling with MSVC ("cl") from a
X		Cygwin shell added: i386-cygwin32_nt-cl.rul
X
X	-	Schily Autoconf basics fixed so it is able to deal
X		with the specifics with the "cl" (MSVC) compiler.
X
X	-	Serveral Schily Autoconf tests have been extended 
X		to support the include file structure from MSVC
X		that is far from c89/c99/POSIX.
X
X	-	A test for __int64 was added to support 64 bit
X		ints with "cl" (MSVC) that lacks "long long".
X
X	-	align_test.c now uses the abstract type Llong
X		instead of "long long" ort "__int64".
X
X	-	psmake/MAKE-sh has been enhanced to support "cl".
X
X	-	Makefilesystem restructured to have platform
X		config files that include a compiler config file.
X	
X-	Support for "Interix" was added in order to support
X	"Services for UNIX" from Microsoft (compiling on the
X	POSIX subsystem of MS-WIN).
X
X-	Allow $O to be usd in pattern matching expansions.
X
X-	Under some circumstances, the Macro expansion code did
X	eat up whitespace. This has been corrected.
X
X
X-	Fixed some serious problems with the "growable buffer"
X	that is used for string processing.
X
X-	Made all string copy operatios safe against buffer overflows
X
X-	New Makefilesystem supports C++
X
X-	Added the missing strlcpy.c and strncpy.c entries in 
X	the directory psmake/
X
X-	Updated to a newer version of the Schily autoconf.
X
X-	License change from GPL to CDDL
X
X-	Updated to a newer version of the Schily autoconf.
X
X-	The Schily Makefilesystem now defines -DSCHILY_BUILD
X
X-	The Schily Makefilesystem now includes environment definitions
X	for the Microsoft Studio 8 compiler. If you like to edit these
X	definitions, check the DEFAULTS directory
X
X-	Next step in supporting Microsoft C-compilers: build in environment
X	set up for the MS compilers. To compile with the MS C-Compiler,
X	set up a Cygwin environment and compile a Cygwin 'smake'.
X	Then use this smake to comile with the MS C-compiler by calling:
X
X	smake CCOM=cl
X
X	This defaults to VC7. If you like to use VC6, call:
X
X	smake CCOM=cl VC=6
X
X	Note that smake itself (if compiled with "cl") will not work, as
X	MS does not implement a reliable way to pass a quoted arg vector
X	to a new program.
X
X
X-	#undef SIZE_T_MAX for FreeBSD
X
X-	New and better static VMS config
X
X-	All schily include files now have been moved to include/schily/*
X
X-	Trying to make the floating point printf() support functions work
X	on systems that implement C99 only with no fallback.
X
X	As this change is a result from a report from a person that does not like
X	to cooperate, I was not able to test on the reported AIX-5.x platform.
X	Also note that this change may result in problems on other platforms.
X	Please test and report!
X
X-	New Special Target ".SPACE_IN_NAMES:" allows to have escaped 
X	spaces in object or dependency names.
X
X-	The string lenght limitation for words read from Makefiles
X	has been removed.
X
X-	Macro expansion is no longer using static length limitations.
X
X-	Fixed some lint errors
X
X-	smake -t (touch) now uses utime(2) where available.
X
X-	Added forgotten file psmake/include/schily/utime.h
X	This was needed due to a restructured make.c
X
X-	A small restructuring of the include file structure
X
X-	The makefilesystem now includes support for Sparc64 (Fujutsu Siemens)
X
X-	Fixed a typo in libschily/fconv.c that caused problems with isnan()
X	on AIX5.
X
X-	*printf() removed from libschily, so we need to #define
X	*printf() -> js*printf()
X
X-	If an error occurs, the failing command is printed even in
X	case that the command was run in silent mode.
X
X-	smake now allows to switch of several warnings by adding a line:
X
X	.NO_WARN: <warn-type> ...
X
X	to the makefile. Currently implemented controllable warn types are:
X
X	:=	Do not warn about non-portable MACRO := val assignements
X
X	$*	Do not warn about illegal use of $* in explicit target rules
X
X-	smake now not only implements the workaround for the bash
X	signal bug on Linux but on all platforms that use bash as /bin/sh
X
X-	New autoconf test whether /bin/sh is bash
X
X-	No longer use -Wtraditional for GCC
X
X-	New targets "html" and "htmlx" for Manual page makefiles 
X	allows to convert man pages using "man2html"
X
X-	Dynamic libraries are now supported for Mac OS X
X
X-	Workaround for a Mac OS X linker bug
X
X-	smake CCOM=xx will now result in writing DEFCCOM=xx into incs/Dcc.<platform>
X	if this is done on the initial make run.
X
X-	Remove Wl,-ztext from gcc's command line when linking shared libraries
X	as GCC does not create 100% correct objects and this would result in
X	being unable to link dynamically.
X
X-	Automagically remove /usr/src/linux/include from include if the
X	Linux kernel include files are rotten. This is unfortunately a
X	"result" of the Linux-2.6 series.
X
X-	call "rm -f" to shared library symlink names before trying to create
X	a new symlink
X
X-	smake COPTX=-DNO_LARGEFILES now allows to compile in non-largefile mode
X
X-	schily/stat.h now includes support for S_ISPORT() (event port)
X
X-	Corrected a typo ("#defin") in schily/errno.h
X
X-	getargs() now allows '+' to appear inside longopt=
X
X-	-I. removed from makefile system
X
X-	The makefile system now allows a mix of static and dynamic linking
X
X-	archconf.c enhanced for Mac OS X & *BSD (using sysctl() now)
X
X-	archconf.c now tries to do more heuristics
X
X-	Fixed a strlen bug (introduced while removing strlen limits
X	with smake-1.2a38) that caused smake to complain about 
X	$(namepre-$(namelast)):
X	"smake: String too long, could not copy macro content for 'namepre-xxx'."
X
X-	Fixed a typo that could cause smake to dump core in some cases
X	when evaluating "$O/$@"
X
X-	Schily makefilesystem enhanced to check for extended
X	fields in struct utsname as seen e.g. in MS SFU (Interix).
X
X-	New predefined macro OSVERSION in the makefilesystem is needed
X	for SCO OpenServer 6.x support (because this uses a UnixWare
X	kernel
X
X-	Trying to support Compilation on SCO OpenServer 6.x
X
X-	Pass $(OSDEFS) to "configure" to allow correct autoconfiguration
X	with MS SFU (Interix) and cl.exe.
X
X-	$(OSDEFS) is now set from e.g. smake or the os-xxx.id rule file
X	and all further macros use OSDEFS +=
X
X-	New macro $(CC_OUTPUT_FILTER) allows to filter away the
X	unwanted file name echo from cl.exe.
X
X-	New autoconf test for $(_XEXEEXT) to check for the need to 
X	call cl.exe as "cl.exe".
X
X-	For compiling with cl.exe, smake now checks for presence off
X	SIGKILL
X
X-	New make target "shell" allows to get a $(SHELL) with the
X	same environment as used for the compiler.
X
X-	New and better autoconf handling of struct timeval in schily/time.h
X
X-	Support for x86 Darwin (intel Mac os x) in config.guess added
X
X-	Interix now uses uname -m instead of uname -p for $(OARCH)
X
X-	New shell script to support to create dependencies with 
X	cl.exe on Interix (SFU)
X
X-	smake has been enhanced to support the extended uname fields
X	in SFU. The following fields are new:
X
X	MAKE_HOST_OS  = windows 		(uname -Hs)
X	MAKE_HOST_OSREL  =      5.1 		(uname -Hr)
X	MAKE_HOST_OSVERSION  =  sp2 		(uname -Hv)
X
X	and 
X
X	MAKE_ARCH  =    intel_x86_family15_model4_stepping1 
X
X	is now used for uname -p
X
X-	Support for compiling with Sun Studio on Linux has been added
X
X-	Trying to support mingw32
X
X-	smake is now able to search for the file "defaults.smk"
X	using getexecname() or $PATH
X
X-	smake now supports parsing pattern matching default rules with no dependencies.
X
X-	New smake special macros MAKE_SHELL_FLAG and MAKE_SHELL_IFLAG
X	allow to control the shell flags that are used to call commands from
X	smake. The default is MAKE_SHELL_IFLAG=-c for "smake -i" and
X	MAKE_SHELL_FLAG=-ce for all other calls. If the special target .POSIX:
X	is present in a makefile or if smake is called with -posix, 
X	the default is MAKE_SHELL_FLAG=-c
X
X-	Several fixes for the Blastwave compile (smake -f Mcsw):
X
X	-	smake now compiles without /opt/csw/ string in the binary
X		this makes smake100% relocatable.
X
X-	Try to avoid a core dump with smake with percent default rules like:
X
X	foo%: 
X		cmd
X
X
X-	Added a workaround for the GNU make workaround into smake.
X	The GNU make workaround requires to create an otherwise useless 
X	dependency from one include file to another previously included file
X	to make GNU make believe that a rule to make the file exists at all.
X	As smake resets the state of all included targets after including them,
X	in order to force the re-evaluation of the complete rule set after
X	all  makefiles have been read, smake believed that the second file
X	did not exist because it depends on a "non-existent" file and called
X	the .INCLUDE_FILED: rule.
X
X	Smake now checks the file for existence before deciding whether to call
X	the .INCLUDE_FILED: rule.
X
X-	psmake/ scripts now auto-create the symlinks or copies to the original
X	source files.
X
X-	psmake/MAKE-sh now aborts before compilation if "configure" does
X	not create xconfig.h (e.g. because the installed compiler is defective).
X
X-	Many new makefile rules in RULES/ (e.g. for supporting the
X	ATARI ST - freemint, Haiku and Syllable).
X
X-	Make smake/archconf.c immune against sysctl() from Linux that
X	does not deliver useful information for us.
X
X-	New option "smake -C dir" for gmake compatibility, although this
X	does not introduce a needed feature. "cd dir && $(MAKE)" is not
X	worse.
X
X-	Allow smake to use "bosh" our portable Bourne Shell. This
X	helps to work around "bash" bugs in systems where /bin/sh is bash.
X
X-	New function put_env() excludes the SHELL= environment from the
X	environment variables that are imported as make macros.
X
X-	Some problems related to grant_gbuf()/growgbuf() have been fixed.
X	There have been a few cases where growgbuf() did relocate the growable
X	global general purpose buffer but the caller did not update the related
X	pointers. 
X	
X-	The schily makefilesystem now by default sets all locale related envronment
X	variables to "C" in order to avoid problems.
X
X-	Fixed a typo in include/schily/archdefs.h
X
X-	cpfiles, lnfiles and rmfiles now includes the files
X	include/schily/systeminfo.h and
X	include/schily/utsname.h
X
X-	Added GMAKE_NOWARN=true to allow to disable the gmake warning
X
X-	make smake a bit more robust in order to grant that 
X	SHELL= is always defined inside smake
X
X-	Replaced calls to tr(1) that are made by SunPro make and
X	gmake by calls to different tr(1) calls that cause less problems.
X	tr(1) oddities.
X
X-	Try to make libschily::fconv.c work on newer AIX releases
X
X-	Added support for 64 bit compilation on HP-UX.
X
X-	Added some files to start a make based compilation on VMS
X
X-	Added support for OpenVMS to config.guess
X
X-	Better autoconf test for bash also works for bash-1.x (used on VMS).
X
X-	Assed support for DragonFly BSD to config.sub
X
X-	New config test for long double
X
X-	Better floatingpoint support for HP-UX and AIX
X	We now include own macros for isinf()/isnan() for IEEE platforms that
X	do not support these functions in libc.
X
X-	The *bytes() functions are now 64 bit aware as they now habe a ssize_t
X	parameter instead of int.
X
X-	psmake/MAKE-all now works on VMS
X
X-	psmake/MAKE-sh now works on VMS
X
X-	psmake/{cpfiles,lnfiles,rmlinks} now work on VMS
X
X-	smake now supports uname -p via utsname.arch on VMS.
X
X-	smake now uses vfork() to support VMS
X
X-	The autoconf test for vfork() was changed to no longer hang on VMS
X
X
X-	Some internal smake variable names have been changed to deal with
X	the problems that arise from the fact that VMS has a non- case sensitive
X	linker.
X
X-	The smake makefile parser no longer causes a core dumps with some 
X	specific situations with backslashes in Makefiles.
X
X-	Changed psmake/cpfiles!lnfiles!rmlinks to include schily/vfork.h
X
X-	smake now also supports the "unexport" directive.
X
X-	POSIX.1-2008 is UNIX compliant again and allows to call
X	commands via "sh -ce command". Smake honors this if in POSIX 
X	mode. Note that this was already the default smake behavior in
X	Non-POSIX mode.
X
X-	Smake now treats "../name" as a valid default target name.
X
X-	The .IGNORE and .SILENT special targets now work in a POSIX compliant
X	way.
X
X-	A new special target ".SSUFFIX_RULES" allows to disable Simple Suffix
X	Rules.
X
X-	smake -p now gives more fine grained results and separates
X	Suffix rules from target rules and special targets.
X
X-	Man page enhanced, it is now complete enough for a final release.
X
X-	The makefile system no longer defines Simple Suffix Rules for smake.
X
X-	Smake now searches "makefile", "Makefile", "SMakefile" if in -posix mode,
X	smake's default is "SMakefile", "Makefile", "makefile.
X
X-	If .PRECIOUS: was specified without dependency list, all targets are 
X	handled as "PRECIOUS". This was recently added by POSIX.
X
X-	The -posix option is now propagated to sub makes via MAKEFLAGS=
X
X-	Smake now supports to be compiled in 64 bit Mode in SGI IRIX
X	using both the SGI compiler and GCC:
X
X-	The common code for Suffix macro substitution and
X	Pattern macro substitution has been fixed to correctly distibguish between
X	both methods and to no longer try to expand % in suffix macro substitutions.
X	This allows to use things like:
X
X		smake COPTX=-errwarn=%all
X
X	to work as expected.
X
X-	Smake now includes a predefined macro called "NUMBER_SIGN" that
X	is initialized with "#" to allow to use the comment character 
X	inside makefiles.
X
X-	Avoid a GCC warning with getargs.c
X
XTODO:
X	Smake would need to implement an undocumented feature from 
X	historical UNIX make implementations that is used by Xorg
X	at one place:
X
X	target: *.o
X		do-something-with *.o
X
X	Which expands *.o from the filesystem. Meanwhile, use 
X	smake -N to compile Xorg.
X
XAfter pattern expansion has been implemented, smake-1.2 final
Xwill be released.
X
XP.P.S.: As Xorg changed it's build system, we may delay this
Xfeature to something past 1.2-final.
X	
X
X
XWARNING: Do not use 'winzip' to extract the tar file!
X	Winzip cannot extract symbolic links correctly.
X
XJoerg
END-of-smake-1.2.1/AN-1.2
echo x - smake-1.2.1/BOOTSTRAP
sed 's/^X//' >smake-1.2.1/BOOTSTRAP << 'END-of-smake-1.2.1/BOOTSTRAP'
X# @(#)BOOTSTRAP	1.3 09/12/14 Copyright 1999 J. Schilling
X
XTo bootstrap smake:
X
X**** If you are of good luck and have a working 'make' program on your system:
X
XYou may simply try to call 'make' in the top level directory (the
Xdirectory where this file is located). In this case, a bootstrap 'smake'
Xbinary is created in the psmake/ directory. To be able to do this, a 
Xshell script called 'MAKE-all' which is located inside the psmake directory
Xis executed. This shell script calls configure in the psmake directory
Xand then compiles 'smake' in the psmake directory.
X
XIf psmake/smake has been created, the top level make executes psmake/smake
Xwhich is able to deal with the Schily SING makefile system that is used to
Xcompile the final 'smake'. The first action will be again to (automatically)
Xcall configure from the makefiles. Sorry for this inconvenience but I did not
Xfind any safe way that would work with only one run of configure.
XFor more information on the makefile system please read the file 'COMPILE'.
X
X	If this did work, then you already compiled the final smake binary.
X
X
X**** If this did not work:
X
XYou should first try to use the semi automated method:
X
X1)	chdir to 'psmake'
X2)	call ./MAKE-all
X
X	If this did work, then you need to chdir back to '..' and then
X	call psmake/smake to create the final smake binary.
X
X
X**** If the above methods did not work......
X
XIf it doesn't work to simply call 'make' or if your system does not provide
Xa working make program, follow the instructions below.
X
XPlease first read the NOTE section between the star lines below step 3):
X
X1)	chdir to 'psmake'
X/*--------------------------------------------------------------------------*/
X
X2)	call ./configure'
X
X	If you are using gcc, call:
X		CC=gcc ./configure
X	or
X		env CC=gcc ./configure
X
X	On HP-UX 10.x or newer call:
X
X		CFLAGS=-Ae ./configure
X
X	to use the the compiler that comes with HP-UX
X/*--------------------------------------------------------------------------*/
X
X3)	call 'make'
X
X	If you are using gcc, call 'make CC=gcc'
X
X	On HP-UX 10.x or newer call:
X
X		make CDEFS=-Ae
X
X	to use the the compiler that comes with HP-UX
X
X*****************************************************************************
X
X	NOTE:	Steps 2 & 3 are automated in a shell script called MAKE-all
X		that can be found inside the 'psmake' directory.
X
X		The MAKE-all script will allow you to compile the first 'smake'
X		stage without having a make utility on your system.
X
X		To call the MAKE-all shell script simply type ./MAKE-all or
X		sh ./MAKE-all if your system does not support the #!/bin/sh
X		shell notation.
X
X*****************************************************************************
X
X/*--------------------------------------------------------------------------*/
X
X4)	cd ..
X
X/*--------------------------------------------------------------------------*/
X5)	call 'psmake/smake'
X
X	On HP-UX 10.x or newer call:
X
X		psmake/smake CCOM=cc
X
X	to use the the compiler that comes with HP-UX
X/*--------------------------------------------------------------------------*/
END-of-smake-1.2.1/BOOTSTRAP
echo x - smake-1.2.1/README.mingw32
sed 's/^X//' >smake-1.2.1/README.mingw32 << 'END-of-smake-1.2.1/README.mingw32'
X
XHow to compile:
X
X-	Download (http://www.mingw.org) and install the following Mingw32 packages:
X
X		MinGW-3.1.0-1.exe
X		MSYS-1.0.10.exe
X
X-	Set PATH environment variable using command:
X
X		set path=c:\msys\1.0\bin;c:\mingw\bin;%path%
X
X-	enter 'make' command in top level directory of the unpacked project
END-of-smake-1.2.1/README.mingw32
echo x - smake-1.2.1/.clean
sed 's/^X//' >smake-1.2.1/.clean << 'END-of-smake-1.2.1/.clean'
X#!/bin/sh
Xrm -rf */OBJ */*/OBJ libs/* incs/*
Xrm -f core */core */*/core
Xrm -f .EDT* */.EDT* */*/.EDT*
Xrm -f .vedt* */.vedt* */*/.vedt*
Xrm -f *.bak */*.bak */*/*.bak
Xrm -f */tags */*/tags
Xrm -f */TAGS */*/TAGS
Xrm -rf proto/* packages/*
X
Xfor i in */.; do
X        (cd $i; [ -r .clean ] && sh .clean a )
Xdone
X
Xif [ -f .links ]; then
X	rm -f `cat .links`
Xfi
END-of-smake-1.2.1/.clean
echo x - smake-1.2.1/Targetdirs
sed 's/^X//' >smake-1.2.1/Targetdirs << 'END-of-smake-1.2.1/Targetdirs'
X#ident %W% %E% %Q%
X###########################################################################
XDIRS=		conf inc lib smake man
X###########################################################################
END-of-smake-1.2.1/Targetdirs
echo x - smake-1.2.1/Gmake
sed 's/^X//' >smake-1.2.1/Gmake << 'END-of-smake-1.2.1/Gmake'
X#!/bin/sh
XMAKEPROG=gmake
Xexport MAKEPROG
Xexec gmake "$@"
END-of-smake-1.2.1/Gmake
echo x - smake-1.2.1/Gmake.linux
sed 's/^X//' >smake-1.2.1/Gmake.linux << 'END-of-smake-1.2.1/Gmake.linux'
X#!/bin/sh
X
XMAKEPROG=gmake
Xexport MAKEPROG
X
X# gmake is called 'make' on Linux
X
Xexec make "$@"
END-of-smake-1.2.1/Gmake.linux
echo x - smake-1.2.1/README.compile
sed 's/^X//' >smake-1.2.1/README.compile << 'END-of-smake-1.2.1/README.compile'
XShort overview for those who don't read manuals:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	There is no 'configure', simply call 'make' on the top level
X	directory.
X
X	***** If this does not work for you, read the rest if this file   *****
X	***** If you have any problem, also first read the topic specific *****
X	***** README.* files (e.g. README.linux for Linux problems).	  *****
X
X	All results in general will be placed into a directory named 
X	OBJ/<arch-name>/ in the current projects leaf directory.
X
X	You **need** either my "smake" program, the SunPRO make 
X	from /usr/bin/make (SunOS 4.x) or /usr/ccs/bin/make (SunOS 5.x)
X	or GNU make to compile this program. Read READMEs/README.gmake for 
X	more information on gmake and a list of the most annoying bugs in gmake.
X
X	All other make programs are either not smart enough or have bugs.
X
X	My "smake" source is at:
X
X	ftp://ftp.berlios.de/pub/smake/alpha/
X
X	It is easy to compile and doesn't need a working make program
X	on your machine. If you don't have a working "make" program on the
X	machine where you like to compile "smake" read the file "BOOTSTRAP".
X
X	If you have the choice between all three make programs, the
X	preference would be 
X
X		1)	smake		(preferred)
X		2)	SunPRO make
X		3)	GNU make	(this is the last resort)
X
X	Important notice: "smake" that comes with SGI/IRIX will not work!!!
X	This is not the Schily "smake" but a dumb make program from SGI.
X
X	***** If you are on a platform that is not yet known by the	 *****
X	***** Schily makefilesystem you cannot use GNU make.		 *****
X	***** In this case, the automake features of smake are required. *****
X
X	Please read the README's for your operating system too.
X
X			WARNING
X	Do not use 'mc' to extract the tar file!
X	All mc versions before 4.0.14 cannot extract symbolic links correctly.
X
X	The versions of WinZip that support tar archives cannot be used too.
X	The reason is that they don't support symbolic links.
X	Star and Gnutar do support symbolic links even on win32 systems.
X	To support symbolic links on win32, you need to link with the
X	Cygwin32 POSIX library.
X
X	To unpack an archive use:
X
X		gzip -d < some-arch.tar.gz | tar -xpf -
X
X	Replace 'star' by the actual archive name.
X
X	If your Platform does not support hard links or symbolic links, you
X	first need to compile "star" and then call:
X
X		star -xpz -copy-links < some-arch.tar.gz
X
X	If your platform does not support hard links but supports
X	symbolic links, you only need to call the command above once.
X	If your platform does not support symbolic links, you need to call
X	the command twice because a symbolic link may occur in the archive
X	before the file it points to.
X		
X
X
XHere comes the long form:
X
X
XPREFACE:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	You don't have to call configure with this make file system.
X
X	Calling	'make' or 'make all' on the top level directory will create
X	all needed targets. Calling 'make install' will install all needed
X	files.
X
X	This program uses a new makefilesystem. This makefilesystem uses
X	techniques and ideas from the 1980s and 1990s, is designed in a
X	modular way and allows sources to be combined in a modular way.
X	For mor information on the modular features read README.SSPM.
X
X	The makefilesystem is optimized for a program called 'smake'
X	Copyright 1985 by Jörg Schilling, but SunPro make (the make program
X	that comes with SunOS >= 4.0 and Solaris) as well as newer versions
X	of GNU make will work also. BSDmake could be made working, if it
X	supports pattern matching rules correctly.
X
X	The makefile system allows simultaneous compilation on a wide
X	variety of target systems if the source tree is accessible via NFS.
X
X
XFinding Compilation Results:
X
X	To allow this, all binaries and results of a 'compilation' in any form
X	are placed in sub-directories. This includes automatically generated
X	include files. Results in general will be placed into
X	a directory named OBJ/<arch-name>/ in the current projects
X	leaf directory, libraries will be placed into a directory called
X	libs/<arch-name>/ that is located in the source tree root directory.
X
X		<arch-name> will be something like 'sparc-sunos5-cc'
X
X	This is the main reason why simultaneous compilation is possible on
X	all supported platforms if the source is mounted via NFS.
X
X
XHow to compile:
X
X	To compile a system or sub-system, simply enter 'smake', 'make' or 
X	'Gmake'. Compilation may be initialized at any point of the source
X	tree of a system. If compilation is started in a sub tree, all objects
X	in that sub tree will be made.
X
X
XHow to install results:
X
X	To install the product of a compilation in your system, call:
X
X		smake install
X
X	at top level. The binaries will usually be installed in 
X	/opt/schily/bin. The directory /opt/<vendor-name>/ has been agreed
X	on by all major UNIX vendors in 1989. Unfortunately, still not all
X	vendors follow this agreement.
X
X	If you want to change the default installation directory, edit the
X	appropriate (system dependent) files in the DEFAULTS directory
X	(e.g. DEFAULTS/Defaults.sunos5).
X
X	***** If "smake install" doesn't do anything, you are on a broken *****
X	***** File System. Remove the file INSTALL in this case (the FS   *****
X	***** does not handle upper/lower case characters correctly).	  *****
X	***** This is true for all DOS based filesystems and for Apple's  *****
X	***** HFS+ filesystem.						  *****
X
X
XUsing a different installation directory:
X
X	If your system does not yet use the standard installation path /opt
X	or if you don't like this installation directory, you can easily 
X	change the installation directory. You may edit the DEFAULTS file 
X	for your system and modify the macro INS_BASE.
X
X	You may  use a different installation directory without editing the
X	DEFAULTS files. If you like to install everything in /usr/local, call:
X
X
X	If your make program supports to propagate make macros to sub make programs
X	which is the case for recent smake releases as well as for a recent gnumake:
X
X		smake INS_BASE=/usr/local install
X	or
X		gmake INS_BASE=/usr/local install
X
X	If you make program doesn't propagate make macros (e.g. SunPRO make) call:
X
X		env INS_BASE=/usr/local make -e install
X
X	Note that INS_BASE=/usr/local needs to be specified for every operation
X	that compiles or links programs as the path is stored inside the
X	binaries.
X
X
XInstalling to a prototype directory to implement package creation staging:
X
X	If you like to create a prototype directory tree that is used as an
X	intermediate store for package creation, use the DESTDIR macro:
X
X		smake INS_BASE=/usr/local DESTDIR=/tmp install
X
X	This will create a usr/local tree below /tmp (i.e. /tmp/usr/local).
X
XUsing a different C-compiler:
X
X	If the configured default compiler is not present on the current machine,
X	the makefilesystem will try an automatic fallback to GCC. For this reason
X	in most cases you will not need to manually select a compiler.
X
X	The default C-compiler can be modified in the files in the
X	DEFAULT directory. If you want to have a different compiler
X	for one compilation, call:
X
X		make CCOM=gcc
X	or
X		make CCOM=cc
X
X	This works even when your make program doesn't propagate make macros.
X
X
XCreating 64 bit executables on Solaris:
X
X	Simply call:
X
X		make CCOM=gcc64
X	or
X		make CCOM=cc64
X
X	It is not clear if GCC already supports other platforms in 64 bit mode.
X	As all GCC versions before 3.1 did emit hundreds of compilation
X	warnings related to 64 bit bugs when compiling itself, there is little
X	hope that other platforms are already supported in 64 bit mode.
X
XCreating executables using the Sun Studio compiler on Linux:
X
X	Simply call:
X
X		make CCOM=suncc
X
X	If the compilation does not work, try:
X
X	mkdir   /opt/sunstudio12/prod/include/cc/linux 
X	cp      /usr/include/linux/types.h  /opt/sunstudio12/prod/include/cc/linux
X
X	Then edit /opt/sunstudio12/prod/include/cc/linux/types.h and remove all
X	lines like: "#if defined(__GNUC__) && !defined(__STRICT_ANSI__)"
X	as well as the related #endif.
X
X
X
XGetting help from make:
X
X	For a list of targets call:
X
X		make .help
X
X
XGetting more information on the make file system:
X
X	The man page makefiles.4 located in man/man4/makefiles.4 contains
X	the documentation on general use and for leaf makefiles.
X
X	The man page makerules.4 located in man/man4/makerules.4 contains
X	the documentation for system programmers who want to modify
X	the make rules of the makefile system.
X
X	For further information read
X
X		ftp://ftp.berlios.de/pub/makefiles/PortableSoftware.ps.gz
X
X
XHints for compilation:
X
X	The makefile system is optimized for 'smake'. Smake will give the
X	fastest processing and best debugging output.
X
X	SunPro make will work as is. GNU make need some special preparation.
X
X	Read READMEs/README.gmake for more information on gmake.
X
X	To use GNU make create a file called 'Gmake' in your search path
X	that contains:
X
X		#!/bin/sh
X		MAKEPROG=gmake
X		export MAKEPROG
X		exec gmake "$@"
X
X	and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make'
X	on Linux is really a gmake.
X
X	'Gmake' and 'Gmake.linux' are part of this distribution.
X
X	Some versions of gmake are very buggy. There are e.g. versions of gmake
X	on some architectures that will not correctly recognize the default
X	target. In this case call 'make all' or ../Gmake all'.
X
X	Note that pseudo error messages from gmake similar to:
X
X	gmake[1]: Entering directory `cdrtools-1.10/conf'
X	../RULES/rules.cnf:58: ../incs/sparc-sunos5-cc/Inull: No such file or directory
X	../RULES/rules.cnf:59: ../incs/sparc-sunos5-cc/rules.cnf: No such file or directory
X
X	Are a result of a bug un GNU make. The make file system itself is
X	correct (as you could prove by using smake).
X	If your gmake version still has this bug, send a bug report to:
X
X		"Paul D. Smith" <psmith@gnu.org>
X
X	He is the current GNU make maintainer.
X
X	If you like to use 'smake', please always compile it from source.
X	The packages are located on:
X
X		ftp://ftp.berlios.de/pub/smake/alpha/
X
X	Smake has a -D flag to see the actual makefile source used
X	and a -d flag that gives easy to read debugging info. Use smake -xM
X	to get a makefile dependency list. Try smake -help
X
X
XCompiling the project using engineering defaults:
X
X	The defaults found in the directory DEFAULTS are configured to
X	give minimum warnings. This is made because many people will
X	be irritated by warning messages and because the GNU c-compiler
X	will give warnings for perfectly correct and portable c-code.
X
X	If you want to port code to new platforms or do engineering
X	on the code, you should use the alternate set of defaults found
X	in the directory DEFAULTS_ENG.
X	You may do this permanently by renaming the directories or
X	for one compilation by calling:
X
X		make DEFAULTSDIR=DEFAULTS_ENG
X
X
XCompiling the project to allow debugging with dbx/gdb:
X
X	If you like to compile with debugging information for dbx or gdb,
X	call:
X
X		make clean
X		make COPTX=-g LDOPTX=-g
X
X
XCreting Blastwave packages:
X
X	Call:
X		.clean
X		smake -f Mcsw
X
X	You need the program "fakeroot" and will find the results
X	in packages/<arch-dir>
X
X	Note that a single program source tree will allow you to create
X	packages like CSWstar but not the packages CSWschilybase and
X	CSWschilyutils on which CSWstar depends.
X
X
X
X
X	If you want to see an example, please have a look at the "star"
X	source. It may be found on:
X
X		ftp://ftp.berlios.de/pub/star
X
X	Have a look at the manual page, it is included in the distribution.
X	Install the manual page with 
X
X	make install first and include /opt/schily/man in your MANPATH
X
X	Note that some systems (e.g. Solaris 2.x) require you either to call
X	/usr/lib/makewhatis /opt/schily/man or to call 
X
X		man -F <man-page-name>
X
X
XAuthor:
X
XJoerg Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X
XEmail: 	joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de
X	joerg.schilling@fokus.fraunhufer.de
X
XPlease mail bugs and suggestions to me.
END-of-smake-1.2.1/README.compile
echo x - smake-1.2.1/README.gmake
sed 's/^X//' >smake-1.2.1/README.gmake << 'END-of-smake-1.2.1/README.gmake'
XGmake compliance is included for convenience because it may
Xbe found on many systems and most make programs are worse
Xthan gmake.
X
X	***** If you are on a platform that is not yet known by the	 *****
X	***** Schily makefilesystem you cannot use GNU make.		 *****
X	***** In this case, the automake features of smake are required. *****
X
XThe major problem with gmake is that it does not handle the
Xinclude directive correctly. The general rule for a make program is
Xto first try to "make" any object it should look on. Gmake
Xdoes not try to "make" any makefile it should include. One result
Xis many warnings about non-existent files (which you could ignore).
XThe other problem with gmake and include files is hat gmake
Xincludes the files in the opposite order than expected. The result is 
Xthat dependencies may not handled correctly.
X
XIf you have problems with the make file system and gmake,
Xyou are out of luck. Gmake has a debug option, but it gives
Xtons of debug messages. Less than 1% of these debug messages are
Xuseful. Important things are missing in these debug messages.
X
XGmake has bug with the VPATH= option. Some of the macros are
Xnot expanded correctly. I had to remove all occurrences of
X$@ $* and $^ on some places for this reason.
X
XOn some platforms (e.g. OSF1), gmake is not able to correctly recognize
Xthe default target. If gmake complains about this, call ./Gmake all
X
XTo use GNU make create a file called 'Gmake' in you search path
Xthat contains:
X
X#!/bin/sh
XMAKEPROG=gmake
Xexport MAKEPROG
Xexec gmake "$@"
X
Xand call 'Gmake' instead of gmake. On Linux and on Cygwin there is
Xno gmake, 'make' on Linux and on Cygwin is really a gmake.
X
X'Gmake' and 'Gmake.linux' are part of this distribution.
X
XNote that makefile versions past 98/10/13 are trying to recognize
Xgmake by assuming that $(MAKE_COMMAND) is only present if you
Xare running gmake. So it may be worth to try to just call 'gmake'
Xor even 'make' if your system uses gmake as the default make program.
X
END-of-smake-1.2.1/README.gmake
echo x - smake-1.2.1/README.ppc
sed 's/^X//' >smake-1.2.1/README.ppc << 'END-of-smake-1.2.1/README.ppc'
XIf your system uses the SVr4 ABI (designed by Motorola), you will only
Xbe able to compile my library files lib/format.c and lib/getargs.c if your
XC-compiler supports the macro va_copy() or __va_copy() from stdarg.h.
X
XMach/Next STep/Apple Rhapsody on ppc use a 'void *' for the type va_list
Xso you don't need to make changes on these systems.
X
XSolaris/ppc (made in 1992) is the first UNIX implementation for the PPC.
XIt includes the va_copy() macro that allows you to assign a C object of the
Xtype va_list in a system independent way.
X
XLinux/ppc uses exactly the same construct as Solaris for the type va_list.
XYou will only be able to compile lib/format.c and lib/getargs.c if your 
XC-compiler includes the macro va_copy() or __va_copy(). If this is not the
Xcase, you will need to upgrade your C-compiler first. GCC 2.8.0 and later
Xincludes this macro.
X
XHere is what Solaris /usr/include/sys/varargs.h looks like:
X
X/*
X * va_copy is a Solaris extension to provide a portable way to perform
X * a variable argument list ``bookmarking'' function.
X */
X#if defined(__ppc)
X#define	va_copy(to, from)	((to)[0] = (from)[0])
X#else
X#define	va_copy(to, from)	((to) = (from))
X#endif
X
XTo be able to compile my lib/format.c and lib/getargs.c on a OS
Ximplementation that uses an array for va_list, you will need
Xthis va_copy() enhancement too.
X
XThe files mentioned above already compile on a PPC Apple Rhapsody system.
XBut as mentioned before, Rhapsody uses a void * for va_list (maybe because
XApple includes badly designed international printf code from BSD 4.4
Xthat requires va_list to be void * to work).
X
XNotice:	lib/format.c allows a %r format that needs additional features
X	in stdarg.h. You need to know whether va_list is an array.
X	I hope that GCC will include some definitions in future versions
X	that allow to propagate va_list type objects from var args
X	in function calls.
X
XGCC
X===
X
XIf you are not using GCC 2.8.0, you can add the following definition 
Xto va-ppc.h :
X
X/usr/lib/gcc-lib/*-linux-gnulibc1/2.*/include/va-ppc.h
X
X#define	va_copy(to, from)	((to)[0] = (from)[0])
X
Xand to all other va-*.h files:
X
X#define	va_copy(to, from)	((to) = (from))
X
XImportant: Check before if you don't have a GCC that is already patched.
X
XJoerg
X
END-of-smake-1.2.1/README.ppc
echo x - smake-1.2.1/BUILD
sed 's/^X//' >smake-1.2.1/BUILD << 'END-of-smake-1.2.1/BUILD'
XShort overview for those who don't read manuals:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	There is no 'configure', simply call 'make' on the top level
X	directory.
X
X	***** If this does not work for you, read the rest if this file   *****
X	***** If you have any problem, also first read the topic specific *****
X	***** README.* files (e.g. README.linux for Linux problems).	  *****
X
X	All results in general will be placed into a directory named 
X	OBJ/<arch-name>/ in the current projects leaf directory.
X
X	You **need** either my "smake" program, the SunPRO make 
X	from /usr/bin/make (SunOS 4.x) or /usr/ccs/bin/make (SunOS 5.x)
X	or GNU make to compile this program. Read READMEs/README.gmake for 
X	more information on gmake and a list of the most annoying bugs in gmake.
X
X	All other make programs are either not smart enough or have bugs.
X
X	My "smake" source is at:
X
X	ftp://ftp.berlios.de/pub/smake/alpha/
X
X	It is easy to compile and doesn't need a working make program
X	on your machine. If you don't have a working "make" program on the
X	machine where you like to compile "smake" read the file "BOOTSTRAP".
X
X	If you have the choice between all three make programs, the
X	preference would be 
X
X		1)	smake		(preferred)
X		2)	SunPRO make
X		3)	GNU make	(this is the last resort)
X
X	Important notice: "smake" that comes with SGI/IRIX will not work!!!
X	This is not the Schily "smake" but a dumb make program from SGI.
X
X	***** If you are on a platform that is not yet known by the	 *****
X	***** Schily makefilesystem you cannot use GNU make.		 *****
X	***** In this case, the automake features of smake are required. *****
X
X	Please read the README's for your operating system too.
X
X			WARNING
X	Do not use 'mc' to extract the tar file!
X	All mc versions before 4.0.14 cannot extract symbolic links correctly.
X
X	The versions of WinZip that support tar archives cannot be used too.
X	The reason is that they don't support symbolic links.
X	Star and Gnutar do support symbolic links even on win32 systems.
X	To support symbolic links on win32, you need to link with the
X	Cygwin32 POSIX library.
X
X	To unpack an archive use:
X
X		gzip -d < some-arch.tar.gz | tar -xpf -
X
X	Replace 'star' by the actual archive name.
X
X	If your Platform does not support hard links or symbolic links, you
X	first need to compile "star" and then call:
X
X		star -xpz -copy-links < some-arch.tar.gz
X
X	If your platform does not support hard links but supports
X	symbolic links, you only need to call the command above once.
X	If your platform does not support symbolic links, you need to call
X	the command twice because a symbolic link may occur in the archive
X	before the file it points to.
X		
X
X
XHere comes the long form:
X
X
XPREFACE:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	You don't have to call configure with this make file system.
X
X	Calling	'make' or 'make all' on the top level directory will create
X	all needed targets. Calling 'make install' will install all needed
X	files.
X
X	This program uses a new makefilesystem. This makefilesystem uses
X	techniques and ideas from the 1980s and 1990s, is designed in a
X	modular way and allows sources to be combined in a modular way.
X	For mor information on the modular features read README.SSPM.
X
X	The makefilesystem is optimized for a program called 'smake'
X	Copyright 1985 by Jörg Schilling, but SunPro make (the make program
X	that comes with SunOS >= 4.0 and Solaris) as well as newer versions
X	of GNU make will work also. BSDmake could be made working, if it
X	supports pattern matching rules correctly.
X
X	The makefile system allows simultaneous compilation on a wide
X	variety of target systems if the source tree is accessible via NFS.
X
X
XFinding Compilation Results:
X
X	To allow this, all binaries and results of a 'compilation' in any form
X	are placed in sub-directories. This includes automatically generated
X	include files. Results in general will be placed into
X	a directory named OBJ/<arch-name>/ in the current projects
X	leaf directory, libraries will be placed into a directory called
X	libs/<arch-name>/ that is located in the source tree root directory.
X
X		<arch-name> will be something like 'sparc-sunos5-cc'
X
X	This is the main reason why simultaneous compilation is possible on
X	all supported platforms if the source is mounted via NFS.
X
X
XHow to compile:
X
X	To compile a system or sub-system, simply enter 'smake', 'make' or 
X	'Gmake'. Compilation may be initialized at any point of the source
X	tree of a system. If compilation is started in a sub tree, all objects
X	in that sub tree will be made.
X
X
XHow to install results:
X
X	To install the product of a compilation in your system, call:
X
X		smake install
X
X	at top level. The binaries will usually be installed in 
X	/opt/schily/bin. The directory /opt/<vendor-name>/ has been agreed
X	on by all major UNIX vendors in 1989. Unfortunately, still not all
X	vendors follow this agreement.
X
X	If you want to change the default installation directory, edit the
X	appropriate (system dependent) files in the DEFAULTS directory
X	(e.g. DEFAULTS/Defaults.sunos5).
X
X	***** If "smake install" doesn't do anything, you are on a broken *****
X	***** File System. Remove the file INSTALL in this case (the FS   *****
X	***** does not handle upper/lower case characters correctly).	  *****
X	***** This is true for all DOS based filesystems and for Apple's  *****
X	***** HFS+ filesystem.						  *****
X
X
XUsing a different installation directory:
X
X	If your system does not yet use the standard installation path /opt
X	or if you don't like this installation directory, you can easily 
X	change the installation directory. You may edit the DEFAULTS file 
X	for your system and modify the macro INS_BASE.
X
X	You may  use a different installation directory without editing the
X	DEFAULTS files. If you like to install everything in /usr/local, call:
X
X
X	If your make program supports to propagate make macros to sub make programs
X	which is the case for recent smake releases as well as for a recent gnumake:
X
X		smake INS_BASE=/usr/local install
X	or
X		gmake INS_BASE=/usr/local install
X
X	If you make program doesn't propagate make macros (e.g. SunPRO make) call:
X
X		env INS_BASE=/usr/local make -e install
X
X	Note that INS_BASE=/usr/local needs to be specified for every operation
X	that compiles or links programs as the path is stored inside the
X	binaries.
X
X
XInstalling to a prototype directory to implement package creation staging:
X
X	If you like to create a prototype directory tree that is used as an
X	intermediate store for package creation, use the DESTDIR macro:
X
X		smake INS_BASE=/usr/local DESTDIR=/tmp install
X
X	This will create a usr/local tree below /tmp (i.e. /tmp/usr/local).
X
XUsing a different C-compiler:
X
X	If the configured default compiler is not present on the current machine,
X	the makefilesystem will try an automatic fallback to GCC. For this reason
X	in most cases you will not need to manually select a compiler.
X
X	The default C-compiler can be modified in the files in the
X	DEFAULT directory. If you want to have a different compiler
X	for one compilation, call:
X
X		make CCOM=gcc
X	or
X		make CCOM=cc
X
X	This works even when your make program doesn't propagate make macros.
X
X
XCreating 64 bit executables on Solaris:
X
X	Simply call:
X
X		make CCOM=gcc64
X	or
X		make CCOM=cc64
X
X	It is not clear if GCC already supports other platforms in 64 bit mode.
X	As all GCC versions before 3.1 did emit hundreds of compilation
X	warnings related to 64 bit bugs when compiling itself, there is little
X	hope that other platforms are already supported in 64 bit mode.
X
XCreating executables using the Sun Studio compiler on Linux:
X
X	Simply call:
X
X		make CCOM=suncc
X
X	If the compilation does not work, try:
X
X	mkdir   /opt/sunstudio12/prod/include/cc/linux 
X	cp      /usr/include/linux/types.h  /opt/sunstudio12/prod/include/cc/linux
X
X	Then edit /opt/sunstudio12/prod/include/cc/linux/types.h and remove all
X	lines like: "#if defined(__GNUC__) && !defined(__STRICT_ANSI__)"
X	as well as the related #endif.
X
X
X
XGetting help from make:
X
X	For a list of targets call:
X
X		make .help
X
X
XGetting more information on the make file system:
X
X	The man page makefiles.4 located in man/man4/makefiles.4 contains
X	the documentation on general use and for leaf makefiles.
X
X	The man page makerules.4 located in man/man4/makerules.4 contains
X	the documentation for system programmers who want to modify
X	the make rules of the makefile system.
X
X	For further information read
X
X		ftp://ftp.berlios.de/pub/makefiles/PortableSoftware.ps.gz
X
X
XHints for compilation:
X
X	The makefile system is optimized for 'smake'. Smake will give the
X	fastest processing and best debugging output.
X
X	SunPro make will work as is. GNU make need some special preparation.
X
X	Read READMEs/README.gmake for more information on gmake.
X
X	To use GNU make create a file called 'Gmake' in your search path
X	that contains:
X
X		#!/bin/sh
X		MAKEPROG=gmake
X		export MAKEPROG
X		exec gmake "$@"
X
X	and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make'
X	on Linux is really a gmake.
X
X	'Gmake' and 'Gmake.linux' are part of this distribution.
X
X	Some versions of gmake are very buggy. There are e.g. versions of gmake
X	on some architectures that will not correctly recognize the default
X	target. In this case call 'make all' or ../Gmake all'.
X
X	Note that pseudo error messages from gmake similar to:
X
X	gmake[1]: Entering directory `cdrtools-1.10/conf'
X	../RULES/rules.cnf:58: ../incs/sparc-sunos5-cc/Inull: No such file or directory
X	../RULES/rules.cnf:59: ../incs/sparc-sunos5-cc/rules.cnf: No such file or directory
X
X	Are a result of a bug un GNU make. The make file system itself is
X	correct (as you could prove by using smake).
X	If your gmake version still has this bug, send a bug report to:
X
X		"Paul D. Smith" <psmith@gnu.org>
X
X	He is the current GNU make maintainer.
X
X	If you like to use 'smake', please always compile it from source.
X	The packages are located on:
X
X		ftp://ftp.berlios.de/pub/smake/alpha/
X
X	Smake has a -D flag to see the actual makefile source used
X	and a -d flag that gives easy to read debugging info. Use smake -xM
X	to get a makefile dependency list. Try smake -help
X
X
XCompiling the project using engineering defaults:
X
X	The defaults found in the directory DEFAULTS are configured to
X	give minimum warnings. This is made because many people will
X	be irritated by warning messages and because the GNU c-compiler
X	will give warnings for perfectly correct and portable c-code.
X
X	If you want to port code to new platforms or do engineering
X	on the code, you should use the alternate set of defaults found
X	in the directory DEFAULTS_ENG.
X	You may do this permanently by renaming the directories or
X	for one compilation by calling:
X
X		make DEFAULTSDIR=DEFAULTS_ENG
X
X
XCompiling the project to allow debugging with dbx/gdb:
X
X	If you like to compile with debugging information for dbx or gdb,
X	call:
X
X		make clean
X		make COPTX=-g LDOPTX=-g
X
X
XCreting Blastwave packages:
X
X	Call:
X		.clean
X		smake -f Mcsw
X
X	You need the program "fakeroot" and will find the results
X	in packages/<arch-dir>
X
X	Note that a single program source tree will allow you to create
X	packages like CSWstar but not the packages CSWschilybase and
X	CSWschilyutils on which CSWstar depends.
X
X
X
X
X	If you want to see an example, please have a look at the "star"
X	source. It may be found on:
X
X		ftp://ftp.berlios.de/pub/star
X
X	Have a look at the manual page, it is included in the distribution.
X	Install the manual page with 
X
X	make install first and include /opt/schily/man in your MANPATH
X
X	Note that some systems (e.g. Solaris 2.x) require you either to call
X	/usr/lib/makewhatis /opt/schily/man or to call 
X
X		man -F <man-page-name>
X
X
XAuthor:
X
XJoerg Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X
XEmail: 	joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de
X	joerg.schilling@fokus.fraunhufer.de
X
XPlease mail bugs and suggestions to me.
END-of-smake-1.2.1/BUILD
echo x - smake-1.2.1/README.solaris
sed 's/^X//' >smake-1.2.1/README.solaris << 'END-of-smake-1.2.1/README.solaris'
XNever compile anything in a locale other than "C" unless you are sure
Xthat your C-compiler and the program 'nm' has been patched.
XThis is not needed with Solaris 2.6 or later and with the Workshop 5.0
Xcompiler or later.
X
XEven if you are a recent Solaris version, use locale "C" in case of problems.
X
XTo ensure that locale "C"' is set, do
X
Xsetenv LC_ALL C
X
Xin csh
Xor
X
XLC_ALL=C
Xexport LC_ALL
Xin sh
X
Xbefore running make. Or simply call
X
Xenv LC_ALL=C make
X
XThe reason:
X
X1)	On Solaris before 2.5.1 'nm' dumps core in any other locale.
X	For that reason lorder will not work.
X	*** no patch available **** but fixed on Solaris 2.5.1
X	according to Sun
X
X2)	The SunPro C-compiler will not convert floating
X	point numbers correctly if e.g. in "de" locale (Germany)
X	1.3 will be interpreted as 1.0!!!!
X	*** patch available ***
X
X3)	/usr/xpg4/bin/tr does not work correctly if locale is not "C"
X	Try:
X		echo ABC | env LC_ALL=de /usr/xpg4/bin/tr 'A-Z' 'a-z'
X
X	it prints:
X
X	BCD
X
X
X
XIf you want to do compilations on Solaris, it is best not have /usr/ucb
Xin your PATH. If you want to have /usr/ucb in the PATH it must be the last
Xentry. You also should put /usr/ccs/bin/ before /usr/xpg4/bin/ in the PATH
Xto make sure that /usr/ccs/bin/make is used and not /usr/xpg4/bin/make.
X
XTo be able to use 'make' 'as' and 'ld' you need to make sure that 
X/usr/ccs/bin is in your path.
X
XAvoid /usr/ucb and /usr/xpg4/bin in your PATH if you have problems.
X
XMake sure - even if you use GCC - you don't use GNU as, GNU ld 
Xand GNU tsort/lorder.
X
XFor CD-Recording please read the README.volmgt too.
X
XOn Solaris you need to stop the volume management if you like to use the USCSI
Xfallback SCSI transport code. Even things like cdrecord -scanbus
Xwill not work if the volume management is running.
X
XIf you run Solaris 7 FCS, install patch 107465-02 to fix a read ahead bug in the
Xhsfs code.
X
XIf you have problems with 12 byte SCSI commands on Solaris (mainly x86) get
XPatch 108779-01
X
XIf you have problems with ISO-9660 partitions > 4 GB  where Solaris wraps to
Xoffset mod 4 GB when reading from the FS install patch 113277-04.
X
X
X		IMPORTANT information for Solaris x86
X
XIf have no DMA, you will get problems with buffer underruns and may never use
Xthe maximum write speed of current CD/DVD drives.
X
XFor more information, read README.solaris-x86-ata-DMA and README.solaris-x86-ATAPI-DMA
Xand take care that the locations for patching may change in future versions.
X
X
END-of-smake-1.2.1/README.solaris
echo x - smake-1.2.1/COMPILE
sed 's/^X//' >smake-1.2.1/COMPILE << 'END-of-smake-1.2.1/COMPILE'
XShort overview for those who don't read manuals:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	There is no 'configure', simply call 'make' on the top level
X	directory.
X
X	***** If this does not work for you, read the rest if this file   *****
X	***** If you have any problem, also first read the topic specific *****
X	***** README.* files (e.g. README.linux for Linux problems).	  *****
X
X	All results in general will be placed into a directory named 
X	OBJ/<arch-name>/ in the current projects leaf directory.
X
X	You **need** either my "smake" program, the SunPRO make 
X	from /usr/bin/make (SunOS 4.x) or /usr/ccs/bin/make (SunOS 5.x)
X	or GNU make to compile this program. Read READMEs/README.gmake for 
X	more information on gmake and a list of the most annoying bugs in gmake.
X
X	All other make programs are either not smart enough or have bugs.
X
X	My "smake" source is at:
X
X	ftp://ftp.berlios.de/pub/smake/alpha/
X
X	It is easy to compile and doesn't need a working make program
X	on your machine. If you don't have a working "make" program on the
X	machine where you like to compile "smake" read the file "BOOTSTRAP".
X
X	If you have the choice between all three make programs, the
X	preference would be 
X
X		1)	smake		(preferred)
X		2)	SunPRO make
X		3)	GNU make	(this is the last resort)
X
X	Important notice: "smake" that comes with SGI/IRIX will not work!!!
X	This is not the Schily "smake" but a dumb make program from SGI.
X
X	***** If you are on a platform that is not yet known by the	 *****
X	***** Schily makefilesystem you cannot use GNU make.		 *****
X	***** In this case, the automake features of smake are required. *****
X
X	Please read the README's for your operating system too.
X
X			WARNING
X	Do not use 'mc' to extract the tar file!
X	All mc versions before 4.0.14 cannot extract symbolic links correctly.
X
X	The versions of WinZip that support tar archives cannot be used too.
X	The reason is that they don't support symbolic links.
X	Star and Gnutar do support symbolic links even on win32 systems.
X	To support symbolic links on win32, you need to link with the
X	Cygwin32 POSIX library.
X
X	To unpack an archive use:
X
X		gzip -d < some-arch.tar.gz | tar -xpf -
X
X	Replace 'star' by the actual archive name.
X
X	If your Platform does not support hard links or symbolic links, you
X	first need to compile "star" and then call:
X
X		star -xpz -copy-links < some-arch.tar.gz
X
X	If your platform does not support hard links but supports
X	symbolic links, you only need to call the command above once.
X	If your platform does not support symbolic links, you need to call
X	the command twice because a symbolic link may occur in the archive
X	before the file it points to.
X		
X
X
XHere comes the long form:
X
X
XPREFACE:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	You don't have to call configure with this make file system.
X
X	Calling	'make' or 'make all' on the top level directory will create
X	all needed targets. Calling 'make install' will install all needed
X	files.
X
X	This program uses a new makefilesystem. This makefilesystem uses
X	techniques and ideas from the 1980s and 1990s, is designed in a
X	modular way and allows sources to be combined in a modular way.
X	For mor information on the modular features read README.SSPM.
X
X	The makefilesystem is optimized for a program called 'smake'
X	Copyright 1985 by Jörg Schilling, but SunPro make (the make program
X	that comes with SunOS >= 4.0 and Solaris) as well as newer versions
X	of GNU make will work also. BSDmake could be made working, if it
X	supports pattern matching rules correctly.
X
X	The makefile system allows simultaneous compilation on a wide
X	variety of target systems if the source tree is accessible via NFS.
X
X
XFinding Compilation Results:
X
X	To allow this, all binaries and results of a 'compilation' in any form
X	are placed in sub-directories. This includes automatically generated
X	include files. Results in general will be placed into
X	a directory named OBJ/<arch-name>/ in the current projects
X	leaf directory, libraries will be placed into a directory called
X	libs/<arch-name>/ that is located in the source tree root directory.
X
X		<arch-name> will be something like 'sparc-sunos5-cc'
X
X	This is the main reason why simultaneous compilation is possible on
X	all supported platforms if the source is mounted via NFS.
X
X
XHow to compile:
X
X	To compile a system or sub-system, simply enter 'smake', 'make' or 
X	'Gmake'. Compilation may be initialized at any point of the source
X	tree of a system. If compilation is started in a sub tree, all objects
X	in that sub tree will be made.
X
X
XHow to install results:
X
X	To install the product of a compilation in your system, call:
X
X		smake install
X
X	at top level. The binaries will usually be installed in 
X	/opt/schily/bin. The directory /opt/<vendor-name>/ has been agreed
X	on by all major UNIX vendors in 1989. Unfortunately, still not all
X	vendors follow this agreement.
X
X	If you want to change the default installation directory, edit the
X	appropriate (system dependent) files in the DEFAULTS directory
X	(e.g. DEFAULTS/Defaults.sunos5).
X
X	***** If "smake install" doesn't do anything, you are on a broken *****
X	***** File System. Remove the file INSTALL in this case (the FS   *****
X	***** does not handle upper/lower case characters correctly).	  *****
X	***** This is true for all DOS based filesystems and for Apple's  *****
X	***** HFS+ filesystem.						  *****
X
X
XUsing a different installation directory:
X
X	If your system does not yet use the standard installation path /opt
X	or if you don't like this installation directory, you can easily 
X	change the installation directory. You may edit the DEFAULTS file 
X	for your system and modify the macro INS_BASE.
X
X	You may  use a different installation directory without editing the
X	DEFAULTS files. If you like to install everything in /usr/local, call:
X
X
X	If your make program supports to propagate make macros to sub make programs
X	which is the case for recent smake releases as well as for a recent gnumake:
X
X		smake INS_BASE=/usr/local install
X	or
X		gmake INS_BASE=/usr/local install
X
X	If you make program doesn't propagate make macros (e.g. SunPRO make) call:
X
X		env INS_BASE=/usr/local make -e install
X
X	Note that INS_BASE=/usr/local needs to be specified for every operation
X	that compiles or links programs as the path is stored inside the
X	binaries.
X
X
XInstalling to a prototype directory to implement package creation staging:
X
X	If you like to create a prototype directory tree that is used as an
X	intermediate store for package creation, use the DESTDIR macro:
X
X		smake INS_BASE=/usr/local DESTDIR=/tmp install
X
X	This will create a usr/local tree below /tmp (i.e. /tmp/usr/local).
X
XUsing a different C-compiler:
X
X	If the configured default compiler is not present on the current machine,
X	the makefilesystem will try an automatic fallback to GCC. For this reason
X	in most cases you will not need to manually select a compiler.
X
X	The default C-compiler can be modified in the files in the
X	DEFAULT directory. If you want to have a different compiler
X	for one compilation, call:
X
X		make CCOM=gcc
X	or
X		make CCOM=cc
X
X	This works even when your make program doesn't propagate make macros.
X
X
XCreating 64 bit executables on Solaris:
X
X	Simply call:
X
X		make CCOM=gcc64
X	or
X		make CCOM=cc64
X
X	It is not clear if GCC already supports other platforms in 64 bit mode.
X	As all GCC versions before 3.1 did emit hundreds of compilation
X	warnings related to 64 bit bugs when compiling itself, there is little
X	hope that other platforms are already supported in 64 bit mode.
X
XCreating executables using the Sun Studio compiler on Linux:
X
X	Simply call:
X
X		make CCOM=suncc
X
X	If the compilation does not work, try:
X
X	mkdir   /opt/sunstudio12/prod/include/cc/linux 
X	cp      /usr/include/linux/types.h  /opt/sunstudio12/prod/include/cc/linux
X
X	Then edit /opt/sunstudio12/prod/include/cc/linux/types.h and remove all
X	lines like: "#if defined(__GNUC__) && !defined(__STRICT_ANSI__)"
X	as well as the related #endif.
X
X
X
XGetting help from make:
X
X	For a list of targets call:
X
X		make .help
X
X
XGetting more information on the make file system:
X
X	The man page makefiles.4 located in man/man4/makefiles.4 contains
X	the documentation on general use and for leaf makefiles.
X
X	The man page makerules.4 located in man/man4/makerules.4 contains
X	the documentation for system programmers who want to modify
X	the make rules of the makefile system.
X
X	For further information read
X
X		ftp://ftp.berlios.de/pub/makefiles/PortableSoftware.ps.gz
X
X
XHints for compilation:
X
X	The makefile system is optimized for 'smake'. Smake will give the
X	fastest processing and best debugging output.
X
X	SunPro make will work as is. GNU make need some special preparation.
X
X	Read READMEs/README.gmake for more information on gmake.
X
X	To use GNU make create a file called 'Gmake' in your search path
X	that contains:
X
X		#!/bin/sh
X		MAKEPROG=gmake
X		export MAKEPROG
X		exec gmake "$@"
X
X	and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make'
X	on Linux is really a gmake.
X
X	'Gmake' and 'Gmake.linux' are part of this distribution.
X
X	Some versions of gmake are very buggy. There are e.g. versions of gmake
X	on some architectures that will not correctly recognize the default
X	target. In this case call 'make all' or ../Gmake all'.
X
X	Note that pseudo error messages from gmake similar to:
X
X	gmake[1]: Entering directory `cdrtools-1.10/conf'
X	../RULES/rules.cnf:58: ../incs/sparc-sunos5-cc/Inull: No such file or directory
X	../RULES/rules.cnf:59: ../incs/sparc-sunos5-cc/rules.cnf: No such file or directory
X
X	Are a result of a bug un GNU make. The make file system itself is
X	correct (as you could prove by using smake).
X	If your gmake version still has this bug, send a bug report to:
X
X		"Paul D. Smith" <psmith@gnu.org>
X
X	He is the current GNU make maintainer.
X
X	If you like to use 'smake', please always compile it from source.
X	The packages are located on:
X
X		ftp://ftp.berlios.de/pub/smake/alpha/
X
X	Smake has a -D flag to see the actual makefile source used
X	and a -d flag that gives easy to read debugging info. Use smake -xM
X	to get a makefile dependency list. Try smake -help
X
X
XCompiling the project using engineering defaults:
X
X	The defaults found in the directory DEFAULTS are configured to
X	give minimum warnings. This is made because many people will
X	be irritated by warning messages and because the GNU c-compiler
X	will give warnings for perfectly correct and portable c-code.
X
X	If you want to port code to new platforms or do engineering
X	on the code, you should use the alternate set of defaults found
X	in the directory DEFAULTS_ENG.
X	You may do this permanently by renaming the directories or
X	for one compilation by calling:
X
X		make DEFAULTSDIR=DEFAULTS_ENG
X
X
XCompiling the project to allow debugging with dbx/gdb:
X
X	If you like to compile with debugging information for dbx or gdb,
X	call:
X
X		make clean
X		make COPTX=-g LDOPTX=-g
X
X
XCreting Blastwave packages:
X
X	Call:
X		.clean
X		smake -f Mcsw
X
X	You need the program "fakeroot" and will find the results
X	in packages/<arch-dir>
X
X	Note that a single program source tree will allow you to create
X	packages like CSWstar but not the packages CSWschilybase and
X	CSWschilyutils on which CSWstar depends.
X
X
X
X
X	If you want to see an example, please have a look at the "star"
X	source. It may be found on:
X
X		ftp://ftp.berlios.de/pub/star
X
X	Have a look at the manual page, it is included in the distribution.
X	Install the manual page with 
X
X	make install first and include /opt/schily/man in your MANPATH
X
X	Note that some systems (e.g. Solaris 2.x) require you either to call
X	/usr/lib/makewhatis /opt/schily/man or to call 
X
X		man -F <man-page-name>
X
X
XAuthor:
X
XJoerg Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X
XEmail: 	joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de
X	joerg.schilling@fokus.fraunhufer.de
X
XPlease mail bugs and suggestions to me.
END-of-smake-1.2.1/COMPILE
echo x - smake-1.2.1/INSTALL
sed 's/^X//' >smake-1.2.1/INSTALL << 'END-of-smake-1.2.1/INSTALL'
XShort overview for those who don't read manuals:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	There is no 'configure', simply call 'make' on the top level
X	directory.
X
X	***** If this does not work for you, read the rest if this file   *****
X	***** If you have any problem, also first read the topic specific *****
X	***** README.* files (e.g. README.linux for Linux problems).	  *****
X
X	All results in general will be placed into a directory named 
X	OBJ/<arch-name>/ in the current projects leaf directory.
X
X	You **need** either my "smake" program, the SunPRO make 
X	from /usr/bin/make (SunOS 4.x) or /usr/ccs/bin/make (SunOS 5.x)
X	or GNU make to compile this program. Read READMEs/README.gmake for 
X	more information on gmake and a list of the most annoying bugs in gmake.
X
X	All other make programs are either not smart enough or have bugs.
X
X	My "smake" source is at:
X
X	ftp://ftp.berlios.de/pub/smake/alpha/
X
X	It is easy to compile and doesn't need a working make program
X	on your machine. If you don't have a working "make" program on the
X	machine where you like to compile "smake" read the file "BOOTSTRAP".
X
X	If you have the choice between all three make programs, the
X	preference would be 
X
X		1)	smake		(preferred)
X		2)	SunPRO make
X		3)	GNU make	(this is the last resort)
X
X	Important notice: "smake" that comes with SGI/IRIX will not work!!!
X	This is not the Schily "smake" but a dumb make program from SGI.
X
X	***** If you are on a platform that is not yet known by the	 *****
X	***** Schily makefilesystem you cannot use GNU make.		 *****
X	***** In this case, the automake features of smake are required. *****
X
X	Please read the README's for your operating system too.
X
X			WARNING
X	Do not use 'mc' to extract the tar file!
X	All mc versions before 4.0.14 cannot extract symbolic links correctly.
X
X	The versions of WinZip that support tar archives cannot be used too.
X	The reason is that they don't support symbolic links.
X	Star and Gnutar do support symbolic links even on win32 systems.
X	To support symbolic links on win32, you need to link with the
X	Cygwin32 POSIX library.
X
X	To unpack an archive use:
X
X		gzip -d < some-arch.tar.gz | tar -xpf -
X
X	Replace 'star' by the actual archive name.
X
X	If your Platform does not support hard links or symbolic links, you
X	first need to compile "star" and then call:
X
X		star -xpz -copy-links < some-arch.tar.gz
X
X	If your platform does not support hard links but supports
X	symbolic links, you only need to call the command above once.
X	If your platform does not support symbolic links, you need to call
X	the command twice because a symbolic link may occur in the archive
X	before the file it points to.
X		
X
X
XHere comes the long form:
X
X
XPREFACE:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	You don't have to call configure with this make file system.
X
X	Calling	'make' or 'make all' on the top level directory will create
X	all needed targets. Calling 'make install' will install all needed
X	files.
X
X	This program uses a new makefilesystem. This makefilesystem uses
X	techniques and ideas from the 1980s and 1990s, is designed in a
X	modular way and allows sources to be combined in a modular way.
X	For mor information on the modular features read README.SSPM.
X
X	The makefilesystem is optimized for a program called 'smake'
X	Copyright 1985 by Jörg Schilling, but SunPro make (the make program
X	that comes with SunOS >= 4.0 and Solaris) as well as newer versions
X	of GNU make will work also. BSDmake could be made working, if it
X	supports pattern matching rules correctly.
X
X	The makefile system allows simultaneous compilation on a wide
X	variety of target systems if the source tree is accessible via NFS.
X
X
XFinding Compilation Results:
X
X	To allow this, all binaries and results of a 'compilation' in any form
X	are placed in sub-directories. This includes automatically generated
X	include files. Results in general will be placed into
X	a directory named OBJ/<arch-name>/ in the current projects
X	leaf directory, libraries will be placed into a directory called
X	libs/<arch-name>/ that is located in the source tree root directory.
X
X		<arch-name> will be something like 'sparc-sunos5-cc'
X
X	This is the main reason why simultaneous compilation is possible on
X	all supported platforms if the source is mounted via NFS.
X
X
XHow to compile:
X
X	To compile a system or sub-system, simply enter 'smake', 'make' or 
X	'Gmake'. Compilation may be initialized at any point of the source
X	tree of a system. If compilation is started in a sub tree, all objects
X	in that sub tree will be made.
X
X
XHow to install results:
X
X	To install the product of a compilation in your system, call:
X
X		smake install
X
X	at top level. The binaries will usually be installed in 
X	/opt/schily/bin. The directory /opt/<vendor-name>/ has been agreed
X	on by all major UNIX vendors in 1989. Unfortunately, still not all
X	vendors follow this agreement.
X
X	If you want to change the default installation directory, edit the
X	appropriate (system dependent) files in the DEFAULTS directory
X	(e.g. DEFAULTS/Defaults.sunos5).
X
X	***** If "smake install" doesn't do anything, you are on a broken *****
X	***** File System. Remove the file INSTALL in this case (the FS   *****
X	***** does not handle upper/lower case characters correctly).	  *****
X	***** This is true for all DOS based filesystems and for Apple's  *****
X	***** HFS+ filesystem.						  *****
X
X
XUsing a different installation directory:
X
X	If your system does not yet use the standard installation path /opt
X	or if you don't like this installation directory, you can easily 
X	change the installation directory. You may edit the DEFAULTS file 
X	for your system and modify the macro INS_BASE.
X
X	You may  use a different installation directory without editing the
X	DEFAULTS files. If you like to install everything in /usr/local, call:
X
X
X	If your make program supports to propagate make macros to sub make programs
X	which is the case for recent smake releases as well as for a recent gnumake:
X
X		smake INS_BASE=/usr/local install
X	or
X		gmake INS_BASE=/usr/local install
X
X	If you make program doesn't propagate make macros (e.g. SunPRO make) call:
X
X		env INS_BASE=/usr/local make -e install
X
X	Note that INS_BASE=/usr/local needs to be specified for every operation
X	that compiles or links programs as the path is stored inside the
X	binaries.
X
X
XInstalling to a prototype directory to implement package creation staging:
X
X	If you like to create a prototype directory tree that is used as an
X	intermediate store for package creation, use the DESTDIR macro:
X
X		smake INS_BASE=/usr/local DESTDIR=/tmp install
X
X	This will create a usr/local tree below /tmp (i.e. /tmp/usr/local).
X
XUsing a different C-compiler:
X
X	If the configured default compiler is not present on the current machine,
X	the makefilesystem will try an automatic fallback to GCC. For this reason
X	in most cases you will not need to manually select a compiler.
X
X	The default C-compiler can be modified in the files in the
X	DEFAULT directory. If you want to have a different compiler
X	for one compilation, call:
X
X		make CCOM=gcc
X	or
X		make CCOM=cc
X
X	This works even when your make program doesn't propagate make macros.
X
X
XCreating 64 bit executables on Solaris:
X
X	Simply call:
X
X		make CCOM=gcc64
X	or
X		make CCOM=cc64
X
X	It is not clear if GCC already supports other platforms in 64 bit mode.
X	As all GCC versions before 3.1 did emit hundreds of compilation
X	warnings related to 64 bit bugs when compiling itself, there is little
X	hope that other platforms are already supported in 64 bit mode.
X
XCreating executables using the Sun Studio compiler on Linux:
X
X	Simply call:
X
X		make CCOM=suncc
X
X	If the compilation does not work, try:
X
X	mkdir   /opt/sunstudio12/prod/include/cc/linux 
X	cp      /usr/include/linux/types.h  /opt/sunstudio12/prod/include/cc/linux
X
X	Then edit /opt/sunstudio12/prod/include/cc/linux/types.h and remove all
X	lines like: "#if defined(__GNUC__) && !defined(__STRICT_ANSI__)"
X	as well as the related #endif.
X
X
X
XGetting help from make:
X
X	For a list of targets call:
X
X		make .help
X
X
XGetting more information on the make file system:
X
X	The man page makefiles.4 located in man/man4/makefiles.4 contains
X	the documentation on general use and for leaf makefiles.
X
X	The man page makerules.4 located in man/man4/makerules.4 contains
X	the documentation for system programmers who want to modify
X	the make rules of the makefile system.
X
X	For further information read
X
X		ftp://ftp.berlios.de/pub/makefiles/PortableSoftware.ps.gz
X
X
XHints for compilation:
X
X	The makefile system is optimized for 'smake'. Smake will give the
X	fastest processing and best debugging output.
X
X	SunPro make will work as is. GNU make need some special preparation.
X
X	Read READMEs/README.gmake for more information on gmake.
X
X	To use GNU make create a file called 'Gmake' in your search path
X	that contains:
X
X		#!/bin/sh
X		MAKEPROG=gmake
X		export MAKEPROG
X		exec gmake "$@"
X
X	and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make'
X	on Linux is really a gmake.
X
X	'Gmake' and 'Gmake.linux' are part of this distribution.
X
X	Some versions of gmake are very buggy. There are e.g. versions of gmake
X	on some architectures that will not correctly recognize the default
X	target. In this case call 'make all' or ../Gmake all'.
X
X	Note that pseudo error messages from gmake similar to:
X
X	gmake[1]: Entering directory `cdrtools-1.10/conf'
X	../RULES/rules.cnf:58: ../incs/sparc-sunos5-cc/Inull: No such file or directory
X	../RULES/rules.cnf:59: ../incs/sparc-sunos5-cc/rules.cnf: No such file or directory
X
X	Are a result of a bug un GNU make. The make file system itself is
X	correct (as you could prove by using smake).
X	If your gmake version still has this bug, send a bug report to:
X
X		"Paul D. Smith" <psmith@gnu.org>
X
X	He is the current GNU make maintainer.
X
X	If you like to use 'smake', please always compile it from source.
X	The packages are located on:
X
X		ftp://ftp.berlios.de/pub/smake/alpha/
X
X	Smake has a -D flag to see the actual makefile source used
X	and a -d flag that gives easy to read debugging info. Use smake -xM
X	to get a makefile dependency list. Try smake -help
X
X
XCompiling the project using engineering defaults:
X
X	The defaults found in the directory DEFAULTS are configured to
X	give minimum warnings. This is made because many people will
X	be irritated by warning messages and because the GNU c-compiler
X	will give warnings for perfectly correct and portable c-code.
X
X	If you want to port code to new platforms or do engineering
X	on the code, you should use the alternate set of defaults found
X	in the directory DEFAULTS_ENG.
X	You may do this permanently by renaming the directories or
X	for one compilation by calling:
X
X		make DEFAULTSDIR=DEFAULTS_ENG
X
X
XCompiling the project to allow debugging with dbx/gdb:
X
X	If you like to compile with debugging information for dbx or gdb,
X	call:
X
X		make clean
X		make COPTX=-g LDOPTX=-g
X
X
XCreting Blastwave packages:
X
X	Call:
X		.clean
X		smake -f Mcsw
X
X	You need the program "fakeroot" and will find the results
X	in packages/<arch-dir>
X
X	Note that a single program source tree will allow you to create
X	packages like CSWstar but not the packages CSWschilybase and
X	CSWschilyutils on which CSWstar depends.
X
X
X
X
X	If you want to see an example, please have a look at the "star"
X	source. It may be found on:
X
X		ftp://ftp.berlios.de/pub/star
X
X	Have a look at the manual page, it is included in the distribution.
X	Install the manual page with 
X
X	make install first and include /opt/schily/man in your MANPATH
X
X	Note that some systems (e.g. Solaris 2.x) require you either to call
X	/usr/lib/makewhatis /opt/schily/man or to call 
X
X		man -F <man-page-name>
X
X
XAuthor:
X
XJoerg Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X
XEmail: 	joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de
X	joerg.schilling@fokus.fraunhufer.de
X
XPlease mail bugs and suggestions to me.
END-of-smake-1.2.1/INSTALL
echo x - smake-1.2.1/README.hpux
sed 's/^X//' >smake-1.2.1/README.hpux << 'END-of-smake-1.2.1/README.hpux'
X		I M P O R T A N T
X
XOn HP-UX-11.x the maximal data size (allocated data) of a 32 bit program is
X64 MB.
X
XOne solution is to build a 64 bit binary, for those the default process memory
Xlimit is 1 GB.
X
X64bit binaries can be created with
X
X	cc +DA2.0w
X	cc +DD64
X
Xif you have the HP C-ANSI-C compiler.
X
XTo compile in 64 bit mode, first call ./.clean then call
X
X	make COPTX=+DD64 LDOPTX=+DD64 
X	make COPTX=+DD64 LDOPTX=+DD64  install
X
X
XIf you have an older GNU gcc, you need a 64bit compiled gcc. Older GNU gcc versions
Xare not capable of switching, so you need a separate compiler installation for either:
X
Xl1:/u/usr/merijn 102 > file /usr/local/pa*/bin/gcc
X/usr/local/pa20_32/bin/gcc:     PA-RISC2.0 shared executable dynamically linked -not stripped
X/usr/local/pa20_64/bin/gcc:     ELF-64 executable object file - PA-RISC 2.0 (LP64)
Xl1:/u/usr/merijn 103 >
X
XWith a newer GCC, you may call ./.clean then call:
X
X	make COPTX=-mlp64 LDOPTX=-mlp64
X	make COPTX=-mlp64 LDOPTX=-mlp64  install
X
X
XThe other way is to alter some kernel parameters which require a reboot.
XThe default kernel parameter seem to look like:
X
XKernel param.               Value
Xmaxdsiz                  67108864
Xmaxdsiz_64bit          1073741824
Xmaxfiles                      200
Xmaxfiles_lim                 2048
Xmaxssiz                   8388608
Xmaxssiz_64bit             8388608
Xmaxswapchunks                3250
Xmaxtsiz                  67108864
Xmaxtsiz_64bit          1073741824
X
XThe important one is maxdsiz, 64 MB is the default and it is rather low.
XThere is some information page at http://www.uwsg.iu.edu/hp/hpux-tune.html#maxdsiz 
Xand they recommend to increase it to 1.9 GB. Sounds extreme.
X
XAt http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x08afe7613948d5118fef0090279cd0f9,00.html 
Xthey recommend 500 MB.
X
Xmaxssiz shouldn't be a problem either since it has to do with swap and such as 
Xstoring arrays and recursion etc.
X
XIf you like to know how to create 64 bit binaries on Solaris, please
Xread README.compile. I hope this helps. If you found the right way for HP-UX,
Xplease send me a mail.
X
X
X
XThe Schily makefile system usually should be able to find the best C-compiler
Xon HP-UX automatically. If it does not work, here is a way force to use a different
Xcompiler.
X
X
XYou may compile with the HP ANSI C-Compiler using:
X
X	make CCOM=cc
X
XTo compile with the free K&R C-compiler call:
X
X	gmake CCOM=cc 'COPTS= ' 
Xor
X	smake CCOM=cc 'COPTS= ' 
X/*--------------------------------------------------------------------------*/
X
XHP-UX SCSI hints:
X
XNote that there are no device nodes for userland SCSI on HP-UX,
Xyou have to call the included shell script MKNOD.hpux first.
X
XIf you own a HP-9000-800 series machine, you need to install
Xthe file MKNOD.hpux-800 in the /etc init shell script directory 
Xin order to call it after each boot.
X
XThis script will create the files in /dev/scsi/... and /dev/rscsi/...
XThe permissions will be set to read/write for root only.
X
X
XHP does not handle CD-ROMs as well as it should. On the HP have a look at
Xthe man pages for
X    pfs
X    pfsd
X    pfs_mount
Xand anymore that they refer too.
X
X/*--------------------------------------------------------------------------*/
X
XFrom:
XH.Merijn Brand        Amsterdam Perl Mongers (http://amsterdam.pm.org/)
X
XAs of Jun 2002, there are some patches available to HP-UX 11.00 and 11i that
Xprevent the need for pfs, and these are highly recommended, since Rock-Ridge
Xextensions are now supported from the kernel level.
X
XFor 11.00:
X
Xa5:/ 103 # swlist | grep -i rock
X  PHCO_26449   1.0  Add Rock Ridge extension to mount_cdfs(1M)
X  PHKL_26448   1.0  Y2k; Rock Ridge extension for ISO-9660
X  PHKL_26450   1.0  Rock Ridge extension for ISO-9660
Xa5:/ 104 #
X
XPHKL_26448 is not recommended, but I never had any trouble with it. I still
Xhave to install PHKL_28060 over PHKL_26448
X
X  PHKL_28060   1.0  Y2k; Rock Ridge extension for ISO-9660
X
XFor 11i:
X
X  PHKL_28025   1.0  Rock Ridge extension for ISO-9660 
X  PHKL_26269   1.0  Rock Ridge extension for ISO-9660 
X  PHCO_25841   1.0  Add Rock Ridge extension to mount_cdfs(1M) 
X
XI don't have 11i (yet), so I got this from HP-UX' patch database.
X
XThe problem is that they did /not/ enable RR by default, but made it a mount
Xoption. D'uh! But you can add it in /etc/fstab, and never worry again :)
X
Xa5:/ 104 # grep cd /etc/fstab
X/dev/cd0        /cdrom          cdfs    ro,rr,noauto    0 0
Xa5:/ 105 #
X
X
END-of-smake-1.2.1/README.hpux
echo x - smake-1.2.1/README.win32
sed 's/^X//' >smake-1.2.1/README.win32 << 'END-of-smake-1.2.1/README.win32'
X# @(#)README.win32	1.7 02/12/16 Copyright 2000 J. Schilling
X
Xcdrecord-1.8a22 or later can be compiled on Win9X/NT4 using Cygnus' cygwin
Xwhich is freely available from:
X
X	http://sourceware.cygnus.com/cygwin/
Xor
X	http://sources.redhat.com/cygwin/
X
XTo compile on Cygwin, get Cygwin by executing setup.exe
X
XYou will need approx. 120 MB to install a full cygwin developer release.
X
XGet the tar'ed cdrtools source and unpack it with 'gnutar' or 'star',
X
Xe.g. Start a bash command line window and type:
X
X	star -xpz < cdrtools-1.10.tar.gz
X
X	don't use winzip to unpack the tar archive, it will not
X	unpack symlinks correctly.
X
XThen (from the bash command line window) run 'make' ... 
X
XIf you have problems with GNU make, get 'smake' from:
X
X	ftp://ftp.berlios.de/pub/smake/alpha/
X
X/*--------------------------------------------------------------------------*/
XA bash window is available from the START -> Programs -> Cygnus Solutions
Xmenu or by clicking at the Cygwin Logo on the desktop.
X/*--------------------------------------------------------------------------*/
XPre-compiled current 'cdrtools' Win32 binaries which should run on
XW95, W98 and WNT are available from:
X
X	ftp://ftp.berlios.de/pub/cdrecord/alpha/win32
X
XTo use the pre-compiled binary, put the files cygwin1.dll, mount.exe as well
Xas the files:
X
Xcdrecord.exe		- The CD recording program
Xcdda2wav.exe		- The DAE (Digital Audio Extraction) program
Xmkisofs.exe		- The ISO-9660/Rock Ridge/Joliet Filesystem formatter
Xreadcd.exe		- A simple program to extract CD-ROM raw data to a file
X
Xin your WINDOWS binary directory and from a Command/MS-DOS (or bash) window
Xtype:
X	cdrecord -help
X
Xfor usage, see also:
X
Xhttp://www.fokus.fhg.de/research/cc/glone/employees/joerg.schilling/private/man/cdrecord.html
X
XAll programs in this directory are Unix command line utilities and know
Xnothing about DOS/WIN. They run in a POSIX subsystem that is supplied by
Xcygwin1.dll. Therefore all directory names are given in Unix (POSIX) format 
X(i.e. use '/' for a directory separator, not '\'). To access files on another 
Xdisks (i.e. floppy, CDROM and network disk), you need to use the supplied "mount"
Xcommand e.g.
X
X	mount a: /a
X	mount d: /cdrom
X
Xi.e. files on the floppy disk are accessed as being in directory /a and
Xfiles on the CDROM are accessed as /cdrom (assuming your CDROM is drive d:)
X
XYu may also use the new /cygpath notation by typing /cygpath/a for
Xyour local floppy.
X
XThe notation //a/dir as a replacement for the DOS directory name a:\dir
Xmay not work in future releases of Cygwin.
X
XThe following command creates a CD image in the current directory
Xusing a source directories on the CDROM drive, a sub-directory and the
Xfloppy drive:
X
X	mkisofs -o hsfs.iso -J -R /cdrom/subdir dir1 /a 
X
XIf you use the options noted above, the hsfs.iso image is ISO-9660 
Xcompliant and includes both Rock Ridge (IEEE P1282) and 
XJoliet (Microsoft proprietary) extensions.
X
XIf your CD writer is on target 6, type 
X
X	cdrecord dev=6,0 -v speed=4 hsfs.iso
X
Xto write the image at speed 4 in TAO mode, or
X
X	cdrecord dev=6,0 -v speed=4 -dao hsfs.iso
X
Xto write the image in DAO mode.
X
XIf you don't like to create the image file 'hsfs.iso' you may use a PIPE
Xto connect mkisofs's output to cdrecord's input by calling:
X
X	mkisofs -J -R /cdrom/subdir dir1 /a | cdrecord dev=6,0 -v speed=4 -
X
XIMPORTANT NOTE:	If you use PIPE's on Win32, you definitely need a POSIX
X		compliant shell to start the programs. Native Win32 PIPE's
X		are not POSIX compliant and will not work with POSIX compliant
X		programs.
X
X/*--------------------------------------------------------------------------*/
XIf you don't know which target your CD-writer is, call
X
X	cdrecord -scanbus
X
XThis gives output similar to:
X
XCdrecord-ProDVD sparc-sun-solaris2.4 release 1.8a39 Copyright (C) 1995-2000 Jörg Schilling
XUsing libscg version 'schily-0.1'
Xscsibus0:
X	0,0,0	  0) 'Quantum ' 'XP34300         ' 'F76D' Disk
X	0,1,0	  1) 'SEAGATE ' 'ST11200N        ' '8334' Disk
X	0,2,0	  2) *
X	0,3,0	  3) 'TOSHIBA ' 'MK537FB/        ' '6258' Disk
X	0,4,0	  4) 'WANGTEK ' '5150ES SCSI-36  ' 'ESB6' Removable Tape
X	0,5,0	  5) 'EXABYTE ' 'EXB-8500-85QUE  ' '0428' Removable Tape
X	0,6,0	  6) 'TOSHIBA ' 'XM-3401TASUNSLCD' '3593' Removable CD-ROM
X	0,7,0	  7) HOST ADAPTOR
Xscsibus1:
X	1,0,0	100) 'IBM     ' 'DCAS-34330      ' 'S65A' Disk
X	1,1,0	101) *
X	1,2,0	102) *
X	1,3,0	103) *
X	1,4,0	104) 'PLEXTOR ' 'CD-R   PX-W8220T' '1.00' Removable CD-ROM
X	1,5,0	105) 'YAMAHA  ' 'CRW4416S        ' '1.0f' Removable CD-ROM
X	1,6,0	106) *
X	1,7,0	107) HOST ADAPTOR
X
XThe numbers on the labels are SCSIbus# * 100 + target#
X
XYou then call cdrecord dev=bus#,target#,0
X
XIf you e.g. like to talk to the Yamaha drive from the list above, you need to
Xcall:
X
X	cdrecord dev=1,5,0 ......
X
X/*--------------------------------------------------------------------------*/
X
X			NOTE
X
XIf "cdrecord -scanbus" dumps core (dies from program fault), you have 
Xa broken ASPI driver on your PC. 
X
XIf you cannot see your drive(s), the following registry changes should make
Xthem visible:
X
X  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Aspi32]
X  "ErrorControl"=dword:00000001
X  "Start"=dword:00000001
X  "Type"=dword:00000001
X
X  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Aspi32\Parameters]
X  "ExcludeMiniports"=""
X
X
XIf you like to use the tools with SCSI or ATAPI, you need a working 
XASPI32 driver and dll on your system. If you don't have it already, 
Xlook for 'aspi_me'. You need to set you clock back to a time before 
XJan 1st 1999 to be able to install it. Note that 'aspi_me' contains 
Xoriginal Adaptec drivers and is banned from most ftp servers for this 
Xreason. 
X
XYou need a special ASPI driver version on NT-5.0 (Win2000)
X
X************************************ Seems to be dead
XYou may get one by downloading
X
X	http://www.poikosoft.com/writer/download.html
X
Xand unpacking the file mightywriter121.exe using unzip.
Xafter you renamed ntaspi32.dll to wnaspi32.dll, cdrecord should work.
X************************************ Seems to be dead
X
XBut here is a new source for ASPI drivers:
X
Xhttp://www.fortunecity.com/skyscraper/solo/719/aspi_drivers.htm
X
X
X			IMPORTANT
X
XIn order to avoid damaging CD blanks because Win is trying to access
Xthe drive while cdrecord writes to it, you definitely should edit
Xyour registry and set the value of
X
XHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom\Autorun
X
Xto '0'.
X
XThe Registry entry noted above is valid for WNT, I don't know
Xif you need to do this for W95 or W98, nor do I know the
Xcorrect Registry entry for these systems.
X
X/*--------------------------------------------------------------------------*/
X
X		For binary only users:
X
XError messages and help output is directed to stderr. Win32 command
Xinterpreters don't know about stderr. I recommend to install bash.exe
Xbecause it is a POSIX compliant shell and allow working PIPE's and
Xit also gives you a command line history that may be edited using
Xcursor commands.
X
XOtherwise you may want to install the Cygwin light version which
Xonly includes the user commands.
END-of-smake-1.2.1/README.win32
echo x - smake-1.2.1/SMakefile
sed 's/^X//' >smake-1.2.1/SMakefile << 'END-of-smake-1.2.1/SMakefile'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for the source root
X###########################################################################
XSRCROOT=	.
XDIRNAME=	SRCROOT
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
Xinclude		Targetdirs
X
X###########################################################################
X# Due to a bug in SunPRO make we need special rules for the root makefile
X#
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.rdi
X###########################################################################
END-of-smake-1.2.1/SMakefile
echo x - smake-1.2.1/Makefile.old
sed 's/^X//' >smake-1.2.1/Makefile.old << 'END-of-smake-1.2.1/Makefile.old'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for the source root
X###########################################################################
XSRCROOT=	.
XDIRNAME=	SRCROOT
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
Xinclude		Targetdirs
X
X###########################################################################
X# Due to a bug in SunPRO make we need special rules for the root makefile
X#
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.rdi
X###########################################################################
END-of-smake-1.2.1/Makefile.old
echo x - smake-1.2.1/PORTING
sed 's/^X//' >smake-1.2.1/PORTING << 'END-of-smake-1.2.1/PORTING'
XPorting FAQ for SING (Schily Is Not Gnu) utilities.
X
X-	The base for porting is the makefile system.
X	Always look into:
X		ftp://ftp.berlios.de/pub/makefiles
X	for a version that might be newer than the one used
X	inside the program that should be ported.
X
X	If you want to know more about the makefile system,
X	read the man pages makefiles4 and makerules.4,
X	they are located in man/man4/*
X
X		to convert a manpage troff->postscript use:
X			gtroff -man file.tr | grops > file.ps
X
X		to convert a manpage troff->Terminal use:
X			nroff -man file.tr | more -s
X
X
X-	To be able to use the makefile system, you need a
X	make program that meets the minimum requirements 
X	for a make program (see makerules(4) man page)
X	Currently, the following make programs meet this
X	minimum requirements: Smake (my program), SunPro Make and Gmake
X
X	A good idea is to first compile 'smake' if you don't
X	have it already.
X
X	The smake source can be found on:
X
X		ftp://ftp.berlios.de/pub/smake/
X	or
X		ftp://ftp.berlios.de/pub/smake/alpha
X
X	for the most recent version.
X
X-	To be able to use the makefile system with gmake,
X	the operating system must have a command named 'uname'.
X	If not, you have to provide it as a shell script.
X
X
X1)	If you are using smake release 1.1 or newer and 
X	a recent makefile system, the next step should be done
X	automagically (smake-1.1 or newer implement a -version
X	option to retrieve the version number).
X
X	If you are using gmake, you need to do this by hand.
X
X	First step for adding a new architecture is creating
X	the appropriate rule files in the RULES directory:
X
X		RULES/os-{newos}.id	For OS identification
X		RULES/os-{newos}.def	For OS definition (man style)
X		RULES/{newarch}-{newos}-cc.rul
X		RULES/{newarch}-{newos}-gcc.rul
X
X	And create a file:
X
X		DEFAULTS/Defaults.{newos}
X
X	Have a look in similar files for a template.
X
X	If the files hae been generated automagically by smake,
X	please check the content and mail me a working set for your OS.
X
X2)	All C-porting control is located in include/mconfig.h
X	and in the file incs/{newarch}-{newos}-{cc!gcc}/xconfig.h
X	The later file is created automatically using GNU 
X	configure. The File conf/xconfig.h.in contains all
X	templates and comments for the various things that are tested.
X
X	In any case, it is recommended to carefully watch the
X	outout from the 'configure' run (which is automatically
X	started from within 'make'). You may also wish to check all
X	files that are created in the directory 
X	incs/{newarch}-{newos}-{cc!gcc}/
X
X3)	Everything should compile now.
X	If not, try to hack the files and mail me your problems.
X
X	You should have a closer look at the sources as it may be that
X	the first attempt to port a utility will not support
X	all possible features of the new OS.
X	If your OS supportes these features in a non standard way,
X	you need to hack conf/configure.in and the source and add 
X	support for the non standard behaviour of your OS.
X
X	This is definitely recommended if you want to port programs 
X	like 'cdrecord' 'star' and similar which need fork(2) and
X	mmap(2) or setprioriry(2) or if you check programs on
X	non POSIX operating systems like W95/W98/WNT OS/2 and
X	similar.
X
X
XNotice for porting tools, that use the SCSI library libscg:
X
XI)	Cdrecord should compile at this moment if you are using
X	a new architecture. The SCSI transport however will not work.
X	Check this!
X
X	All files that contain low level code for SCSI transport are 
X	located in the directory libscg/
X
XII)	Implementing a SCSI Transport Layer for your architecture:
X
X	You need to add a new block into scsihack.c that will add
X	support for your OS. Copy the block:
X
X	#ifdef  __NEW_ARCHITECTURE
X	#define SCSI_IMPL               /* We have a SCSI implementation for XXX */
X	/*
X	 * Add new hacks here
X	 */
X	#include "scsi-new-arch.c"
X	#endif
X
X	and rename __NEW_ARCHITECTURE to reflect your new architecture.
X
X	Add a new file that will be called scsi-{newarch}.c
X	Have a look into scsi-linux-sg.c for a template how to do this.
X
X	More hints for writing the needed SCSI low level transport functions
X	is in:
X
X		ftp://ftp.berlios.de/pub/cdrecord/README.scsi-IF
X
X4)	Test your ported program.
X
X5)	You may check other programs from me to see if everything compiles
X	and works.
X
X6)	Send me your changes
X
XJoerg Schilling
X
Xjoerg.schilling@fokus.fraunhofer.de
Xjoerg@schily.isdn.cs.tu-berlin.de
Xjs@cs.tu-berlin.de
X
X
X
X
END-of-smake-1.2.1/PORTING
echo x - smake-1.2.1/MKLINKS
sed 's/^X//' >smake-1.2.1/MKLINKS << 'END-of-smake-1.2.1/MKLINKS'
X#!/bin/sh
X###########################################################################
X#ident "@(#)MKLINKS	1.1 08/07/31 "
X###########################################################################
X# Written 2008 by J. Schilling
X###########################################################################
X# Copyright (c) 2008 J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xif [ ! -d RULES/. ]; then
X	ln -s makefiles/RULES		.
Xfi
Xif [ ! -d DEFAULTS_DIST/. ]; then
X	ln -s makefiles/DEFAULTS	DEFAULTS_DIST
Xfi
Xif [ ! -d autoconf/. ]; then
X	ln -s conf			autoconf
Xfi
Xif [ ! -d libedc/. ]; then
X	ln -s libedc_ecc		libedc
Xfi
Xif [ ! -d libschily/. ]; then
X	ln -s lib			libschily
Xfi
Xif [ ! -d readcd/. ]; then
X	ln -s cdrecord			readcd
Xfi
Xif [ ! -d smake/. ]; then
X	ln -s build			smake
Xfi
END-of-smake-1.2.1/MKLINKS
echo x - smake-1.2.1/configure
sed 's/^X//' >smake-1.2.1/configure << 'END-of-smake-1.2.1/configure'
X#!/bin/sh -
Xecho 'configure is no longer used - just type "make", supported make programs are:'
Xecho ''
Xecho 'smake	-	The Schily smake program'
Xecho '			This is the preferred make program, the source can be'
Xecho '			found on ftp://ftp.berlios.de/pub/smake/alpha/'
Xecho ''
Xecho '		Smake is the only make program with automake features, it is'
Xecho '		the only program that works on unknown platforms.'
Xecho ''
Xecho 'make	-	SunPRO make (on SunOS/Solaris only)'
Xecho '			in /usr/bin/ (SunOS 4.x) or /usr/ccs/bin/ (Solaris)'
Xecho ''
Xecho 'gmake	-	GNU make'
Xecho '			GNU make will not work correctly on all platforms'
Xecho '			and due to some conceptional bugs output several'
Xecho '			error messages that are not related to the makefile'
Xecho '			system but to GNU make (see README.gmake)'
Xecho ''
Xecho 'Other make programs will not work, for more information read README.compile'
Xecho ''
Xecho 'If you have problems and if you are in doubt, try to use smake'
Xecho '	Always compile the latest version that can be found on:'
Xecho '		ftp://ftp.berlios.de/pub/smake/alpha/'
Xecho ''
X#
X# Make automated procedures that believe all programs still use the outdated GNU
X# "./configure; make" procedure think configure failed and get the attention of
X# a human ...
X#
Xexit 1
END-of-smake-1.2.1/configure
echo x - smake-1.2.1/README.aix
sed 's/^X//' >smake-1.2.1/README.aix << 'END-of-smake-1.2.1/README.aix'
XYou need to use GNUmake or my smake to compile on AIX
X
XRead the file README.compile before compiling.
X
XNOTE:	AIX seems to have a kernel bug in the mmap() part
X	that may cause kernel panics.
X
XIf you observe this kernel panic, try to add a line:
X
XCOPTS += -DUSE_USGSHM
X
Xto the file cdrecord/Makefile
X
Xor compile the package using:
X
Xmake COPTX=-DUSE_USGSHM
X
XIt seems that SVrx style shared memory does not have this kernel bug
XIn newer AIX releases, the mmap() kernel problem seems to be fixed.
X
XIf you like to create bootable CD's for AIX on the CHRP architecture:
X
X	The /usr/sbin/mkcd command starting shipping with
X	AIX 4.3.3 back in Oct 99'. It's installed by default with the system.
X	There's more info about it in /usr/lpp/bos.sysmgt/mkcd.README.html.
X
X
XNOTE:	there is currently no real SCSI generic support for AIX, so 
X	cdrecord -scanbus will not work.
X
X	/dev/rcd0 is mapped to dev=0,0,0
X	/dev/rcd1 is mapped to dev=0,1,0
END-of-smake-1.2.1/README.aix
echo x - smake-1.2.1/README.SSPM
sed 's/^X//' >smake-1.2.1/README.SSPM << 'END-of-smake-1.2.1/README.SSPM'
X     A new milestone in modular portable programming is ready!
X
XThe "Slottable Source Plugin Module" system (SSPM) is an idea that
Xreally is more than 3 years old but I was hesitating to announce it
Xearlier. Now I can tell you that the new makefile system has been
Xunder test during the last 6 months and nobody complained about any 
Xproblem caused by the SSPM.
X
XThe portability overhead is currently about 2 MB. This turns a medium
Xsized application like 'star' which is about 500 kB of pure source
Xinto a packet that is 5x as big as the pure source size.
X
XAs all my applications are based on the Schily SING makefile system
Xand share a common portability base it makes sense to share the
Xadvantages of the Schily makefile system with all users.
X
XSimple ideas like the SSPM are usually hard to understand by people
Xfrom outside, so I try to describe the new system by giving you an
Xexample on how it is used:
X
X--------------------
XYou may test the new system by first downloading the latest
Xcdrtools package 
X
X	ftp://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-1.11a11.tar.gz
X
Xor newer. Then unpack the source tarball, chdir into the top level
Xdirectory of the cdrtools package. Run 'make' and wait until the 
Xcompilation has finished.
X
XSo far, there is nothing new (except that some people may recognize
Xthat this is a 'smooth' fully integrated compilation and you don't need
Xto call 'configure'.
X
XNow, to understand what a "Slottable Source Plugin Module" is, fetch
Xanother source. There is currently only one demo source that is ready
Xfor testing:
X
X	ftp://ftp.berlios.de/pub/star/alpha/star-1.4a08-sspm.tar.gz
X
XUnpack this tarball in the top level directory of cdrtools and
Xcall 'make' again. The Schily makefile system does recognize that there
Xis additional (uncompiled) source and will compile these new parts.
XAs there is no need to run 'configure' again, compilation of the 
Xadditional 'star' sources is much faster than the compilation of the
Xcomplete 'star' source package would take.
X
XTo understand how the "Slottable Source Plugin Module" system works,
Xhave a look into the TARGETS directory.....
X
X-------------------
END-of-smake-1.2.1/README.SSPM
echo x - smake-1.2.1/dos_make.bat
sed 's/^X//' >smake-1.2.1/dos_make.bat << 'END-of-smake-1.2.1/dos_make.bat'
X@echo off
X
Xif exist .\psmake\smake.exe goto gopsmake
Xcd psmake
Xsh make-sh
Xcd ..
Xif exist .\psmake\smake.exe goto gopsmake
X
Xecho Cannot make .\psmake\smake.exe
Xgoto quit
X
X:gopsmake
X.\psmake\smake.exe all
X
X:quit
END-of-smake-1.2.1/dos_make.bat
echo x - smake-1.2.1/README.msdos
sed 's/^X//' >smake-1.2.1/README.msdos << 'END-of-smake-1.2.1/README.msdos'
X# @(#)README.msdos	1.2 04/06/07 J. Schilling
X
XYou cannot compile this program on DOS directly, you need a win32 environment.
XSee below for more information. You need DJGPP for a compilation.
X
XThe DOS/DJGPP have been made with help from 
X		Alex Kopylov <reanimatolog@yandex.ru>
X
XYou may like to check his Web Page: http://bootcd.narod.ru/index_e.htm too.
X
XCompilation under DJGPP is fully integrated into the Schily Makefile System,
Xhowever you need to use 'smake' (version 1.2a20 or newer). It seems that
XGNU make and other make programs don't work.
X
XAs the file names of a typical UNIX project don't fit into the DOS 8.3 naming
Xscheme, you must have long names support, i.e. you must use a Windows DOS-box
Xinstead pure DOS
X
XTo compile under DJGPP:
X
X-	Unpack the following DJGPP packages into c:\djgpp directory:
X
X	ftp://ftp.delorie.com/pub/djgpp/current/v2/beta/djdev204.zip
X	ftp://ftp.delorie.com/pub/djgpp/alpha/v2gnu/bsh205bb.zip
X	ftp://ftp.delorie.com/pub/djgpp/alpha/v2gnu/gcc340b.zip
X	ftp://ftp.delorie.com/pub/djgpp/alpha/v2gnu/gpp340b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/bnu214b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/dif28b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/fil41b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/grep251b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/gwk311b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/gzip135b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/mak380b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/pat253b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/sed407b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/shl2011b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/tar112ab.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/txt20b.zip
X
XNote that these are the best files on 21.05.2004, things may change in future.
X
X-	Set environment variables using commands:
X
X		set path=c:\djgpp\bin;%path%
X		set djgpp=c:\djgpp\djgpp.env
X
X	If you are using an smake version before 1.2a23, you also need:
X
X		set djgpp_sh=c:\djgpp\bin\sh.exe
X
X
X-	Unpack the source archive using command:
X
X		tar -xpz < package-name.tar.gz
X
X	If you like to use star, you need star-1.5a36 or newer.
X	Use a command line like:
X
X		star -xpz < package-name.tar.gz
X
X-	Enter 'smake' command in top level directory of the unpacked project
X	(to make 'smake' itself, use a command 'dos_make' instead).
X
X	Note that in case you don't have a 'smake' binary for DOS, you need to
X	compile one before or fetch a binary from:
X
X		 http://bootcd.narod.ru/index_e.htm
X
XIn order to run commands on MS-DOS that use SCSI commands, you must have an
XASPI manager installed in your config.sys. For example:
X
X	SCSI devices: 
X
X		device = aspi2dos.sys (not tested!)
X		device = aspi4dos.sys (not tested!)
X		device = aspi8dos.sys
X		device = aspi8u2.sys (not tested!)
X
X	ATAPI devices:
X
X		device = oakaspi.sys
X
X	USB devices:
X
X		device = usbaspi.sys (not tested!)
X
XThe ASPI managers may be fetched from:
X
X		http://bootcd.narod.ru/index_e.htm
END-of-smake-1.2.1/README.msdos
echo x - smake-1.2.1/README.macosX
sed 's/^X//' >smake-1.2.1/README.macosX << 'END-of-smake-1.2.1/README.macosX'
XFebruary 25, 2002
X
XMacOS 10.1 driver now in the tree in libscg/scsi-mac-iokit.c.
X
XIt supports:
X	* Firewire, USB, and ATAPI MMC-3 compliant burners
X	* SCSI parallel bus attached burners (requires MacOS X.1.3)
X
XIt does not support:
X	* Older non MMC-3 burners
X	* CD-ROM drives/DVD-ROM drives (i.e. non-burners)
X
XNote that this is a limitation of MacOS X and not of the driver.
XSee the end of the document if you're curious why.
X
XIf you just want to burn ISO images, you may want to consider using Apple's
Xhdiutil program, but it is not clear how standard compliant this method is.
X
XBuilding
X--------
X
XNote if you installed MacOS X on a HFS+ volume, make install will fail if
Xthere is a file called INSTALL in the directory tree because this Filesystem
Xis not POSIX compliant. POSIX requires to honor character case but HFS+
Xignores the character case. If you like to use "make install" rename 
XINSTALL to something else. (e.g. INSTALL.txt)
X
X
XDevice Naming
X-------------
X
XYou need to pass a device name on the command line to the cdrecord utility
X
XCD burners: (probably) IOCompactDiscServices
XDVD burners: (probably) IODVDServices
X
X# ./cdrecord dev=IOCompactDiscServices -toc
X
Xor if you have multiple drives, you can append a number to differentiate
X
X# ./cdrecord dev=IOCompactDiscServices/2 -toc
X
XThat should talk to the second CD-R on the system (NOT TESTED).
X
XSharing nicely with the Finder
X------------------------------
X
XThe MacOS 10.1 Finder will offer to burn any blank media you put into
Xthe burner.  However, you don't want to use the Finder, you want to
Xuse cdrecord! So, how do you get around this problem?
X
XWhen you insert the media, the Finder asks "Do you want to prepare this
Xdisc?". Click on the "Ignore" button.
X
XThe Finder will then say "No volumes found. Click Continue to continue
Xwithout ejecting".  Click on the "Continue" button.
X
X
XCommon Errors
X-------------
X
XNo matching device ... found:
XMake sure you typed the device names correctly. See above. Use ioreg
X-l to find if there is an IOCompactDiscServices or IODVDServices in
Xthe device tree.
X
XUnable to get exclusive access: 
XAnother programs (usually the Finder) has exclusive access to the drive.
XSee "Sharing Nicely with the Finder"
X
XUnable to get plugin interface: 
XThe SCSI Architecture Family of drivers (supports Firewire, ATAPI, and
XUSB) has a special module that allows user code like libscg to send
XSCSI commands to a device. This module is only attached, though, if
Xthe kernel device driver thinks the device is sufficiently interesting
X(e.g. the kernel thinks it's a burner).
X
XYou can see if the module is loaded by looking for
XSCSITaskUserClientIniter in the output of ioreg -l.
X
XWhy doesn't it support my SCSI device?
X--------------------------------------
X
XApple's kernel drivers enforces the rule that application cannot send
XSCSI commands to devices for which they feel they have enough kernel
Xsupport. This includes hard disks and CD/DVD ROMs. They make an exception
Xfor burners, though.
X
XThere are two possible work-arounds, neither of which has been
Ximplemented.  One is to write a kernel driver that wraps the Apple
Xkernel drivers and exposes a raw SCSI interface, overriding the Apple
Xkernel drivers. The other is to write a SCSI device emulator at user
Xmode that translates SCSI commands into the appropriate interface
Xcalls to IOKit.
X
XBugs
X----
XSend bugs to: csapuntz@stanford.edu
END-of-smake-1.2.1/README.macosX
echo x - smake-1.2.1/README.macosX-old-versions
sed 's/^X//' >smake-1.2.1/README.macosX-old-versions << 'END-of-smake-1.2.1/README.macosX-old-versions'
X*********************************************************************************
X*										*
X*			WARNING							*
X*										*
X*	This is only valid for OLD MacOS X versions				*
X*	This are versions _before_ MacOS X-10.1	(Darwin-1.4)			*
X*										*
X*										*
X*********************************************************************************
X
XIf uname -a does print something like:
X
XDarwin HOST 1.4 Darwin Kernel Version 1.4: Sun Sep  9 15:39:59 PDT 2001; root:xnu/xnu-201.obj~1/RELEASE_PPC  Power Macintosh powerpc
X
Xor a version > 1.4 then you should rather read  README.macosX
X
X/*--------------------------------------------------------------------------*/
X
XUnfortunately, Apple does not deliver a consistent Mac OS-X system
XThe longer they work on it, the more bugs they introduce...
X
XIn addition, there is no visible 'clean' road of development.
XRelease names (from 'uname') are confusing and don't help to find out what
Xrelease they refer to.
X
X/*--------------------------------------------------------------------------*/
X	The next hint is for Mac OS X versions up to January 2000 only:
X
XThe file <bsd/dev/scsireg.h> tries to include <kern/queue.h> which cannot
Xbe found.
X
XTo be able to compile, I suggest to create a symlink:
X
XSystem/Library/Frameworks/System.framework/Versions/B/Headers/kern -> kernserv
X
XTo do this, chdir to:
X
XSystem/Library/Frameworks/System.framework/Versions/B/Headers/
X
Xand call 
X
Xln -s kernserv kern
X
Xas root.
X/*--------------------------------------------------------------------------*/
X
X
X/*--------------------------------------------------------------------------*/
X	This hint is for Mac OS X version starting ~ April 2000:
X
XApple did remove the generic SCSI transport driver for unknown reasons!
XCdrtools compile, but as there is no SCSI transport, you may only write
XCD's connected to other systems using the REMOTE SCSI protocol.
X/*--------------------------------------------------------------------------*/
X
X/*--------------------------------------------------------------------------*/
X	This hint is for Mac OS X versions starting around March 2001:
X
XIf your compile log looks like this:
X
X         ==> MAKING "all" ON SUBCOMPONENT ".../libschily.mk"
X         ==> COMPILING "OBJ/powerpc-darwin-cc/cmpbytes.o"
Xcmpbytes.c: In function `cmpbytes':
Xcmpbytes.c:49: invalid operands to binary |
Xmake[1]: *** [OBJ/powerpc-darwin-cc/cmpbytes.o] Error 1
Xmake: *** [all] Error 2
X
XYou are hit by the Apple developers. Some time ago they started to introduce
Xa file <inttypes.h> which uses types defines in <sys/types.h>
XWhile the buggy types are ignored in <sys/types.h> they are used if found
Xin <inttypes.h>.
X
XAs a workaround, you may edit  
X
X	incs/power-macintosh-darwin-cc/xconfig.h
X
Xafter it has been created by autoconf and make the lint containing
XHAME_INTTYPES_H this way:
X
X/* #undef HAVE_INTTYPES_H */    /* to use UNIX-98 inttypes.h */ 
X
XThis will tell the autoconf using code to ignore the system supplied
X<inttypes.h> and use the internal version.
X
XIMPORTANT: Don't forget to tell the Apple support that MacOSX sucks until they
Xfix such fundamental bugs in the system include files!
X
XIn case you are interested in the full details: the reason why cdrecord
Xdoes not compile is that MacOS X defines a type
X
Xtypedef	int *		intptr_t;
Xtypedef	unsigned int *	uintptr_t;
X
Xinstead of the correct:
X
Xtypedef	long		intptr_t;
Xtypedef	unsigned long	intptr_t;
X
X... a result of either Apple developers being unwilling to read or unable to 
Xunderstand simple standards written in English :-(
X
XSee: http://www.opengroup.org/onlinepubs/7908799/xsh/inttypes.h.html
X
X/*--------------------------------------------------------------------------*/
END-of-smake-1.2.1/README.macosX-old-versions
echo x - smake-1.2.1/CDDL.Schily.txt
sed 's/^X//' >smake-1.2.1/CDDL.Schily.txt << 'END-of-smake-1.2.1/CDDL.Schily.txt'
XCOMMON DEVELOPMENT AND DISTRIBUTION LICENSE Version 1.0
X
X1. Definitions.
X
X    1.1. "Contributor" means each individual or entity that creates
X         or contributes to the creation of Modifications.
X
X    1.2. "Contributor Version" means the combination of the Original
X         Software, prior Modifications used by a Contributor (if any),
X         and the Modifications made by that particular Contributor.
X
X    1.3. "Covered Software" means (a) the Original Software, or (b)
X         Modifications, or (c) the combination of files containing
X         Original Software with files containing Modifications, in
X         each case including portions thereof.
X
X    1.4. "Executable" means the Covered Software in any form other
X         than Source Code.
X
X    1.5. "Initial Developer" means the individual or entity that first
X         makes Original Software available under this License.
X
X    1.6. "Larger Work" means a work which combines Covered Software or
X         portions thereof with code not governed by the terms of this
X         License.
X
X    1.7. "License" means this document.
X
X    1.8. "Licensable" means having the right to grant, to the maximum
X         extent possible, whether at the time of the initial grant or
X         subsequently acquired, any and all of the rights conveyed
X         herein.
X
X    1.9. "Modifications" means the Source Code and Executable form of
X         any of the following:
X
X        A. Any file that results from an addition to, deletion from or
X           modification of the contents of a file containing Original
X           Software or previous Modifications;
X
X        B. Any new file that contains any part of the Original
X           Software or previous Modifications; or
X
X        C. Any new file that is contributed or otherwise made
X           available under the terms of this License.
X
X    1.10. "Original Software" means the Source Code and Executable
X          form of computer software code that is originally released
X          under this License.
X
X    1.11. "Patent Claims" means any patent claim(s), now owned or
X          hereafter acquired, including without limitation, method,
X          process, and apparatus claims, in any patent Licensable by
X          grantor.
X
X    1.12. "Source Code" means (a) the common form of computer software
X          code in which modifications are made and (b) associated
X          documentation included in or with such code.
X
X    1.13. "You" (or "Your") means an individual or a legal entity
X          exercising rights under, and complying with all of the terms
X          of, this License.  For legal entities, "You" includes any
X          entity which controls, is controlled by, or is under common
X          control with You.  For purposes of this definition,
X          "control" means (a) the power, direct or indirect, to cause
X          the direction or management of such entity, whether by
X          contract or otherwise, or (b) ownership of more than fifty
X          percent (50%) of the outstanding shares or beneficial
X          ownership of such entity.
X
X2. License Grants.
X
X    2.1. The Initial Developer Grant.
X
X    Conditioned upon Your compliance with Section 3.1 below and
X    subject to third party intellectual property claims, the Initial
X    Developer hereby grants You a world-wide, royalty-free,
X    non-exclusive license:
X
X        (a) under intellectual property rights (other than patent or
X            trademark) Licensable by Initial Developer, to use,
X            reproduce, modify, display, perform, sublicense and
X            distribute the Original Software (or portions thereof),
X            with or without Modifications, and/or as part of a Larger
X            Work; and
X
X        (b) under Patent Claims infringed by the making, using or
X            selling of Original Software, to make, have made, use,
X            practice, sell, and offer for sale, and/or otherwise
X            dispose of the Original Software (or portions thereof).
X
X        (c) The licenses granted in Sections 2.1(a) and (b) are
X            effective on the date Initial Developer first distributes
X            or otherwise makes the Original Software available to a
X            third party under the terms of this License.
X
X        (d) Notwithstanding Section 2.1(b) above, no patent license is
X            granted: (1) for code that You delete from the Original
X            Software, or (2) for infringements caused by: (i) the
X            modification of the Original Software, or (ii) the
X            combination of the Original Software with other software
X            or devices.
X
X    2.2. Contributor Grant.
X
X    Conditioned upon Your compliance with Section 3.1 below and
X    subject to third party intellectual property claims, each
X    Contributor hereby grants You a world-wide, royalty-free,
X    non-exclusive license:
X
X        (a) under intellectual property rights (other than patent or
X            trademark) Licensable by Contributor to use, reproduce,
X            modify, display, perform, sublicense and distribute the
X            Modifications created by such Contributor (or portions
X            thereof), either on an unmodified basis, with other
X            Modifications, as Covered Software and/or as part of a
X            Larger Work; and
X
X        (b) under Patent Claims infringed by the making, using, or
X            selling of Modifications made by that Contributor either
X            alone and/or in combination with its Contributor Version
X            (or portions of such combination), to make, use, sell,
X            offer for sale, have made, and/or otherwise dispose of:
X            (1) Modifications made by that Contributor (or portions
X            thereof); and (2) the combination of Modifications made by
X            that Contributor with its Contributor Version (or portions
X            of such combination).
X
X        (c) The licenses granted in Sections 2.2(a) and 2.2(b) are
X            effective on the date Contributor first distributes or
X            otherwise makes the Modifications available to a third
X            party.
X
X        (d) Notwithstanding Section 2.2(b) above, no patent license is
X            granted: (1) for any code that Contributor has deleted
X            from the Contributor Version; (2) for infringements caused
X            by: (i) third party modifications of Contributor Version,
X            or (ii) the combination of Modifications made by that
X            Contributor with other software (except as part of the
X            Contributor Version) or other devices; or (3) under Patent
X            Claims infringed by Covered Software in the absence of
X            Modifications made by that Contributor.
X
X3. Distribution Obligations.
X
X    3.1. Availability of Source Code.
X
X    Any Covered Software that You distribute or otherwise make
X    available in Executable form must also be made available in Source
X    Code form and that Source Code form must be distributed only under
X    the terms of this License.  You must include a copy of this
X    License with every copy of the Source Code form of the Covered
X    Software You distribute or otherwise make available.  You must
X    inform recipients of any such Covered Software in Executable form
X    as to how they can obtain such Covered Software in Source Code
X    form in a reasonable manner on or through a medium customarily
X    used for software exchange.
X
X    3.2. Modifications.
X
X    The Modifications that You create or to which You contribute are
X    governed by the terms of this License.  You represent that You
X    believe Your Modifications are Your original creation(s) and/or
X    You have sufficient rights to grant the rights conveyed by this
X    License.
X
X    3.3. Required Notices.
X
X    You must include a notice in each of Your Modifications that
X    identifies You as the Contributor of the Modification.  You may
X    not remove or alter any copyright, patent or trademark notices
X    contained within the Covered Software, or any notices of licensing
X    or any descriptive text giving attribution to any Contributor or
X    the Initial Developer.
X
X    3.4. Application of Additional Terms.
X
X    You may not offer or impose any terms on any Covered Software in
X    Source Code form that alters or restricts the applicable version
X    of this License or the recipients' rights hereunder.  You may
X    choose to offer, and to charge a fee for, warranty, support,
X    indemnity or liability obligations to one or more recipients of
X    Covered Software.  However, you may do so only on Your own behalf,
X    and not on behalf of the Initial Developer or any Contributor.
X    You must make it absolutely clear that any such warranty, support,
X    indemnity or liability obligation is offered by You alone, and You
X    hereby agree to indemnify the Initial Developer and every
X    Contributor for any liability incurred by the Initial Developer or
X    such Contributor as a result of warranty, support, indemnity or
X    liability terms You offer.
X
X    3.5. Distribution of Executable Versions.
X
X    You may distribute the Executable form of the Covered Software
X    under the terms of this License or under the terms of a license of
X    Your choice, which may contain terms different from this License,
X    provided that You are in compliance with the terms of this License
X    and that the license for the Executable form does not attempt to
X    limit or alter the recipient's rights in the Source Code form from
X    the rights set forth in this License.  If You distribute the
X    Covered Software in Executable form under a different license, You
X    must make it absolutely clear that any terms which differ from
X    this License are offered by You alone, not by the Initial
X    Developer or Contributor.  You hereby agree to indemnify the
X    Initial Developer and every Contributor for any liability incurred
X    by the Initial Developer or such Contributor as a result of any
X    such terms You offer.
X
X    3.6. Larger Works.
X
X    You may create a Larger Work by combining Covered Software with
X    other code not governed by the terms of this License and
X    distribute the Larger Work as a single product.  In such a case,
X    You must make sure the requirements of this License are fulfilled
X    for the Covered Software.
X
X4. Versions of the License.
X
X    4.1. New Versions.
X
X    Sun Microsystems, Inc. is the initial license steward and may
X    publish revised and/or new versions of this License from time to
X    time.  Each version will be given a distinguishing version number.
X    Except as provided in Section 4.3, no one other than the license
X    steward has the right to modify this License.
X
X    4.2. Effect of New Versions.
X
X    You may always continue to use, distribute or otherwise make the
X    Covered Software available under the terms of the version of the
X    License under which You originally received the Covered Software.
X    If the Initial Developer includes a notice in the Original
X    Software prohibiting it from being distributed or otherwise made
X    available under any subsequent version of the License, You must
X    distribute and make the Covered Software available under the terms
X    of the version of the License under which You originally received
X    the Covered Software.  Otherwise, You may also choose to use,
X    distribute or otherwise make the Covered Software available under
X    the terms of any subsequent version of the License published by
X    the license steward.
X
X    4.3. Modified Versions.
X
X    When You are an Initial Developer and You want to create a new
X    license for Your Original Software, You may create and use a
X    modified version of this License if You: (a) rename the license
X    and remove any references to the name of the license steward
X    (except to note that the license differs from this License); and
X    (b) otherwise make it clear that the license contains terms which
X    differ from this License.
X
X5. DISCLAIMER OF WARRANTY.
X
X    COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
X    BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
X    INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
X    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
X    PURPOSE OR NON-INFRINGING.  THE ENTIRE RISK AS TO THE QUALITY AND
X    PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU.  SHOULD ANY
X    COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
X    INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY
X    NECESSARY SERVICING, REPAIR OR CORRECTION.  THIS DISCLAIMER OF
X    WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.  NO USE OF
X    ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
X    DISCLAIMER.
X
X6. TERMINATION.
X
X    6.1. This License and the rights granted hereunder will terminate
X    automatically if You fail to comply with terms herein and fail to
X    cure such breach within 30 days of becoming aware of the breach.
X    Provisions which, by their nature, must remain in effect beyond
X    the termination of this License shall survive.
X
X    6.2. If You assert a patent infringement claim (excluding
X    declaratory judgment actions) against Initial Developer or a
X    Contributor (the Initial Developer or Contributor against whom You
X    assert such claim is referred to as "Participant") alleging that
X    the Participant Software (meaning the Contributor Version where
X    the Participant is a Contributor or the Original Software where
X    the Participant is the Initial Developer) directly or indirectly
X    infringes any patent, then any and all rights granted directly or
X    indirectly to You by such Participant, the Initial Developer (if
X    the Initial Developer is not the Participant) and all Contributors
X    under Sections 2.1 and/or 2.2 of this License shall, upon 60 days
X    notice from Participant terminate prospectively and automatically
X    at the expiration of such 60 day notice period, unless if within
X    such 60 day period You withdraw Your claim with respect to the
X    Participant Software against such Participant either unilaterally
X    or pursuant to a written agreement with Participant.
X
X    6.3. In the event of termination under Sections 6.1 or 6.2 above,
X    all end user licenses that have been validly granted by You or any
X    distributor hereunder prior to termination (excluding licenses
X    granted to You by any distributor) shall survive termination.
X
X7. LIMITATION OF LIABILITY.
X
X    UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
X    (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
X    INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
X    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
X    LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
X    CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
X    LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
X    STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
X    COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
X    INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.  THIS LIMITATION OF
X    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
X    INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT
X    APPLICABLE LAW PROHIBITS SUCH LIMITATION.  SOME JURISDICTIONS DO
X    NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
X    CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
X    APPLY TO YOU.
X
X8. U.S. GOVERNMENT END USERS.
X
X    The Covered Software is a "commercial item," as that term is
X    defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
X    computer software" (as that term is defined at 48
X    C.F.R. 252.227-7014(a)(1)) and "commercial computer software
X    documentation" as such terms are used in 48 C.F.R. 12.212
X    (Sept. 1995).  Consistent with 48 C.F.R. 12.212 and 48
X    C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all
X    U.S. Government End Users acquire Covered Software with only those
X    rights set forth herein.  This U.S. Government Rights clause is in
X    lieu of, and supersedes, any other FAR, DFAR, or other clause or
X    provision that addresses Government rights in computer software
X    under this License.
X
X9. MISCELLANEOUS.
X
X    This License represents the complete agreement concerning subject
X    matter hereof.  If any provision of this License is held to be
X    unenforceable, such provision shall be reformed only to the extent
X    necessary to make it enforceable.  This License shall be governed
X    by the law of the jurisdiction specified in a notice contained
X    within the Original Software (except to the extent applicable law,
X    if any, provides otherwise), excluding such jurisdiction's
X    conflict-of-law provisions.  Any litigation relating to this
X    License shall be subject to the jurisdiction of the courts located
X    in the jurisdiction and venue specified in a notice contained
X    within the Original Software, with the losing party responsible
X    for costs, including, without limitation, court costs and
X    reasonable attorneys' fees and expenses.  The application of the
X    United Nations Convention on Contracts for the International Sale
X    of Goods is expressly excluded.  Any law or regulation which
X    provides that the language of a contract shall be construed
X    against the drafter shall not apply to this License.  You agree
X    that You alone are responsible for compliance with the United
X    States export administration regulations (and the export control
X    laws and regulation of any other countries) when You use,
X    distribute or otherwise make available any Covered Software.
X
X10. RESPONSIBILITY FOR CLAIMS.
X
X    As between Initial Developer and the Contributors, each party is
X    responsible for claims and damages arising, directly or
X    indirectly, out of its utilization of rights under this License
X    and You agree to work with Initial Developer and Contributors to
X    distribute such responsibility on an equitable basis.  Nothing
X    herein is intended or shall be deemed to constitute any admission
X    of liability.
X
X--------------------------------------------------------------------
X
XNOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND
XDISTRIBUTION LICENSE (CDDL)
X
XFor Covered Software in this distribution, this License shall
Xbe governed by the laws of Germany (excluding conflict-of-law
Xprovisions).
X
XAny litigation relating to this License shall be subject to the
Xjurisdiction and the courts of Berlin Germany, with venue lying
Xin Berlin Germany.
END-of-smake-1.2.1/CDDL.Schily.txt
echo x - smake-1.2.1/GPL-2.0.txt
sed 's/^X//' >smake-1.2.1/GPL-2.0.txt << 'END-of-smake-1.2.1/GPL-2.0.txt'
X		    GNU GENERAL PUBLIC LICENSE
X		       Version 2, June 1991
X
X Copyright (C) 1991, 1999 Free Software Foundation, Inc.
X 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
X Everyone is permitted to copy and distribute verbatim copies
X of this license document, but changing it is not allowed.
X
X			    Preamble
X
X  The licenses for most software are designed to take away your
Xfreedom to share and change it.  By contrast, the GNU General Public
XLicense is intended to guarantee your freedom to share and change free
Xsoftware--to make sure the software is free for all its users.  This
XGeneral Public License applies to most of the Free Software
XFoundation's software and to any other program whose authors commit to
Xusing it.  (Some other Free Software Foundation software is covered by
Xthe GNU Library General Public License instead.)  You can apply it to
Xyour programs, too.
X
X  When we speak of free software, we are referring to freedom, not
Xprice.  Our General Public Licenses are designed to make sure that you
Xhave the freedom to distribute copies of free software (and charge for
Xthis service if you wish), that you receive source code or can get it
Xif you want it, that you can change the software or use pieces of it
Xin new free programs; and that you know you can do these things.
X
X  To protect your rights, we need to make restrictions that forbid
Xanyone to deny you these rights or to ask you to surrender the rights.
XThese restrictions translate to certain responsibilities for you if you
Xdistribute copies of the software, or if you modify it.
X
X  For example, if you distribute copies of such a program, whether
Xgratis or for a fee, you must give the recipients all the rights that
Xyou have.  You must make sure that they, too, receive or can get the
Xsource code.  And you must show them these terms so they know their
Xrights.
X
X  We protect your rights with two steps: (1) copyright the software, and
X(2) offer you this license which gives you legal permission to copy,
Xdistribute and/or modify the software.
X
X  Also, for each author's protection and ours, we want to make certain
Xthat everyone understands that there is no warranty for this free
Xsoftware.  If the software is modified by someone else and passed on, we
Xwant its recipients to know that what they have is not the original, so
Xthat any problems introduced by others will not reflect on the original
Xauthors' reputations.
X
X  Finally, any free program is threatened constantly by software
Xpatents.  We wish to avoid the danger that redistributors of a free
Xprogram will individually obtain patent licenses, in effect making the
Xprogram proprietary.  To prevent this, we have made it clear that any
Xpatent must be licensed for everyone's free use or not licensed at all.
X
X  The precise terms and conditions for copying, distribution and
Xmodification follow.
X
X		    GNU GENERAL PUBLIC LICENSE
X   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
X
X  0. This License applies to any program or other work which contains
Xa notice placed by the copyright holder saying it may be distributed
Xunder the terms of this General Public License.  The "Program", below,
Xrefers to any such program or work, and a "work based on the Program"
Xmeans either the Program or any derivative work under copyright law:
Xthat is to say, a work containing the Program or a portion of it,
Xeither verbatim or with modifications and/or translated into another
Xlanguage.  (Hereinafter, translation is included without limitation in
Xthe term "modification".)  Each licensee is addressed as "you".
X
XActivities other than copying, distribution and modification are not
Xcovered by this License; they are outside its scope.  The act of
Xrunning the Program is not restricted, and the output from the Program
Xis covered only if its contents constitute a work based on the
XProgram (independent of having been made by running the Program).
XWhether that is true depends on what the Program does.
X
X  1. You may copy and distribute verbatim copies of the Program's
Xsource code as you receive it, in any medium, provided that you
Xconspicuously and appropriately publish on each copy an appropriate
Xcopyright notice and disclaimer of warranty; keep intact all the
Xnotices that refer to this License and to the absence of any warranty;
Xand give any other recipients of the Program a copy of this License
Xalong with the Program.
X
XYou may charge a fee for the physical act of transferring a copy, and
Xyou may at your option offer warranty protection in exchange for a fee.
X
X  2. You may modify your copy or copies of the Program or any portion
Xof it, thus forming a work based on the Program, and copy and
Xdistribute such modifications or work under the terms of Section 1
Xabove, provided that you also meet all of these conditions:
X
X    a) You must cause the modified files to carry prominent notices
X    stating that you changed the files and the date of any change.
X
X    b) You must cause any work that you distribute or publish, that in
X    whole or in part contains or is derived from the Program or any
X    part thereof, to be licensed as a whole at no charge to all third
X    parties under the terms of this License.
X
X    c) If the modified program normally reads commands interactively
X    when run, you must cause it, when started running for such
X    interactive use in the most ordinary way, to print or display an
X    announcement including an appropriate copyright notice and a
X    notice that there is no warranty (or else, saying that you provide
X    a warranty) and that users may redistribute the program under
X    these conditions, and telling the user how to view a copy of this
X    License.  (Exception: if the Program itself is interactive but
X    does not normally print such an announcement, your work based on
X    the Program is not required to print an announcement.)
X
XThese requirements apply to the modified work as a whole.  If
Xidentifiable sections of that work are not derived from the Program,
Xand can be reasonably considered independent and separate works in
Xthemselves, then this License, and its terms, do not apply to those
Xsections when you distribute them as separate works.  But when you
Xdistribute the same sections as part of a whole which is a work based
Xon the Program, the distribution of the whole must be on the terms of
Xthis License, whose permissions for other licensees extend to the
Xentire whole, and thus to each and every part regardless of who wrote it.
X
XThus, it is not the intent of this section to claim rights or contest
Xyour rights to work written entirely by you; rather, the intent is to
Xexercise the right to control the distribution of derivative or
Xcollective works based on the Program.
X
XIn addition, mere aggregation of another work not based on the Program
Xwith the Program (or with a work based on the Program) on a volume of
Xa storage or distribution medium does not bring the other work under
Xthe scope of this License.
X
X  3. You may copy and distribute the Program (or a work based on it,
Xunder Section 2) in object code or executable form under the terms of
XSections 1 and 2 above provided that you also do one of the following:
X
X    a) Accompany it with the complete corresponding machine-readable
X    source code, which must be distributed under the terms of Sections
X    1 and 2 above on a medium customarily used for software interchange; or,
X
X    b) Accompany it with a written offer, valid for at least three
X    years, to give any third party, for a charge no more than your
X    cost of physically performing source distribution, a complete
X    machine-readable copy of the corresponding source code, to be
X    distributed under the terms of Sections 1 and 2 above on a medium
X    customarily used for software interchange; or,
X
X    c) Accompany it with the information you received as to the offer
X    to distribute corresponding source code.  (This alternative is
X    allowed only for noncommercial distribution and only if you
X    received the program in object code or executable form with such
X    an offer, in accord with Subsection b above.)
X
XThe source code for a work means the preferred form of the work for
Xmaking modifications to it.  For an executable work, complete source
Xcode means all the source code for all modules it contains, plus any
Xassociated interface definition files, plus the scripts used to
Xcontrol compilation and installation of the executable.  However, as a
Xspecial exception, the source code distributed need not include
Xanything that is normally distributed (in either source or binary
Xform) with the major components (compiler, kernel, and so on) of the
Xoperating system on which the executable runs, unless that component
Xitself accompanies the executable.
X
XIf distribution of executable or object code is made by offering
Xaccess to copy from a designated place, then offering equivalent
Xaccess to copy the source code from the same place counts as
Xdistribution of the source code, even though third parties are not
Xcompelled to copy the source along with the object code.
X
X  4. You may not copy, modify, sublicense, or distribute the Program
Xexcept as expressly provided under this License.  Any attempt
Xotherwise to copy, modify, sublicense or distribute the Program is
Xvoid, and will automatically terminate your rights under this License.
XHowever, parties who have received copies, or rights, from you under
Xthis License will not have their licenses terminated so long as such
Xparties remain in full compliance.
X
X  5. You are not required to accept this License, since you have not
Xsigned it.  However, nothing else grants you permission to modify or
Xdistribute the Program or its derivative works.  These actions are
Xprohibited by law if you do not accept this License.  Therefore, by
Xmodifying or distributing the Program (or any work based on the
XProgram), you indicate your acceptance of this License to do so, and
Xall its terms and conditions for copying, distributing or modifying
Xthe Program or works based on it.
X
X  6. Each time you redistribute the Program (or any work based on the
XProgram), the recipient automatically receives a license from the
Xoriginal licensor to copy, distribute or modify the Program subject to
Xthese terms and conditions.  You may not impose any further
Xrestrictions on the recipients' exercise of the rights granted herein.
XYou are not responsible for enforcing compliance by third parties to
Xthis License.
X
X  7. If, as a consequence of a court judgment or allegation of patent
Xinfringement or for any other reason (not limited to patent issues),
Xconditions are imposed on you (whether by court order, agreement or
Xotherwise) that contradict the conditions of this License, they do not
Xexcuse you from the conditions of this License.  If you cannot
Xdistribute so as to satisfy simultaneously your obligations under this
XLicense and any other pertinent obligations, then as a consequence you
Xmay not distribute the Program at all.  For example, if a patent
Xlicense would not permit royalty-free redistribution of the Program by
Xall those who receive copies directly or indirectly through you, then
Xthe only way you could satisfy both it and this License would be to
Xrefrain entirely from distribution of the Program.
X
XIf any portion of this section is held invalid or unenforceable under
Xany particular circumstance, the balance of the section is intended to
Xapply and the section as a whole is intended to apply in other
Xcircumstances.
X
XIt is not the purpose of this section to induce you to infringe any
Xpatents or other property right claims or to contest validity of any
Xsuch claims; this section has the sole purpose of protecting the
Xintegrity of the free software distribution system, which is
Ximplemented by public license practices.  Many people have made
Xgenerous contributions to the wide range of software distributed
Xthrough that system in reliance on consistent application of that
Xsystem; it is up to the author/donor to decide if he or she is willing
Xto distribute software through any other system and a licensee cannot
Ximpose that choice.
X
XThis section is intended to make thoroughly clear what is believed to
Xbe a consequence of the rest of this License.
X
X  8. If the distribution and/or use of the Program is restricted in
Xcertain countries either by patents or by copyrighted interfaces, the
Xoriginal copyright holder who places the Program under this License
Xmay add an explicit geographical distribution limitation excluding
Xthose countries, so that distribution is permitted only in or among
Xcountries not thus excluded.  In such case, this License incorporates
Xthe limitation as if written in the body of this License.
X
X  9. The Free Software Foundation may publish revised and/or new versions
Xof the General Public License from time to time.  Such new versions will
Xbe similar in spirit to the present version, but may differ in detail to
Xaddress new problems or concerns.
X
XEach version is given a distinguishing version number.  If the Program
Xspecifies a version number of this License which applies to it and "any
Xlater version", you have the option of following the terms and conditions
Xeither of that version or of any later version published by the Free
XSoftware Foundation.  If the Program does not specify a version number of
Xthis License, you may choose any version ever published by the Free Software
XFoundation.
X
X  10. If you wish to incorporate parts of the Program into other free
Xprograms whose distribution conditions are different, write to the author
Xto ask for permission.  For software which is copyrighted by the Free
XSoftware Foundation, write to the Free Software Foundation; we sometimes
Xmake exceptions for this.  Our decision will be guided by the two goals
Xof preserving the free status of all derivatives of our free software and
Xof promoting the sharing and reuse of software generally.
X
X			    NO WARRANTY
X
X  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
XFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
XOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
XPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
XOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
XMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
XTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
XREPAIR OR CORRECTION.
X
X  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
XWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
XREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
XINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
XOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
XTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
XYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
XPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
XPOSSIBILITY OF SUCH DAMAGES.
X
X		     END OF TERMS AND CONDITIONS
X
X	    How to Apply These Terms to Your New Programs
X
X  If you develop a new program, and you want it to be of the greatest
Xpossible use to the public, the best way to achieve this is to make it
Xfree software which everyone can redistribute and change under these terms.
X
X  To do so, attach the following notices to the program.  It is safest
Xto attach them to the start of each source file to most effectively
Xconvey the exclusion of warranty; and each file should have at least
Xthe "copyright" line and a pointer to where the full notice is found.
X
X    <one line to give the program's name and a brief idea of what it does.>
X    Copyright (C) <year>  <name of author>
X
X    This program is free software; you can redistribute it and/or modify
X    it under the terms of the GNU General Public License version 2
X    as published by the Free Software Foundation.
X
X    This program is distributed in the hope that it will be useful,
X    but WITHOUT ANY WARRANTY; without even the implied warranty of
X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
X    GNU General Public License for more details.
X
X    You should have received a copy of the GNU General Public License
X    along with this program; if not, write to the Free Software
X    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
X
X
XAlso add information on how to contact you by electronic and paper mail.
X
XIf the program is interactive, make it output a short notice like this
Xwhen it starts in an interactive mode:
X
X    Gnomovision version 69, Copyright (C) year  name of author
X    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
X    This is free software, and you are welcome to redistribute it
X    under certain conditions; type `show c' for details.
X
XThe hypothetical commands `show w' and `show c' should show the appropriate
Xparts of the General Public License.  Of course, the commands you use may
Xbe called something other than `show w' and `show c'; they could even be
Xmouse-clicks or menu items--whatever suits your program.
X
XYou should also get your employer (if you work as a programmer) or your
Xschool, if any, to sign a "copyright disclaimer" for the program, if
Xnecessary.  Here is a sample; alter the names:
X
X  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
X  `Gnomovision' (which makes passes at compilers) written by James Hacker.
X
X  <signature of Ty Coon>, 1 April 1989
X  Ty Coon, President of Vice
X
XThis General Public License does not permit incorporating your program into
Xproprietary programs.  If your program is a subroutine library, you may
Xconsider it more useful to permit linking proprietary applications with the
Xlibrary.  If this is what you want to do, use the GNU Library General
XPublic License instead of this License.
END-of-smake-1.2.1/GPL-2.0.txt
echo x - smake-1.2.1/CONTRIBUTING
sed 's/^X//' >smake-1.2.1/CONTRIBUTING << 'END-of-smake-1.2.1/CONTRIBUTING'
X# @(#)CONTRIBUTING	1.3 06/05/30 Copyright 2006 J. Schilling
X
XIf you like to send patches or code to add to the project, you are welcome.
X
XBefore you send code or patches, please make sure that the following
Xrequirements apply to your code:
X
X§1	Your code does not duplicate existing functionality
X
X§2	Integrating your code does not take more time than it would
X	take to write it from scratch
X
X§3	Your code is cleanly written, is byteorder independent and
X	does compile on all supported platforms
X
X§4	Your code does not cause this project to break or otherwise
X	fail on one of the supported platforms
X
X§5	Your code does not rely on a specific compiler
X
X§6	Your code is cleanly indented (matches the coding style 
X	from "Cstyle"). See files:
X
X		ftp://ftp.berlios.de/pub/cdrecord/Cstyle
X	and
X		ftp://ftp.berlios.de/pub/cdrecord/cstyle
X
X§7	You allow me to publish the code under any OSI approved
X	license (see http://www.opensource.org/). If you like to
X	see your code under a specific license and this license
X	grants less freedom than the CDDL, there is little chance
X	to integrate your code.
X
X§8	Include not only the code patches but also include the related
X	extensions to the man pages.
X
X§9	If you like to make a bigger contribution, provide white papers
X	and other documentation that allows to understand your patch
X	within a reasonable amount of time.
X
XPleae note for §7: Licenses may not last forever and it may sometimes
Xbe apropriate to change the license. In case that contributors did
Xinsist in a specific license when contributing and are no longer
Xreachable via mail, this undertaking may be impossible and kill the 
Xfuture of the project. So please help with your contributing to ensure
Xthe future of this project.
X
END-of-smake-1.2.1/CONTRIBUTING
echo c - smake-1.2.1/autoconf
mkdir -p smake-1.2.1/autoconf > /dev/null 2>&1
echo x - smake-1.2.1/autoconf/acgeneral.m4
sed 's/^X//' >smake-1.2.1/autoconf/acgeneral.m4 << 'END-of-smake-1.2.1/autoconf/acgeneral.m4'
Xdnl @(#)acgeneral.m4	1.11 09/11/05 Copyright 1998-2009 J. Schilling
Xdnl
Xdnl Parameterized macros.
Xdnl Requires GNU m4.
Xdnl This file is part of Autoconf.
Xdnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc.
Xdnl
Xdnl This program is free software; you can redistribute it and/or modify
Xdnl it under the terms of the GNU General Public License as published by
Xdnl the Free Software Foundation; either version 2, or (at your option)
Xdnl any later version.
Xdnl
Xdnl This program is distributed in the hope that it will be useful,
Xdnl but WITHOUT ANY WARRANTY; without even the implied warranty of
Xdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Xdnl GNU General Public License for more details.
Xdnl
Xdnl You should have received a copy of the GNU General Public License
Xdnl along with this program; if not, write to the Free Software
Xdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Xdnl 02111-1307, USA.
Xdnl
Xdnl As a special exception, the Free Software Foundation gives unlimited
Xdnl permission to copy, distribute and modify the configure scripts that
Xdnl are the output of Autoconf.  You need not follow the terms of the GNU
Xdnl General Public License when using or distributing such scripts, even
Xdnl though portions of the text of Autoconf appear in them.  The GNU
Xdnl General Public License (GPL) does govern all other use of the material
Xdnl that constitutes the Autoconf program.
Xdnl
Xdnl Certain portions of the Autoconf source text are designed to be copied
Xdnl (in certain cases, depending on the input) into the output of
Xdnl Autoconf.  We call these the "data" portions.  The rest of the Autoconf
Xdnl source text consists of comments plus executable code that decides which
Xdnl of the data portions to output in any given case.  We call these
Xdnl comments and executable code the "non-data" portions.  Autoconf never
Xdnl copies any of the non-data portions into its output.
Xdnl
Xdnl This special exception to the GPL applies to versions of Autoconf
Xdnl released by the Free Software Foundation.  When you make and
Xdnl distribute a modified version of Autoconf, you may extend this special
Xdnl exception to the GPL to apply to your modified version as well, *unless*
Xdnl your modified version has the potential to copy into its output some
Xdnl of the text that was the non-data portion of the version that you started
Xdnl with.  (In other words, unless your change moves or copies text from
Xdnl the non-data portions to the data portions.)  If your modification has
Xdnl such potential, you must delete any notice of this special exception
Xdnl to the GPL from your modified version.
Xdnl
Xdnl Written by David MacKenzie, with help from
Xdnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
Xdnl Roland McGrath, Noah Friedman, david d zuhn, and many others.
Xdnl
Xdivert(-1)dnl Throw away output until AC_INIT is called.
Xchangequote([, ])
X
Xdefine(AC_ACVERSION, 2.13)
X
Xdnl Some old m4's don't support m4exit.  But they provide
Xdnl equivalent functionality by core dumping because of the
Xdnl long macros we define.
Xifdef([__gnu__], , [errprint(Autoconf requires GNU m4.
XInstall it before installing Autoconf or set the
XM4 environment variable to its path name.
X)m4exit(2)])
X
Xundefine([eval])
Xundefine([include])
Xundefine([shift])
Xundefine([format])
X
X
Xdnl ### Defining macros
X
X
Xdnl m4 output diversions.  We let m4 output them all in order at the end,
Xdnl except that we explicitly undivert AC_DIVERSION_SED, AC_DIVERSION_CMDS,
Xdnl and AC_DIVERSION_ICMDS.
X
Xdnl AC_DIVERSION_NOTICE - 1 (= 0)	AC_REQUIRE'd #! /bin/sh line
Xdefine(AC_DIVERSION_NOTICE, 1)dnl	copyright notice & option help strings
Xdefine(AC_DIVERSION_INIT, 2)dnl		initialization code
Xdefine(AC_DIVERSION_NORMAL_4, 3)dnl	AC_REQUIRE'd code, 4 level deep
Xdefine(AC_DIVERSION_NORMAL_3, 4)dnl	AC_REQUIRE'd code, 3 level deep
Xdefine(AC_DIVERSION_NORMAL_2, 5)dnl	AC_REQUIRE'd code, 2 level deep
Xdefine(AC_DIVERSION_NORMAL_1, 6)dnl	AC_REQUIRE'd code, 1 level deep
Xdefine(AC_DIVERSION_NORMAL, 7)dnl	the tests and output code
Xdefine(AC_DIVERSION_SED, 8)dnl		variable substitutions in config.status
Xdefine(AC_DIVERSION_CMDS, 9)dnl		extra shell commands in config.status
Xdefine(AC_DIVERSION_ICMDS, 10)dnl	extra initialization in config.status
X
Xdnl Change the diversion stream to STREAM, while stacking old values.
Xdnl AC_DIVERT_PUSH(STREAM)
Xdefine(AC_DIVERT_PUSH,
X[pushdef([AC_DIVERSION_CURRENT], $1)dnl
Xdivert(AC_DIVERSION_CURRENT)dnl
X])
X
Xdnl Change the diversion stream to its previous value, unstacking it.
Xdnl AC_DIVERT_POP()
Xdefine(AC_DIVERT_POP,
X[popdef([AC_DIVERSION_CURRENT])dnl
Xdivert(AC_DIVERSION_CURRENT)dnl
X])
X
Xdnl Initialize the diversion setup.
Xdefine([AC_DIVERSION_CURRENT], AC_DIVERSION_NORMAL)
Xdnl This will be popped by AC_REQUIRE in AC_INIT.
Xpushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_NOTICE)
X
Xdnl The prologue for Autoconf macros.
Xdnl AC_PRO(MACRO-NAME)
Xdefine(AC_PRO,
X[define([AC_PROVIDE_$1], )dnl
Xifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
X[AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))],
X[pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_CURRENT)])dnl
X])
X
Xdnl The Epilogue for Autoconf macros.
Xdnl AC_EPI()
Xdefine(AC_EPI,
X[AC_DIVERT_POP()dnl
Xifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
X[undivert(AC_DIVERSION_NORMAL_4)dnl
Xundivert(AC_DIVERSION_NORMAL_3)dnl
Xundivert(AC_DIVERSION_NORMAL_2)dnl
Xundivert(AC_DIVERSION_NORMAL_1)dnl
X])dnl
X])
X
Xdnl Define a macro which automatically provides itself.  Add machinery
Xdnl so the macro automatically switches expansion to the diversion
Xdnl stack if it is not already using it.  In this case, once finished,
Xdnl it will bring back all the code accumulated in the diversion stack.
Xdnl This, combined with AC_REQUIRE, achieves the topological ordering of
Xdnl macros.  We don't use this macro to define some frequently called
Xdnl macros that are not involved in ordering constraints, to save m4
Xdnl processing.
Xdnl AC_DEFUN(NAME, EXPANSION)
Xdefine([AC_DEFUN],
X[define($1, [AC_PRO([$1])$2[]AC_EPI()])])
X
X
Xdnl ### Initialization
X
X
Xdnl AC_INIT_NOTICE()
XAC_DEFUN(AC_INIT_NOTICE,
X[# Guess values for system-dependent variables and create Makefiles.
X# Generated automatically using autoconf version] AC_ACVERSION [
X# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
X#
X# This configure script is free software; the Free Software Foundation
X# gives unlimited permission to copy, distribute and modify it.
X
X# Defaults:
Xac_help=
Xac_default_prefix=/usr/local
X[#] Any additions from configure.in:])
X
Xdnl AC_PREFIX_DEFAULT(PREFIX)
XAC_DEFUN(AC_PREFIX_DEFAULT,
X[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
Xac_default_prefix=$1
XAC_DIVERT_POP()])
X
Xdnl AC_INIT_PARSE_ARGS()
XAC_DEFUN(AC_INIT_PARSE_ARGS,
X[
X# Initialize some variables set by options.
X# The variables have the same names as the options, with
X# dashes changed to underlines.
Xbuild=NONE
Xcache_file=./config.cache
Xexec_prefix=NONE
Xhost=NONE
Xno_create=
Xnonopt=NONE
Xno_recursion=
Xprefix=NONE
Xprogram_prefix=NONE
Xprogram_suffix=NONE
Xprogram_transform_name=s,x,x,
Xsilent=
Xsite=
Xsrcdir=
Xtarget=NONE
Xverbose=
Xx_includes=NONE
Xx_libraries=NONE
Xdnl Installation directory options.
Xdnl These are left unexpanded so users can "make install exec_prefix=/foo"
Xdnl and all the variables that are supposed to be based on exec_prefix
Xdnl by default will actually change.
Xdnl Use braces instead of parens because sh, perl, etc. also accept them.
Xbindir='${exec_prefix}/bin'
Xsbindir='${exec_prefix}/sbin'
Xlibexecdir='${exec_prefix}/libexec'
Xdatadir='${prefix}/share'
Xsysconfdir='${prefix}/etc'
Xsharedstatedir='${prefix}/com'
Xlocalstatedir='${prefix}/var'
Xlibdir='${exec_prefix}/lib'
Xincludedir='${prefix}/include'
Xoldincludedir='/usr/include'
Xinfodir='${prefix}/info'
Xmandir='${prefix}/man'
X
X# Initialize some other variables.
Xsubdirs=
XMFLAGS= MAKEFLAGS=
XSHELL=${CONFIG_SHELL-/bin/sh}
X# Maximum number of lines to put in a shell here document.
Xac_max_here_lines=12
X
Xac_prev=
Xfor ac_option
Xdo
X
X  # If the previous option needs an argument, assign it.
X  if test -n "$ac_prev"; then
X    eval "$ac_prev=\$ac_option"
X    ac_prev=
X    continue
X  fi
X
X  case "$ac_option" in
Xchangequote(, )dnl
X  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
Xchangequote([, ])dnl
X  *) ac_optarg= ;;
X  esac
X
X  # Accept the important Cygnus configure options, so we can diagnose typos.
X
X  case "$ac_option" in
X
X  -bindir | --bindir | --bindi | --bind | --bin | --bi)
X    ac_prev=bindir ;;
X  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
X    bindir="$ac_optarg" ;;
X
X  -build | --build | --buil | --bui | --bu)
X    ac_prev=build ;;
X  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
X    build="$ac_optarg" ;;
X
X  -cache-file | --cache-file | --cache-fil | --cache-fi \
X  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
X    ac_prev=cache_file ;;
X  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
X  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
X    cache_file="$ac_optarg" ;;
X
X  -cc=* | --cc=* )
X    CC="$ac_optarg" ; echo using $CC as compiler ;;
X
X  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
X    ac_prev=datadir ;;
X  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
X  | --da=*)
X    datadir="$ac_optarg" ;;
X
X  -disable-* | --disable-*)
X    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
X    # Reject names that are not valid shell variable names.
Xchangequote(, )dnl
X    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Xchangequote([, ])dnl
X      AC_MSG_ERROR($ac_feature: invalid feature name)
X    fi
X    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
X    eval "enable_${ac_feature}=no" ;;
X
X  -enable-* | --enable-*)
X    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
X    # Reject names that are not valid shell variable names.
Xchangequote(, )dnl
X    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Xchangequote([, ])dnl
X      AC_MSG_ERROR($ac_feature: invalid feature name)
X    fi
X    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
X    case "$ac_option" in
X      *=*) ;;
X      *) ac_optarg=yes ;;
X    esac
X    eval "enable_${ac_feature}='$ac_optarg'" ;;
X
X  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
X  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
X  | --exec | --exe | --ex)
X    ac_prev=exec_prefix ;;
X  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
X  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
X  | --exec=* | --exe=* | --ex=*)
X    exec_prefix="$ac_optarg" ;;
X
X  -gas | --gas | --ga | --g)
X    # Obsolete; use --with-gas.
X    with_gas=yes ;;
X
X  -help | --help | --hel | --he)
X    # Omit some internal or obsolete options to make the list less imposing.
X    # This message is too long to be a string in the A/UX 3.1 sh.
X    cat << EOF
Xchangequote(, )dnl
XUsage: configure [options] [host]
XOptions: [defaults in brackets after descriptions]
XConfiguration:
X  --cache-file=FILE       cache test results in FILE
X  --help                  print this message
X  --no-create             do not create output files
X  --quiet, --silent       do not print \`checking...' messages
X  --version               print the version of autoconf that created configure
XDirectory and file names:
X  --prefix=PREFIX         install architecture-independent files in PREFIX
X                          [$ac_default_prefix]
X  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
X                          [same as prefix]
X  --bindir=DIR            user executables in DIR [EPREFIX/bin]
X  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
X  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
X  --datadir=DIR           read-only architecture-independent data in DIR
X                          [PREFIX/share]
X  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
X  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
X                          [PREFIX/com]
X  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
X  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
X  --includedir=DIR        C header files in DIR [PREFIX/include]
X  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
X  --infodir=DIR           info documentation in DIR [PREFIX/info]
X  --mandir=DIR            man documentation in DIR [PREFIX/man]
X  --srcdir=DIR            find the sources in DIR [configure dir or ..]
X  --program-prefix=PREFIX prepend PREFIX to installed program names
X  --program-suffix=SUFFIX append SUFFIX to installed program names
X  --program-transform-name=PROGRAM
X                          run sed PROGRAM on installed program names
XEOF
X    cat << EOF
XHost type:
X  --build=BUILD           configure for building on BUILD [BUILD=HOST]
X  --host=HOST             configure for HOST [guessed]
X  --target=TARGET         configure for TARGET [TARGET=HOST]
XFeatures and packages:
X  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
X  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
X  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
X  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
X  --x-includes=DIR        X include files are in DIR
X  --x-libraries=DIR       X library files are in DIR
Xchangequote([, ])dnl
XEOF
X    if test -n "$ac_help"; then
X      echo "--enable and --with options recognized:$ac_help"
X    fi
X    exit 0 ;;
X
X  -host | --host | --hos | --ho)
X    ac_prev=host ;;
X  -host=* | --host=* | --hos=* | --ho=*)
X    host="$ac_optarg" ;;
X
X  -includedir | --includedir | --includedi | --included | --include \
X  | --includ | --inclu | --incl | --inc)
X    ac_prev=includedir ;;
X  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
X  | --includ=* | --inclu=* | --incl=* | --inc=*)
X    includedir="$ac_optarg" ;;
X
X  -infodir | --infodir | --infodi | --infod | --info | --inf)
X    ac_prev=infodir ;;
X  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
X    infodir="$ac_optarg" ;;
X
X  -libdir | --libdir | --libdi | --libd)
X    ac_prev=libdir ;;
X  -libdir=* | --libdir=* | --libdi=* | --libd=*)
X    libdir="$ac_optarg" ;;
X
X  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
X  | --libexe | --libex | --libe)
X    ac_prev=libexecdir ;;
X  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
X  | --libexe=* | --libex=* | --libe=*)
X    libexecdir="$ac_optarg" ;;
X
X  -localstatedir | --localstatedir | --localstatedi | --localstated \
X  | --localstate | --localstat | --localsta | --localst \
X  | --locals | --local | --loca | --loc | --lo)
X    ac_prev=localstatedir ;;
X  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
X  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
X  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
X    localstatedir="$ac_optarg" ;;
X
X  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
X    ac_prev=mandir ;;
X  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
X    mandir="$ac_optarg" ;;
X
X  -nfp | --nfp | --nf)
X    # Obsolete; use --without-fp.
X    with_fp=no ;;
X
X  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
X  | --no-cr | --no-c)
X    no_create=yes ;;
X
X  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
X  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
X    no_recursion=yes ;;
X
X  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
X  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
X  | --oldin | --oldi | --old | --ol | --o)
X    ac_prev=oldincludedir ;;
X  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
X  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
X  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
X    oldincludedir="$ac_optarg" ;;
X
X  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
X    ac_prev=prefix ;;
X  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
X    prefix="$ac_optarg" ;;
X
X  -program-prefix | --program-prefix | --program-prefi | --program-pref \
X  | --program-pre | --program-pr | --program-p)
X    ac_prev=program_prefix ;;
X  -program-prefix=* | --program-prefix=* | --program-prefi=* \
X  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
X    program_prefix="$ac_optarg" ;;
X
X  -program-suffix | --program-suffix | --program-suffi | --program-suff \
X  | --program-suf | --program-su | --program-s)
X    ac_prev=program_suffix ;;
X  -program-suffix=* | --program-suffix=* | --program-suffi=* \
X  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
X    program_suffix="$ac_optarg" ;;
X
X  -program-transform-name | --program-transform-name \
X  | --program-transform-nam | --program-transform-na \
X  | --program-transform-n | --program-transform- \
X  | --program-transform | --program-transfor \
X  | --program-transfo | --program-transf \
X  | --program-trans | --program-tran \
X  | --progr-tra | --program-tr | --program-t)
X    ac_prev=program_transform_name ;;
X  -program-transform-name=* | --program-transform-name=* \
X  | --program-transform-nam=* | --program-transform-na=* \
X  | --program-transform-n=* | --program-transform-=* \
X  | --program-transform=* | --program-transfor=* \
X  | --program-transfo=* | --program-transf=* \
X  | --program-trans=* | --program-tran=* \
X  | --progr-tra=* | --program-tr=* | --program-t=*)
X    program_transform_name="$ac_optarg" ;;
X
X  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
X  | -silent | --silent | --silen | --sile | --sil)
X    silent=yes ;;
X
X  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
X    ac_prev=sbindir ;;
X  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
X  | --sbi=* | --sb=*)
X    sbindir="$ac_optarg" ;;
X
X  -sharedstatedir | --sharedstatedir | --sharedstatedi \
X  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
X  | --sharedst | --shareds | --shared | --share | --shar \
X  | --sha | --sh)
X    ac_prev=sharedstatedir ;;
X  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
X  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
X  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
X  | --sha=* | --sh=*)
X    sharedstatedir="$ac_optarg" ;;
X
X  -site | --site | --sit)
X    ac_prev=site ;;
X  -site=* | --site=* | --sit=*)
X    site="$ac_optarg" ;;
X
X  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
X    ac_prev=srcdir ;;
X  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
X    srcdir="$ac_optarg" ;;
X
X  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
X  | --syscon | --sysco | --sysc | --sys | --sy)
X    ac_prev=sysconfdir ;;
X  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
X  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
X    sysconfdir="$ac_optarg" ;;
X
X  -target | --target | --targe | --targ | --tar | --ta | --t)
X    ac_prev=target ;;
X  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
X    target="$ac_optarg" ;;
X
X  -v | -verbose | --verbose | --verbos | --verbo | --verb)
X    verbose=yes ;;
X
X  -version | --version | --versio | --versi | --vers)
X    echo "configure generated by autoconf version AC_ACVERSION"
X    exit 0 ;;
X
X  -with-* | --with-*)
X    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
X    # Reject names that are not valid shell variable names.
Xchangequote(, )dnl
X    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Xchangequote([, ])dnl
X      AC_MSG_ERROR($ac_package: invalid package name)
X    fi
X    ac_package=`echo $ac_package| sed 's/-/_/g'`
X    case "$ac_option" in
X      *=*) ;;
X      *) ac_optarg=yes ;;
X    esac
X    eval "with_${ac_package}='$ac_optarg'" ;;
X
X  -without-* | --without-*)
X    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
X    # Reject names that are not valid shell variable names.
Xchangequote(, )dnl
X    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Xchangequote([, ])dnl
X      AC_MSG_ERROR($ac_package: invalid package name)
X    fi
X    ac_package=`echo $ac_package| sed 's/-/_/g'`
X    eval "with_${ac_package}=no" ;;
X
X  --x)
X    # Obsolete; use --with-x.
X    with_x=yes ;;
X
X  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
X  | --x-incl | --x-inc | --x-in | --x-i)
X    ac_prev=x_includes ;;
X  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
X  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
X    x_includes="$ac_optarg" ;;
X
X  -x-libraries | --x-libraries | --x-librarie | --x-librari \
X  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
X    ac_prev=x_libraries ;;
X  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
X  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
X    x_libraries="$ac_optarg" ;;
X
X  -*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage])
X    ;;
X
X  *)
Xchangequote(, )dnl
X    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Xchangequote([, ])dnl
X      AC_MSG_WARN($ac_option: invalid host type)
X    fi
X    if test "x$nonopt" != xNONE; then
X      AC_MSG_ERROR(can only configure for one host and one target at a time)
X    fi
X    nonopt="$ac_option"
X    ;;
X
X  esac
Xdone
X
Xif test -n "$ac_prev"; then
X  AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`)
Xfi
X])
X
Xdnl Try to have only one #! line, so the script doesn't look funny
Xdnl for users of AC_REVISION.
Xdnl AC_INIT_BINSH()
XAC_DEFUN(AC_INIT_BINSH,
X[#! /bin/sh
X])
X
Xdnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR)
XAC_DEFUN(AC_INIT,
X[sinclude(acsite.m4)dnl
Xsinclude(./aclocal.m4)dnl
XAC_REQUIRE([AC_INIT_BINSH])dnl
XAC_INIT_NOTICE
XAC_DIVERT_POP()dnl to NORMAL
XAC_DIVERT_PUSH(AC_DIVERSION_INIT)dnl
XAC_INIT_PARSE_ARGS
XAC_INIT_PREPARE($1)dnl
XAC_DIVERT_POP()dnl to NORMAL
X])
X
Xdnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR)
XAC_DEFUN(AC_INIT_PREPARE,
X[trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
X
X# File descriptor usage:
X# 0 standard input
X# 1 file creation
X# 2 errors and warnings
X# 3 some systems may open it to /dev/tty
X# 4 used on the Kubota Titan
Xdefine(AC_FD_MSG, 6)dnl
X[#] AC_FD_MSG checking for... messages and results
Xdefine(AC_FD_CC, 5)dnl
X[#] AC_FD_CC compiler messages saved in config.log
Xif test "$silent" = yes; then
X  exec AC_FD_MSG>/dev/null
Xelse
X  exec AC_FD_MSG>&1
Xfi
Xexec AC_FD_CC>./config.log
X
Xecho "\
XThis file contains any messages produced by compilers while
Xrunning configure, to aid debugging if configure makes a mistake.
X" 1>&AC_FD_CC
X
X# Strip out --no-create and --no-recursion so they do not pile up.
X# Also quote any args containing shell metacharacters.
Xac_configure_args=
Xfor ac_arg
Xdo
X  case "$ac_arg" in
X  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
X  | --no-cr | --no-c) ;;
X  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
X  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
Xchangequote(<<, >>)dnl
Xdnl If you change this globbing pattern, test it on an old shell --
Xdnl it's sensitive.  Putting any kind of quote in it causes syntax errors.
X  *" "*|*"	"*|*[\[\]\~\<<#>>\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
X  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
Xchangequote([, ])dnl
X  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
X  esac
Xdone
X
X# NLS nuisances.
X# Only set these to C if already set.  These must not be set unconditionally
X# because not all systems understand e.g. LANG=C (notably SCO).
X# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
X# Non-C LC_CTYPE values break the ctype check.
Xif test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
Xif test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
Xif test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
Xif test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
X
X# confdefs.h avoids OS command line length limits that DEFS can exceed.
Xrm -rf conftest* confdefs.h
X# AIX cpp loses on an empty file, so make sure it contains at least a newline.
Xecho > confdefs.h
X
X# A filename unique to this package, relative to the directory that
X# configure is in, which we can look for to find out if srcdir is correct.
Xac_unique_file=$1
X
X# Find the source files, if location was not specified.
Xif test -z "$srcdir"; then
X  ac_srcdir_defaulted=yes
X  # Try the directory containing this script, then its parent.
X  ac_prog=[$]0
Xchangequote(, )dnl
X  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
Xchangequote([, ])dnl
X  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
X  srcdir=$ac_confdir
X  if test ! -r $srcdir/$ac_unique_file; then
X    srcdir=..
X  fi
Xelse
X  ac_srcdir_defaulted=no
Xfi
Xif test ! -r $srcdir/$ac_unique_file; then
X  if test "$ac_srcdir_defaulted" = yes; then
X    AC_MSG_ERROR(can not find sources in $ac_confdir or ..)
X  else
X    AC_MSG_ERROR(can not find sources in $srcdir)
X  fi
Xfi
Xdnl Double slashes in pathnames in object file debugging info
Xdnl mess up M-x gdb in Emacs.
Xchangequote(, )dnl
Xsrcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
Xchangequote([, ])dnl
X
Xdnl Let the site file select an alternate cache file if it wants to.
XAC_SITE_LOAD
XAC_CACHE_LOAD
XAC_LANG_C
Xdnl By default always use an empty string as the executable
Xdnl extension.  Only change it if the script calls AC_EXEEXT.
Xac_exeext=
Xac_xexeext=
Xdnl By default assume that objects files use an extension of .o.  Only
Xdnl change it if the script calls AC_OBJEXT.
Xac_objext=o
XAC_PROG_ECHO_N
Xdnl Substitute for predefined variables.
XAC_SUBST(SHELL)dnl
XAC_SUBST(CFLAGS)dnl
XAC_SUBST(CPPFLAGS)dnl
XAC_SUBST(CXXFLAGS)dnl
XAC_SUBST(FFLAGS)dnl
XAC_SUBST(DEFS)dnl
XAC_SUBST(LDFLAGS)dnl
XAC_SUBST(LIBS)dnl
XAC_SUBST(exec_prefix)dnl
XAC_SUBST(prefix)dnl
XAC_SUBST(program_transform_name)dnl
Xdnl Installation directory options.
XAC_SUBST(bindir)dnl
XAC_SUBST(sbindir)dnl
XAC_SUBST(libexecdir)dnl
XAC_SUBST(datadir)dnl
XAC_SUBST(sysconfdir)dnl
XAC_SUBST(sharedstatedir)dnl
XAC_SUBST(localstatedir)dnl
XAC_SUBST(libdir)dnl
XAC_SUBST(includedir)dnl
XAC_SUBST(oldincludedir)dnl
XAC_SUBST(infodir)dnl
XAC_SUBST(mandir)dnl
X])
X
X
Xdnl ### Selecting optional features
X
X
Xdnl AC_ARG_ENABLE(FEATURE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
XAC_DEFUN(AC_ARG_ENABLE,
X[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
Xac_help="$ac_help
X[$2]"
XAC_DIVERT_POP()dnl
X[#] Check whether --enable-[$1] or --disable-[$1] was given.
Xif test "[${enable_]patsubst([$1], -, _)+set}" = set; then
X  enableval="[$enable_]patsubst([$1], -, _)"
X  ifelse([$3], , :, [$3])
Xifelse([$4], , , [else
X  $4
X])dnl
Xfi
X])
X
XAC_DEFUN(AC_ENABLE,
X[AC_OBSOLETE([$0], [; instead use AC_ARG_ENABLE])dnl
XAC_ARG_ENABLE([$1], [  --enable-$1], [$2], [$3])dnl
X])
X
X
Xdnl ### Working with optional software
X
X
Xdnl AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
XAC_DEFUN(AC_ARG_WITH,
X[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
Xac_help="$ac_help
X[$2]"
XAC_DIVERT_POP()dnl
X[#] Check whether --with-[$1] or --without-[$1] was given.
Xif test "[${with_]patsubst([$1], -, _)+set}" = set; then
X  withval="[$with_]patsubst([$1], -, _)"
X  ifelse([$3], , :, [$3])
Xifelse([$4], , , [else
X  $4
X])dnl
Xfi
X])
X
XAC_DEFUN(AC_WITH,
X[AC_OBSOLETE([$0], [; instead use AC_ARG_WITH])dnl
XAC_ARG_WITH([$1], [  --with-$1], [$2], [$3])dnl
X])
X
X
Xdnl ### Transforming program names.
X
X
Xdnl AC_ARG_PROGRAM()
XAC_DEFUN(AC_ARG_PROGRAM,
X[if test "$program_transform_name" = s,x,x,; then
X  program_transform_name=
Xelse
X  # Double any \ or $.  echo might interpret backslashes.
X  cat <<\EOF_SED > conftestsed
Xs,\\,\\\\,g; s,\$,$$,g
XEOF_SED
X  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
X  rm -f conftestsed
Xfi
Xtest "$program_prefix" != NONE &&
X  program_transform_name="s,^,${program_prefix},; $program_transform_name"
X# Use a double $ so make ignores it.
Xtest "$program_suffix" != NONE &&
X  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
X
X# sed with no file args requires a program.
Xtest "$program_transform_name" = "" && program_transform_name="s,x,x,"
X])
X
X
Xdnl ### Version numbers
X
X
Xdnl AC_REVISION(REVISION-INFO)
XAC_DEFUN(AC_REVISION,
X[AC_REQUIRE([AC_INIT_BINSH])dnl
X[# From configure.in] translit([$1], $")])
X
Xdnl Subroutines of AC_PREREQ.
X
Xdnl Change the dots in NUMBER into commas.
Xdnl AC_PREREQ_SPLIT(NUMBER)
Xdefine(AC_PREREQ_SPLIT,
X[translit($1, ., [, ])])
X
Xdnl Default the ternary version number to 0 (e.g., 1, 7 -> 1, 7, 0).
Xdnl AC_PREREQ_CANON(MAJOR, MINOR [,TERNARY])
Xdefine(AC_PREREQ_CANON,
X[$1, $2, ifelse([$3], , 0, [$3])])
X
Xdnl Complain and exit if version number 1 is less than version number 2.
Xdnl PRINTABLE2 is the printable version of version number 2.
Xdnl AC_PREREQ_COMPARE(MAJOR1, MINOR1, TERNARY1, MAJOR2, MINOR2, TERNARY2,
Xdnl                   PRINTABLE2)
Xdefine(AC_PREREQ_COMPARE,
X[ifelse(builtin([eval],
X[$3 + $2 * 1000 + $1 * 1000000 < $6 + $5 * 1000 + $4 * 1000000]), 1,
X[errprint(dnl
XFATAL ERROR: Autoconf version $7 or higher is required for this script
X)m4exit(3)])])
X
Xdnl Complain and exit if the Autoconf version is less than VERSION.
Xdnl AC_PREREQ(VERSION)
Xdefine(AC_PREREQ,
X[AC_PREREQ_COMPARE(AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)),
XAC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])])
X
X
Xdnl ### Getting the canonical system type
X
X
Xdnl Find install-sh, config.sub, config.guess, and Cygnus configure
Xdnl in directory DIR.  These are auxiliary files used in configuration.
Xdnl DIR can be either absolute or relative to $srcdir.
Xdnl AC_CONFIG_AUX_DIR(DIR)
XAC_DEFUN(AC_CONFIG_AUX_DIR,
X[AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])
X
Xdnl The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
Xdnl There's no need to call this macro explicitly; just AC_REQUIRE it.
XAC_DEFUN(AC_CONFIG_AUX_DIR_DEFAULT,
X[AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])
X
Xdnl Internal subroutine.
Xdnl Search for the configuration auxiliary files in directory list $1.
Xdnl We look only for install-sh, so users of AC_PROG_INSTALL
Xdnl do not automatically need to distribute the other auxiliary files.
Xdnl AC_CONFIG_AUX_DIRS(DIR ...)
XAC_DEFUN(AC_CONFIG_AUX_DIRS,
X[ac_aux_dir=
Xfor ac_dir in $1; do
X  if test -f $ac_dir/install-sh; then
X    ac_aux_dir=$ac_dir
X    ac_install_sh="$ac_aux_dir/install-sh -c"
X    break
X  elif test -f $ac_dir/install.sh; then
X    ac_aux_dir=$ac_dir
X    ac_install_sh="$ac_aux_dir/install.sh -c"
X    break
X  fi
Xdone
Xif test -z "$ac_aux_dir"; then
X  AC_MSG_ERROR([can not find install-sh or install.sh in $1])
Xfi
Xac_config_guess=$ac_aux_dir/config.guess
Xac_config_sub=$ac_aux_dir/config.sub
Xac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
XAC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
X])
X
Xdnl Canonicalize the host, target, and build system types.
XAC_DEFUN(AC_CANONICAL_SYSTEM,
X[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
XAC_BEFORE([$0], [AC_ARG_PROGRAM])
X# Do some error checking and defaulting for the host and target type.
X# The inputs are:
X#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
X#
X# The rules are:
X# 1. You are not allowed to specify --host, --target, and nonopt at the
X#    same time.
X# 2. Host defaults to nonopt.
X# 3. If nonopt is not specified, then host defaults to the current host,
X#    as determined by config.guess.
X# 4. Target and build default to nonopt.
X# 5. If nonopt is not specified, then target and build default to host.
X
X# The aliases save the names the user supplied, while $host etc.
X# will get canonicalized.
Xcase $host---$target---$nonopt in
XNONE---*---* | *---NONE---* | *---*---NONE) ;;
X*) AC_MSG_ERROR(can only configure for one host and one target at a time) ;;
Xesac
X
XAC_CANONICAL_HOST
XAC_CANONICAL_TARGET
XAC_CANONICAL_BUILD
Xtest "$host_alias" != "$target_alias" &&
X  test "$program_prefix$program_suffix$program_transform_name" = \
X    NONENONEs,x,x, &&
X  program_prefix=${target_alias}-
X])
X
Xdnl Subroutines of AC_CANONICAL_SYSTEM.
X
XAC_DEFUN(AC_CANONICAL_HOST,
X[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
X
X# Make sure we can run config.sub.
Xif ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
Xelse AC_MSG_ERROR(can not run $ac_config_sub)
Xfi
X
XAC_MSG_CHECKING(host system type)
X
Xdnl Set host_alias.
Xhost_alias=$host
Xcase "$host_alias" in
XNONE)
X  case $nonopt in
X  NONE)
X    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
X    else AC_MSG_ERROR(can not guess host type; you must specify one)
X    fi ;;
X  *) host_alias=$nonopt ;;
X  esac ;;
Xesac
X
Xdnl Set the other host vars.
Xchangequote(<<, >>)dnl
Xhost=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
Xhost_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
Xhost_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
Xhost_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
Xchangequote([, ])dnl
XAC_MSG_RESULT($host)
XAC_SUBST(host)dnl
XAC_SUBST(host_alias)dnl
XAC_SUBST(host_cpu)dnl
XAC_SUBST(host_vendor)dnl
XAC_SUBST(host_os)dnl
X])
X
Xdnl Internal use only.
XAC_DEFUN(AC_CANONICAL_TARGET,
X[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
XAC_MSG_CHECKING(target system type)
X
Xdnl Set target_alias.
Xtarget_alias=$target
Xcase "$target_alias" in
XNONE)
X  case $nonopt in
X  NONE) target_alias=$host_alias ;;
X  *) target_alias=$nonopt ;;
X  esac ;;
Xesac
X
Xdnl Set the other target vars.
Xchangequote(<<, >>)dnl
Xtarget=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
Xtarget_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
Xtarget_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
Xtarget_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
Xchangequote([, ])dnl
XAC_MSG_RESULT($target)
XAC_SUBST(target)dnl
XAC_SUBST(target_alias)dnl
XAC_SUBST(target_cpu)dnl
XAC_SUBST(target_vendor)dnl
XAC_SUBST(target_os)dnl
X])
X
Xdnl Internal use only.
XAC_DEFUN(AC_CANONICAL_BUILD,
X[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
XAC_MSG_CHECKING(build system type)
X
Xdnl Set build_alias.
Xbuild_alias=$build
Xcase "$build_alias" in
XNONE)
X  case $nonopt in
X  NONE) build_alias=$host_alias ;;
X  *) build_alias=$nonopt ;;
X  esac ;;
Xesac
X
Xdnl Set the other build vars.
Xchangequote(<<, >>)dnl
Xbuild=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
Xbuild_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
Xbuild_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
Xbuild_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
Xchangequote([, ])dnl
XAC_MSG_RESULT($build)
XAC_SUBST(build)dnl
XAC_SUBST(build_alias)dnl
XAC_SUBST(build_cpu)dnl
XAC_SUBST(build_vendor)dnl
XAC_SUBST(build_os)dnl
X])
X
X
Xdnl AC_VALIDATE_CACHED_SYSTEM_TUPLE[(cmd)]
Xdnl if the cache file is inconsistent with the current host,
Xdnl target and build system types, execute CMD or print a default
Xdnl error message.
XAC_DEFUN(AC_VALIDATE_CACHED_SYSTEM_TUPLE, [
X  AC_REQUIRE([AC_CANONICAL_SYSTEM])
X  AC_MSG_CHECKING([cached system tuple])
X  if { test x"${ac_cv_host_system_type+set}" = x"set" &&
X       test x"$ac_cv_host_system_type" != x"$host"; } ||
X     { test x"${ac_cv_build_system_type+set}" = x"set" &&
X       test x"$ac_cv_build_system_type" != x"$build"; } ||
X     { test x"${ac_cv_target_system_type+set}" = x"set" &&
X       test x"$ac_cv_target_system_type" != x"$target"; }; then
X      AC_MSG_RESULT([different])
X      ifelse($#, 1, [$1],
X        [AC_MSG_ERROR([remove config.cache and re-run configure])])
X  else
X    AC_MSG_RESULT(ok)
X  fi
X  ac_cv_host_system_type="$host"
X  ac_cv_build_system_type="$build"
X  ac_cv_target_system_type="$target"
X])
X
X
Xdnl ### Caching test results
X
X
Xdnl Look for site or system specific initialization scripts.
Xdnl AC_SITE_LOAD()
Xdefine(AC_SITE_LOAD,
X[# Prefer explicitly selected file to automatically selected ones.
Xif test -z "$CONFIG_SITE"; then
X  if test "x$prefix" != xNONE; then
X    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
X  else
X    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
X  fi
Xfi
Xfor ac_site_file in $CONFIG_SITE; do
X  if test -r "$ac_site_file"; then
X    echo "loading site script $ac_site_file"
X    . "$ac_site_file"
X  fi
Xdone
X])
X
Xdnl AC_CACHE_LOAD()
Xdefine(AC_CACHE_LOAD,
X[if test -r "$cache_file"; then
X  echo "loading cache $cache_file"
X  . $cache_file
Xelse
X  echo "creating cache $cache_file"
X  > $cache_file
Xfi
X])
X
Xdnl AC_CACHE_SAVE()
Xdefine(AC_CACHE_SAVE,
X[cat > confcache <<\EOF
X# This file is a shell script that caches the results of configure
X# tests run on this system so they can be shared between configure
X# scripts and configure runs.  It is not useful on other systems.
X# If it contains results you don't want to keep, you may remove or edit it.
X#
X# By default, configure uses ./config.cache as the cache file,
X# creating it if it does not exist already.  You can give configure
X# the --cache-file=FILE option to use a different cache file; that is
X# what configure does when it calls configure scripts in
X# subdirectories, so they share the cache.
X# Giving --cache-file=/dev/null disables caching, for debugging configure.
X# config.status only pays attention to the cache file if you give it the
X# --recheck option to rerun configure.
X#
XEOF
Xdnl Allow a site initialization script to override cache values.
X# The following way of writing the cache mishandles newlines in values,
X# but we know of no workaround that is simple, portable, and efficient.
X# So, don't put newlines in cache variables' values.
X# Ultrix sh set writes to stderr and can't be redirected directly,
X# and sets the high bit in the cache file unless we assign to the vars.
Xchangequote(, )dnl
X(set) 2>&1 |
X  case `(ac_space=' '; set | grep ac_space) 2>&1` in
X  *ac_space=\ *)
X    # `set' does not quote correctly, so add quotes (double-quote substitution
X    # turns \\\\ into \\, and sed turns \\ into \).
X    sed -n \
X      -e "s/'/'\\\\''/g" \
X      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
X    ;;
X  *)
X    # `set' quotes correctly as required by POSIX, so do not add quotes.
X    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
X    ;;
X  esac >> confcache
Xchangequote([, ])dnl
Xif cmp -s $cache_file confcache; then
X  :
Xelse
X  if test -w $cache_file; then
X    echo "updating cache $cache_file"
X    cat confcache > $cache_file
X  else
X    echo "not updating unwritable cache $cache_file"
X  fi
Xfi
Xrm -f confcache
X])
X
Xdnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
Xdnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
Xdefine(AC_CACHE_VAL,
X[dnl We used to use the below line, but it fails if the 1st arg is a
Xdnl shell variable, so we need the eval.
Xdnl if test "${$1+set}" = set; then
Xdnl the '' avoids an AIX 4.1 sh bug ("invalid expansion").
Xif eval "test \"`echo '$''{'$1'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&AC_FD_MSG
Xelse
X  $2
Xfi
X])
X
Xdnl AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
Xdefine(AC_CACHE_CHECK,
X[AC_MSG_CHECKING([$1])
XAC_CACHE_VAL([$2], [$3])
XAC_MSG_RESULT([$]$2)])
X
X
Xdnl ### Defining symbols
X
X
Xdnl Set VARIABLE to VALUE, verbatim, or 1.
Xdnl AC_DEFINE(VARIABLE [, VALUE])
Xdefine(AC_DEFINE,
X[cat >> confdefs.h <<\EOF
X[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
XEOF
X])
X
Xdnl Similar, but perform shell substitutions $ ` \ once on VALUE.
Xdefine(AC_DEFINE_UNQUOTED,
X[cat >> confdefs.h <<EOF
X[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
XEOF
X])
X
X
Xdnl ### Setting output variables
X
X
Xdnl This macro protects VARIABLE from being diverted twice
Xdnl if this macro is called twice for it.
Xdnl AC_SUBST(VARIABLE)
Xdefine(AC_SUBST,
X[ifdef([AC_SUBST_$1], ,
X[define([AC_SUBST_$1], )dnl
XAC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
Xs%@$1@%[$]$1%g
XAC_DIVERT_POP()dnl
X])])
X
Xdnl AC_SUBST_FILE(VARIABLE)
Xdefine(AC_SUBST_FILE,
X[ifdef([AC_SUBST_$1], ,
X[define([AC_SUBST_$1], )dnl
XAC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
X/@$1@/r [$]$1
Xs%@$1@%%g
XAC_DIVERT_POP()dnl
X])])
X
X
Xdnl ### Printing messages
X
X
Xdnl AC_MSG_CHECKING(FEATURE-DESCRIPTION)
Xdefine(AC_MSG_CHECKING,
X[echo $ac_n "checking $1""... $ac_c" 1>&AC_FD_MSG
Xecho "configure:__oline__: checking $1" >&AC_FD_CC])
X
Xdnl AC_CHECKING(FEATURE-DESCRIPTION)
Xdefine(AC_CHECKING,
X[echo "checking $1" 1>&AC_FD_MSG
Xecho "configure:__oline__: checking $1" >&AC_FD_CC])
X
Xdnl AC_MSG_RESULT(RESULT-DESCRIPTION)
Xdefine(AC_MSG_RESULT,
X[echo "$ac_t""$1" 1>&AC_FD_MSG])
X
Xdnl AC_VERBOSE(RESULT-DESCRIPTION)
Xdefine(AC_VERBOSE,
X[AC_OBSOLETE([$0], [; instead use AC_MSG_RESULT])dnl
Xecho "	$1" 1>&AC_FD_MSG])
X
Xdnl AC_MSG_WARN(PROBLEM-DESCRIPTION)
Xdefine(AC_MSG_WARN,
X[echo "configure: warning: $1" 1>&2])
X
Xdnl AC_MSG_ERROR(ERROR-DESCRIPTION)
Xdefine(AC_MSG_ERROR,
X[{ echo "configure: error: $1" 1>&2; exit 1; }])
X
X
Xdnl ### Selecting which language to use for testing
X
X
Xdnl AC_LANG_C()
XAC_DEFUN(AC_LANG_C,
X[define([AC_LANG], [C])dnl
Xac_ext=c
X# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Xac_cpp='$CPP $CPPFLAGS'
Xac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
Xac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&AC_FD_CC'
Xcross_compiling=$ac_cv_prog_cc_cross
X])
X
Xdnl AC_LANG_CPLUSPLUS()
XAC_DEFUN(AC_LANG_CPLUSPLUS,
X[define([AC_LANG], [CPLUSPLUS])dnl
Xac_ext=C
X# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Xac_cpp='$CXXCPP $CPPFLAGS'
Xac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
Xac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&AC_FD_CC'
Xcross_compiling=$ac_cv_prog_cxx_cross
X])
X
Xdnl AC_LANG_FORTRAN77()
XAC_DEFUN(AC_LANG_FORTRAN77,
X[define([AC_LANG], [FORTRAN77])dnl
Xac_ext=f
Xac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC'
Xac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&AC_FD_CC'
Xcross_compiling=$ac_cv_prog_f77_cross
X])
X
Xdnl Push the current language on a stack.
Xdnl AC_LANG_SAVE()
Xdefine(AC_LANG_SAVE,
X[pushdef([AC_LANG_STACK], AC_LANG)])
X
Xdnl Restore the current language from the stack.
Xdnl AC_LANG_RESTORE()
Xpushdef([AC_LANG_RESTORE],
X[ifelse(AC_LANG_STACK, [C], [AC_LANG_C],dnl
XAC_LANG_STACK, [CPLUSPLUS], [AC_LANG_CPLUSPLUS],dnl
XAC_LANG_STACK, [FORTRAN77], [AC_LANG_FORTRAN77])[]popdef([AC_LANG_STACK])])
X
X
Xdnl ### Compiler-running mechanics
X
X
Xdnl The purpose of this macro is to "configure:123: command line"
Xdnl written into config.log for every test run.
Xdnl AC_TRY_EVAL(VARIABLE)
XAC_DEFUN(AC_TRY_EVAL,
X[{ (eval echo configure:__oline__: \"[$]$1\") 1>&AC_FD_CC; dnl
X(eval [$]$1) 2>&AC_FD_CC; }])
X
Xdnl AC_TRY_COMMAND(COMMAND)
XAC_DEFUN(AC_TRY_COMMAND,
X[{ ac_try='$1'; AC_TRY_EVAL(ac_try); }])
X
X
Xdnl ### Dependencies between macros
X
X
Xdnl AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
Xdefine(AC_BEFORE,
X[ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1
X])])])
X
Xdnl AC_REQUIRE(MACRO-NAME)
Xdefine(AC_REQUIRE,
X[ifdef([AC_PROVIDE_$1], ,
X[AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))dnl
Xindir([$1])
XAC_DIVERT_POP()dnl
X])])
X
Xdnl AC_PROVIDE(MACRO-NAME)
Xdefine(AC_PROVIDE,
X[define([AC_PROVIDE_$1], )])
X
Xdnl AC_OBSOLETE(THIS-MACRO-NAME [, SUGGESTION])
Xdefine(AC_OBSOLETE,
X[errprint(__file__:__line__: warning: [$1] is obsolete[$2]
X)])
X
X
Xdnl ### Checking for programs
X
X
Xdnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND
Xdnl               [, [VALUE-IF-NOT-FOUND] [, [PATH] [, [REJECT]]]])
XAC_DEFUN(AC_CHECK_PROG,
X[# Extract the first word of "$2", so it can be a program name with args.
Xset dummy $2; ac_word=[$]2
XAC_MSG_CHECKING([for $ac_word])
XAC_CACHE_VAL(ac_cv_prog_$1,
X[if test -n "[$]$1"; then
X  ac_cv_prog_$1="[$]$1" # Let the user override the test.
Xelse
X  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
Xifelse([$6], , , [  ac_prog_rejected=no
X])dnl
Xdnl $ac_dummy forces splitting on constant user-supplied paths.
Xdnl POSIX.2 word splitting is done only on the output of word expansions,
Xdnl not every word.  This closes a longstanding sh security hole.
X  ac_dummy="ifelse([$5], , $PATH, [$5])"
X  for ac_dir in $ac_dummy; do
X    test -z "$ac_dir" && ac_dir=.
X    if test -f $ac_dir/$ac_word; then
Xifelse([$6], , , dnl
X[      if test "[$ac_dir/$ac_word]" = "$6"; then
X        ac_prog_rejected=yes
X	continue
X      fi
X])dnl
X      ac_cv_prog_$1="$3"
X      break
X    fi
X  done
X  IFS="$ac_save_ifs"
Xifelse([$6], , , [if test $ac_prog_rejected = yes; then
X  # We found a bogon in the path, so make sure we never use it.
X  set dummy [$]ac_cv_prog_$1
X  shift
X  if test [$]# -gt 0; then
X    # We chose a different compiler from the bogus one.
X    # However, it has the same basename, so the bogon will be chosen
X    # first if we set $1 to just the basename; use the full file name.
X    shift
X    set dummy "$ac_dir/$ac_word" "[$]@"
X    shift
X    ac_cv_prog_$1="[$]@"
Xifelse([$2], [$4], dnl
X[  else
X    # Default is a loser.
X    AC_MSG_ERROR([$1=$6 unacceptable, but no other $4 found in dnl
Xifelse([$5], , [\$]PATH, [$5])])
X])dnl
X  fi
Xfi
X])dnl
Xdnl If no 4th arg is given, leave the cache variable unset,
Xdnl so AC_CHECK_PROGS will keep looking.
Xifelse([$4], , , [  test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4"
X])dnl
Xfi])dnl
X$1="$ac_cv_prog_$1"
Xif test -n "[$]$1"; then
X  AC_MSG_RESULT([$]$1)
Xelse
X  AC_MSG_RESULT(no)
Xfi
XAC_SUBST($1)dnl
X])
X
Xdnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]])
XAC_DEFUN(AC_PATH_PROG,
X[# Extract the first word of "$2", so it can be a program name with args.
Xset dummy $2; ac_word=[$]2
XAC_MSG_CHECKING([for $ac_word])
XAC_CACHE_VAL(ac_cv_path_$1,
X[case "[$]$1" in
X  /*)
X  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
X  ;;
X  ?:/*)			 
X  ac_cv_path_$1="[$]$1" # Let the user override the test with a dos path.
X  ;;
X  *)
X  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
Xdnl $ac_dummy forces splitting on constant user-supplied paths.
Xdnl POSIX.2 word splitting is done only on the output of word expansions,
Xdnl not every word.  This closes a longstanding sh security hole.
X  ac_dummy="ifelse([$4], , $PATH, [$4])"
X  for ac_dir in $ac_dummy; do 
X    test -z "$ac_dir" && ac_dir=.
X    if test -f $ac_dir/$ac_word; then
X      ac_cv_path_$1="$ac_dir/$ac_word"
X      break
X    fi
X  done
X  IFS="$ac_save_ifs"
Xdnl If no 3rd arg is given, leave the cache variable unset,
Xdnl so AC_PATH_PROGS will keep looking.
Xifelse([$3], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
X])dnl
X  ;;
Xesac])dnl
X$1="$ac_cv_path_$1"
Xif test -n "[$]$1"; then
X  AC_MSG_RESULT([$]$1)
Xelse
X  AC_MSG_RESULT(no)
Xfi
XAC_SUBST($1)dnl
X])
X
Xdnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
Xdnl                [, PATH]])
XAC_DEFUN(AC_CHECK_PROGS,
X[for ac_prog in $2
Xdo
XAC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, , $4)
Xtest -n "[$]$1" && break
Xdone
Xifelse([$3], , , [test -n "[$]$1" || $1="$3"
X])])
X
Xdnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
Xdnl               [, PATH]])
XAC_DEFUN(AC_PATH_PROGS,
X[for ac_prog in $2
Xdo
XAC_PATH_PROG($1, [$]ac_prog, , $4)
Xtest -n "[$]$1" && break
Xdone
Xifelse([$3], , , [test -n "[$]$1" || $1="$3"
X])])
X
Xdnl Internal subroutine.
XAC_DEFUN(AC_CHECK_TOOL_PREFIX,
X[AC_REQUIRE([AC_CANONICAL_HOST])AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Xif test $host != $build; then
X  ac_tool_prefix=${host_alias}-
Xelse
X  ac_tool_prefix=
Xfi
X])
X
Xdnl AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH]])
XAC_DEFUN(AC_CHECK_TOOL,
X[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
XAC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
X	      ifelse([$3], , [$2], ), $4)
Xifelse([$3], , , [
Xif test -z "$ac_cv_prog_$1"; then
Xif test -n "$ac_tool_prefix"; then
X  AC_CHECK_PROG($1, $2, $2, $3)
Xelse
X  $1="$3"
Xfi
Xfi])
X])
X
Xdnl Guess the value for the `prefix' variable by looking for
Xdnl the argument program along PATH and taking its parent.
Xdnl Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
Xdnl set `prefix' to /usr/local/gnu.
Xdnl This comes too late to find a site file based on the prefix,
Xdnl and it might use a cached value for the path.
Xdnl No big loss, I think, since most configures don't use this macro anyway.
Xdnl AC_PREFIX_PROGRAM(PROGRAM)
XAC_DEFUN(AC_PREFIX_PROGRAM,
X[if test "x$prefix" = xNONE; then
Xchangequote(<<, >>)dnl
Xdefine(<<AC_VAR_NAME>>, translit($1, [a-z], [A-Z]))dnl
Xchangequote([, ])dnl
Xdnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
Xecho $ac_n "checking for prefix by $ac_c" 1>&AC_FD_MSG
XAC_PATH_PROG(AC_VAR_NAME, $1)
Xchangequote(<<, >>)dnl
X  if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then
X    prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
Xchangequote([, ])dnl
X  fi
Xfi
Xundefine([AC_VAR_NAME])dnl
X])
X
Xdnl Try to compile, link and execute TEST-PROGRAM.  Set WORKING-VAR to
Xdnl `yes' if the current compiler works, otherwise set it ti `no'.  Set
Xdnl CROSS-VAR to `yes' if the compiler and linker produce non-native
Xdnl executables, otherwise set it to `no'.  Before calling
Xdnl `AC_TRY_COMPILER()', call `AC_LANG_*' to set-up for the right
Xdnl language.
Xdnl 
Xdnl AC_TRY_COMPILER(TEST-PROGRAM, WORKING-VAR, CROSS-VAR)
XAC_DEFUN(AC_TRY_COMPILER,
X[cat > conftest.$ac_ext << EOF
Xifelse(AC_LANG, [FORTRAN77], ,
X[
X[#]line __oline__ "configure"
X#include "confdefs.h"
X])
X[$1]
XEOF
Xif AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
X  [$2]=yes
X  # If we can't run a trivial program, we are probably using a cross compiler.
X  if (./conftest${ac_xexeext}; exit) 2>/dev/null; then
X    [$3]=no
X  else
X    [$3]=yes
X  fi
Xelse
X  echo "configure: failed program was:" >&AC_FD_CC
X  cat conftest.$ac_ext >&AC_FD_CC
X  [$2]=no
Xfi
Xrm -fr conftest*])
X
X
Xdnl ### Checking for libraries
X
X
Xdnl AC_TRY_LINK_FUNC(func, action-if-found, action-if-not-found)
Xdnl Try to link a program that calls FUNC, handling GCC builtins.  If
Xdnl the link succeeds, execute ACTION-IF-FOUND; otherwise, execute
Xdnl ACTION-IF-NOT-FOUND.
X
XAC_DEFUN(AC_TRY_LINK_FUNC,
XAC_TRY_LINK(dnl
Xifelse([$1], [main], , dnl Avoid conflicting decl of main.
X[/* Override any gcc2 internal prototype to avoid an error.  */
X]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
Xextern "C"
X#endif
X])dnl
X[/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $1();
X]),
X[$1()],
X[$2],
X[$3]))
X
X
Xdnl AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND
Xdnl            [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
Xdnl Search for a library defining FUNC, if it's not already available.
X
XAC_DEFUN(AC_SEARCH_LIBS,
X[AC_PREREQ([2.13])
XAC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1],
X[ac_func_search_save_LIBS="$LIBS"
Xac_cv_search_$1="no"
XAC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"])
Xtest "$ac_cv_search_$1" = "no" && for i in $2; do
XLIBS="-l$i $5 $ac_func_search_save_LIBS"
XAC_TRY_LINK_FUNC([$1],
X[ac_cv_search_$1="-l$i"
Xbreak])
Xdone
XLIBS="$ac_func_search_save_LIBS"])
Xif test "$ac_cv_search_$1" != "no"; then
X  test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
X  $3
Xelse :
X  $4
Xfi])
X
X
X
Xdnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
Xdnl              [, OTHER-LIBRARIES]]])
XAC_DEFUN(AC_CHECK_LIB,
X[AC_MSG_CHECKING([for $2 in -l$1])
Xdnl Use a cache variable name containing both the library and function name,
Xdnl because the test really is for library $1 defining function $2, not
Xdnl just for library $1.  Separate tests with the same $1 and different $2s
Xdnl may have different results.
Xac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
XAC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
X[ac_save_LIBS="$LIBS"
XLIBS=`echo "-l$1 $5 $LIBS" | sed -e 's/-lc //'`
XAC_TRY_LINK(dnl
Xifelse(AC_LANG, [FORTRAN77], ,
Xifelse([$2], [main], , dnl Avoid conflicting decl of main.
X[/* Override any gcc2 internal prototype to avoid an error.  */
X]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
Xextern "C"
X#endif
X])dnl
X[/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $2();
X])),
X	    [$2()],
X	    eval "ac_cv_lib_$ac_lib_var=yes",
X	    eval "ac_cv_lib_$ac_lib_var=no")
XLIBS="$ac_save_LIBS"
X])dnl
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  ifelse([$3], ,
X[changequote(, )dnl
X  ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
X    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_lib)
X  LIBS="-l$1 $LIBS"
X], [$3])
Xelse
X  AC_MSG_RESULT(no)
Xifelse([$4], , , [$4
X])dnl
Xfi
X])
X
Xdnl AC_HAVE_LIBRARY(LIBRARY, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
Xdnl                 [, OTHER-LIBRARIES]]])
XAC_DEFUN(AC_HAVE_LIBRARY,
X[AC_OBSOLETE([$0], [; instead use AC_CHECK_LIB])dnl
Xchangequote(<<, >>)dnl
Xdefine(<<AC_LIB_NAME>>, dnl
Xpatsubst(patsubst($1, <<lib\([^\.]*\)\.a>>, <<\1>>), <<-l>>, <<>>))dnl
Xdefine(<<AC_CV_NAME>>, ac_cv_lib_<<>>AC_LIB_NAME)dnl
Xchangequote([, ])dnl
XAC_MSG_CHECKING([for -l[]AC_LIB_NAME])
XAC_CACHE_VAL(AC_CV_NAME,
X[ac_save_LIBS="$LIBS"
XLIBS="-l[]AC_LIB_NAME[] $4 $LIBS"
XAC_TRY_LINK( , [main()], AC_CV_NAME=yes, AC_CV_NAME=no)
XLIBS="$ac_save_LIBS"
X])dnl
XAC_MSG_RESULT($AC_CV_NAME)
Xif test "$AC_CV_NAME" = yes; then
X  ifelse([$2], ,
X[AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z]))
X  LIBS="-l[]AC_LIB_NAME[] $LIBS"
X], [$2])
Xifelse([$3], , , [else
X  $3
X])dnl
Xfi
Xundefine([AC_LIB_NAME])dnl
Xundefine([AC_CV_NAME])dnl
X])
X
X
Xdnl ### Examining declarations
X
X
Xdnl AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
XAC_DEFUN(AC_TRY_CPP,
X[AC_REQUIRE_CPP()dnl
Xcat > conftest.$ac_ext <<EOF
X[#]line __oline__ "configure"
X#include "confdefs.h"
X[$1]
XEOF
Xdnl Capture the stderr of cpp.  eval is necessary to expand ac_cpp.
Xdnl We used to copy stderr to stdout and capture it in a variable, but
Xdnl that breaks under sh -x, which writes compile commands starting
Xdnl with ` +' to stderr in eval and subshells.
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
XAC_TRY_EVAL(ac_try)
Xdnl ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  ifelse([$2], , :, [rm -rf conftest*
X  $2])
Xelse
X  echo "$ac_err" >&AC_FD_CC
X  echo "configure: failed program was:" >&AC_FD_CC
X  cat conftest.$ac_ext >&AC_FD_CC
Xifelse([$3], , , [  rm -rf conftest*
X  $3
X])dnl
Xfi
Xrm -f conftest*])
X
Xdnl AC_EGREP_HEADER(PATTERN, HEADER-FILE, ACTION-IF-FOUND [,
Xdnl                 ACTION-IF-NOT-FOUND])
XAC_DEFUN(AC_EGREP_HEADER,
X[AC_EGREP_CPP([$1], [#include <$2>], [$3], [$4])])
X
Xdnl Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
Xdnl come early, it is not included in AC_BEFORE checks.
Xdnl AC_EGREP_CPP(PATTERN, PROGRAM, [ACTION-IF-FOUND [,
Xdnl              ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_EGREP_CPP,
X[AC_REQUIRE_CPP()dnl
Xcat > conftest.$ac_ext <<EOF
X[#]line __oline__ "configure"
X#include "confdefs.h"
X[$2]
XEOF
Xdnl eval is necessary to expand ac_cpp.
Xdnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |
Xdnl Prevent m4 from eating character classes:
Xchangequote(, )dnl
X  egrep "$1" >/dev/null 2>&1; then
Xchangequote([, ])dnl
X  ifelse([$3], , :, [rm -rf conftest*
X  $3])
Xifelse([$4], , , [else
X  rm -rf conftest*
X  $4
X])dnl
Xfi
Xrm -f conftest*
X])
X
X
Xdnl ### Examining syntax
X
X
Xdnl AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
Xdnl             [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_TRY_COMPILE,
X[cat > conftest.$ac_ext <<EOF
Xifelse(AC_LANG, [FORTRAN77],
X[      program main
X[$2]
X      end],
X[dnl This sometimes fails to find confdefs.h, for some reason.
Xdnl [#]line __oline__ "[$]0"
X[#]line __oline__ "configure"
X#include "confdefs.h"
X[$1]
Xint main() {
X[$2]
X; return 0; }
X])EOF
Xif AC_TRY_EVAL(ac_compile); then
X  ifelse([$3], , :, [rm -rf conftest*
X  $3])
Xelse
X  echo "configure: failed program was:" >&AC_FD_CC
X  cat conftest.$ac_ext >&AC_FD_CC
Xifelse([$4], , , [  rm -rf conftest*
X  $4
X])dnl
Xfi
Xrm -f conftest*])
X
X
Xdnl ### Examining libraries
X
X
Xdnl AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
Xdnl                  ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
XAC_DEFUN(AC_COMPILE_CHECK,
X[AC_OBSOLETE([$0], [; instead use AC_TRY_COMPILE or AC_TRY_LINK, and AC_MSG_CHECKING and AC_MSG_RESULT])dnl
Xifelse([$1], , , [AC_CHECKING([for $1])
X])dnl
XAC_TRY_LINK([$2], [$3], [$4], [$5])
X])
X
Xdnl AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
Xdnl             [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_TRY_LINK,
X[cat > conftest.$ac_ext <<EOF
Xifelse(AC_LANG, [FORTRAN77],
X[
X      program main
X      call [$2]
X      end
X],
X[dnl This sometimes fails to find confdefs.h, for some reason.
Xdnl [#]line __oline__ "[$]0"
X[#]line __oline__ "configure"
X#include "confdefs.h"
X[$1]
Xint main() {
X[$2]
X; return 0; }
X])EOF
Xif AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
X  ifelse([$3], , :, [rm -rf conftest*
X  $3])
Xelse
X  echo "configure: failed program was:" >&AC_FD_CC
X  cat conftest.$ac_ext >&AC_FD_CC
Xifelse([$4], , , [  rm -rf conftest*
X  $4
X])dnl
Xfi
Xrm -f conftest*])
X
X
Xdnl ### Checking for run-time features
X
X
Xdnl AC_TRY_RUN(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE
Xdnl            [, ACTION-IF-CROSS-COMPILING]]])
XAC_DEFUN(AC_TRY_RUN,
X[if test "$cross_compiling" = yes; then
X  ifelse([$4], ,
X    [errprint(__file__:__line__: warning: [AC_TRY_RUN] called without default to allow cross compiling
X)dnl
X  AC_MSG_ERROR(can not run test program while cross compiling)],
X  [$4])
Xelse
X  AC_TRY_RUN_NATIVE([$1], [$2], [$3])
Xfi
X])
X
Xdnl Like AC_TRY_RUN but assumes a native-environment (non-cross) compiler.
Xdnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
XAC_DEFUN(AC_TRY_RUN_NATIVE,
X[cat > conftest.$ac_ext <<EOF
X[#]line __oline__ "configure"
X#include "confdefs.h"
Xifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
Xextern "C" void exit(int);
X#endif
X])dnl
X[$1]
XEOF
Xif AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
Xdnl Don't remove the temporary files here, so they can be examined.
X  ifelse([$2], , :, [$2])
Xelse
X  echo "configure: failed program was:" >&AC_FD_CC
X  cat conftest.$ac_ext >&AC_FD_CC
Xifelse([$3], , , [  rm -fr conftest*
X  $3
X])dnl
Xfi
Xrm -fr conftest*])
X
X
Xdnl ### Checking for header files
X
X
Xdnl AC_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_CHECK_HEADER,
X[dnl Do the transliteration at runtime so arg 1 can be a shell variable.
Xac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
XAC_MSG_CHECKING([for $1])
XAC_CACHE_VAL(ac_cv_header_$ac_safe,
X[AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
X  eval "ac_cv_header_$ac_safe=no")])dnl
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  ifelse([$2], , :, [$2])
Xelse
X  AC_MSG_RESULT(no)
Xifelse([$3], , , [$3
X])dnl
Xfi
X])
X
Xdnl AC_CHECK_HEADERS(HEADER-FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_CHECK_HEADERS,
X[for ac_hdr in $1
Xdo
XAC_CHECK_HEADER($ac_hdr,
X[changequote(, )dnl
X  ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3)dnl
Xdone
X])
X
X
Xdnl ### Checking for the existence of files
X
Xdnl AC_CHECK_FILE(FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_CHECK_FILE,
X[AC_REQUIRE([AC_PROG_CC])
Xdnl Do the transliteration at runtime so arg 1 can be a shell variable.
Xac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
XAC_MSG_CHECKING([for $1])
XAC_CACHE_VAL(ac_cv_file_$ac_safe,
X[if test "$cross_compiling" = yes; then
X  errprint(__file__:__line__: warning: Cannot check for file existence when cross compiling
X)dnl
X  AC_MSG_ERROR(Cannot check for file existence when cross compiling)
Xelse
X  if test -r $1; then
X    eval "ac_cv_file_$ac_safe=yes"
X  else
X    eval "ac_cv_file_$ac_safe=no"
X  fi
Xfi])dnl
Xif eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  ifelse([$2], , :, [$2])
Xelse
X  AC_MSG_RESULT(no)
Xifelse([$3], , , [$3])
Xfi
X])
X
Xdnl AC_CHECK_FILES(FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_CHECK_FILES,
X[for ac_file in $1
Xdo
XAC_CHECK_FILE($ac_file,
X[changequote(, )dnl
X  ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_file) $2], $3)dnl
Xdone
X])
X
X
Xdnl ### Checking for library functions
X
X
Xdnl AC_CHECK_FUNC(FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_CHECK_FUNC,
X[AC_MSG_CHECKING([for $1])
XAC_CACHE_VAL(ac_cv_func_$1,
X[AC_TRY_LINK(
Xdnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h>
Xdnl which includes <sys/select.h> which contains a prototype for
Xdnl select.  Similarly for bzero.
X[/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $1(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
Xextern "C"
X#endif
X])dnl
X[/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $1();
X], [
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$1) || defined (__stub___$1)
Xchoke me
X#else
X$1();
X#endif
X], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")])
Xif eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  ifelse([$2], , :, [$2])
Xelse
X  AC_MSG_RESULT(no)
Xifelse([$3], , , [$3
X])dnl
Xfi
X])
X
Xdnl AC_CHECK_FUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_CHECK_FUNCS,
X[for ac_func in $1
Xdo
XAC_CHECK_FUNC($ac_func,
X[changequote(, )dnl
X  ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl
Xdone
X])
X
Xdnl AC_REPLACE_FUNCS(FUNCTION...)
XAC_DEFUN(AC_REPLACE_FUNCS,
X[AC_CHECK_FUNCS([$1], , [LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"])
XAC_SUBST(LIBOBJS)dnl
X])
X
X
Xdnl ### Raw Checking for the pure existence of library functions
X
X
Xdnl AC_RCHECK_FUNC(FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_RCHECK_FUNC,
X[AC_MSG_CHECKING([for raw availability of $1])
XAC_CACHE_VAL(ac_cv_rfunc_$1,
X[AC_TRY_LINK(
Xdnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h>
Xdnl which includes <sys/select.h> which contains a prototype for
Xdnl select.  Similarly for bzero.
X[/* Override any gcc2 internal prototype to avoid an error.  */
X]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
Xextern "C"
X#endif
X])dnl
X[/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $1();
X], [
X$1();
X], eval "ac_cv_rfunc_$1=yes", eval "ac_cv_rfunc_$1=no")])
Xif eval "test \"`echo '$ac_cv_rfunc_'$1`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  ifelse([$2], , :, [$2])
Xelse
X  AC_MSG_RESULT(no)
Xifelse([$3], , , [$3
X])dnl
Xfi
X])
X
Xdnl AC_RCHECK_FUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_RCHECK_FUNCS,
X[for ac_func in $1
Xdo
XAC_RCHECK_FUNC($ac_func,
X[changequote(, )dnl
X  ac_tr_func=HAVE_RAW_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl
Xdone
X])
X
X
Xdnl ### Checking compiler characteristics
X
X
Xdnl AC_CHECK_SIZEOF(TYPE [, CROSS-SIZE])
XAC_DEFUN(AC_CHECK_SIZEOF,
X[changequote(<<, >>)dnl
Xdnl The name to #define.
Xdefine(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
Xdnl The cache variable name.
Xdefine(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
Xchangequote([, ])dnl
XAC_MSG_CHECKING(size of $1)
XAC_CACHE_VAL(AC_CV_NAME,
X[AC_TRY_RUN([#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof($1));
X  exit(0);
X}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
XAC_MSG_RESULT($AC_CV_NAME)
XAC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
Xundefine([AC_TYPE_NAME])dnl
Xundefine([AC_CV_NAME])dnl
X])
X
X
Xdnl ### Checking for typedefs
X
X
Xdnl AC_CHECK_TYPE(TYPE, DEFAULT)
XAC_DEFUN(AC_CHECK_TYPE,
X[AC_REQUIRE([AC_HEADER_STDC])dnl
XAC_MSG_CHECKING(for $1)
XAC_CACHE_VAL(ac_cv_type_$1,
X[AC_EGREP_CPP(dnl
Xchangequote(<<,>>)dnl
X<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
Xchangequote([,]), [#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
XAC_MSG_RESULT($ac_cv_type_$1)
Xif test $ac_cv_type_$1 = no; then
X  AC_DEFINE($1, $2)
Xfi
X])
X
X
Xdnl ### Creating output files
X
X
Xdnl AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
XAC_DEFUN(AC_CONFIG_HEADER,
X[define(AC_LIST_HEADER, $1)])
X
Xdnl Link each of the existing files SOURCE... to the corresponding
Xdnl link name in DEST...
Xdnl AC_LINK_FILES(SOURCE..., DEST...)
XAC_DEFUN(AC_LINK_FILES,
X[dnl
Xdefine([AC_LIST_FILES], ifdef([AC_LIST_FILES], [AC_LIST_FILES ],)[$1])dnl
Xdefine([AC_LIST_LINKS], ifdef([AC_LIST_LINKS], [AC_LIST_LINKS ],)[$2])])
X
Xdnl Add additional commands for AC_OUTPUT to put into config.status.
Xdnl Use diversions instead of macros so we can be robust in the
Xdnl presence of commas in $1 and/or $2.
Xdnl AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
XAC_DEFUN(AC_OUTPUT_COMMANDS,
X[AC_DIVERT_PUSH(AC_DIVERSION_CMDS)dnl
X[$1]
XAC_DIVERT_POP()dnl
XAC_DIVERT_PUSH(AC_DIVERSION_ICMDS)dnl
X[$2]
XAC_DIVERT_POP()])
X
Xdnl AC_CONFIG_SUBDIRS(DIR ...)
XAC_DEFUN(AC_CONFIG_SUBDIRS,
X[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
Xdefine([AC_LIST_SUBDIRS], ifdef([AC_LIST_SUBDIRS], [AC_LIST_SUBDIRS ],)[$1])dnl
Xsubdirs="AC_LIST_SUBDIRS"
XAC_SUBST(subdirs)dnl
X])
X
Xdnl The big finish.
Xdnl Produce config.status, config.h, and links; and configure subdirs.
Xdnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS])
Xdefine(AC_OUTPUT,
X[trap '' 1 2 15
XAC_CACHE_SAVE
Xtrap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
X
Xtest "x$prefix" = xNONE && prefix=$ac_default_prefix
X# Let make expand exec_prefix.
Xtest "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
X
X# Any assignment to VPATH causes Sun make to only execute
X# the first set of double-colon rules, so remove it if not needed.
X# If there is a colon in the path, we need to keep it.
Xif test "x$srcdir" = x.; then
Xchangequote(, )dnl
X  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
Xchangequote([, ])dnl
Xfi
X
Xtrap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
X
Xifdef([AC_LIST_HEADER], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
X
X# Without the "./", some shells look in PATH for config.status.
X: ${CONFIG_STATUS=./config.status}
X
Xecho creating $CONFIG_STATUS
Xrm -f $CONFIG_STATUS
Xcat > $CONFIG_STATUS <<EOF
X#! /bin/sh
X# Generated automatically by configure.
X# Run this file to recreate the current configuration.
X# This directory was configured as follows,
Xdnl hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
Xdnl so uname gets run too.
X# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
X#
X[#] [$]0 [$]ac_configure_args
X#
X# Compiler output produced by configure, useful for debugging
X# configure, is in ./config.log if it exists.
X
Xchangequote(, )dnl
Xac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Xchangequote([, ])dnl
Xfor ac_option
Xdo
X  case "[\$]ac_option" in
X  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
X    echo "running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion"
X    exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion ;;
X  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
X    echo "$CONFIG_STATUS generated by autoconf version AC_ACVERSION"
X    exit 0 ;;
X  -help | --help | --hel | --he | --h)
X    echo "[\$]ac_cs_usage"; exit 0 ;;
X  *) echo "[\$]ac_cs_usage"; exit 1 ;;
X  esac
Xdone
X
Xac_given_srcdir=$srcdir
Xifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
X])dnl
X
Xchangequote(<<, >>)dnl
Xifdef(<<AC_LIST_HEADER>>,
X<<trap 'rm -fr `echo "$1 AC_LIST_HEADER" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15>>,
X<<trap 'rm -fr `echo "$1" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15>>)
Xchangequote([, ])dnl
XEOF
Xcat >> $CONFIG_STATUS <<EOF
X
XAC_OUTPUT_FILES($1)
Xifdef([AC_LIST_HEADER], [AC_OUTPUT_HEADER(AC_LIST_HEADER)])dnl
Xifdef([AC_LIST_LINKS], [AC_OUTPUT_LINKS(AC_LIST_FILES, AC_LIST_LINKS)])dnl
XEOF
Xcat >> $CONFIG_STATUS <<EOF
Xundivert(AC_DIVERSION_ICMDS)dnl
X$3
XEOF
Xcat >> $CONFIG_STATUS <<\EOF
Xundivert(AC_DIVERSION_CMDS)dnl
X$2
Xexit 0
XEOF
Xchmod +x $CONFIG_STATUS
Xrm -fr confdefs* $ac_clean_files
Xtest "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Xdnl config.status should not do recursion.
Xifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl
X])dnl
X
Xdnl Set the DEFS variable to the -D options determined earlier.
Xdnl This is a subroutine of AC_OUTPUT.
Xdnl It is called inside configure, outside of config.status.
Xdnl AC_OUTPUT_MAKE_DEFS()
Xdefine(AC_OUTPUT_MAKE_DEFS,
X[# Transform confdefs.h into DEFS.
Xdnl Using a here document instead of a string reduces the quoting nightmare.
X# Protect against shell expansion while executing Makefile rules.
X# Protect against Makefile macro expansion.
Xcat > conftest.defs <<\EOF
Xchangequote(<<, >>)dnl
Xs%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
Xs%[ 	`~<<#>>$^&*(){}\\|;'"<>?]%\\&%g
Xs%\[%\\&%g
Xs%\]%\\&%g
Xs%\$%$$%g
Xchangequote([, ])dnl
XEOF
XDEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
Xrm -f conftest.defs
X])
X
Xdnl Do the variable substitutions to create the Makefiles or whatever.
Xdnl This is a subroutine of AC_OUTPUT.  It is called inside an unquoted
Xdnl here document whose contents are going into config.status, but
Xdnl upon returning, the here document is being quoted.
Xdnl AC_OUTPUT_FILES(FILE...)
Xdefine(AC_OUTPUT_FILES,
X[# Protect against being on the right side of a sed subst in config.status.
Xchangequote(, )dnl
Xsed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
X s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Xchangequote([, ])dnl
Xdnl These here document variables are unquoted when configure runs
Xdnl but quoted when config.status runs, so variables are expanded once.
X$ac_vpsub
Xdnl Shell code in configure.in might set extrasub.
X$extrasub
Xdnl Insert the sed substitutions of variables.
Xundivert(AC_DIVERSION_SED)
XCEOF
XEOF
X
Xcat >> $CONFIG_STATUS <<\EOF
X
X# Split the substitutions into bite-sized pieces for seds with
X# small command number limits, like on Digital OSF/1 and HP-UX.
Xac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
Xac_file=1 # Number of current file.
Xac_beg=1 # First line for current file.
Xac_end=$ac_max_sed_cmds # Line after last line for current file.
Xac_more_lines=:
Xac_sed_cmds=""
Xwhile $ac_more_lines; do
X  if test $ac_beg -gt 1; then
X    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
X  else
X    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
X  fi
X  if test ! -s conftest.s$ac_file; then
X    ac_more_lines=false
X    rm -f conftest.s$ac_file
X  else
X    if test -z "$ac_sed_cmds"; then
X      ac_sed_cmds="sed -f conftest.s$ac_file"
X    else
X      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
X    fi
X    ac_file=`expr $ac_file + 1`
X    ac_beg=$ac_end
X    ac_end=`expr $ac_end + $ac_max_sed_cmds`
X  fi
Xdone
Xif test -z "$ac_sed_cmds"; then
X  ac_sed_cmds=cat
Xfi
XEOF
X
Xcat >> $CONFIG_STATUS <<EOF
X
XCONFIG_FILES=\${CONFIG_FILES-"$1"}
XEOF
Xcat >> $CONFIG_STATUS <<\EOF
Xfor ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Xchangequote(, )dnl
X  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
X  case "$ac_file" in
X  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
X       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
X  *) ac_file_in="${ac_file}.in" ;;
X  esac
X
X  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
X
X  # Remove last slash and all that follows it.  Not all systems have dirname.
X  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Xchangequote([, ])dnl
X  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
X    # The file is in a subdirectory.
X    test ! -d "$ac_dir" && mkdir "$ac_dir"
X    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
X    # A "../" for each directory in $ac_dir_suffix.
Xchangequote(, )dnl
X    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
Xchangequote([, ])dnl
X  else
X    ac_dir_suffix= ac_dots=
X  fi
X
X  case "$ac_given_srcdir" in
X  .)  srcdir=.
X      if test -z "$ac_dots"; then top_srcdir=.
X      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
X  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
X  *) # Relative path.
X    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
X    top_srcdir="$ac_dots$ac_given_srcdir" ;;
X  esac
X
Xifdef([AC_PROVIDE_AC_PROG_INSTALL],
X[  case "$ac_given_INSTALL" in
Xchangequote(, )dnl
X  [/$]*) INSTALL="$ac_given_INSTALL" ;;
Xchangequote([, ])dnl
X  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
X  esac
X])dnl
X
X  echo creating "$ac_file"
X  rm -f "$ac_file"
X  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
X  case "$ac_file" in
X  *Makefile*) ac_comsub="1i\\
X# $configure_input" ;;
X  *) ac_comsub= ;;
X  esac
X
X  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
X  sed -e "$ac_comsub
Xs%@configure_input@%$configure_input%g
Xs%@srcdir@%$srcdir%g
Xs%@top_srcdir@%$top_srcdir%g
Xifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g
X])dnl
Xdnl The parens around the eval prevent an "illegal io" in Ultrix sh.
X" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Xdnl This would break Makefile dependencies.
Xdnl  if cmp -s $ac_file conftest.out 2>/dev/null; then
Xdnl    echo "$ac_file is unchanged"
Xdnl    rm -f conftest.out
Xdnl   else
Xdnl     rm -f $ac_file
Xdnl    mv conftest.out $ac_file
Xdnl  fi
Xfi; done
Xrm -f conftest.s*
X])
X
Xdnl Create the config.h files from the config.h.in files.
Xdnl This is a subroutine of AC_OUTPUT.  It is called inside a quoted
Xdnl here document whose contents are going into config.status.
Xdnl AC_OUTPUT_HEADER(HEADER-FILE...)
Xdefine(AC_OUTPUT_HEADER,
X[changequote(<<, >>)dnl
X# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
X# NAME is the cpp macro being defined and VALUE is the value it is being given.
X#
X# ac_d sets the value in "#define NAME VALUE" lines.
Xac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
Xac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
Xac_dC='\3'
Xac_dD='%g'
X# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Xac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
Xac_uB='\([ 	]\)%\1#\2define\3'
Xac_uC=' '
Xac_uD='\4%g'
X# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Xac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
Xac_eB='<<$>>%\1#\2define\3'
Xac_eC=' '
Xac_eD='%g'
Xchangequote([, ])dnl
X
Xif test "${CONFIG_HEADERS+set}" != set; then
XEOF
Xdnl Support passing AC_CONFIG_HEADER a value containing shell variables.
Xcat >> $CONFIG_STATUS <<EOF
X  CONFIG_HEADERS="$1"
XEOF
Xcat >> $CONFIG_STATUS <<\EOF
Xfi
Xfor ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Xchangequote(, )dnl
X  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
X  case "$ac_file" in
X  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
X       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
X  *) ac_file_in="${ac_file}.in" ;;
X  esac
Xchangequote([, ])dnl
X
X  echo creating $ac_file
X
X  rm -f conftest.frag conftest.in conftest.out
X  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
X  cat $ac_file_inputs > conftest.in
X
XEOF
X
X# Transform confdefs.h into a sed script conftest.vals that substitutes
X# the proper values into config.h.in to produce config.h.  And first:
X# Protect against being on the right side of a sed subst in config.status.
X# Protect against being in an unquoted here document in config.status.
Xrm -f conftest.vals
Xdnl Using a here document instead of a string reduces the quoting nightmare.
Xdnl Putting comments in sed scripts is not portable.
Xcat > conftest.hdr <<\EOF
Xchangequote(<<, >>)dnl
Xs/[\\&%]/\\&/g
Xs%[\\$`]%\\&%g
Xs%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
Xs%ac_d%ac_u%gp
Xs%ac_u%ac_e%gp
Xchangequote([, ])dnl
XEOF
Xsed -n -f conftest.hdr confdefs.h > conftest.vals
Xrm -f conftest.hdr
X
X# This sed command replaces #undef with comments.  This is necessary, for
X# example, in the case of _POSIX_SOURCE, which is predefined and required
X# on some systems where configure will not decide to define it.
Xcat >> conftest.vals <<\EOF
Xchangequote(, )dnl
Xs%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
Xchangequote([, ])dnl
XEOF
X
X# Break up conftest.vals because some shells have a limit on
X# the size of here documents, and old seds have small limits too.
X
Xrm -f conftest.tail
Xwhile :
Xdo
X  ac_lines=`grep -c . conftest.vals`
X  # grep -c gives empty output for an empty file on some AIX systems.
X  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
X  # Write a limited-size here document to conftest.frag.
X  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
X  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
X  echo 'CEOF
X  sed -f conftest.frag conftest.in > conftest.out
X  rm -f conftest.in
X  mv conftest.out conftest.in
X' >> $CONFIG_STATUS
X  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
X  rm -f conftest.vals
X  mv conftest.tail conftest.vals
Xdone
Xrm -f conftest.vals
X
Xdnl Now back to your regularly scheduled config.status.
Xcat >> $CONFIG_STATUS <<\EOF
X  rm -f conftest.frag conftest.h
X  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
X  cat conftest.in >> conftest.h
X  rm -f conftest.in
X  if cmp -s $ac_file conftest.h 2>/dev/null; then
X    echo "$ac_file is unchanged"
X    rm -f conftest.h
X  else
X    # Remove last slash and all that follows it.  Not all systems have dirname.
X  changequote(, )dnl
X    ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
X  changequote([, ])dnl
X    if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
X      # The file is in a subdirectory.
X      test ! -d "$ac_dir" && mkdir "$ac_dir"
X    fi
X    rm -f $ac_file
X    mv conftest.h $ac_file
X  fi
Xfi; done
X
X])
X
Xdnl This is a subroutine of AC_OUTPUT.  It is called inside a quoted
Xdnl here document whose contents are going into config.status.
Xdnl AC_OUTPUT_LINKS(SOURCE..., DEST...)
Xdefine(AC_OUTPUT_LINKS,
X[EOF
X
Xcat >> $CONFIG_STATUS <<EOF
Xac_sources="$1"
Xac_dests="$2"
XEOF
X
Xcat >> $CONFIG_STATUS <<\EOF
Xsrcdir=$ac_given_srcdir
Xwhile test -n "$ac_sources"; do
X  set $ac_dests; ac_dest=[$]1; shift; ac_dests=[$]*
X  set $ac_sources; ac_source=[$]1; shift; ac_sources=[$]*
X
X  echo "linking $srcdir/$ac_source to $ac_dest"
X
X  if test ! -r $srcdir/$ac_source; then
X    AC_MSG_ERROR($srcdir/$ac_source: File not found)
X  fi
X  rm -f $ac_dest
X
X  # Make relative symlinks.
X  # Remove last slash and all that follows it.  Not all systems have dirname.
Xchangequote(, )dnl
X  ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
Xchangequote([, ])dnl
X  if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
X    # The dest file is in a subdirectory.
X    test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
X    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
X    # A "../" for each directory in $ac_dest_dir_suffix.
Xchangequote(, )dnl
X    ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
Xchangequote([, ])dnl
X  else
X    ac_dest_dir_suffix= ac_dots=
X  fi
X
X  case "$srcdir" in
Xchangequote(, )dnl
X  [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
Xchangequote([, ])dnl
X  *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
X  esac
X
X  # Make a symlink if possible; otherwise try a hard link.
X  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
X    ln $srcdir/$ac_source $ac_dest; then :
X  else
X    AC_MSG_ERROR(can not link $ac_dest to $srcdir/$ac_source)
X  fi
Xdone
X])
X
Xdnl This is a subroutine of AC_OUTPUT.
Xdnl It is called after running config.status.
Xdnl AC_OUTPUT_SUBDIRS(DIRECTORY...)
Xdefine(AC_OUTPUT_SUBDIRS,
X[
Xif test "$no_recursion" != yes; then
X
X  # Remove --cache-file and --srcdir arguments so they do not pile up.
X  ac_sub_configure_args=
X  ac_prev=
X  for ac_arg in $ac_configure_args; do
X    if test -n "$ac_prev"; then
X      ac_prev=
X      continue
X    fi
X    case "$ac_arg" in
X    -cache-file | --cache-file | --cache-fil | --cache-fi \
X    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
X      ac_prev=cache_file ;;
X    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
X    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
X      ;;
X    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
X      ac_prev=srcdir ;;
X    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
X      ;;
X    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
X    esac
X  done
X
X  for ac_config_dir in $1; do
X
X    # Do not complain, so a configure script can configure whichever
X    # parts of a large source tree are present.
X    if test ! -d $srcdir/$ac_config_dir; then
X      continue
X    fi
X
X    echo configuring in $ac_config_dir
X
X    case "$srcdir" in
X    .) ;;
X    *)
X      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
X      else
X        AC_MSG_ERROR(can not create `pwd`/$ac_config_dir)
X      fi
X      ;;
X    esac
X
X    ac_popdir=`pwd`
X    cd $ac_config_dir
X
Xchangequote(, )dnl
X      # A "../" for each directory in /$ac_config_dir.
X      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
Xchangequote([, ])dnl
X
X    case "$srcdir" in
X    .) # No --srcdir option.  We are building in place.
X      ac_sub_srcdir=$srcdir ;;
X    /*) # Absolute path.
X      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
X    *) # Relative path.
X      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
X    esac
X
X    # Check for guested configure; otherwise get Cygnus style configure.
X    if test -f $ac_sub_srcdir/configure; then
X      ac_sub_configure=$ac_sub_srcdir/configure
X    elif test -f $ac_sub_srcdir/configure.in; then
X      ac_sub_configure=$ac_configure
X    else
X      AC_MSG_WARN(no configuration information is in $ac_config_dir)
X      ac_sub_configure=
X    fi
X
X    # The recursion is here.
X    if test -n "$ac_sub_configure"; then
X
X      # Make the cache file name correct relative to the subdirectory.
X      case "$cache_file" in
X      /*) ac_sub_cache_file=$cache_file ;;
X      *) # Relative path.
X        ac_sub_cache_file="$ac_dots$cache_file" ;;
X      esac
Xifdef([AC_PROVIDE_AC_PROG_INSTALL],
X      [  case "$ac_given_INSTALL" in
Xchangequote(, )dnl
X        [/$]*) INSTALL="$ac_given_INSTALL" ;;
Xchangequote([, ])dnl
X        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
X        esac
X])dnl
X
X      echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
X      # The eval makes quoting arguments work.
X      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
X      then :
X      else
X        AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)
X      fi
X    fi
X
X    cd $ac_popdir
X  done
Xfi
X])
END-of-smake-1.2.1/autoconf/acgeneral.m4
echo x - smake-1.2.1/autoconf/aclocal.m4
sed 's/^X//' >smake-1.2.1/autoconf/aclocal.m4 << 'END-of-smake-1.2.1/autoconf/aclocal.m4'
Xdnl @(#)aclocal.m4	1.87 09/12/31 Copyright 1998-2009 J. Schilling
X
Xdnl Set VARIABLE to VALUE in C-string form, verbatim, or 1.
Xdnl AC_DEFINE_STRING(VARIABLE [, VALUE])
Xdefine(AC_DEFINE_STRING,
X[cat >> confdefs.h <<\EOF
X[#define] $1 ifelse($#, 2, "[$2]", $#, 3, "[$2]", 1)
XEOF
X])
X
Xdnl Similar, but perform shell substitutions $ ` \ once on VALUE.
Xdefine(AC_DEFINE_UNQUOTED_STRING,
X[cat >> confdefs.h <<EOF
X[#define] $1 ifelse($#, 2, "[$2]", $#, 3, "[$2]", 1)
XEOF
X])
X
Xdnl ==== Check if we have  typedef
X
Xdnl AC_HAVE_TYPE(INCLUDES, TYPE)
XAC_DEFUN(AC_HAVE_TYPE,
X[AC_REQUIRE([AC_HEADER_STDC])dnl
XAC_MSG_CHECKING(for $2)
XAC_CACHE_VAL(ac_cv_have_type_$2,
X[AC_EGREP_CPP(dnl
Xchangequote(<<,>>)dnl
X<<(^|[^a-zA-Z_0-9])$2[^a-zA-Z_0-9]>>dnl
Xchangequote([,]), [#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X$1], ac_cv_have_type_$2=yes, ac_cv_have_type_$2=no)])dnl
XAC_MSG_RESULT($ac_cv_have_type_$2)
Xchangequote(, )dnl
X  ac_tr_type=HAVE_TYPE_`echo $2 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xchangequote([, ])dnl
Xif test $ac_cv_have_type_$2 = yes; then
X  AC_DEFINE_UNQUOTED($ac_tr_type)
Xfi
X])
X
XAC_DEFUN(AC_ICONV_CONST,
X[AC_CACHE_CHECK(whether iconv() uses const char **, ac_cv_iconv_const,
X[cat > conftest.c <<EOF
X#include <iconv.h>
XEOF
Xif AC_TRY_COMMAND(${CC-cc} -E conftest.c) | grep 'size_t.*iconv.*iconv_t.*const' >/dev/null 2>&1; then
X  ac_cv_iconv_const=yes
Xelse
X  ac_cv_iconv_const=no
Xfi])
Xif test $ac_cv_iconv_const = yes; then
X  AC_DEFINE(HAVE_ICONV_CONST)
Xfi])
X
Xdnl Checks if /bin/sh is bash
Xdnl Defines BIN_SHELL_IS_BASH on success.
XAC_DEFUN([AC_BIN_SHELL_BASH],
X[AC_CACHE_CHECK([if /bin/sh is bash], ac_cv_bin_shell_is_bash,
X                [
Xac_err=`< /dev/null /bin/sh --version 2> /dev/null | egrep 'GNU sh|bash'`
Xif test -n "$ac_err"; then
X	ac_cv_bin_shell_is_bash=yes
Xelse
X	ac_cv_bin_shell_is_bash=no
Xfi
X])
Xif test $ac_cv_bin_shell_is_bash = yes; then
X  AC_DEFINE(BIN_SHELL_IS_BASH)
Xfi])
X
Xdnl Checks if sh is bash
Xdnl Defines SHELL_IS_BASH on success.
XAC_DEFUN([AC_SHELL_BASH],
X[AC_CACHE_CHECK([if sh is bash], ac_cv_shell_is_bash,
X                [
Xac_err=`< /dev/null sh --version 2> /dev/null | egrep 'GNU sh|bash'`
Xif test -n "$ac_err"; then
X	ac_cv_shell_is_bash=yes
Xelse
X	ac_cv_shell_is_bash=no
Xfi
X])
Xif test $ac_cv_shell_is_bash = yes; then
X  AC_DEFINE(SHELL_IS_BASH)
Xfi])
X
Xdnl Checks if /bin/sh -ce is broken
Xdnl Defines BIN_SHELL_CE_IS_BROKEN on success.
XAC_DEFUN([AC_BIN_SHELL_CE_BROKEN],
X[AC_CACHE_CHECK([whether /bin/sh -ce is broken], ac_cv_bin_shell_ce_is_broken,
X                [
Xac_err=`/bin/sh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
Xif test -n "$ac_err"; then
X	ac_cv_bin_shell_ce_is_broken=yes
Xelse
X	ac_cv_bin_shell_ce_is_broken=no
Xfi
X])
Xif test $ac_cv_bin_shell_ce_is_broken = yes; then
X  AC_DEFINE(BIN_SHELL_CE_IS_BROKEN)
Xfi])
X
Xdnl Checks if /bin/bosh is a working shell
Xdnl Defines BIN_SHELL_BOSH on success.
XAC_DEFUN([AC_BIN_SHELL_BOSH],
X[AC_CACHE_CHECK([whether /bin/bosh is a working shell], ac_cv_bin_shell_bosh,
X                [
Xac_err=`< /dev/null /bin/bosh -c 'echo abc' 2> /dev/null | grep abc`
Xif test "$ac_err" != "abc"; then
X	ac_cv_bin_shell_bosh=no
Xelse
X	ac_err=`/bin/bosh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
X	if test -z "$ac_err"; then
X		ac_cv_bin_shell_bosh=yes
X	else
X		ac_cv_bin_shell_bosh=no
X	fi
Xfi
X])
Xif test $ac_cv_bin_shell_bosh = yes; then
X  AC_DEFINE(BIN_SHELL_BOSH)
Xfi])
X
Xdnl Checks if /opt/schily/bin/bosh is a working shell
Xdnl Defines OPT_SCHILY_BIN_SHELL_BOSH on success.
XAC_DEFUN([AC_OPT_SCHILY_BIN_SHELL_BOSH],
X[AC_CACHE_CHECK([whether /opt/schily/bin/bosh is a working shell], ac_cv_opt_schily_bin_shell_bosh,
X                [
Xac_err=`< /dev/null /opt/schily/bin/bosh -c 'echo abc' 2> /dev/null | grep abc`
Xif test "$ac_err" != "abc"; then
X	ac_cv_opt_schily_bin_shell_bosh=no
Xelse
X	ac_err=`/opt/schily/bin/bosh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
X	if test -z "$ac_err"; then
X		ac_cv_opt_schily_bin_shell_bosh=yes
X	else
X		ac_cv_opt_schily_bin_shell_bosh=no
X	fi
Xfi
X])
Xif test $ac_cv_opt_schily_bin_shell_bosh = yes; then
X  AC_DEFINE(OPT_SCHILY_BIN_SHELL_BOSH)
Xfi])
X
Xdnl Checks if sh -ce is broken
Xdnl Defines SHELL_CE_IS_BROKEN on success.
XAC_DEFUN([AC_SHELL_CE_BROKEN],
X[AC_CACHE_CHECK([whether sh -ce is broken], ac_cv_shell_ce_is_broken,
X                [
Xac_err=`sh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
Xif test -n "$ac_err"; then
X	ac_cv_shell_ce_is_broken=yes
Xelse
X	ac_cv_shell_ce_is_broken=no
Xfi
X])
Xif test $ac_cv_shell_ce_is_broken = yes; then
X  AC_DEFINE(SHELL_CE_IS_BROKEN)
Xfi])
X
Xdnl Checks if Sun cc supports -m64
Xdnl Defines sun_cc64_opt on success.
XAC_DEFUN([AC_SUN_CC64_OPT],
X[AC_CACHE_CHECK([if suncc/cc supports -m64], ac_cv_sun_cc64_opt,
X                [
Xsun_cc64=cc
Xsun_cc64_opt=''
Xac_cv_sun_cc64_opt=no
Xif test "$GCC" != yes; then
X	if test "$CC" = suncc; then
X		sun_cc64=suncc
X	fi
X	ac_err=`< /dev/null eval $sun_cc64 -m64 -c 2>&1 | grep illegal`
X	if test -n "$ac_err"; then
X		ac_cv_sun_cc64_opt=no
X	else
X		ac_cv_sun_cc64_opt=yes
X	fi
Xfi
X])
Xif test $ac_cv_sun_cc64_opt = yes; then
X  sun_cc64_opt='-m64'
Xfi])
X
Xdnl Checks if HP cc supports -Ae
Xdnl Defines hp_cc_ansi_opt on success.
XAC_DEFUN([AC_HP_CC_ANSI_OPT],
X[AC_CACHE_CHECK([if HP cc supports -Ae], ac_cv_hp_cc_ansi_opt,
X                [
Xhp_cc=cc
Xhp_cc_ansi_opt=''
Xac_cv_hp_cc_ansi_opt=no
Xif test "$GCC" != yes; then
X	os_name=`(uname -s) 2> /dev/null`
X	if test ."$os_name" = .HP-UX ; then
X		ac_err=`< /dev/null eval $hp_cc -Ae -c 2>&1 | grep 'Bundled.*option is available only'`
X		if test -n "$ac_err"; then
X			ac_cv_hp_cc_ansi_opt=no
X		else
X			ac_cv_hp_cc_ansi_opt=yes
X		fi
X	fi
Xfi
X])
Xif test $ac_cv_hp_cc_ansi_opt = yes; then
X  hp_cc_ansi_opt='-Ae'
Xfi])
X
Xdnl Checks if HP cc supports -O
Xdnl Defines hp_cc_opt_opt on success.
XAC_DEFUN([AC_HP_CC_OPT_OPT],
X[AC_CACHE_CHECK([if HP cc supports -O], ac_cv_hp_cc_opt_opt,
X                [
Xhp_cc=cc
Xhp_cc_opt_opt=''
Xac_cv_hp_cc_opt_opt=no
Xif test "$GCC" != yes; then
X	os_name=`(uname -s) 2> /dev/null`
X	if test ."$os_name" = .HP-UX ; then
X		ac_err=`< /dev/null eval $hp_cc -O -c 2>&1 | grep 'Bundled.*option is available only'`
X		if test -n "$ac_err"; then
X			ac_cv_hp_cc_opt_opt=no
X		else
X			ac_cv_hp_cc_opt_opt=yes
X		fi
X	fi
Xfi
X])
Xif test $ac_cv_hp_cc_opt_opt = yes; then
X  hp_cc_opt_opt='-O'
Xfi])
X
Xdnl Checks if HP cc supports -G
Xdnl Defines hp_cc_gprof_opt on success.
XAC_DEFUN([AC_HP_CC_GPROF_OPT],
X[AC_CACHE_CHECK([if HP cc supports -G], ac_cv_hp_cc_gprof_opt,
X                [
Xhp_cc=cc
Xhp_cc_gprof_opt=''
Xac_cv_hp_cc_gprof_opt=no
Xif test "$GCC" != yes; then
X	os_name=`(uname -s) 2> /dev/null`
X	if test ."$os_name" = .HP-UX ; then
X		ac_err=`< /dev/null eval $hp_cc -O -c 2>&1 | grep 'Bundled.*option is available only'`
X		if test -n "$ac_err"; then
X			ac_cv_hp_cc_gprof_opt=no
X		else
X			ac_cv_hp_cc_gprof_opt=yes
X		fi
X	fi
Xfi
X])
Xif test $ac_cv_hp_cc_gprof_opt = yes; then
X  hp_cc_gprof_opt='-G'
Xfi])
X
Xdnl XXX this used to be:
Xdnl #ifndef $2 
Xdnl	char *p = (char *) $2; 
Xdnl #endif
Xdnl but we use this test un order to check whether we are able to get the
Xdnl address of a function from this name, so we did replace this by:
Xdnl  char *p = (char *) $2;
Xdnl 
Xdnl AC_CHECK_DECLARE(INCLUDES, SYMBOL)
Xdnl Checks if symbol is declared
Xdnl Defines HAVE_DECL_SYMBOL on success.
XAC_DEFUN([AC_CHECK_DECLARE],
X[AC_CACHE_CHECK([if $2 is declared], ac_cv_have_decl_$2,
X                [AC_TRY_COMPILE([$1],
X[ char *p = (char *) $2; ],
X		[ac_cv_have_decl_$2=yes],
X		[ac_cv_have_decl_$2=no])])
Xchangequote(, )dnl
X  ac_tr_decl=HAVE_DECL_`echo $2 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xchangequote([, ])dnl
Xif test $ac_cv_have_decl_$2 = yes; then
X  AC_DEFINE_UNQUOTED($ac_tr_decl)
Xfi])
X
Xdnl AC_CHECK_DFUNC(INCLUDES, SYMBOL)
Xdnl Checks if symbol is defined or a function
Xdnl Defines HAVE_SYMBOL on success.
XAC_DEFUN([AC_CHECK_DFUNC],
X[AC_CACHE_CHECK([if $2 is defined or function], ac_cv_have_$2,
X                [AC_TRY_LINK([$1],
X[
X#ifndef $2
X	char *p = (char *) $2;
X#endif],
X		[ac_cv_have_$2=yes],
X		[ac_cv_have_$2=no])])
Xchangequote(, )dnl
X  ac_tr_dfunc=HAVE_`echo $2 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xchangequote([, ])dnl
Xif test $ac_cv_have_$2 = yes; then
X  AC_DEFINE_UNQUOTED($ac_tr_dfunc)
Xfi])
X
Xdnl Checks whether symbol is defined or a function in a lib
Xdnl AC_CHECK_DLIB(INCLUDES, LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
Xdnl              [, OTHER-LIBRARIES]]])
XAC_DEFUN(AC_CHECK_DLIB,
X[AC_MSG_CHECKING([for $3 in -l$2])
Xdnl Use a cache variable name containing both the library and function name,
Xdnl because the test really is for library $2 defining function $3, not
Xdnl just for library $2.  Separate tests with the same $2 and different $3s
Xdnl may have different results.
Xac_lib_var=`echo $2['_']$3 | sed 'y%./+-%__p_%'`
XAC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
X[ac_save_LIBS="$LIBS"
XLIBS="-l$2 $6 $LIBS"
XAC_TRY_LINK([$1],
X[
X#ifndef $3
X	char *p = (char *) $3;
X#endif],
X	    eval "ac_cv_lib_$ac_lib_var=yes",
X	    eval "ac_cv_lib_$ac_lib_var=no")
XLIBS="$ac_save_LIBS"
X])dnl
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  ifelse([$4], ,
X[changequote(, )dnl
X  ac_tr_lib=HAVE_LIB`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
X    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_lib)
X  LIBS="-l$2 $LIBS"
X], [$4])
Xelse
X  AC_MSG_RESULT(no)
Xifelse([$5], , , [$5
X])dnl
Xfi
X])
X
Xdnl Checks whether symbol is in a lib
Xdnl this does not work for void func()
Xdnl AC_CHECK_ILIB(INCLUDES, LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
Xdnl              [, OTHER-LIBRARIES]]])
XAC_DEFUN(AC_CHECK_ILIB,
X[AC_MSG_CHECKING([for $3 in -l$2])
Xdnl Use a cache variable name containing both the library and function name,
Xdnl because the test really is for library $2 defining function $3, not
Xdnl just for library $2.  Separate tests with the same $2 and different $3s
Xdnl may have different results.
Xac_lib_var=`echo $2['_']$3 | sed 'y%./+-%__p_%'`
XAC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
X[ac_save_LIBS="$LIBS"
XLIBS="-l$2 $6 $LIBS"
XAC_TRY_LINK([$1],
X[
X	char *p = (char *) $3;
X
X	return ((int)p);
X],
X	    eval "ac_cv_lib_$ac_lib_var=yes",
X	    eval "ac_cv_lib_$ac_lib_var=no")
XLIBS="$ac_save_LIBS"
X])dnl
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  ifelse([$4], ,
X[changequote(, )dnl
X  ac_tr_lib=HAVE_LIB`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
X    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_lib)
X  LIBS="-l$2 $LIBS"
X], [$4])
Xelse
X  AC_MSG_RESULT(no)
Xifelse([$5], , , [$5
X])dnl
Xfi
X])
X
X
Xdnl Checks if structure 'stat' have field 'st_spare1'.
Xdnl Defines HAVE_ST_SPARE1 on success.
XAC_DEFUN([AC_STRUCT_ST_SPARE1],
X[AC_CACHE_CHECK([if struct stat contains st_spare1], ac_cv_struct_st_spare1,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_spare1 = 0;],
X                                [ac_cv_struct_st_spare1=yes],
X                                [ac_cv_struct_st_spare1=no])])
Xif test $ac_cv_struct_st_spare1 = yes; then
X  AC_DEFINE(HAVE_ST_SPARE1)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_atimensec'.
Xdnl Defines HAVE_ST_ATIMENSEC on success.
XAC_DEFUN([AC_STRUCT_ST_ATIMENSEC],
X[AC_CACHE_CHECK([if struct stat contains st_atimensec], ac_cv_struct_st_atimensec,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_atimensec = 0;],
X                                [ac_cv_struct_st_atimensec=yes],
X                                [ac_cv_struct_st_atimensec=no])])
Xif test $ac_cv_struct_st_atimensec = yes; then
X  AC_DEFINE(HAVE_ST_ATIMENSEC)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_atime_n'.
Xdnl Defines HAVE_ST_ATIME_N on success.
XAC_DEFUN([AC_STRUCT_ST_ATIME_N],
X[AC_CACHE_CHECK([if struct stat contains st_atime_n], ac_cv_struct_st_atime_n,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_atime_n = 0;],
X                                [ac_cv_struct_st_atime_n=yes],
X                                [ac_cv_struct_st_atime_n=no])])
Xif test $ac_cv_struct_st_atime_n = yes; then
X  AC_DEFINE(HAVE_ST_ATIME_N)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_atim.tv_nsec'.
Xdnl Defines HAVE_ST_NSEC on success.
XAC_DEFUN([AC_STRUCT_ST_NSEC],
X[AC_CACHE_CHECK([if struct stat contains st_atim.tv_nsec], ac_cv_struct_st_nsec,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_atim.tv_nsec = 0;],
X                                [ac_cv_struct_st_nsec=yes],
X                                [ac_cv_struct_st_nsec=no])])
Xif test $ac_cv_struct_st_nsec = yes; then
X  AC_DEFINE(HAVE_ST_NSEC)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_atim.st__tim.tv_nsec'.
Xdnl Defines HAVE_ST__TIM on success.
XAC_DEFUN([AC_STRUCT_ST__TIM],
X[AC_CACHE_CHECK([if struct stat contains st_atim.st__tim.tv_nsec], ac_cv_struct_st__tim,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_atim.st__tim.tv_nsec = 0;],
X                                [ac_cv_struct_st__tim=yes],
X                                [ac_cv_struct_st__tim=no])])
Xif test $ac_cv_struct_st__tim = yes; then
X  AC_DEFINE(HAVE_ST__TIM)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_atimspec.tv_nsec'.
Xdnl Defines HAVE_ST_ATIMESPEC on success.
XAC_DEFUN([AC_STRUCT_ST_ATIMESPEC],
X[AC_CACHE_CHECK([if struct stat contains st_atimespec.tv_nsec], ac_cv_struct_st_atimespec,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_atimespec.tv_nsec = 0;],
X                                [ac_cv_struct_st_atimespec=yes],
X                                [ac_cv_struct_st_atimespec=no])])
Xif test $ac_cv_struct_st_atimespec = yes; then
X  AC_DEFINE(HAVE_ST_ATIMESPEC)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_flag'.
Xdnl Defines HAVE_ST_FLAG on success.
XAC_DEFUN([AC_STRUCT_ST_FLAG],
X[AC_CACHE_CHECK([if struct stat contains st_flag], ac_cv_struct_st_flag,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_flag = 0;],
X                                [ac_cv_struct_st_flag=yes],
X                                [ac_cv_struct_st_flag=no])])
Xif test $ac_cv_struct_st_flag = yes; then
X  AC_DEFINE(HAVE_ST_FLAG)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_flags'.
Xdnl Defines HAVE_ST_FLAGS on success.
XAC_DEFUN([AC_STRUCT_ST_FLAGS],
X[AC_CACHE_CHECK([if struct stat contains st_flags], ac_cv_struct_st_flags,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_flags = 0;],
X                                [ac_cv_struct_st_flags=yes],
X                                [ac_cv_struct_st_flags=no])])
Xif test $ac_cv_struct_st_flags = yes; then
X  AC_DEFINE(HAVE_ST_FLAGS)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_fstype'.
Xdnl Defines HAVE_ST_FSTYPE on success.
XAC_DEFUN([AC_STRUCT_ST_FSTYPE],
X[AC_CACHE_CHECK([if struct stat contains st_fstype], ac_cv_struct_st_fstype,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_fstype[0] = 0;],
X                                [ac_cv_struct_st_fstype=yes],
X                                [ac_cv_struct_st_fstype=no])])
Xif test $ac_cv_struct_st_fstype = yes; then
X  AC_DEFINE(HAVE_ST_FSTYPE)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_aclcnt'.
Xdnl Defines HAVE_ST_ACLCNT on success.
XAC_DEFUN([AC_STRUCT_ST_ACLCNT],
X[AC_CACHE_CHECK([if struct stat contains st_aclcnt], ac_cv_struct_st_aclcnt,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_aclcnt = 0;],
X                                [ac_cv_struct_st_aclcnt=yes],
X                                [ac_cv_struct_st_aclcnt=no])])
Xif test $ac_cv_struct_st_aclcnt = yes; then
X  AC_DEFINE(HAVE_ST_ACLCNT)
Xfi])
X
Xdnl Checks if structure 'utsname' have field 'arch'.
Xdnl Defines HAVE_UTSNAME_ARCH on success.
XAC_DEFUN([AC_STRUCT_UTSNAME_ARCH],
X[AC_CACHE_CHECK([if struct utsname contains arch], ac_cv_struct_utsname_arch,
X                [AC_TRY_COMPILE([#include <sys/utsname.h>],
X                                [struct  utsname u; u.arch[0] = 0;],
X                                [ac_cv_struct_utsname_arch=yes],
X                                [ac_cv_struct_utsname_arch=no])])
Xif test $ac_cv_struct_utsname_arch = yes; then
X  AC_DEFINE(HAVE_UTSNAME_ARCH)
Xfi])
X
Xdnl Checks if structure 'utsname' have field 'processor'.
Xdnl Defines HAVE_UTSNAME_PROCESSOR on success.
XAC_DEFUN([AC_STRUCT_UTSNAME_PROCESSOR],
X[AC_CACHE_CHECK([if struct utsname contains processor], ac_cv_struct_utsname_processor,
X                [AC_TRY_COMPILE([#include <sys/utsname.h>],
X                                [struct  utsname u; u.processor[0] = 0;],
X                                [ac_cv_struct_utsname_processor=yes],
X                                [ac_cv_struct_utsname_processor=no])])
Xif test $ac_cv_struct_utsname_processor = yes; then
X  AC_DEFINE(HAVE_UTSNAME_PROCESSOR)
Xfi])
X
Xdnl Checks if structure 'utsname' have field 'sysname_host'.
Xdnl Defines HAVE_UTSNAME_SYSNAME_HOST on success.
XAC_DEFUN([AC_STRUCT_UTSNAME_SYSNAME_HOST],
X[AC_CACHE_CHECK([if struct utsname contains sysname_host], ac_cv_struct_utsname_sysname_host,
X                [AC_TRY_COMPILE([#include <sys/utsname.h>],
X                                [struct  utsname u; u.sysname_host[0] = 0;],
X                                [ac_cv_struct_utsname_sysname_host=yes],
X                                [ac_cv_struct_utsname_sysname_host=no])])
Xif test $ac_cv_struct_utsname_sysname_host = yes; then
X  AC_DEFINE(HAVE_UTSNAME_SYSNAME_HOST)
Xfi])
X
Xdnl Checks if structure 'utsname' have field 'release_host'.
Xdnl Defines HAVE_UTSNAME_RELEASE_HOST on success.
XAC_DEFUN([AC_STRUCT_UTSNAME_RELEASE_HOST],
X[AC_CACHE_CHECK([if struct utsname contains release_host], ac_cv_struct_utsname_release_host,
X                [AC_TRY_COMPILE([#include <sys/utsname.h>],
X                                [struct  utsname u; u.release_host[0] = 0;],
X                                [ac_cv_struct_utsname_release_host=yes],
X                                [ac_cv_struct_utsname_release_host=no])])
Xif test $ac_cv_struct_utsname_release_host = yes; then
X  AC_DEFINE(HAVE_UTSNAME_RELEASE_HOST)
Xfi])
X
Xdnl Checks if structure 'utsname' have field 'version_host'.
Xdnl Defines HAVE_UTSNAME_VERSION_HOST on success.
XAC_DEFUN([AC_STRUCT_UTSNAME_VERSION_HOST],
X[AC_CACHE_CHECK([if struct utsname contains version_host], ac_cv_struct_utsname_version_host,
X                [AC_TRY_COMPILE([#include <sys/utsname.h>],
X                                [struct  utsname u; u.version_host[0] = 0;],
X                                [ac_cv_struct_utsname_version_host=yes],
X                                [ac_cv_struct_utsname_version_host=no])])
Xif test $ac_cv_struct_utsname_version_host = yes; then
X  AC_DEFINE(HAVE_UTSNAME_VERSION_HOST)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_type'.
Xdnl Defines HAVE_MTGET_TYPE on success.
XAC_DEFUN([AC_STRUCT_MTGET_TYPE],
X[AC_CACHE_CHECK([if struct mtget contains mt_type], ac_cv_struct_mtget_type,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_type = 0;],
X                                [ac_cv_struct_mtget_type=yes],
X                                [ac_cv_struct_mtget_type=no])])
Xif test $ac_cv_struct_mtget_type = yes; then
X  AC_DEFINE(HAVE_MTGET_TYPE)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_model'.
Xdnl Defines HAVE_MTGET_MODEL on success.
XAC_DEFUN([AC_STRUCT_MTGET_MODEL],
X[AC_CACHE_CHECK([if struct mtget contains mt_model], ac_cv_struct_mtget_model,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_model = 0;],
X                                [ac_cv_struct_mtget_model=yes],
X                                [ac_cv_struct_mtget_model=no])])
Xif test $ac_cv_struct_mtget_model = yes; then
X  AC_DEFINE(HAVE_MTGET_MODEL)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_dsreg'.
Xdnl Defines HAVE_MTGET_DSREG on success.
XAC_DEFUN([AC_STRUCT_MTGET_DSREG],
X[AC_CACHE_CHECK([if struct mtget contains mt_dsreg], ac_cv_struct_mtget_dsreg,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_dsreg = 0;],
X                                [ac_cv_struct_mtget_dsreg=yes],
X                                [ac_cv_struct_mtget_dsreg=no])])
Xif test $ac_cv_struct_mtget_dsreg = yes; then
X  AC_DEFINE(HAVE_MTGET_DSREG)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_dsreg1'.
Xdnl Defines HAVE_MTGET_DSREG on success.
XAC_DEFUN([AC_STRUCT_MTGET_DSREG1],
X[AC_CACHE_CHECK([if struct mtget contains mt_dsreg1], ac_cv_struct_mtget_dsreg1,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_dsreg1 = 0;],
X                                [ac_cv_struct_mtget_dsreg1=yes],
X                                [ac_cv_struct_mtget_dsreg1=no])])
Xif test $ac_cv_struct_mtget_dsreg1 = yes; then
X  AC_DEFINE(HAVE_MTGET_DSREG1)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_dsreg2'.
Xdnl Defines HAVE_MTGET_DSREG2 on success.
XAC_DEFUN([AC_STRUCT_MTGET_DSREG2],
X[AC_CACHE_CHECK([if struct mtget contains mt_dsreg2], ac_cv_struct_mtget_dsreg2,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_dsreg2 = 0;],
X                                [ac_cv_struct_mtget_dsreg2=yes],
X                                [ac_cv_struct_mtget_dsreg2=no])])
Xif test $ac_cv_struct_mtget_dsreg2 = yes; then
X  AC_DEFINE(HAVE_MTGET_DSREG2)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_gstat'.
Xdnl Defines HAVE_MTGET_GSTAT on success.
XAC_DEFUN([AC_STRUCT_MTGET_GSTAT],
X[AC_CACHE_CHECK([if struct mtget contains mt_gstat], ac_cv_struct_mtget_gstat,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_gstat = 0;],
X                                [ac_cv_struct_mtget_gstat=yes],
X                                [ac_cv_struct_mtget_gstat=no])])
Xif test $ac_cv_struct_mtget_gstat = yes; then
X  AC_DEFINE(HAVE_MTGET_GSTAT)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_erreg'.
Xdnl Defines HAVE_MTGET_ERREG on success.
XAC_DEFUN([AC_STRUCT_MTGET_ERREG],
X[AC_CACHE_CHECK([if struct mtget contains mt_erreg], ac_cv_struct_mtget_erreg,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_erreg = 0;],
X                                [ac_cv_struct_mtget_erreg=yes],
X                                [ac_cv_struct_mtget_erreg=no])])
Xif test $ac_cv_struct_mtget_erreg = yes; then
X  AC_DEFINE(HAVE_MTGET_ERREG)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_resid'.
Xdnl Defines HAVE_MTGET_RESID on success.
XAC_DEFUN([AC_STRUCT_MTGET_RESID],
X[AC_CACHE_CHECK([if struct mtget contains mt_resid], ac_cv_struct_mtget_resid,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_resid = 0;],
X                                [ac_cv_struct_mtget_resid=yes],
X                                [ac_cv_struct_mtget_resid=no])])
Xif test $ac_cv_struct_mtget_resid = yes; then
X  AC_DEFINE(HAVE_MTGET_RESID)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_fileno'.
Xdnl Defines HAVE_MTGET_FILENO on success.
XAC_DEFUN([AC_STRUCT_MTGET_FILENO],
X[AC_CACHE_CHECK([if struct mtget contains mt_fileno],
X                ac_cv_struct_mtget_fileno,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X		                [struct  mtget t; t.mt_fileno = 0;],
X	        	        [ac_cv_struct_mtget_fileno=yes],
X                		[ac_cv_struct_mtget_fileno=no])])
Xif test $ac_cv_struct_mtget_fileno = yes; then
X  AC_DEFINE(HAVE_MTGET_FILENO)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_blkno'.
Xdnl Defines HAVE_MTGET_BLKNO on success.
XAC_DEFUN([AC_STRUCT_MTGET_BLKNO],
X[AC_CACHE_CHECK([if struct mtget contains mt_blkno], ac_cv_struct_mtget_blkno,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_blkno = 0;],
X                                [ac_cv_struct_mtget_blkno=yes],
X                                [ac_cv_struct_mtget_blkno=no])])
Xif test $ac_cv_struct_mtget_blkno = yes; then
X  AC_DEFINE(HAVE_MTGET_BLKNO)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_flags'.
Xdnl Defines HAVE_MTGET_FLAGS on success.
XAC_DEFUN([AC_STRUCT_MTGET_FLAGS],
X[AC_CACHE_CHECK([if struct mtget contains mt_flags], ac_cv_struct_mtget_flags,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_flags = 0;],
X                                [ac_cv_struct_mtget_flags=yes],
X                                [ac_cv_struct_mtget_flags=no])])
Xif test $ac_cv_struct_mtget_flags = yes; then
X  AC_DEFINE(HAVE_MTGET_FLAGS)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_bf'.
Xdnl Defines HAVE_MTGET_BF on success.
XAC_DEFUN([AC_STRUCT_MTGET_BF],
X[AC_CACHE_CHECK([if struct mtget contains mt_bf], ac_cv_struct_mtget_bf,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_bf = 0;],
X                                [ac_cv_struct_mtget_bf=yes],
X                                [ac_cv_struct_mtget_bf=no])])
Xif test $ac_cv_struct_mtget_bf = yes; then
X  AC_DEFINE(HAVE_MTGET_BF)
Xfi])
X
Xdnl Checks for illegal declaration of 'union semun' in sys/sem.h.
Xdnl Defines HAVE_UNION_SEMUN on success.
XAC_DEFUN([AC_STRUCT_UNION_SEMUN],
X[AC_CACHE_CHECK([if an illegal declaration for union semun in sys/sem.h exists], ac_cv_struct_union_semun,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/ipc.h>
X#include <sys/sem.h>], [union semun s;],
X                [ac_cv_struct_union_semun=yes],
X                [ac_cv_struct_union_semun=no])])
Xif test $ac_cv_struct_union_semun = yes; then
X  AC_DEFINE(HAVE_UNION_SEMUN)
Xfi])
X
Xdnl Checks if 'union wait' is declared in 'wait.h' or 'sys/wait.h'.
Xdnl Defines HAVE_UNION_WAIT on success.
XAC_DEFUN([AC_STRUCT_UNION_WAIT],
X[AC_CACHE_CHECK([if union wait is declared in wait.h or sys/wait.h], ac_cv_struct_union_wait,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#if	defined(HAVE_WAIT_H)
X#	include <wait.h>
X#else
X#include <sys/wait.h>
X#endif], [union wait w;],
X                [ac_cv_struct_union_wait=yes],
X                [ac_cv_struct_union_wait=no])])
Xif test $ac_cv_struct_union_wait = yes; then
X  AC_DEFINE(HAVE_UNION_WAIT)
Xfi])
X
Xdnl Checks if union wait is used by default
Xdnl Defines USE_UNION_WAIT to int on failure.
XAC_DEFUN([AC_USE_STRUCT_UNION_WAIT],
X[AC_REQUIRE([AC_HEADER_STDC])dnl
XAC_MSG_CHECKING(if union wait is used by default)
XAC_CACHE_VAL(ac_cv_use_union_wait,
X[AC_EGREP_CPP(dnl
Xchangequote(<<,>>)dnl
X<<xxzzy.*x_|xxzzy.*union>>dnl
Xchangequote([,]), [#include <sys/types.h>
X#if	defined(HAVE_WAIT_H)
X#	include <wait.h>
X#else
X#include <sys/wait.h>
X#endif
Xxxzzy WTERMSIG(status)
Xxxzzy WCOREDUMP(status)
Xxxzzy WEXITSTATUS(status)
Xxxzzy WSTOPSIG(status)
Xxxzzy WIFSTOPPED(status)
Xxxzzy WIFSIGNALED(status)
Xxxzzy WIFEXITED(status)], ac_cv_use_union_wait=yes, ac_cv_use_union_wait=no)])dnl
XAC_MSG_RESULT($ac_cv_use_union_wait)
Xif test $ac_cv_use_union_wait = yes; then
X  AC_DEFINE(USE_UNION_WAIT)
Xfi])
X
Xdnl Checks if 'struct rusage' is declared in sys/resource.h.
Xdnl Defines HAVE_STRUCT_RUSAGE on success.
XAC_DEFUN([AC_STRUCT_RUSAGE],
X[AC_CACHE_CHECK([if struct rusage is declared in sys/resource.h], ac_cv_struct_rusage,
X                [AC_TRY_COMPILE([#include <sys/time.h>
X#include <sys/resource.h>], [struct rusage r;],
X                [ac_cv_struct_rusage=yes],
X                [ac_cv_struct_rusage=no])])
Xif test $ac_cv_struct_rusage = yes; then
X  AC_DEFINE(HAVE_STRUCT_RUSAGE)
Xfi])
X
Xdnl Checks if structure 'siginfo' have field 'si_utime'.
Xdnl Defines HAVE_SI_UTIME on success.
XAC_DEFUN([AC_STRUCT_SI_UTIME],
X[AC_CACHE_CHECK([if struct siginfo contains si_utime], ac_cv_struct_si_utime,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/siginfo.h>],
X                                [struct  siginfo si; si.si_utime = 0;],
X                                [ac_cv_struct_si_utime=yes],
X                                [ac_cv_struct_si_utime=no])])
Xif test $ac_cv_struct_si_utime = yes; then
X  AC_DEFINE(HAVE_SI_UTIME)
Xfi])
X
X
Xdnl Checks if structure 'dirent' have field 'd_ino'.
Xdnl Defines HAVE_DIRENT_D_INO on success.
XAC_DEFUN([AC_STRUCT_DIRENT_D_INO],
X[AC_CACHE_CHECK([if struct dirent contains d_ino], ac_cv_struct_dirent_d_ino,
X                [AC_TRY_COMPILE([
X/*
X * This must be kept in sync with schily/dirdesf.h
X */
X#ifdef	HAVE_SYS_TYPES_H
X#	include <sys/types.h>
X#endif
X#ifdef	HAVE_SYS_STAT_H
X#	include <sys/stat.h>
X#endif
X#	ifdef	HAVE_DIRENT_H		/* This a POSIX compliant system */
X#		include <dirent.h>
X#		define	_FOUND_DIR_
X#	else				/* This is a Pre POSIX system	 */
X
X#	define 	dirent	direct
X
X#	if	defined(HAVE_SYS_DIR_H)
X#		include <sys/dir.h>
X#		define	_FOUND_DIR_
X#	endif
X
X#	if	defined(HAVE_NDIR_H) && !defined(_FOUND_DIR_)
X#		include <ndir.h>
X#		define	_FOUND_DIR_
X#	endif
X
X#	if	defined(HAVE_SYS_NDIR_H) && !defined(_FOUND_DIR_)
X#		include <sys/ndir.h>
X#		define	_FOUND_DIR_
X#	endif
X#	endif	/* HAVE_DIRENT_H */
X				],
X                                [struct  dirent d; d.d_ino = 0;],
X                                [ac_cv_struct_dirent_d_ino=yes],
X                                [ac_cv_struct_dirent_d_ino=no])])
Xif test $ac_cv_struct_dirent_d_ino = yes; then
X  AC_DEFINE(HAVE_DIRENT_D_INO)
Xfi])
X
Xdnl Checks if structure 'DIR' have field 'dd_fd'.
Xdnl Defines HAVE_DIR_DD_FD on success.
XAC_DEFUN([AC_STRUCT_DIR_DD_FD],
X[AC_CACHE_CHECK([if DIR * contains dd_fd], ac_cv_struct_dir_dd_fd,
X                [AC_TRY_COMPILE([#include <dirent.h>],
X                                [DIR d; d.dd_fd = 0;],
X                                [ac_cv_struct_dir_dd_fd=yes],
X                                [ac_cv_struct_dir_dd_fd=no])])
Xif test $ac_cv_struct_dir_dd_fd = yes; then
X  AC_DEFINE(HAVE_DIR_DD_FD)
Xfi])
X
Xdnl Checks wether major(), minor() and makedev() are defined in
Xdnl 'sys/mkdev.h' or in 'sys/sysmacros.h. Defines MAJOR_IN_MKDEV or
Xdnl MAJOR_IN_SYSMACROS or nothing.
XAC_DEFUN([AC_HEADER_MAKEDEV],
X[AC_CACHE_CHECK([for header file containing  major(), minor() and makedev()],
X               ac_cv_header_makedev,
X[ac_cv_header_makedev=none
XAC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mkdev.h>],
X               [int i = major(0); i = minor(0); i = makedev(0,0);],
X                [ac_cv_header_makedev=sys/mkdev.h])
Xif test $ac_cv_header_makedev = none; then
X  AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/sysmacros.h>],
X                 [int i = major(0); i = minor(0); i = makedev(0,0);],
X                 [ac_cv_header_makedev=sys/sysmacros.h])
Xfi])
Xif test $ac_cv_header_makedev = sys/mkdev.h; then
X  AC_DEFINE(MAJOR_IN_MKDEV)
Xfi
Xif test $ac_cv_header_makedev = sys/sysmacros.h; then
X  AC_DEFINE(MAJOR_IN_SYSMACROS)
Xfi])
X
Xdnl Checks for USG derived STDIO that uses _filbuf()
Xdnl Defines HAVE__FILBUF on success.
XAC_DEFUN([AC_HEADER__FILBUF],
X[AC_CACHE_CHECK([for _filbuf()], ac_cv_func__filbuf,
X                [AC_TRY_LINK([#include <stdio.h>],
X[FILE    *f;
Xint     flag;
Xint     count;
Xchar    *ptr;
Xchar	c = 0;
Xf = fopen("confdefs.h", "r");
X_filbuf(f);
X_flsbuf(c, f);
Xflag  = f->_flag & _IONBF;
Xflag |= f->_flag & _IOERR;
Xflag |= f->_flag & _IOEOF;
Xcount = f->_cnt;
Xptr = (char *)f->_ptr;
Xfclose(f);],
X                [ac_cv_func__filbuf=yes],
X                [ac_cv_func__filbuf=no])])
Xif test $ac_cv_func__filbuf = yes; then
X  AC_DEFINE(HAVE__FILBUF)
Xfi])
X
Xdnl Checks for USG derived STDIO that uses __filbuf()
Xdnl Defines HAVE___FILBUF on success.
XAC_DEFUN([AC_HEADER___FILBUF],
X[AC_CACHE_CHECK([for __filbuf()], ac_cv_func___filbuf,
X                [AC_TRY_LINK([#include <stdio.h>],
X[FILE    *f;
Xint     flag;
Xint     count;
Xchar    *ptr;
Xchar	c = 0;
Xf = fopen("confdefs.h", "r");
X__filbuf(f);
X__flsbuf(c, f);
Xflag  = f->_flag & _IONBF;
Xflag |= f->_flag & _IOERR;
Xflag |= f->_flag & _IOEOF;
Xcount = f->_cnt;
Xptr = (char *)f->_ptr;
Xfclose(f);],
X                [ac_cv_func___filbuf=yes],
X                [ac_cv_func___filbuf=no])])
Xif test $ac_cv_func___filbuf = yes; then
X  AC_DEFINE(HAVE___FILBUF)
Xfi])
X
Xdnl Checks for USG derived STDIO
Xdnl Defines HAVE_USG_STDIO on success.
XAC_DEFUN([AC_HEADER_USG_STDIO],
X[AC_REQUIRE([AC_HEADER__FILBUF])AC_REQUIRE([AC_HEADER___FILBUF])dnl
XAC_CACHE_CHECK([for USG derived STDIO], ac_cv_header_usg_stdio,
X                [AC_TRY_LINK([#include <stdio.h>],
X[FILE    *f;
Xint     flag;
Xint     count;
Xchar    *ptr;
Xchar	c = 0;
Xf = fopen("confdefs.h", "r");
X#ifdef	HAVE___FILBUF
X__filbuf(f);
X__flsbuf(c, f);
X#else
X#	ifdef	HAVE__FILBUF
X_filbuf(f);
X_flsbuf(c, f);
X#	else
Xno filbuf()
X#	endif
X#endif
Xflag  = f->_flag & _IONBF;
Xflag |= f->_flag & _IOERR;
Xflag |= f->_flag & _IOEOF;
Xcount = f->_cnt;
Xptr = (char *)f->_ptr;
Xfclose(f);],
X                [ac_cv_header_usg_stdio=yes],
X                [ac_cv_header_usg_stdio=no])])
Xif test $ac_cv_header_usg_stdio = yes; then
X  AC_DEFINE(HAVE_USG_STDIO)
Xfi])
X
Xdnl Checks for errno definition in <errno.h>
Xdnl Defines HAVE_ERRNO_DEF on success.
XAC_DEFUN([AC_HEADER_ERRNO_DEF],
X[AC_CACHE_CHECK([for errno definition in errno.h], ac_cv_header_errno_def,
X                [AC_TRY_COMPILE([#include <errno.h>],
X[errno = 0;],
X                [ac_cv_header_errno_def=yes],
X                [ac_cv_header_errno_def=no])])
Xif test $ac_cv_header_errno_def = yes; then
X  AC_DEFINE(HAVE_ERRNO_DEF)
Xfi])
X
Xdnl Checks for environ definition in <unistd.h>
Xdnl Defines HAVE_ENVIRON_DEF on success.
XAC_DEFUN([AC_HEADER_ENVIRON_DEF],
X[AC_CACHE_CHECK([for environ definition in unistd.h/stdlib.h], ac_cv_header_environ_def,
X                [AC_TRY_COMPILE([
X#ifdef	HAVE_UNISTD_H
X#include <unistd.h>
X#else
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>	/* MSC no unistd.h but environ in stdlib.h */
X#endif
X#endif
X],
X[environ = 0;],
X                [ac_cv_header_environ_def=yes],
X                [ac_cv_header_environ_def=no])])
Xif test $ac_cv_header_environ_def = yes; then
X  AC_DEFINE(HAVE_ENVIRON_DEF)
Xfi])
X
Xdnl Checks for sys_siglist definition in <signal.h>
Xdnl Defines HAVE_SYS_SIGLIST_DEF on success.
XAC_DEFUN([AC_HEADER_SYS_SIGLIST_DEF],
X[AC_CACHE_CHECK([for sys_siglist definition in signal.h], ac_cv_header_sys_siglist_def,
X                [AC_TRY_COMPILE([#include <signal.h>],
X[char *cp = (char *)sys_siglist[0];],
X                [ac_cv_header_sys_siglist_def=yes],
X                [ac_cv_header_sys_siglist_def=no])])
Xif test $ac_cv_header_sys_siglist_def = yes; then
X  AC_DEFINE(HAVE_SYS_SIGLIST_DEF)
Xfi])
X
Xdnl Checks for extern timezone in time.h or sys/time.h
Xdnl Defines HAVE_VAR_TIMEZONE_DEF on success.
XAC_DEFUN([AC_VAR_TIMEZONE_DEF],
X[AC_REQUIRE([AC_HEADER_TIME])dnl
XAC_CACHE_CHECK([for extern timezone in time.h or sys/time.h], ac_cv_var_timezone_def,
X                [AC_TRY_COMPILE([
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif], [timezone = 1;],
X                [ac_cv_var_timezone_def=yes],
X                [ac_cv_var_timezone_def=no])])
Xif test $ac_cv_var_timezone_def = yes; then
X  AC_DEFINE(HAVE_VAR_TIMEZONE_DEF)
Xfi])
X
Xdnl Checks if extern long timezone exists in libc
Xdnl Defines HAVE_VAR_TIMEZONE on success.
XAC_DEFUN([AC_VAR_TIMEZONE],
X[AC_CACHE_CHECK([for working extern long timezone ], ac_cv_var_timezone,
X                [AC_TRY_RUN([
Xextern	long	timezone;
X
Xint
Xmain()
X{
X	exit(timezone != 0);
X}],
X                [ac_cv_var_timezone=yes],
X                [ac_cv_var_timezone=no])])
Xif test $ac_cv_var_timezone = yes; then
X  AC_DEFINE(HAVE_VAR_TIMEZONE)
Xfi])
X
Xdnl Checks for UNIX-98 compliant <inttypes.h>
Xdnl Defines HAVE_INTTYPES_H on success.
XAC_DEFUN([AC_HEADER_INTTYPES],
X[AC_CACHE_CHECK([for UNIX-98 compliant inttypes.h], ac_cv_header_inttypes,
X                [AC_TRY_COMPILE([#include <inttypes.h>],
X[int8_t c; uint8_t uc; int16_t s; uint16_t us; int32_t i; uint32_t ui;
Xint64_t ll; uint64_t ull;
Xintptr_t ip; uintptr_t uip;],
X                [ac_cv_header_inttypes=yes],
X                [ac_cv_header_inttypes=no])])
Xif test $ac_cv_header_inttypes = yes; then
X  AC_DEFINE(HAVE_INTTYPES_H)
Xfi])
X
Xdnl Checks for SUSv3 compliant <stdint.h>
Xdnl Defines HAVE_STDINT_H and HAVE_TYPE_INTMAX_T/HAVE_TYPE_UINTMAX_T on success.
XAC_DEFUN([AC_HEADER_STDINT],
X[AC_CACHE_CHECK([for SUSv3 compliant stdint.h], ac_cv_header_stdint,
X                [AC_TRY_COMPILE([#include <stdint.h>],
X[int8_t c; uint8_t uc; int16_t s; uint16_t us; int32_t i; uint32_t ui;
Xint64_t ll; uint64_t ull;
Xintptr_t ip; uintptr_t uip;
Xintmax_t im; uintmax_t uim;],
X                [ac_cv_header_stdint=yes],
X                [ac_cv_header_stdint=no])])
Xif test $ac_cv_header_stdint = yes; then
X  AC_DEFINE(HAVE_STDINT_H)
X  AC_DEFINE(HAVE_TYPE_INTMAX_T)
X  AC_DEFINE(HAVE_TYPE_UINTMAX_T)
Xfi])
X
Xdnl Checks for struct timeval in time.h or sys/time.h
Xdnl Defines HAVE_STRUCT_TIMEVAL on success.
XAC_DEFUN([AC_STRUCT_TIMEVAL],
X[AC_REQUIRE([AC_HEADER_TIME])dnl
XAC_CACHE_CHECK([for struct timeval in time.h or sys/time.h], ac_cv_struct_timeval,
X                [AC_TRY_COMPILE([
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif], [struct timeval tv;],
X                [ac_cv_struct_timeval=yes],
X                [ac_cv_struct_timeval=no])])
Xif test $ac_cv_struct_timeval = yes; then
X  AC_DEFINE(HAVE_STRUCT_TIMEVAL)
Xfi])
X
Xdnl Checks for struct timezone in time.h or sys/time.h
Xdnl Defines HAVE_STRUCT_TIMEZONE on success.
XAC_DEFUN([AC_STRUCT_TIMEZONE],
X[AC_REQUIRE([AC_HEADER_TIME])dnl
XAC_CACHE_CHECK([for struct timezone in time.h or sys/time.h], ac_cv_struct_timezone,
X                [AC_TRY_COMPILE([
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif], [struct timezone tz;],
X                [ac_cv_struct_timezone=yes],
X                [ac_cv_struct_timezone=no])])
Xif test $ac_cv_struct_timezone = yes; then
X  AC_DEFINE(HAVE_STRUCT_TIMEZONE)
Xfi])
X
Xdnl Checks for type time_t
Xdnl Defines time_t to long on failure.
XAC_DEFUN([AC_TYPE_TIME_T],
X[AC_REQUIRE([AC_HEADER_TIME])dnl
XAC_CACHE_CHECK([for time_t], ac_cv_type_time_t,
X                [AC_TRY_COMPILE([
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif], [time_t t;],
X                [ac_cv_type_time_t=yes],
X                [ac_cv_type_time_t=no])])
Xif test $ac_cv_type_time_t = no; then
X  AC_DEFINE(time_t, long)
Xfi])
X
Xdnl AC_CHECK_SIZE_TIME([CROSS-SIZE])
Xdnl This must be called past AC_CHECK_SIZEOF(long int)
XAC_DEFUN(AC_CHECK_SIZE_TIME_T,
X[changequote(<<, >>)dnl
Xdnl The name to #define.
Xdefine(<<AC_TYPE_NAME>>, translit(sizeof_time_t, [a-z *], [A-Z_P]))dnl
Xdnl The cache variable name.
Xdefine(<<AC_CV_NAME>>, translit(ac_cv_sizeof_time_t, [ *], [_p]))dnl
Xchangequote([, ])dnl
XAC_MSG_CHECKING(size of time_t)
XAC_CACHE_VAL(AC_CV_NAME,
X[AC_TRY_RUN([#include <stdio.h>
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(time_t));
X  exit(0);
X}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=SIZEOF_LONG_INT, ifelse([$1], , , AC_CV_NAME=$1))])dnl
XAC_MSG_RESULT($AC_CV_NAME)
XAC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
Xundefine([AC_TYPE_NAME])dnl
Xundefine([AC_CV_NAME])dnl
X])
X
Xdnl AC_CHECK_SIZE_WCHAR([CROSS-SIZE])
XAC_DEFUN(AC_CHECK_SIZE_WCHAR,
X[changequote(<<, >>)dnl
Xdnl The name to #define.
Xdefine(<<AC_TYPE_NAME>>, translit(sizeof_wchar, [a-z *], [A-Z_P]))dnl
Xdnl The cache variable name.
Xdefine(<<AC_CV_NAME>>, translit(ac_cv_sizeof_wchar, [ *], [_p]))dnl
Xchangequote([, ])dnl
XAC_MSG_CHECKING(size of wchar)
XAC_CACHE_VAL(AC_CV_NAME,
X[AC_TRY_RUN([#include <stdio.h>
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(L'a'));
X  exit(0);
X}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$1], , , AC_CV_NAME=$1))])dnl
XAC_MSG_RESULT($AC_CV_NAME)
XAC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
Xundefine([AC_TYPE_NAME])dnl
Xundefine([AC_CV_NAME])dnl
X])
X
Xdnl AC_CHECK_SIZE_WCHAR([CROSS-SIZE])
XAC_DEFUN(AC_CHECK_SIZE_WCHAR_T,
X[changequote(<<, >>)dnl
Xdnl The name to #define.
Xdefine(<<AC_TYPE_NAME>>, translit(sizeof_wchar_t, [a-z *], [A-Z_P]))dnl
Xdnl The cache variable name.
Xdefine(<<AC_CV_NAME>>, translit(ac_cv_sizeof_wchar_t, [ *], [_p]))dnl
Xchangequote([, ])dnl
XAC_MSG_CHECKING(size of wchar_t)
XAC_CACHE_VAL(AC_CV_NAME,
X[AC_TRY_RUN([#include <stdio.h>
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(wchar_t));
X  exit(0);
X}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=SIZEOF_CHAR, ifelse([$1], , , AC_CV_NAME=$1))])dnl
XAC_MSG_RESULT($AC_CV_NAME)
XAC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
Xundefine([AC_TYPE_NAME])dnl
Xundefine([AC_CV_NAME])dnl
X])
X
X
Xdnl Checks for type clock_t
Xdnl Defines clock_t to long on failure.
Xdnl XXX we cannot check for AC_CHECK_HEADERS(sys/times.h)
XAC_DEFUN([AC_TYPE_CLOCK_T],
X[AC_REQUIRE([AC_HEADER_TIME])dnl
XAC_CACHE_CHECK([for clock_t], ac_cv_type_clock_t,
X                [AC_TRY_COMPILE([
X#include <sys/types.h>
X/*
X * time.h is needed because of a bug in Next Step.
X * Next Step needs time.h for clock_t
X */
X#ifdef	TIME_WITH_SYS_TIME
X#	ifndef	_INCL_SYS_TIME_H
X#	include <sys/time.h>
X#	define	_INCL_SYS_TIME_H
X#	endif
X#	ifndef	_INCL_TIME_H
X#	include <time.h>
X#	define	_INCL_TIME_H
X#	endif
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	ifndef	_INCL_SYS_TIME_H
X#	include <sys/time.h>
X#	define	_INCL_SYS_TIME_H
X#	endif
X#else
X#	ifndef	_INCL_TIME_H
X#	include <time.h>
X#	define	_INCL_TIME_H
X#	endif
X#endif
X#endif
X#ifdef	HAVE_SYS_TIMES_H
X#include <sys/times.h>
X#endif
X		], [clock_t t;],
X                [ac_cv_type_clock_t=yes],
X                [ac_cv_type_clock_t=no])])
Xif test $ac_cv_type_clock_t = no; then
X  AC_DEFINE(clock_t, long)
Xfi])
X
Xdnl Checks for type socklen_t
Xdnl Defines socklen_t to int on failure.
XAC_DEFUN([AC_TYPE_SOCKLEN_T],
X[AC_REQUIRE([AC_HEADER_STDC])dnl
XAC_MSG_CHECKING(for socklen_t)
XAC_CACHE_VAL(ac_cv_type_socklen_t,
X[AC_EGREP_CPP(dnl
Xchangequote(<<,>>)dnl
X<<(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]>>dnl
Xchangequote([,]), [#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#include <sys/socket.h>], ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no)])dnl
XAC_MSG_RESULT($ac_cv_type_socklen_t)
Xif test $ac_cv_type_socklen_t = no; then
X  AC_DEFINE(socklen_t, int)
Xfi])
X
Xdnl Checks for type stack_t
Xdnl Defines HAVE_STACK_T on success.
XAC_DEFUN([AC_TYPE_STACK_T],
X[AC_CACHE_CHECK([if stack_t is declared in signal.h], ac_cv_stack_t,
X                [AC_TRY_COMPILE([#include <signal.h>],
X                                [stack_t ss; ss.ss_size = 0;],
X                                [ac_cv_stack_t=yes],
X                                [ac_cv_stack_t=no])])
Xif test $ac_cv_stack_t = yes; then
X  AC_DEFINE(HAVE_STACK_T)
Xfi])
X
Xdnl Checks for type siginfo_t
Xdnl Defines HAVE_SIGINFO_T on success.
XAC_DEFUN([AC_TYPE_SIGINFO_T],
X[AC_CACHE_CHECK([if siginfo_t is declared in signal.h], ac_cv_siginfo_t,
X                [AC_TRY_COMPILE([#include <signal.h>
X#ifdef	HAVE_SIGINFO_H
X#include <siginfo.h>
X#else
X#ifdef	HAVE_SYS_SIGINFO_H
X#include <sys/siginfo.h>
X#endif
X#endif],
X                                [siginfo_t si; si.si_signo = 0;],
X                                [ac_cv_siginfo_t=yes],
X                                [ac_cv_siginfo_t=no])])
Xif test $ac_cv_siginfo_t = yes; then
X  AC_DEFINE(HAVE_SIGINFO_T)
Xfi])
X
Xdnl Checks for type struct sockaddr_storage
Xdnl Defines HAVE_SOCKADDR_STORAGE on success.
XAC_DEFUN([AC_STRUCT_SOCKADDR_STORAGE],
X[AC_CACHE_CHECK([if struct sockaddr_storage is declared in socket.h], ac_cv_struct_sockaddr_storage,
X                [AC_TRY_COMPILE([#include <sys/socket.h>],
X                                [struct  sockaddr_storage ss; ss.ss_family = 0;],
X                                [ac_cv_struct_sockaddr_storage=yes],
X                                [ac_cv_struct_sockaddr_storage=no])])
Xif test $ac_cv_struct_sockaddr_storage = yes; then
X  AC_DEFINE(HAVE_SOCKADDR_STORAGE)
Xfi])
X
Xdnl Checks for type long long
Xdnl Defines HAVE_LONGLONG on success.
XAC_DEFUN([AC_TYPE_LONGLONG],
X[AC_CACHE_CHECK([for type long long], ac_cv_type_longlong,
X                [AC_TRY_COMPILE([], [long long i;],
X                [ac_cv_type_longlong=yes],
X                [ac_cv_type_longlong=no])])
Xif test $ac_cv_type_longlong = yes; then
X  AC_DEFINE(HAVE_LONGLONG)
Xfi])
X
Xdnl Checks for type __int64
Xdnl Defines HAVE___INT64 on success.
XAC_DEFUN([AC_TYPE___INT64],
X[AC_CACHE_CHECK([for type __int64], ac_cv_type___int64,
X                [AC_TRY_COMPILE([], [__int64 i;],
X                [ac_cv_type___int64=yes],
X                [ac_cv_type___int64=no])])
Xif test $ac_cv_type___int64 = yes; then
X  AC_DEFINE(HAVE___INT64)
Xfi])
X
Xdnl Checks for type long double
Xdnl Defines HAVE_LONGDOUBLE on success.
XAC_DEFUN([AC_TYPE_LONGDOUBLE],
X[AC_CACHE_CHECK([for type long double], ac_cv_type_longdouble,
X                [AC_TRY_COMPILE([], [long double ld;],
X                [ac_cv_type_longdouble=yes],
X                [ac_cv_type_longdouble=no])])
Xif test $ac_cv_type_longdouble = yes; then
X  AC_DEFINE(HAVE_LONGDOUBLE)
Xfi])
X
Xdnl Checks if C-compiler orders bitfields htol
Xdnl Defines BITFIELDS_HTOL on success.
XAC_DEFUN([AC_C_BITFIELDS],
X[AC_CACHE_CHECK([whether bitorder in bitfields is htol], ac_cv_c_bitfields_htol,
X                [AC_TRY_RUN([
Xstruct {
X	unsigned char	x1:4;
X	unsigned char	x2:4;
X} a;
Xint
Xmain()
X{
Xchar	*cp;
X
Xcp = (char *)&a;
X*cp = 0x12;
Xexit(a.x1 == 2);}],
X                [ac_cv_c_bitfields_htol=yes],
X                [ac_cv_c_bitfields_htol=no])])
Xif test $ac_cv_c_bitfields_htol = yes; then
X  AC_DEFINE(BITFIELDS_HTOL)
Xfi])
X
Xdnl Checks if C-compiler understands prototypes
Xdnl Defines PROTOTYPES on success.
XAC_DEFUN([AC_TYPE_PROTOTYPES],
X[AC_CACHE_CHECK([for prototypes], ac_cv_type_prototypes,
X                [AC_TRY_RUN([
Xdoit(int i, ...)
X{return 0;}
Xint
Xmain(int ac, char *av[])
X{ doit(1, 2, 3);
Xexit(0);}],
X                [ac_cv_type_prototypes=yes],
X                [ac_cv_type_prototypes=no])])
Xif test $ac_cv_type_prototypes = yes; then
X  AC_DEFINE(PROTOTYPES)
Xfi])
X
Xdnl Checks for type size_t
Xdnl Defines HAVE_SIZE_T_ on success.
XAC_DEFUN([AC_TYPE_SIZE_T_],
X[AC_CACHE_CHECK([for type size_t], ac_cv_type_size_t_,
X                [AC_TRY_COMPILE([
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X#ifdef	HAVE_STDDEF_H
X#include <stddef.h>
X#endif
X#ifdef	HAVE_STDIO_H
X#include <stdio.h>
X#endif
X		], [size_t s;],
X                [ac_cv_type_size_t_=yes],
X                [ac_cv_type_size_t_=no])])
Xif test $ac_cv_type_size_t_ = yes; then
X  AC_DEFINE(HAVE_SIZE_T)
Xelse
X  AC_DEFINE(NO_SIZE_T)
Xfi])
X
Xdnl Checks if type char is unsigned
Xdnl Defines CHAR_IS_UNSIGNED on success.
XAC_DEFUN([AC_TYPE_CHAR],
X[AC_CACHE_CHECK([if char is unsigned], ac_cv_type_char_unsigned,
X                [AC_TRY_RUN([
Xint
Xmain()
X{
X	char c;
X
X	c = -1;
X	exit(c < 0);}],
X		[ac_cv_type_char_unsigned=yes],
X		[ac_cv_type_char_unsigned=no],
X		[ac_cv_type_char_unsigned=no])]) 
Xif test $ac_cv_type_char_unsigned = yes; then
X  AC_DEFINE(CHAR_IS_UNSIGNED)
Xfi])
X
Xdnl Checks if function/macro va_copy() is available
Xdnl Defines HAVE_VA_COPY on success.
XAC_DEFUN([AC_FUNC_VA_COPY],
X[AC_CACHE_CHECK([for va_copy], ac_cv_func_va_copy,
X                [AC_TRY_LINK([
X#ifdef	HAVE_STDARG_H
X#	include <stdarg.h>
X#else
X#	include <varargs.h>
X#endif], 
X		[
Xva_list a, b;
X
Xva_copy(a, b);],
X                [ac_cv_func_va_copy=yes],
X                [ac_cv_func_va_copy=no])])
Xif test $ac_cv_func_va_copy = yes; then
X  AC_DEFINE(HAVE_VA_COPY)
Xfi])
X
Xdnl Checks if function/macro __va_copy() is available
Xdnl Defines HAVE__VA_COPY on success.
XAC_DEFUN([AC_FUNC__VA_COPY],
X[AC_CACHE_CHECK([for __va_copy], ac_cv_func__va_copy,
X                [AC_TRY_LINK([
X#ifdef	HAVE_STDARG_H
X#	include <stdarg.h>
X#else
X#	include <varargs.h>
X#endif], 
X		[
Xva_list a, b;
X
X__va_copy(a, b);],
X
X                [ac_cv_func__va_copy=yes],
X                [ac_cv_func__va_copy=no])])
Xif test $ac_cv_func__va_copy = yes; then
X  AC_DEFINE(HAVE__VA_COPY)
Xfi])
X
Xdnl Checks if va_list is an array
Xdnl Defines VA_LIST_IS_ARRAY on success.
XAC_DEFUN([AC_TYPE_VA_LIST],
X[AC_CACHE_CHECK([if va_list is an array], ac_cv_type_va_list_array,
X                [AC_TRY_LINK([
X#ifdef	HAVE_STDARG_H
X#	include <stdarg.h>
X#else
X#	include <varargs.h>
X#endif
X],
X	[
Xva_list a, b;
X
Xa = b;],
X		[ac_cv_type_va_list_array=no],
X		[ac_cv_type_va_list_array=yes])]) 
Xif test $ac_cv_type_va_list_array = yes; then
X  AC_DEFINE(VA_LIST_IS_ARRAY)
Xfi])
X
Xdnl Checks if quotactl is present as ioctl
Xdnl Defines HAVE_QUOTAIOCTL on success.
XAC_DEFUN([AC_FUNC_QUOTAIOCTL],
X[AC_CACHE_CHECK([if quotactl is an ioctl], ac_cv_func_quotaioctl,
X                [AC_TRY_LINK([#include <sys/types.h>
X#include <sys/fs/ufs_quota.h>],
X		[struct quotctl q; ioctl(0, Q_QUOTACTL, &q)],
X		[ac_cv_func_quotaioctl=yes],
X		[ac_cv_func_quotaioctl=no])]) 
Xif test $ac_cv_func_quotaioctl = yes; then
X  AC_DEFINE(HAVE_QUOTAIOCTL)
Xfi])
X
Xdnl Checks if function __dtoa() is available
Xdnl Defines HAVE_DTOA on success.
XAC_DEFUN([AC_FUNC_DTOA],
X[AC_CACHE_CHECK([for __dtoa], ac_cv_func_dtoa,
X                [AC_TRY_LINK([extern  char *__dtoa();], 
X[int decpt; int sign; char *ep; char *bp;
Xbp = __dtoa(0.0, 2, 6, &decpt, &sign, &ep);],
X                [ac_cv_func_dtoa=yes],
X                [ac_cv_func_dtoa=no])])
Xif test $ac_cv_func_dtoa = yes; then
X  AC_DEFINE(HAVE_DTOA)
Xfi])
X
Xdnl Checks if reentrant __dtoa() exists (needs a result prt)
Xdnl Defines HAVE_DTOA_R on success.
XAC_DEFUN([AC_FUNC_DTOA_R],
X[AC_REQUIRE([AC_FUNC_DTOA])dnl
XAC_CACHE_CHECK([for __dtoa that needs result ptr], ac_cv_func_dtoa_r,
X                [AC_TRY_RUN([
Xextern	char *__dtoa();
Xint
Xmain()
X{
X#ifdef	HAVE_DTOA
X	int	decpt, sign;
X	char	*bp;
X	char	*ep;
X	char	*result;
X
X	result = 0;
X	bp = __dtoa(1.9, 2, 5, &decpt, &sign, &ep, &result);
X	exit(result == 0);
X#else
X	exit(1);
X#endif
X}],
X                [ac_cv_func_dtoa_r=yes],
X                [ac_cv_func_dtoa_r=no])])
Xif test $ac_cv_func_dtoa_r = yes; then
X  AC_DEFINE(HAVE_DTOA_R)
Xfi])
X
Xdnl Checks if working ecvt() exists
Xdnl Defines HAVE_ECVT on success.
XAC_DEFUN([AC_FUNC_ECVT],
X[AC_CACHE_CHECK([for working ecvt() ], ac_cv_func_ecvt,
X                [AC_TRY_RUN([
Xextern	char *ecvt();
X
Xsprintf(s)
X	char	*s;
X{
X	strcpy(s, "DEAD");
X}
X
Xint
Xmain()
X{
X	int a, b;
X
X/*	exit (strcmp("DEAD", ecvt(1.9, 2, &a, &b)) == 0);*/
X	exit (strcmp("19", ecvt(1.9, 2, &a, &b)) != 0);
X}],
X                [ac_cv_func_ecvt=yes],
X                [ac_cv_func_ecvt=no])])
Xif test $ac_cv_func_ecvt = yes; then
X  AC_DEFINE(HAVE_ECVT)
Xfi])
X
Xdnl Checks if working fcvt() exists
Xdnl Defines HAVE_FCVT on success.
XAC_DEFUN([AC_FUNC_FCVT],
X[AC_CACHE_CHECK([for working fcvt() ], ac_cv_func_fcvt,
X                [AC_TRY_RUN([
Xextern	char *fcvt();
X
Xsprintf(s)
X	char	*s;
X{
X	strcpy(s, "DEAD");
X}
X
Xint
Xmain()
X{
X	int a, b;
X
X/*	exit (strcmp("DEAD", fcvt(1.9, 2, &a, &b)) == 0);*/
X	exit (strcmp("190", fcvt(1.9, 2, &a, &b)) != 0);
X}],
X                [ac_cv_func_fcvt=yes],
X                [ac_cv_func_fcvt=no])])
Xif test $ac_cv_func_fcvt = yes; then
X  AC_DEFINE(HAVE_FCVT)
Xfi])
X
Xdnl Checks if working gcvt() exists
Xdnl Defines HAVE_GCVT on success.
XAC_DEFUN([AC_FUNC_GCVT],
X[AC_CACHE_CHECK([for working gcvt() ], ac_cv_func_gcvt,
X                [AC_TRY_RUN([
Xextern	char *gcvt();
X
Xsprintf(s)
X	char	*s;
X{
X	strcpy(s, "DEAD");
X}
X
Xint
Xmain()
X{
X	char	buf[32];
X
X/*	exit (strcmp("DEAD", gcvt(1.9, 10, buf)) == 0);*/
X	exit (strcmp("1.9", gcvt(1.9, 10, buf)) != 0);
X}],
X                [ac_cv_func_gcvt=yes],
X                [ac_cv_func_gcvt=no])])
Xif test $ac_cv_func_gcvt = yes; then
X  AC_DEFINE(HAVE_GCVT)
Xfi])
X
Xdnl Checks if function uname() is available
Xdnl Defines HAVE_UNAME on success.
XAC_DEFUN([AC_FUNC_UNAME],
X[AC_CACHE_CHECK([for uname], ac_cv_func_uname,
X                [AC_TRY_LINK([#include <sys/utsname.h>], 
X[struct	utsname un;
Xuname(&un);],
X                [ac_cv_func_uname=yes],
X                [ac_cv_func_uname=no])])
Xif test $ac_cv_func_uname = yes; then
X  AC_DEFINE(HAVE_UNAME)
Xfi])
X
Xdnl Checks if function mlock() is available
Xdnl beware HP-UX 10.x it contains a bad mlock() in libc
Xdnl Defines HAVE_MLOCK on success.
XAC_DEFUN([AC_FUNC_MLOCK],
X[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl
XAC_CACHE_CHECK([for mlock], ac_cv_func_mlock,
X                [AC_TRY_RUN([
X#include <sys/types.h>
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
X
Xmain()
X{
X	if (mlock(0, 0) < 0) {
X		if (errno == EINVAL || errno ==  ENOMEM ||
X		    errno == EPERM  || errno ==  EACCES)
X			exit(0);
X		exit(-1);
X	}
X	exit(0);
X}],
X                [ac_cv_func_mlock=yes],
X                [ac_cv_func_mlock=no])
Xrm -f core core.* *.core])
Xif test $ac_cv_func_mlock = yes; then
X  AC_DEFINE(HAVE_MLOCK)
Xfi])
X
Xdnl Checks if function mlockall() is available
Xdnl beware HP-UX 10.x it contains a bad mlockall() in libc
Xdnl Defines HAVE_MLOCKALL on success.
XAC_DEFUN([AC_FUNC_MLOCKALL],
X[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl
XAC_CACHE_CHECK([for mlockall], ac_cv_func_mlockall,
X                [AC_TRY_RUN([
X#include <sys/types.h>
X#include <sys/mman.h>
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
X
Xint
Xmain()
X{
X	if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0) {
X		if (errno == EINVAL || errno ==  ENOMEM ||
X		    errno == EPERM  || errno ==  EACCES)
X			exit(0);
X		exit(-1);
X	}
X	exit(0);
X}
X],
X                [ac_cv_func_mlockall=yes],
X                [ac_cv_func_mlockall=no])
Xrm -f core core.* *.core])
Xif test $ac_cv_func_mlockall = yes; then
X  AC_DEFINE(HAVE_MLOCKALL)
Xfi])
X
XAC_DEFUN([jsAC_FUNC_MMAP],
X[AC_REQUIRE([AC_MMAP_SIZEP])dnl
XAC_CHECK_HEADERS(unistd.h)
XAC_CHECK_FUNCS(getpagesize)
XAC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
X[AC_TRY_RUN([
X/* Thanks to Mike Haertel and Jim Avera for this test.
X   Here is a matrix of mmap possibilities:
X	mmap private not fixed
X	mmap private fixed at somewhere currently unmapped
X	mmap private fixed at somewhere already mapped
X	mmap shared not fixed
X	mmap shared fixed at somewhere currently unmapped
X	mmap shared fixed at somewhere already mapped
X   For private mappings, we should verify that changes cannot be read()
X   back from the file, nor mmap's back from the file at a different
X   address.  (There have been systems where private was not correctly
X   implemented like the infamous i386 svr4.0, and systems where the
X   VM page cache was not coherent with the filesystem buffer cache
X   like early versions of FreeBSD and possibly contemporary NetBSD.)
X   For shared mappings, we should conversely verify that changes get
X   propogated back to all the places they're supposed to be.
X
X   Grep wants private fixed already mapped.
X   The main things grep needs to know about mmap are:
X   * does it exist and is it safe to write into the mmap'd area
X   * how to use it (BSD variants)  */
X#include <sys/types.h>
X#include <fcntl.h>
X#include <sys/mman.h>
X
X/*
X * Needed for Apollo Domain/OS and may be for others?
X */
X#ifdef	_MMAP_WITH_SIZEP
X#	define	mmap_sizeparm(s)	(&(s))
X#else
X#	define	mmap_sizeparm(s)	(s)
X#endif
X
X/* This mess was copied from the GNU getpagesize.h.  */
X#ifndef HAVE_GETPAGESIZE
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X
X/* Assume that all systems that can run configure have sys/param.h.  */
X# ifndef HAVE_SYS_PARAM_H
X#  define HAVE_SYS_PARAM_H 1
X# endif
X
X# ifdef _SC_PAGESIZE
X#  define getpagesize() sysconf(_SC_PAGESIZE)
X# else /* no _SC_PAGESIZE */
X#  ifdef HAVE_SYS_PARAM_H
X#   include <sys/param.h>
X#   ifdef EXEC_PAGESIZE
X#    define getpagesize() EXEC_PAGESIZE
X#   else /* no EXEC_PAGESIZE */
X#    ifdef NBPG
X#     define getpagesize() NBPG * CLSIZE
X#     ifndef CLSIZE
X#      define CLSIZE 1
X#     endif /* no CLSIZE */
X#    else /* no NBPG */
X#     ifdef NBPC
X#      define getpagesize() NBPC
X#     else /* no NBPC */
X#      ifdef PAGESIZE
X#       define getpagesize() PAGESIZE
X#      endif /* PAGESIZE */
X#     endif /* no NBPC */
X#    endif /* no NBPG */
X#   endif /* no EXEC_PAGESIZE */
X#  else /* no HAVE_SYS_PARAM_H */
X#   define getpagesize() 8192	/* punt totally */
X#  endif /* no HAVE_SYS_PARAM_H */
X# endif /* no _SC_PAGESIZE */
X
X#endif /* no HAVE_GETPAGESIZE */
X
X#ifdef __cplusplus
Xextern "C" { void *malloc(unsigned); }
X#else
Xchar *malloc();
X#endif
X
Xint
Xmain()
X{
X	char *data, *data2, *data3;
X	int i, pagesize;
X	int fd;
X
X	pagesize = getpagesize();
X
X	/*
X	 * First, make a file with some known garbage in it.
X	 */
X	data = malloc(pagesize);
X	if (!data)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		*(data + i) = rand();
X	umask(0);
X	fd = creat("conftestmmap", 0600);
X	if (fd < 0)
X		exit(1);
X	if (write(fd, data, pagesize) != pagesize)
X		exit(1);
X	close(fd);
X
X	/*
X	 * Next, try to mmap the file at a fixed address which
X	 * already has something else allocated at it.  If we can,
X	 * also make sure that we see the same garbage.
X	 */
X	fd = open("conftestmmap", O_RDWR);
X	if (fd < 0)
X		exit(1);
X	data2 = malloc(2 * pagesize);
X	if (!data2)
X		exit(1);
X	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
X	if (data2 != mmap(data2, mmap_sizeparm(pagesize), PROT_READ | PROT_WRITE,
X	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data2 + i))
X			exit(1);
X
X	/*
X	 * Finally, make sure that changes to the mapped area
X	 * do not percolate back to the file as seen by read().
X	 * (This is a bug on some variants of i386 svr4.0.)
X	 */
X	for (i = 0; i < pagesize; ++i)
X		*(data2 + i) = *(data2 + i) + 1;
X	data3 = malloc(pagesize);
X	if (!data3)
X		exit(1);
X	if (read(fd, data3, pagesize) != pagesize)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data3 + i))
X			exit(1);
X	close(fd);
X	unlink("conftestmmap");
X	exit(0);
X}
X], ac_cv_func_mmap_fixed_mapped=yes, ac_cv_func_mmap_fixed_mapped=no,
Xac_cv_func_mmap_fixed_mapped=no)])
Xif test $ac_cv_func_mmap_fixed_mapped = yes; then
X  AC_DEFINE(HAVE_MMAP)
Xfi
X])
X
XAC_DEFUN([AC_MMAP_SIZEP],
X[AC_CHECK_HEADERS(unistd.h)
XAC_CHECK_FUNCS(getpagesize)
XAC_CACHE_CHECK(for mmap that needs ptr to size, ac_cv_func_mmap_sizep,
X[AC_TRY_RUN([
X#include <sys/types.h>
X#include <fcntl.h>
X#include <signal.h>
X#include <setjmp.h>
X#include <sys/mman.h>
X
X#ifndef MAP_FILE
X#define MAP_FILE   0		/* Needed on Apollo Domain/OS */
X#endif
X
X/* This mess was copied from the GNU getpagesize.h.  */
X#ifndef HAVE_GETPAGESIZE
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X
X/* Assume that all systems that can run configure have sys/param.h.  */
X# ifndef HAVE_SYS_PARAM_H
X#  define HAVE_SYS_PARAM_H 1
X# endif
X
X# ifdef _SC_PAGESIZE
X#  define getpagesize() sysconf(_SC_PAGESIZE)
X# else /* no _SC_PAGESIZE */
X#  ifdef HAVE_SYS_PARAM_H
X#   include <sys/param.h>
X#   ifdef EXEC_PAGESIZE
X#    define getpagesize() EXEC_PAGESIZE
X#   else /* no EXEC_PAGESIZE */
X#    ifdef NBPG
X#     define getpagesize() NBPG * CLSIZE
X#     ifndef CLSIZE
X#      define CLSIZE 1
X#     endif /* no CLSIZE */
X#    else /* no NBPG */
X#     ifdef NBPC
X#      define getpagesize() NBPC
X#     else /* no NBPC */
X#      ifdef PAGESIZE
X#       define getpagesize() PAGESIZE
X#      endif /* PAGESIZE */
X#     endif /* no NBPC */
X#    endif /* no NBPG */
X#   endif /* no EXEC_PAGESIZE */
X#  else /* no HAVE_SYS_PARAM_H */
X#   define getpagesize() 8192	/* punt totally */
X#  endif /* no HAVE_SYS_PARAM_H */
X# endif /* no _SC_PAGESIZE */
X
X#endif /* no HAVE_GETPAGESIZE */
X
X#ifdef __cplusplus
Xextern "C" { void *malloc(unsigned); }
X#else
Xchar *malloc();
X#endif
X
Xjmp_buf jenv;
X
Xint
Xintr()
X{
X	signal(SIGSEGV, intr);
X	longjmp(jenv, 1);
X}
X
Xint
Xmain()
X{
X	char *data, *data2;
X	int i, pagesize, ps;
X	int fd;
X
X	pagesize = getpagesize();
X
X	/*
X	 * First, make a file with some known garbage in it.
X	 */
X	data = malloc(pagesize);
X	if (!data)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		*(data + i) = rand();
X	umask(0);
X	fd = creat("conftestmmap", 0600);
X	if (fd < 0)
X		exit(1);
X	if (write(fd, data, pagesize) != pagesize)
X		exit(1);
X	close(fd);
X
X	/*
X	 * Next, try to mmap the file at a fixed address which
X	 * already has something else allocated at it.  If we can,
X	 * also make sure that we see the same garbage.
X	 */
X	fd = open("conftestmmap", O_RDWR);
X	if (fd < 0)
X		exit(1);
X
X	/*
X	 * Keep a copy, Apollo modifies the value...
X	 */
X	ps = pagesize;
X
X	/*
X	 * Apollo mmap() is not a syscall but a library function and fails
X	 * if it tries to dereference 'ps'. We must use setjmp in order to
X	 * catch the failure.
X	 */
X	signal(SIGSEGV, intr);
X	if (setjmp(jenv) == 0) {
X		data2 = mmap(0, ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L);
X	} else {
X		data2 = (char *)-1;
X	}
X	if (data2 != (char *)-1)
X		exit(1);
X
X	signal(SIGSEGV, intr);
X	if (setjmp(jenv) == 0) {
X		data2 = mmap(0, &ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L);
X	} else {
X		data2 = (char *)-1;
X	}
X	if (data2 == (char *)-1)
X		exit(1);
X
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data2 + i))
X			exit(1);
X
X	close(fd);
X	unlink("conftestmmap");
X	exit(0);
X}
X], ac_cv_func_mmap_sizep=yes, ac_cv_func_mmap_sizep=no,
Xac_cv_func_mmap_sizep=no)])
Xif test $ac_cv_func_mmap_sizep = yes; then
X  AC_DEFINE(_MMAP_WITH_SIZEP)
Xfi
X])
X
Xdnl Checks if mmap() works to get shared memory
Xdnl Defines HAVE_SMMAP on success.
XAC_DEFUN([AC_FUNC_SMMAP],
X[AC_CACHE_CHECK([if mmap works to get shared memory], ac_cv_func_smmap,
X                [AC_TRY_RUN([
X#include <sys/types.h>
X#include <sys/mman.h>
X
X#ifndef	MAP_ANONYMOUS
X#	ifdef	MAP_ANON
X#		define MAP_ANONYMOUS MAP_ANON
X#	endif
X#endif
X
X/*
X * Needed for Apollo Domain/OS and may be for others?
X */
X#ifdef	_MMAP_WITH_SIZEP
X#	define	mmap_sizeparm(s)	(&(s))
X#else
X#	define	mmap_sizeparm(s)	(s)
X#endif
X
Xchar *
Xmkshare()
X{
X        int     size = 8192;
X        int     f;
X        char    *addr;
X
X#ifdef  MAP_ANONYMOUS   /* HP/UX */
X        f = -1;
X        addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, f, 0);
X#else
X        if ((f = open("/dev/zero", 2)) < 0)
X                exit(1);
X        addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED, f, 0);
X#endif
X        if (addr == (char *)-1)
X                exit(1);
X        close(f);
X
X        return (addr);
X}
X
Xint
Xmain()
X{
X        char    *addr;
X        
X        addr = mkshare();
X        *addr = 'I';
X
X        switch (fork()) {
X
X        case -1:
X                printf("help\n"); exit(1);
X
X        case 0: /* child */
X                *addr = 'N';
X                _exit(0);
X                break;
X        default: /* parent */
X                wait(0);
X                sleep(1);
X                break;
X        }
X
X        if (*addr != 'N')
X                exit(1);
X        exit(0);
X}
X], 
X                [ac_cv_func_smmap=yes],
X                [ac_cv_func_smmap=no],
X                [ac_cv_func_smmap=no])])
Xif test $ac_cv_func_smmap = yes; then
X  AC_DEFINE(HAVE_SMMAP)
Xfi])
X
Xdnl Checks if shmget() works to get shared memory
Xdnl Defines HAVE_SHMGET on success.
XAC_DEFUN([AC_FUNC_SHMGET],
X[AC_CACHE_CHECK([if shmget works to get shared memory], ac_cv_func_shmget,
X                [AC_TRY_RUN([
X#include <sys/types.h>
X#include <sys/ipc.h>
X#include <sys/shm.h>
Xint
Xmain()
X{
X	int	id;
X
X	id = shmget(IPC_PRIVATE, 0x1, IPC_CREAT|0600);
X	if (id == -1)
X		exit(1);
X	shmctl(id, IPC_RMID, 0);
X        exit(0);
X}
X], 
X                [ac_cv_func_shmget=yes],
X                [ac_cv_func_shmget=no],
X                [ac_cv_func_shmget=no])])
Xif test $ac_cv_func_shmget = yes; then
X  AC_DEFINE(HAVE_SHMGET)
Xfi])
X
Xdnl Checks if sys_siglist[] exists
Xdnl Defines HAVE_SYS_SIGLIST on success.
XAC_DEFUN([AC_FUNC_SYS_SIGLIST],
X[AC_CACHE_CHECK([for sys_siglist], ac_cv_func_sys_siglist,
X                [AC_TRY_RUN([
Xint
Xmain()
X{ extern char *sys_siglist[];
Xif (sys_siglist[1] == 0)
X	exit(1);
Xexit(0);}],
X                [ac_cv_func_sys_siglist=yes],
X                [ac_cv_func_sys_siglist=no])])
Xif test $ac_cv_func_sys_siglist = yes; then
X  AC_DEFINE(HAVE_SYS_SIGLIST)
Xfi])
X
Xdnl Checks for maximum number of bits in minor device number
XAC_DEFUN([AC_CHECK_MINOR_BITS],
X[AC_REQUIRE([AC_HEADER_MAKEDEV])dnl
Xchangequote(<<, >>)dnl
Xdefine(<<AC_MACRO_NAME>>, DEV_MINOR_BITS)dnl
Xdnl The cache variable name.
Xdefine(<<AC_CV_NAME>>, ac_cv_dev_minor_bits)dnl
Xchangequote([, ])dnl
XAC_MSG_CHECKING(bits in minor device number)
XAC_CACHE_VAL(AC_CV_NAME,
X[AC_TRY_RUN([#include <stdio.h>
X#include <sys/types.h>
X#ifdef major
X#	define _FOUND_MAJOR_
X#endif
X
X#ifdef MAJOR_IN_MKDEV
X#	include <sys/mkdev.h>
X#	define _FOUND_MAJOR_
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	ifdef MAJOR_IN_SYSMACROS
X#		include <sys/sysmacros.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	if defined(hpux) || defined(__hpux__) || defined(__hpux)
X#		include <sys/mknod.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	define major(dev)		(((dev) >> 8) & 0xFF)
X#	define minor(dev)		((dev) & 0xFF)
X#	define makedev(majo, mino)	(((majo) << 8) | (mino))
X#endif
Xint
Xmain()
X{
X	long	l = 1;
X	int	i;
X	int	m;
X	int	c = 0;
X	FILE	*f=fopen("conftestval", "w");
X	int	maxloop = 32;
X
X	if (sizeof (long) > 4)
X		maxloop = 64;
X
X	if (!f) exit(1);
X
X	for (i=1, m=0; i <= maxloop; i++, l<<=1) {
X		if (minor(l) == 0 && c == 0)
X			c = m;
X		if (minor(l) != 0)
X			m = i;
X	}
X	fprintf(f, "%d\n", m);
X	exit(0);
X}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
XAC_MSG_RESULT($AC_CV_NAME)
XAC_DEFINE_UNQUOTED(AC_MACRO_NAME, $AC_CV_NAME)
Xundefine([AC_MACRO_NAME])dnl
Xundefine([AC_CV_NAME])dnl
X])
X
Xdnl Checks for maximum number of bits in minor device numbers are non contiguous
Xdnl Defines DEV_MINOR_NONCONTIG on success.
XAC_DEFUN([AC_CHECK_MINOR_NONCONTIG],
X[AC_REQUIRE([AC_HEADER_MAKEDEV])dnl
XAC_CACHE_CHECK([whether bits in minor device numbers are non contiguous], ac_cv_dev_minor_noncontig,
X                [AC_TRY_RUN([
X#include <sys/types.h>
X#ifdef major
X#	define _FOUND_MAJOR_
X#endif
X
X#ifdef MAJOR_IN_MKDEV
X#	include <sys/mkdev.h>
X#	define _FOUND_MAJOR_
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	ifdef MAJOR_IN_SYSMACROS
X#		include <sys/sysmacros.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	if defined(hpux) || defined(__hpux__) || defined(__hpux)
X#		include <sys/mknod.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	define major(dev)		(((dev) >> 8) & 0xFF)
X#	define minor(dev)		((dev) & 0xFF)
X#	define makedev(majo, mino)	(((majo) << 8) | (mino))
X#endif
Xint
Xmain()
X{
X	long	l = 1;
X	int	i;
X	int	m;
X	int	c = 0;
X	int	maxloop = 32;
X
X	if (sizeof (long) > 4)
X		maxloop = 64;
X
X	for (i=1, m=0; i <= maxloop; i++, l<<=1) {
X		if (minor(l) == 0 && c == 0)
X			c = m;
X		if (minor(l) != 0)
X			m = i;
X	}
Xexit (m == c);}],
X                [ac_cv_dev_minor_noncontig=yes],
X                [ac_cv_dev_minor_noncontig=no])])
Xif test $ac_cv_dev_minor_noncontig = yes; then
X  AC_DEFINE(DEV_MINOR_NONCONTIG)
Xfi])
X
Xdnl Checks if we may not define our own malloc()
Xdnl Defines NO_USER_MALLOC if we cannot.
XAC_DEFUN([AC_USER_MALLOC],
X[AC_CACHE_CHECK([if we may not define our own malloc()], ac_cv_no_user_malloc,
X                [AC_TRY_RUN([
Xstatic int mcalled;
Xchar *
Xmalloc(s)
X	int	s;
X{
X	extern	char *sbrk();
X
X	/*
X	 * Don't ask me why, but with Cygwin on 64 Bit Vista this hangs
X	 * infinitely and is undebuggable unless we call write() here...
X	 */
X	write(2, "", 0);
X	mcalled++;
X	_exit(0);
X	return (sbrk(s));
X}
X
Xfree(p) char *p;{}
X	
Xmain()
X{
X#ifdef	HAVE_STRDUP
X	strdup("aaa");
X#else
X	exit(0);
X#endif
X	exit(1);}],
X                [ac_cv_no_user_malloc=no],
X                [ac_cv_no_user_malloc=yes])])
Xif test $ac_cv_no_user_malloc = yes; then
X  AC_DEFINE(NO_USER_MALLOC)
Xfi])
X
Xdnl Checks if ecvt()/fcvt()/gcvt() may be replaced by local implementations
Xdnl There are known problems on ATARI MINT and older Linux version and statical linking
Xdnl Defines NO_USER_XCVT on failure.
XAC_DEFUN([AC_USER_XCVT],
X[AC_CACHE_CHECK([if we may not define our own ecvt()/fcvt()/gcvt()], ac_cv_no_user_xcvt,
X                [AC_TRY_LINK([
X#include <stdio.h>
X
Xchar *
Xecvt(value, ndig, decpt, sign)
X	double	value;
X	int	ndig;
X	int	*decpt;
X	int	*sign;
X{
X	return ("ecvt-test");
X}
X
Xchar *
Xfcvt(value, ndig, decpt, sign)
X	double	value;
X	int	ndig;
X	int	*decpt;
X	int	*sign;
X{
X	return ("fcvt-test");
X}
X
Xchar *
Xgcvt(value, ndig, bp)
X	double	value;
X	int	ndig;
X	char	*bp;
X{
X	return ("gcvt-test");
X}
X], 
X		[
X	char	buf[64];
X
X	printf("E: %e F: %f G: %g local gcvt: %s\n", 1.234, 1.234, 1.234, gcvt(1.234, 4, buf));
X],
X                [ac_cv_no_user_xcvt=no],
X                [ac_cv_no_user_xcvt=yes])])
Xif test $ac_cv_no_user_xcvt = yes; then
X  AC_DEFINE(NO_USER_XCVT)
Xfi])
X
Xdnl Checks if BSD-4.2 compliant getpgrp() exists
Xdnl Defines HAVE_BSD_GETPGRP on success.
XAC_DEFUN([AC_FUNC_BSD_GETPGRP],
X[AC_CACHE_CHECK([for BSD compliant getpgrp], ac_cv_func_bsd_getpgrp,
X                [AC_TRY_RUN([
Xint
Xmain()
X{ long p;
X/*
X * POSIX getpgrp() has void parameter...
X */
X	p = getpgrp(-1);
X	if (p == getpgrp(1) && p == getpgrp(getpid()))
X		exit(1);
Xexit(0);}],
X                [ac_cv_func_bsd_getpgrp=yes],
X                [ac_cv_func_bsd_getpgrp=no])])
Xif test $ac_cv_func_bsd_getpgrp = yes; then
X  AC_DEFINE(HAVE_BSD_GETPGRP)
Xfi])
X
Xdnl Checks if BSD-4.2 compliant setpgrp() exists
Xdnl Defines HAVE_BSD_SETPGRP on success.
XAC_DEFUN([AC_FUNC_BSD_SETPGRP],
X[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl
XAC_CACHE_CHECK([for BSD compliant setpgrp], ac_cv_func_bsd_setpgrp,
X                [AC_TRY_RUN([
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
Xint
Xmain()
X{ errno = 0;
X/*
X * Force illegal pid on BSD
X */
Xif (setpgrp(-1, 100) < 0 && errno == ESRCH)
X	exit(0);
Xexit(1);}],
X                [ac_cv_func_bsd_setpgrp=yes],
X                [ac_cv_func_bsd_setpgrp=no])])
Xif test $ac_cv_func_bsd_setpgrp = yes; then
X  AC_DEFINE(HAVE_BSD_SETPGRP)
Xfi])
X
Xdnl Checks if C99 compliant isinf() exists
Xdnl Defines HAVE_C99_ISINF on success.
XAC_DEFUN([AC_FUNC_C99_ISINF],
X[AC_CACHE_CHECK([for C99 compliant isinf], ac_cv_func_c99_isinf,
X                [AC_TRY_LINK([#include <math.h>], [ double	d;
X#ifndef	isinf
XThe isinf macro is not defined
X#endif
Xreturn (isinf(d));
X],
X                [ac_cv_func_c99_isinf=yes],
X                [ac_cv_func_c99_isinf=no])])
Xif test $ac_cv_func_c99_isinf = yes; then
X  AC_DEFINE(HAVE_C99_ISINF)
Xfi])
X
Xdnl Checks if C99 compliant isnan() exists
Xdnl Defines HAVE_C99_ISNAN on success.
XAC_DEFUN([AC_FUNC_C99_ISNAN],
X[AC_CACHE_CHECK([for C99 compliant isnan], ac_cv_func_c99_isnan,
X                [AC_TRY_LINK([#include <math.h>], [ double	d;
X#ifndef	isnan
XThe isnan macro is not defined
X#endif
Xreturn (isnan(d));
X],
X                [ac_cv_func_c99_isnan=yes],
X                [ac_cv_func_c99_isnan=no])])
Xif test $ac_cv_func_c99_isnan = yes; then
X  AC_DEFINE(HAVE_C99_ISNAN)
Xfi])
X
Xdnl Checks if select() needs more than sys/time.h & sys/types.h
Xdnl Defines SELECT_NONSTD_HDR on success.
XAC_DEFUN([AC_HEADER_SELECT_NONSTD],
X[AC_CACHE_CHECK([if select needs nonstd include files], ac_cv_header_slect_nonstd_hdr,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/time.h>],
X			[fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);],
X				[ac_cv_header_slect_nonstd_hdr=no],
X				[ac_cv_header_slect_nonstd_hdr=yes])])
Xif test $ac_cv_header_slect_nonstd_hdr = yes; then
X  AC_DEFINE(SELECT_NONSTD_HDR)
Xfi])
X
Xdnl Checks if select() needs sys/select.h
Xdnl Defines NEED_SYS_SELECT_H on success.
XAC_DEFUN([AC_HEADER_SYS_SELECT],
X[AC_REQUIRE([AC_HEADER_SELECT_NONSTD])dnl
XAC_CACHE_CHECK([if sys/select.h is needed for select], ac_cv_header_need_sys_select_h,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/time.h>
X#include <sys/select.h>
X#ifndef	SELECT_NONSTD_HDR
Xdo not compile if we do not need nonstandard headers
X#endif],
X			[fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);],
X				[ac_cv_header_need_sys_select_h=yes],
X				[ac_cv_header_need_sys_select_h=no])])
Xif test $ac_cv_header_need_sys_select_h = yes; then
X  AC_DEFINE(NEED_SYS_SELECT_H)
Xfi])
X
Xdnl Checks if select() needs sys/socket.h
Xdnl Defines NEED_SYS_SOCKET_H on success.
XAC_DEFUN([AC_HEADER_SELECT2],
X[AC_REQUIRE([AC_HEADER_SELECT_NONSTD])dnl
XAC_CACHE_CHECK([if sys/socket.h is needed for select], ac_cv_header_need_sys_socket_h,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/time.h>
X#include <sys/socket.h>
X#ifndef	SELECT_NONSTD_HDR
Xdo not compile if we do not need nonstandard headers
X#endif],
X			[fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);],
X				[ac_cv_header_need_sys_socket_h=yes],
X				[ac_cv_header_need_sys_socket_h=no])])
Xif test $ac_cv_header_need_sys_socket_h = yes; then
X  AC_DEFINE(NEED_SYS_SOCKET_H)
Xfi])
X
Xdnl Checks if file locking via fcntl() is available
Xdnl Defines HAVE_FCNTL_LOCKF on success.
XAC_DEFUN([AC_FUNC_FCNTL_LOCKF],
X[AC_CACHE_CHECK([for file locking via fcntl], ac_cv_func_fcntl_lock,
X                [AC_TRY_LINK([
X#include <sys/types.h>
X#include <fcntl.h>], 
X		[
Xstruct flock fl;
Xfcntl(0, F_SETLK, &fl);],
X                [ac_cv_func_fcntl_lock=yes],
X                [ac_cv_func_fcntl_lock=no])])
Xif test $ac_cv_func_fcntl_lock = yes; then
X  AC_DEFINE(HAVE_FCNTL_LOCKF)
Xfi])
X
X
Xdnl Checks if sigsetjmp() is available
Xdnl Defines HAVE_SIGSETJMP on success.
XAC_DEFUN([AC_FUNC_SIGSETJMP],
X[AC_CACHE_CHECK([for sigsetjmp], ac_cv_func_sigsetjmp,
X                [AC_TRY_LINK([
X#include <setjmp.h>],
X		[
Xsigjmp_buf jb;
Xsigsetjmp(jb, 1);],
X                [ac_cv_func_sigsetjmp=yes],
X                [ac_cv_func_sigsetjmp=no])])
Xif test $ac_cv_func_sigsetjmp = yes; then
X  AC_DEFINE(HAVE_SIGSETJMP)
Xfi])
X
Xdnl Checks if siglongjmp() is available
Xdnl Defines HAVE_SIGLONGJMP on success.
XAC_DEFUN([AC_FUNC_SIGLONGJMP],
X[AC_CACHE_CHECK([for siglongjmp], ac_cv_func_siglongjmp,
X                [AC_TRY_LINK([
X#include <setjmp.h>],
X		[
Xsigjmp_buf jb;
Xsigsetjmp(jb, 1);
Xsiglongjmp(jb, 1);],
X                [ac_cv_func_siglongjmp=yes],
X                [ac_cv_func_siglongjmp=no])])
Xif test $ac_cv_func_siglongjmp = yes; then
X  AC_DEFINE(HAVE_SIGLONGJMP)
Xfi])
X
X
Xdnl Checks if link() allows hard links on symlinks
Xdnl Defines HAVE_HARD_SYMLINKS on success.
XAC_DEFUN([AC_HARD_SYMLINKS],
X[AC_CACHE_CHECK([if link() allows hard links on symlinks], ac_cv_hard_symlinks,
X                [AC_TRY_RUN([
Xmain()
X{
X	int	ret = 0;
X
X	unlink("confdefs.f1");
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	if (symlink("confdefs.f1", "confdefs.l1") < 0)
X		ret = 1;
X	if (link("confdefs.l1", "confdefs.h1") < 0)
X		ret = 1;
X
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	exit(ret);
X}],
X                [ac_cv_hard_symlinks=yes],
X                [ac_cv_hard_symlinks=no])])
Xif test $ac_cv_hard_symlinks = yes; then
X  AC_DEFINE(HAVE_HARD_SYMLINKS)
Xfi])
X
X
Xdnl Checks if link() does not follow symlinks
Xdnl Defines HAVE_LINK_NOFOLLOW on success.
XAC_DEFUN([AC_LINK_NOFOLLOW],
X[AC_CACHE_CHECK([if link() does not folow symlinks], ac_cv_link_nofollow,
X                [AC_TRY_RUN([
X#include <sys/types.h>
X#include <sys/stat.h>
X
Xmain()
X{
X	int	ret = 0;
X	int	f;
X	struct stat sb;
X
X	unlink("confdefs.f1");
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	f = creat("confdefs.f1", 0666);
X	close(f);
X	if (symlink("confdefs.f1", "confdefs.l1") < 0)
X		ret = 1;
X	if (link("confdefs.l1", "confdefs.h1") < 0)
X		ret = 1;
X
X	stat("confdefs.f1", &sb);
X	if (sb.st_nlink == 2)
X		ret = 1;
X
X	unlink("confdefs.f1");
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	exit(ret);
X}],
X                [ac_cv_link_nofollow=yes],
X                [ac_cv_link_nofollow=no])])
Xif test $ac_cv_link_nofollow = yes; then
X  AC_DEFINE(HAVE_LINK_NOFOLLOW)
Xfi])
X
Xdnl Checks if access() does implement E_OK (010) for effective UIDs
Xdnl Defines HAVE_ACCESS_E_OK on success.
XAC_DEFUN([AC_ACCESS_E_OK],
X[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl
XAC_CHECK_HEADERS(unistd.h)
XAC_CACHE_CHECK([if access() does implement E_OK], ac_cv_access_e_ok,
X                [AC_TRY_RUN([
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X#ifndef	R_OK
X#define	R_OK	4	/* Test for Read permission */
X#define	W_OK	2	/* Test for Write permission */
X#define	X_OK	1	/* Test for eXecute permission */
X#define	F_OK	0	/* Test for existence of File */
X#endif
X
X#ifndef	E_OK
X#ifdef	EFF_ONLY_OK
X#define	E_OK	EFF_ONLY_OK /* Irix */
X#else
X#ifdef	EUID_OK
X#define	E_OK	EUID_OK	/* UNICOS (0400) */
X#else
X#define	E_OK	010	/* Test effective uids */
X#endif
X#endif
X#endif
X
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
X
Xmain()
X{
X#ifdef	_MSC_VER
X/*
X * If we use "cl" to compile and call access(".", E_OK|F_OK), the program will
X * cause an exception that results in a popup window. For this reason, the test
X * is disabled for "cl",  it would not work anyway.
X */	
X	int	ret = 1;
X#else
X	int	ret = 0;
X
X	if (access(".", F_OK) != 0)
X		ret = 1;
X	else if (access(".", E_OK|F_OK) != 0)
X		ret = 1;
X	else if (access(".", (R_OK<<4)|F_OK) == 0)
X		ret = 1;
X#endif
X
X	exit(ret);
X}],
X                [ac_cv_access_e_ok=yes],
X                [ac_cv_access_e_ok=no])])
Xif test $ac_cv_access_e_ok = yes; then
X  AC_DEFINE(HAVE_ACCESS_E_OK)
Xfi])
X
X
Xdnl XXXXXXXXXXXXXXXXXX Begin Stolen (but modified) from GNU tar XXXXXXXXXXXXXXXXXXXXXXXXXXX
Xdnl Changes:
X
Xdnl One line has been changed to:    [ac_save_CC="${CC-cc}" to default to "'cc"
X
Xdnl AC_SYS_LARGEFILE_MACRO_VALUE test moved from AC_FUNC_FSEEKO into AC_SYS_LARGEFILE
Xdnl Do not call AC_FUNC_FSEEKO because it does not check whether fseeko() is
Xdnl available on non Large File mode. There are additionoal tests for fseeko()/ftello()
Xdnl inside the AC_HAVE_LARGEFILES test.
X
Xdnl largefile_cc_opt definition added
X
X#serial 18
X
Xdnl By default, many hosts won't let programs access large files;
Xdnl one must use special compiler options to get large-file access to work.
Xdnl For more details about this brain damage please see:
Xdnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
X
Xdnl Written by Paul Eggert <eggert@twinsun.com>.
X
Xdnl Internal subroutine of AC_SYS_LARGEFILE.
Xdnl AC_SYS_LARGEFILE_TEST_INCLUDES
XAC_DEFUN([AC_SYS_LARGEFILE_TEST_INCLUDES],
X  [[#include <sys/types.h>
X    /* Check that off_t can represent 2**63 - 1 correctly.
X       We can't simply "#define LARGE_OFF_T 9223372036854775807",
X       since some C++ compilers masquerading as C compilers
X       incorrectly reject 9223372036854775807.  */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
X  ]])
X
Xdnl Internal subroutine of AC_SYS_LARGEFILE.
Xdnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, CACHE-VAR, COMMENT, INCLUDES, FUNCTION-BODY)
XAC_DEFUN([AC_SYS_LARGEFILE_MACRO_VALUE],
X  [AC_CACHE_CHECK([for $1 value needed for large files], $3,
X     [$3=no
X      AC_TRY_COMPILE([$5],
X	[$6], 
X	,
X	[AC_TRY_COMPILE([#define $1 $2]
X[$5]
X	   ,
X	   [$6],
X	   [$3=$2])])])
X   if test "[$]$3" != no; then
X     AC_DEFINE_UNQUOTED([$1], [$]$3, [$4])
X   fi])
X
XAC_DEFUN([AC_SYS_LARGEFILE],
X  [AC_ARG_ENABLE(largefile,
X     [  --disable-largefile     omit support for large files])
X   if test "$enable_largefile" != no; then
X
X     AC_CACHE_CHECK([for special C compiler options needed for large files],
X       ac_cv_sys_largefile_CC,
X       [ac_cv_sys_largefile_CC=no
X        largefile_cc_opt=""
X        if test "$GCC" != yes; then
X	  # IRIX 6.2 and later do not support large files by default,
X	  # so use the C compiler's -n32 option if that helps.
X	  AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , ,
X	    [ac_save_CC="${CC-cc}"
X	     CC="$CC -n32"
X	     AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, ,
X	       ac_cv_sys_largefile_CC=' -n32')
X	     CC="$ac_save_CC"])
X        fi])
X     if test "$ac_cv_sys_largefile_CC" != no; then
X       CC="$CC$ac_cv_sys_largefile_CC"
X       largefile_cc_opt="$ac_cv_sys_largefile_CC"
X     fi
X
X     AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
X       ac_cv_sys_file_offset_bits,
X       [Number of bits in a file offset, on hosts where this is settable.],
X       AC_SYS_LARGEFILE_TEST_INCLUDES)
X     AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
X       ac_cv_sys_large_files,
X       [Define for large files, on AIX-style hosts.],
X       AC_SYS_LARGEFILE_TEST_INCLUDES)
X     AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
X       ac_cv_sys_largefile_source,
X       [Define to make fseeko visible on some hosts (e.g. glibc 2.2).],
X       [#include <stdio.h>], [return !fseeko;])
X   fi
X  ])
X
X
XAC_DEFUN([AC_FUNC_FSEEKO],
X  [AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
X     ac_cv_sys_largefile_source,
X     [Define to make fseeko visible on some hosts (e.g. glibc 2.2).],
X     [#include <stdio.h>], [return !fseeko;])
X   # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
X   # in glibc 2.1.3, but that breaks too many other things.
X   # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
X
X   AC_CACHE_CHECK([for fseeko], ac_cv_func_fseeko,
X     [ac_cv_func_fseeko=no
X      AC_TRY_LINK([#include <stdio.h>],
X        [return fseeko && fseeko (stdin, 0, 0);],
X	[ac_cv_func_fseeko=yes])])
X   if test $ac_cv_func_fseeko != no; then
X     AC_DEFINE(HAVE_FSEEKO, 1,
X       [Define if fseeko (and presumably ftello) exists and is declared.])
X   fi])
X
X
Xdnl XXXXXXXXXXXXXXXXXX End Stolen (but modified) from GNU tar XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
X
XAC_DEFUN([AC_HAVE_LARGEFILES],
X[AC_CACHE_CHECK([if system supports Large Files at all], ac_cv_largefiles,
X     	[AC_TRY_COMPILE([#include <stdio.h>
X#include <sys/types.h>],
X     		[
X/*
X * Check that off_t can represent 2**63 - 1 correctly.
X * We can't simply "#define LARGE_OFF_T 9223372036854775807",
X * since some C++ compilers masquerading as C compilers
X * incorrectly reject 9223372036854775807.
X */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
Xreturn !fseeko;
Xreturn !ftello;],
X     		[ac_cv_largefiles=yes],
X     		[ac_cv_largefiles=no])])
X	if test $ac_cv_largefiles = yes; then
X		AC_DEFINE(HAVE_LARGEFILES)
X	fi])
X
Xdnl Checks for whether fseeko() is available in non large file mode
Xdnl and whether there is a prototype for fseeko()
Xdnl Defines HAVE_FSEEKO on success.
XAC_DEFUN([AC_SMALL_FSEEKO],
X[AC_CACHE_CHECK([for fseeko()], ac_cv_func_fseeko,
X                [AC_TRY_LINK([#include <stdio.h>],
X[return !fseeko;],
X                [ac_cv_func_fseeko=yes],
X                [ac_cv_func_fseeko=no])])
Xif test $ac_cv_func_fseeko = yes; then
X  AC_DEFINE(HAVE_FSEEKO)
Xfi])
X
Xdnl Checks for whether ftello() is available in non large file mode
Xdnl and whether there is a prototype for ftello()
Xdnl Defines HAVE_FTELLO on success.
XAC_DEFUN([AC_SMALL_FTELLO],
X[AC_CACHE_CHECK([for ftello()], ac_cv_func_ftello,
X                [AC_TRY_LINK([#include <stdio.h>],
X[return !ftello;],
X                [ac_cv_func_ftello=yes],
X                [ac_cv_func_ftello=no])])
Xif test $ac_cv_func_ftello = yes; then
X  AC_DEFINE(HAVE_FTELLO)
Xfi])
X
Xdnl Checks if compiler allows dynamic arrays.
Xdnl Defines HAVE_DYN_ARRAYS on success.
XAC_DEFUN([AC_DYN_ARRAYS],
X[AC_CACHE_CHECK([if compiler allows dynamic arrays], ac_cv_dyn_arrays,
X                [AC_TRY_COMPILE([],
X                                [extern int __aa(); int len = __aa(); char some_array[len];],
X                                [ac_cv_dyn_arrays=yes],
X                                [ac_cv_dyn_arrays=no])])
Xif test $ac_cv_dyn_arrays = yes; then
X  AC_DEFINE(HAVE_DYN_ARRAYS)
Xfi])
X
Xdnl Checks if the compiler allows #pragma weak
Xdnl Defines HAVE_PRAGMA_WEAK on success.
XAC_DEFUN([AC_PRAGMA_WEAK],
X[AC_CACHE_CHECK([if compiler allows pragma weak], ac_cv_pragma_weak,
X                [AC_TRY_LINK([#pragma weak test2 = test1
Xint test1() {return 0;}],
X[return test2();],
X                [ac_cv_pragma_weak=yes],
X                [ac_cv_pragma_weak=no])])
Xif test $ac_cv_pragma_weak = yes; then
X  AC_DEFINE(HAVE_PRAGMA_WEAK)
Xfi])
X
Xdnl Checks if Linux include file linux/ext2_fs.h is broken
Xdnl Defines HAVE_BROKEN_LINUX_EXT2_FS_H on success.
XAC_DEFUN([AC_BROKEN_LINUX_EXT2_FS_H],
X[AC_CACHE_CHECK([if Linux include file linux/ext2_fs.h is broken], ac_cv_broken_linux_ext2_fs_h,
X                [AC_TRY_COMPILE([
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <linux/ext2_fs.h>
X#endif],
X                                [],
X                                [ac_cv_broken_linux_ext2_fs_h=no],
X                                [ac_cv_broken_linux_ext2_fs_h=yes])])
Xif test $ac_cv_broken_linux_ext2_fs_h = yes; then
X  AC_DEFINE(HAVE_BROKEN_LINUX_EXT2_FS_H)
Xfi])
X
Xdnl Checks if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken
Xdnl Defines HAVE_BROKEN_SRC_LINUX_EXT2_FS_H on success.
XAC_DEFUN([AC_BROKEN_SRC_LINUX_EXT2_FS_H],
X[AC_CACHE_CHECK([if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken], ac_cv_broken_src_linux_ext2_fs_h,
X                [___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS"
X		AC_TRY_COMPILE([
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <linux/ext2_fs.h>
X#endif],
X                                [],
X                                [ac_cv_broken_src_linux_ext2_fs_h=no],
X                                [ac_cv_broken_src_linux_ext2_fs_h=yes])])
XCPPFLAGS=$___CPPFLAGS
Xif test $ac_cv_broken_src_linux_ext2_fs_h = yes; then
X  AC_DEFINE(HAVE_BROKEN_SRC_LINUX_EXT2_FS_H)
Xfi])
X
Xdnl Checks if Linux include file scsi/scsi.h is broken
Xdnl Defines HAVE_BROKEN_SCSI_SCSI_H on success.
XAC_DEFUN([AC_BROKEN_SCSI_SCSI_H],
X[AC_CACHE_CHECK([if Linux include file scsi/scsi.h is broken], ac_cv_broken_scsi_scsi_h,
X                [AC_TRY_COMPILE([
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <scsi/scsi.h>
X#endif],
X                                [],
X                                [ac_cv_broken_scsi_scsi_h=no],
X                                [ac_cv_broken_scsi_scsi_h=yes])])
Xif test $ac_cv_broken_scsi_scsi_h = yes; then
X  AC_DEFINE(HAVE_BROKEN_SCSI_SCSI_H)
Xfi])
X
Xdnl Checks if Linux include file /usr/src/linux/include/scsi/scsi.h is broken
Xdnl Defines HAVE_BROKEN_SRC_SCSI_SCSI_H on success.
XAC_DEFUN([AC_BROKEN_SRC_SCSI_SCSI_H],
X[AC_CACHE_CHECK([if Linux include file /usr/src/linux/include/scsi/scsi.h is broken], ac_cv_broken_src_scsi_scsi_h,
X                [___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS"
X                AC_TRY_COMPILE([
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <scsi/scsi.h>
X#endif],
X                                [],
X                                [ac_cv_broken_src_scsi_scsi_h=no],
X                                [ac_cv_broken_src_scsi_scsi_h=yes])])
XCPPFLAGS=$___CPPFLAGS
Xif test $ac_cv_broken_src_scsi_scsi_h = yes; then
X  AC_DEFINE(HAVE_BROKEN_SRC_SCSI_SCSI_H)
Xfi])
X
Xdnl Checks if Linux include file scsi/sg.h is broken
Xdnl Defines HAVE_BROKEN_SCSI_SG_H on success.
XAC_DEFUN([AC_BROKEN_SCSI_SG_H],
X[AC_CACHE_CHECK([if Linux include file scsi/sg.h is broken], ac_cv_broken_scsi_sg_h,
X                [AC_TRY_COMPILE([
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <sys/types.h>
X#include <scsi/sg.h>
X#endif],
X                                [],
X                                [ac_cv_broken_scsi_sg_h=no],
X                                [ac_cv_broken_scsi_sg_h=yes])])
Xif test $ac_cv_broken_scsi_sg_h = yes; then
X  AC_DEFINE(HAVE_BROKEN_SCSI_SG_H)
Xfi])
X
Xdnl Checks if Linux include file /usr/src/linux/include/scsi/sg.h is broken
Xdnl Defines HAVE_BROKEN_SRC_SCSI_SG_H on success.
XAC_DEFUN([AC_BROKEN_SRC_SCSI_SG_H],
X[AC_CACHE_CHECK([if Linux include file /usr/src/linux/include/scsi/sg.h is broken], ac_cv_broken_src_scsi_sg_h,
X                [___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS"
X                AC_TRY_COMPILE([
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <sys/types.h>
X#include <scsi/sg.h>
X#endif],
X                                [],
X                                [ac_cv_broken_src_scsi_sg_h=no],
X                                [ac_cv_broken_src_scsi_sg_h=yes])])
XCPPFLAGS=$___CPPFLAGS
Xif test $ac_cv_broken_src_scsi_sg_h = yes; then
X  AC_DEFINE(HAVE_BROKEN_SRC_SCSI_SG_H)
Xfi])
X
XAC_DEFUN(AC_PROG_SHELL_BROKEN_E,
X[AC_CACHE_CHECK(whether handling of /bin/sh -ce 'command' is broken, ac_cv_prog_shell_broken_e,
X[if AC_TRY_COMMAND(/bin/sh -ce 'if false; true; then echo yes; else echo no; fi') | egrep yes >/dev/null 2>&1; then
X  ac_cv_prog_shell_broken_e=no
Xelse
X  ac_cv_prog_shell_broken_e=yes
Xfi
Xif test $ac_cv_prog_shell_broken_e = yes; then
X  AC_DEFINE(HAVE_PROG_SHELL_BROKEN_E)
Xfi])])
END-of-smake-1.2.1/autoconf/aclocal.m4
echo x - smake-1.2.1/autoconf/acoldnames.m4
sed 's/^X//' >smake-1.2.1/autoconf/acoldnames.m4 << 'END-of-smake-1.2.1/autoconf/acoldnames.m4'
Xdnl @(#)acoldnames.m4	1.3 08/08/01 Copyright 1998-2008 J. Schilling
Xdnl
Xdnl Map old names of Autoconf macros to new regularized names.
Xdnl This file is part of Autoconf.
Xdnl Copyright (C) 1994 Free Software Foundation, Inc.
Xdnl
Xdnl This program is free software; you can redistribute it and/or modify
Xdnl it under the terms of the GNU General Public License as published by
Xdnl the Free Software Foundation; either version 2, or (at your option)
Xdnl any later version.
Xdnl
Xdnl This program is distributed in the hope that it will be useful,
Xdnl but WITHOUT ANY WARRANTY; without even the implied warranty of
Xdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Xdnl GNU General Public License for more details.
Xdnl
Xdnl You should have received a copy of the GNU General Public License
Xdnl along with this program; if not, write to the Free Software
Xdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Xdnl 02111-1307, USA.
Xdnl
Xdnl General macros.
Xdnl
Xdefine(AC_WARN, [indir([AC_MSG_WARN], $@)])dnl
Xdefine(AC_ERROR, [indir([AC_MSG_ERROR], $@)])dnl
XAC_DEFUN(AC_PROGRAM_CHECK, [indir([AC_CHECK_PROG], $@)])dnl
XAC_DEFUN(AC_PROGRAM_PATH, [indir([AC_PATH_PROG], $@)])dnl
XAC_DEFUN(AC_PROGRAMS_CHECK, [indir([AC_CHECK_PROGS], $@)])dnl
XAC_DEFUN(AC_PROGRAMS_PATH, [indir([AC_PATH_PROGS], $@)])dnl
XAC_DEFUN(AC_PREFIX, [indir([AC_PREFIX_PROGRAM], $@)])dnl
XAC_DEFUN(AC_HEADER_EGREP, [indir([AC_EGREP_HEADER], $@)])dnl
XAC_DEFUN(AC_PROGRAM_EGREP, [indir([AC_EGREP_CPP], $@)])dnl
XAC_DEFUN(AC_TEST_PROGRAM, [indir([AC_TRY_RUN], $@)])dnl
XAC_DEFUN(AC_TEST_CPP, [indir([AC_TRY_CPP], $@)])dnl
XAC_DEFUN(AC_HEADER_CHECK, [indir([AC_CHECK_HEADER], $@)])dnl
XAC_DEFUN(AC_FUNC_CHECK, [indir([AC_CHECK_FUNC], $@)])dnl
XAC_DEFUN(AC_HAVE_FUNCS, [indir([AC_CHECK_FUNCS], $@)])dnl
XAC_DEFUN(AC_HAVE_HEADERS, [indir([AC_CHECK_HEADERS], $@)])dnl
XAC_DEFUN(AC_SIZEOF_TYPE, [indir([AC_CHECK_SIZEOF], $@)])dnl
Xdnl
Xdnl Specific macros.
Xdnl
XAC_DEFUN(AC_GCC_TRADITIONAL, [indir([AC_PROG_GCC_TRADITIONAL])])dnl
XAC_DEFUN(AC_MINUS_C_MINUS_O, [indir([AC_PROG_CC_C_O])])dnl
XAC_DEFUN(AC_SET_MAKE, [indir([AC_PROG_MAKE_SET])])dnl
XAC_DEFUN(AC_YYTEXT_POINTER, [indir([AC_DECL_YYTEXT])])dnl
XAC_DEFUN(AC_LN_S, [indir([AC_PROG_LN_S])])dnl
XAC_DEFUN(AC_STDC_HEADERS, [indir([AC_HEADER_STDC])])dnl
XAC_DEFUN(AC_MAJOR_HEADER, [indir([AC_HEADER_MAJOR])])dnl
XAC_DEFUN(AC_STAT_MACROS_BROKEN, [indir([AC_HEADER_STAT])])dnl
XAC_DEFUN(AC_SYS_SIGLIST_DECLARED, [indir([AC_DECL_SYS_SIGLIST])])dnl
XAC_DEFUN(AC_GETGROUPS_T, [indir([AC_TYPE_GETGROUPS])])dnl
XAC_DEFUN(AC_UID_T, [indir([AC_TYPE_UID_T])])dnl
XAC_DEFUN(AC_SIZE_T, [indir([AC_TYPE_SIZE_T])])dnl
XAC_DEFUN(AC_PID_T, [indir([AC_TYPE_PID_T])])dnl
XAC_DEFUN(AC_OFF_T, [indir([AC_TYPE_OFF_T])])dnl
XAC_DEFUN(AC_MODE_T, [indir([AC_TYPE_MODE_T])])dnl
XAC_DEFUN(AC_RETSIGTYPE, [indir([AC_TYPE_SIGNAL])])dnl
XAC_DEFUN(AC_MMAP, [indir([AC_FUNC_MMAP])])dnl
XAC_DEFUN(AC_VPRINTF, [indir([AC_FUNC_VPRINTF])])dnl
XAC_DEFUN(AC_VFORK, [indir([AC_FUNC_VFORK])])dnl
XAC_DEFUN(AC_WAIT3, [indir([AC_FUNC_WAIT3])])dnl
XAC_DEFUN(AC_ALLOCA, [indir([AC_FUNC_ALLOCA])])dnl
XAC_DEFUN(AC_GETLOADAVG, [indir([AC_FUNC_GETLOADAVG])])dnl
XAC_DEFUN(AC_UTIME_NULL, [indir([AC_FUNC_UTIME_NULL])])dnl
XAC_DEFUN(AC_STRCOLL, [indir([AC_FUNC_STRCOLL])])dnl
XAC_DEFUN(AC_SETVBUF_REVERSED, [indir([AC_FUNC_SETVBUF_REVERSED])])dnl
XAC_DEFUN(AC_TIME_WITH_SYS_TIME, [indir([AC_HEADER_TIME])])dnl
XAC_DEFUN(AC_TIMEZONE, [indir([AC_STRUCT_TM_ZONE])])dnl
XAC_DEFUN(AC_ST_BLOCKS, [indir([AC_STRUCT_ST_BLOCKS])])dnl
XAC_DEFUN(AC_ST_BLKSIZE, [indir([AC_STRUCT_ST_BLKSIZE])])dnl
XAC_DEFUN(AC_ST_RDEV, [indir([AC_STRUCT_ST_RDEV])])dnl
XAC_DEFUN(AC_CROSS_CHECK, [indir([AC_C_CROSS])])dnl
XAC_DEFUN(AC_CHAR_UNSIGNED, [indir([AC_C_CHAR_UNSIGNED])])dnl
XAC_DEFUN(AC_LONG_DOUBLE, [indir([AC_C_LONG_DOUBLE])])dnl
XAC_DEFUN(AC_WORDS_BIGENDIAN, [indir([AC_C_BIGENDIAN])])dnl
XAC_DEFUN(AC_INLINE, [indir([AC_C_INLINE])])dnl
XAC_DEFUN(AC_CONST, [indir([AC_C_CONST])])dnl
XAC_DEFUN(AC_LONG_FILE_NAMES, [indir([AC_SYS_LONG_FILE_NAMES])])dnl
XAC_DEFUN(AC_RESTARTABLE_SYSCALLS, [indir([AC_SYS_RESTARTABLE_SYSCALLS])])dnl
XAC_DEFUN(AC_FIND_X, [indir([AC_PATH_X])])dnl
XAC_DEFUN(AC_FIND_XTRA, [indir([AC_PATH_XTRA])])dnl
END-of-smake-1.2.1/autoconf/acoldnames.m4
echo x - smake-1.2.1/autoconf/acspecific.m4
sed 's/^X//' >smake-1.2.1/autoconf/acspecific.m4 << 'END-of-smake-1.2.1/autoconf/acspecific.m4'
Xdnl @(#)acspecific.m4	1.13 10/02/28 Copyright 1998-2009 J. Schilling
Xdnl
Xdnl Macros that test for specific features.
Xdnl This file is part of Autoconf.
Xdnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc.
Xdnl
Xdnl This program is free software; you can redistribute it and/or modify
Xdnl it under the terms of the GNU General Public License as published by
Xdnl the Free Software Foundation; either version 2, or (at your option)
Xdnl any later version.
Xdnl
Xdnl This program is distributed in the hope that it will be useful,
Xdnl but WITHOUT ANY WARRANTY; without even the implied warranty of
Xdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Xdnl GNU General Public License for more details.
Xdnl
Xdnl You should have received a copy of the GNU General Public License
Xdnl along with this program; if not, write to the Free Software
Xdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Xdnl 02111-1307, USA.
Xdnl
Xdnl As a special exception, the Free Software Foundation gives unlimited
Xdnl permission to copy, distribute and modify the configure scripts that
Xdnl are the output of Autoconf.  You need not follow the terms of the GNU
Xdnl General Public License when using or distributing such scripts, even
Xdnl though portions of the text of Autoconf appear in them.  The GNU
Xdnl General Public License (GPL) does govern all other use of the material
Xdnl that constitutes the Autoconf program.
Xdnl
Xdnl Certain portions of the Autoconf source text are designed to be copied
Xdnl (in certain cases, depending on the input) into the output of
Xdnl Autoconf.  We call these the "data" portions.  The rest of the Autoconf
Xdnl source text consists of comments plus executable code that decides which
Xdnl of the data portions to output in any given case.  We call these
Xdnl comments and executable code the "non-data" portions.  Autoconf never
Xdnl copies any of the non-data portions into its output.
Xdnl
Xdnl This special exception to the GPL applies to versions of Autoconf
Xdnl released by the Free Software Foundation.  When you make and
Xdnl distribute a modified version of Autoconf, you may extend this special
Xdnl exception to the GPL to apply to your modified version as well, *unless*
Xdnl your modified version has the potential to copy into its output some
Xdnl of the text that was the non-data portion of the version that you started
Xdnl with.  (In other words, unless your change moves or copies text from
Xdnl the non-data portions to the data portions.)  If your modification has
Xdnl such potential, you must delete any notice of this special exception
Xdnl to the GPL from your modified version.
Xdnl
Xdnl Written by David MacKenzie, with help from
Xdnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
Xdnl Roland McGrath, Noah Friedman, david d zuhn, and many others.
X
X
Xdnl ### Checks for programs
X
X
Xdnl Check whether to use -n, \c, or newline-tab to separate
Xdnl checking messages from result messages.
Xdnl Idea borrowed from dist 3.0.
Xdnl Internal use only.
XAC_DEFUN(AC_PROG_ECHO_N,
X[if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
X  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
X  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
X    ac_n= ac_c='
X' ac_t='	'
X  else
X    ac_n=-n ac_c= ac_t=
X  fi
Xelse
X  ac_n= ac_c='\c' ac_t=
Xfi
X])
X
XAC_DEFUN(AC_PROG_CC,
X[AC_BEFORE([$0], [AC_PROG_CPP])dnl
XAC_CHECK_PROG(CC, gcc, gcc)
Xif test -z "$CC"; then
X  AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
X  if test -z "$CC"; then
X    case "`uname -s`" in
X    *win32* | *WIN32*)
X      AC_CHECK_PROG(CC, cl, cl) ;;
X    esac
X  fi
X  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
Xfi
X
XAC_PROG_CC_WORKS
XAC_PROG_CC_GNU
X
Xif test $ac_cv_prog_gcc = yes; then
X  GCC=yes
Xelse
X  GCC=
Xfi
X
Xdnl Check whether -g works, even if CFLAGS is set, in case the package
Xdnl plays around with CFLAGS (such as to build both debugging and
Xdnl normal versions of a library), tasteless as that idea is.
Xac_test_CFLAGS="${CFLAGS+set}"
Xac_save_CFLAGS="$CFLAGS"
XCFLAGS=
XAC_PROG_CC_G
Xif test "$ac_test_CFLAGS" = set; then
X  CFLAGS="$ac_save_CFLAGS"
Xelif test $ac_cv_prog_cc_g = yes; then
X  if test "$GCC" = yes; then
X    CFLAGS="-g -O2"
X  else
X    CFLAGS="-g"
X  fi
Xelse
X  if test "$GCC" = yes; then
X    CFLAGS="-O2"
X  else
X    CFLAGS=
X  fi
Xfi
X])
X
XAC_DEFUN(AC_PROG_CXX,
X[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
XAC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, gcc)
X
XAC_PROG_CXX_WORKS
XAC_PROG_CXX_GNU
X
Xif test $ac_cv_prog_gxx = yes; then
X  GXX=yes
Xelse
X  GXX=
Xfi
X
Xdnl Check whether -g works, even if CXXFLAGS is set, in case the package
Xdnl plays around with CXXFLAGS (such as to build both debugging and
Xdnl normal versions of a library), tasteless as that idea is.
Xac_test_CXXFLAGS="${CXXFLAGS+set}"
Xac_save_CXXFLAGS="$CXXFLAGS"
XCXXFLAGS=
XAC_PROG_CXX_G
Xif test "$ac_test_CXXFLAGS" = set; then
X  CXXFLAGS="$ac_save_CXXFLAGS"
Xelif test $ac_cv_prog_cxx_g = yes; then
X  if test "$GXX" = yes; then
X    CXXFLAGS="-g -O2"
X  else
X    CXXFLAGS="-g"
X  fi
Xelse
X  if test "$GXX" = yes; then
X    CXXFLAGS="-O2"
X  else
X    CXXFLAGS=
X  fi
Xfi
X])
X
Xdnl Determine a Fortran 77 compiler to use.  If `F77' is not already set
Xdnl in the environment, check for `g77', `f77' and `f2c', in that order.
Xdnl Set the output variable `F77' to the name of the compiler found.
Xdnl 
Xdnl If using `g77' (the GNU Fortran 77 compiler), then `AC_PROG_F77'
Xdnl will set the shell variable `G77' to `yes', and empty otherwise.  If
Xdnl the output variable `FFLAGS' was not already set in the environment,
Xdnl then set it to `-g -02' for `g77' (or `-O2' where `g77' does not
Xdnl accept `-g').  Otherwise, set `FFLAGS' to `-g' for all other Fortran
Xdnl 77 compilers.
Xdnl 
Xdnl AC_PROG_F77()
XAC_DEFUN(AC_PROG_F77,
X[AC_BEFORE([$0], [AC_PROG_CPP])dnl
Xif test -z "$F77"; then
X  AC_CHECK_PROGS(F77, g77 f77 f2c)
X    test -z "$F77" && AC_MSG_ERROR([no acceptable Fortran 77 compiler found in \$PATH])
Xfi
X
XAC_PROG_F77_WORKS
XAC_PROG_F77_GNU
X
Xif test $ac_cv_prog_g77 = yes; then
X  G77=yes
Xdnl Check whether -g works, even if FFLAGS is set, in case the package
Xdnl plays around with FFLAGS (such as to build both debugging and
Xdnl normal versions of a library), tasteless as that idea is.
X  ac_test_FFLAGS="${FFLAGS+set}"
X  ac_save_FFLAGS="$FFLAGS"
X  FFLAGS=
X  AC_PROG_F77_G
X  if test "$ac_test_FFLAGS" = set; then
X    FFLAGS="$ac_save_FFLAGS"
X  elif test $ac_cv_prog_f77_g = yes; then
X    FFLAGS="-g -O2"
X  else
X    FFLAGS="-O2"
X  fi
Xelse
X  G77=
X  test "${FFLAGS+set}" = set || FFLAGS="-g"
Xfi
X])
X
XAC_DEFUN(AC_PROG_CC_WORKS,
X[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works])
XAC_LANG_SAVE
XAC_LANG_C
XAC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross)
XAC_LANG_RESTORE
XAC_MSG_RESULT($ac_cv_prog_cc_works)
Xif test $ac_cv_prog_cc_works = no; then
X  AC_MSG_ERROR([installation or configuration problem: C compiler cannot create executables.])
Xfi
XAC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler])
XAC_MSG_RESULT($ac_cv_prog_cc_cross)
Xcross_compiling=$ac_cv_prog_cc_cross
X])
X
XAC_DEFUN(AC_PROG_CXX_WORKS,
X[AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works])
XAC_LANG_SAVE
XAC_LANG_CPLUSPLUS
XAC_TRY_COMPILER([int main(){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross)
XAC_LANG_RESTORE
XAC_MSG_RESULT($ac_cv_prog_cxx_works)
Xif test $ac_cv_prog_cxx_works = no; then
X  AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.])
Xfi
XAC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler])
XAC_MSG_RESULT($ac_cv_prog_cxx_cross)
Xcross_compiling=$ac_cv_prog_cxx_cross
X])
X
Xdnl Test whether the Fortran 77 compiler can compile and link a trivial
Xdnl Fortran program.  Also, test whether the Fortran 77 compiler is a
Xdnl cross-compiler (which may realistically be the case if the Fortran
Xdnl compiler is `g77').
Xdnl 
Xdnl AC_PROG_F77_WORKS()
XAC_DEFUN(AC_PROG_F77_WORKS,
X[AC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works])
XAC_LANG_SAVE
XAC_LANG_FORTRAN77
XAC_TRY_COMPILER(dnl
X[      program conftest
X      end
X], ac_cv_prog_f77_works, ac_cv_prog_f77_cross)
XAC_LANG_RESTORE
XAC_MSG_RESULT($ac_cv_prog_f77_works)
Xif test $ac_cv_prog_f77_works = no; then
X  AC_MSG_ERROR([installation or configuration problem: Fortran 77 compiler cannot create executables.])
Xfi
XAC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler])
XAC_MSG_RESULT($ac_cv_prog_f77_cross)
Xcross_compiling=$ac_cv_prog_f77_cross
X])
X
XAC_DEFUN(AC_PROG_CC_GNU,
X[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
X[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
Xcat > conftest.c <<EOF
X#ifdef __GNUC__
X  yes;
X#endif
XEOF
Xif AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
X  ac_cv_prog_gcc=yes
Xelse
X  ac_cv_prog_gcc=no
Xfi])])
X
XAC_DEFUN(AC_PROG_CXX_GNU,
X[AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx,
X[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
Xcat > conftest.C <<EOF
X#ifdef __GNUC__
X  yes;
X#endif
XEOF
Xif AC_TRY_COMMAND(${CXX-g++} -E conftest.C) | egrep yes >/dev/null 2>&1; then
X  ac_cv_prog_gxx=yes
Xelse
X  ac_cv_prog_gxx=no
Xfi])])
X
Xdnl Test whether for Fortran 77 compiler is `g77' (the GNU Fortran 77
Xdnl Compiler).  This test depends on whether the Fortran 77 compiler can
Xdnl do CPP pre-processing.
Xdnl 
Xdnl AC_PROG_F77_GNU()
XAC_DEFUN(AC_PROG_F77_GNU,
X[AC_CACHE_CHECK(whether we are using GNU Fortran 77, ac_cv_prog_g77,
X[cat > conftest.fpp <<EOF
X#ifdef __GNUC__
X  yes
X#endif
XEOF
Xif AC_TRY_COMMAND($F77 -E conftest.fpp) | egrep yes >/dev/null 2>&1; then
X  ac_cv_prog_g77=yes
Xelse
X  ac_cv_prog_g77=no
Xfi])])
X
XAC_DEFUN(AC_PROG_CC_G,
X[AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
X[echo 'void f(){}' > conftest.c
Xif test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
X  ac_cv_prog_cc_g=yes
Xelse
X  ac_cv_prog_cc_g=no
Xfi
Xrm -f conftest*
X])])
X
XAC_DEFUN(AC_PROG_CXX_G,
X[AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
X[echo 'void f(){}' > conftest.cc
Xif test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
X  ac_cv_prog_cxx_g=yes
Xelse
X  ac_cv_prog_cxx_g=no
Xfi
Xrm -f conftest*
X])])
X
Xdnl Test whether the Fortran 77 compiler can accept the `-g' option to
Xdnl enable debugging.
Xdnl 
Xdnl AC_PROG_F77_G()
XAC_DEFUN(AC_PROG_F77_G,
X[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
X[cat > conftest.f << EOF
X       program conftest
X       end
XEOF
Xif test -z "`$F77 -g -c conftest.f 2>&1`"; then
X  ac_cv_prog_f77_g=yes
Xelse
X  ac_cv_prog_f77_g=no
Xfi
Xrm -f conftest*
X])])
X
XAC_DEFUN(AC_PROG_GCC_TRADITIONAL,
X[AC_REQUIRE([AC_PROG_CC])dnl
XAC_REQUIRE([AC_PROG_CPP])dnl
Xif test $ac_cv_prog_gcc = yes; then
X    AC_CACHE_CHECK(whether ${CC-cc} needs -traditional,
X      ac_cv_prog_gcc_traditional,
X[  ac_pattern="Autoconf.*'x'"
X  AC_EGREP_CPP($ac_pattern, [#include <sgtty.h>
XAutoconf TIOCGETP],
X  ac_cv_prog_gcc_traditional=yes, ac_cv_prog_gcc_traditional=no)
X
X  if test $ac_cv_prog_gcc_traditional = no; then
X    AC_EGREP_CPP($ac_pattern, [#include <termio.h>
XAutoconf TCGETA],
X    ac_cv_prog_gcc_traditional=yes)
X  fi])
X  if test $ac_cv_prog_gcc_traditional = yes; then
X    CC="$CC -traditional"
X  fi
Xfi
X])
X
XAC_DEFUN(AC_PROG_CC_C_O,
X[if test "x$CC" != xcc; then
X  AC_MSG_CHECKING(whether $CC and cc understand -c and -o together)
Xelse
X  AC_MSG_CHECKING(whether cc understands -c and -o together)
Xfi
Xset dummy $CC; ac_cc="`echo [$]2 |
Xchangequote(, )dnl
X		       sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
Xchangequote([, ])dnl
XAC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o,
X[echo 'foo(){}' > conftest.c
X# Make sure it works both with $CC and with simple cc.
X# We do the test twice because some compilers refuse to overwrite an
X# existing .o file with -o, though they will create one.
Xac_try='${CC-cc} -c conftest.c -o conftest.o 1>&AC_FD_CC'
Xif AC_TRY_EVAL(ac_try) &&
X   test -f conftest.o && AC_TRY_EVAL(ac_try);
Xthen
X  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
X  if test "x$CC" != xcc; then
X    # Test first that cc exists at all.
X    if AC_TRY_COMMAND(cc -c conftest.c 1>&AC_FD_CC); then
X      ac_try='cc -c conftest.c -o conftest.o 1>&AC_FD_CC'
X      if AC_TRY_EVAL(ac_try) &&
X	 test -f conftest.o && AC_TRY_EVAL(ac_try);
X      then
X        # cc works too.
X        :
X      else
X        # cc exists but doesn't like -o.
X        eval ac_cv_prog_cc_${ac_cc}_c_o=no
X      fi
X    fi
X  fi
Xelse
X  eval ac_cv_prog_cc_${ac_cc}_c_o=no
Xfi
Xrm -f conftest*
X])dnl
Xif eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
X  AC_MSG_RESULT(yes)
Xelse
X  AC_MSG_RESULT(no)
X  AC_DEFINE(NO_MINUS_C_MINUS_O)
Xfi
X])
X
Xdnl Test if the Fortran 77 compiler accepts the options `-c' and `-o'
Xdnl simultaneously, and define `F77_NO_MINUS_C_MINUS_O' if it does not.
Xdnl
Xdnl The usefulness of this macro is questionable, as I can't really see
Xdnl why anyone would use it.  The only reason I include it is for
Xdnl completeness, since a similar test exists for the C compiler.
Xdnl 
Xdnl AC_PROG_F77_C_O
XAC_DEFUN(AC_PROG_F77_C_O,
X[AC_BEFORE([$0], [AC_PROG_F77])dnl
XAC_MSG_CHECKING(whether $F77 understand -c and -o together)
Xset dummy $F77; ac_f77="`echo [$]2 |
Xchangequote(, )dnl
Xsed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
Xchangequote([, ])dnl
XAC_CACHE_VAL(ac_cv_prog_f77_${ac_f77}_c_o,
X[cat > conftest.f << EOF
X       program conftest
X       end
XEOF
X# We do the `AC_TRY_EVAL' test twice because some compilers refuse to
X# overwrite an existing `.o' file with `-o', although they will create
X# one.
Xac_try='$F77 $FFLAGS -c conftest.f -o conftest.o 1>&AC_FD_CC'
Xif AC_TRY_EVAL(ac_try) && test -f conftest.o && AC_TRY_EVAL(ac_try); then
X  eval ac_cv_prog_f77_${ac_f77}_c_o=yes
Xelse
X  eval ac_cv_prog_f77_${ac_f77}_c_o=no
Xfi
Xrm -f conftest*
X])dnl
Xif eval "test \"`echo '$ac_cv_prog_f77_'${ac_f77}_c_o`\" = yes"; then
X  AC_MSG_RESULT(yes)
Xelse
X  AC_MSG_RESULT(no)
X  AC_DEFINE(F77_NO_MINUS_C_MINUS_O)
Xfi
X])
X
Xdnl Define SET_MAKE to set ${MAKE} if make doesn't.
XAC_DEFUN(AC_PROG_MAKE_SET,
X[AC_MSG_CHECKING(whether ${MAKE-make} sets \${MAKE})
Xset dummy ${MAKE-make}; ac_make=`echo "[$]2" | sed 'y%./+-%__p_%'`
XAC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,
X[cat > conftestmake <<\EOF
Xall:
X	@echo 'ac_maketemp="${MAKE}"'
XEOF
Xchangequote(, )dnl
X# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
Xeval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
Xchangequote([, ])dnl
Xif test -n "$ac_maketemp"; then
X  eval ac_cv_prog_make_${ac_make}_set=yes
Xelse
X  eval ac_cv_prog_make_${ac_make}_set=no
Xfi
Xrm -f conftestmake])dnl
Xif eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  SET_MAKE=
Xelse
X  AC_MSG_RESULT(no)
X  SET_MAKE="MAKE=${MAKE-make}"
Xfi
XAC_SUBST([SET_MAKE])dnl
X])
X
XAC_DEFUN(AC_PROG_RANLIB,
X[AC_CHECK_PROG(RANLIB, ranlib, ranlib, :)])
X
Xdnl Check for mawk first since it's generally faster.
XAC_DEFUN(AC_PROG_AWK,
X[AC_CHECK_PROGS(AWK, mawk gawk nawk awk, )])
X
XAC_DEFUN(AC_PROG_YACC,
X[AC_CHECK_PROGS(YACC, 'bison -y' byacc, yacc)])
X
XAC_DEFUN(AC_PROG_CPP,
X[AC_MSG_CHECKING(how to run the C preprocessor)
X# On Suns, sometimes $CPP names a directory.
Xif test -n "$CPP" && test -d "$CPP"; then
X  CPP=
Xfi
Xif test -z "$CPP"; then
XAC_CACHE_VAL(ac_cv_prog_CPP,
X[  # This must be in double quotes, not single quotes, because CPP may get
X  # substituted into the Makefile and "${CC-cc}" will confuse make.
X  CPP="${CC-cc} -E"
X  # On the NeXT, cc -E runs the code through the compiler's parser,
X  # not just through cpp.
Xdnl Use a header file that comes with gcc, so configuring glibc
Xdnl with a fresh cross-compiler works.
X  AC_TRY_CPP([#include <assert.h>
XSyntax Error], ,
X  CPP="${CC-cc} -E -traditional-cpp"
X  AC_TRY_CPP([#include <assert.h>
XSyntax Error], ,
X  CPP="${CC-cc} -nologo -E"
X  AC_TRY_CPP([#include <assert.h>
XSyntax Error], , CPP=/lib/cpp)))
X  ac_cv_prog_CPP="$CPP"])dnl
X  CPP="$ac_cv_prog_CPP"
Xelse
X  ac_cv_prog_CPP="$CPP"
Xfi
XAC_MSG_RESULT($CPP)
XAC_SUBST(CPP)dnl
X])
X
XAC_DEFUN(AC_PROG_CXXCPP,
X[AC_MSG_CHECKING(how to run the C++ preprocessor)
Xif test -z "$CXXCPP"; then
XAC_CACHE_VAL(ac_cv_prog_CXXCPP,
X[AC_LANG_SAVE[]dnl
XAC_LANG_CPLUSPLUS[]dnl
X  CXXCPP="${CXX-g++} -E"
X  AC_TRY_CPP([#include <stdlib.h>], , CXXCPP=/lib/cpp)
X  ac_cv_prog_CXXCPP="$CXXCPP"
XAC_LANG_RESTORE[]dnl
Xfi])dnl
XCXXCPP="$ac_cv_prog_CXXCPP"
XAC_MSG_RESULT($CXXCPP)
XAC_SUBST(CXXCPP)dnl
X])
X
Xdnl Require finding the C or C++ preprocessor, whichever is the
Xdnl current language.
XAC_DEFUN(AC_REQUIRE_CPP,
X[ifelse(AC_LANG, C, [AC_REQUIRE([AC_PROG_CPP])], [AC_REQUIRE([AC_PROG_CXXCPP])])])
X
XAC_DEFUN(AC_PROG_LEX,
X[AC_CHECK_PROG(LEX, flex, flex, lex)
Xif test -z "$LEXLIB"
Xthen
X  case "$LEX" in
X  flex*) ac_lib=fl ;;
X  *) ac_lib=l ;;
X  esac
X  AC_CHECK_LIB($ac_lib, yywrap, LEXLIB="-l$ac_lib")
Xfi
XAC_SUBST(LEXLIB)])
X
Xdnl Check if lex declares yytext as a char * by default, not a char[].
Xundefine([AC_DECL_YYTEXT])
XAC_DEFUN(AC_DECL_YYTEXT,
X[AC_REQUIRE_CPP()dnl
XAC_REQUIRE([AC_PROG_LEX])dnl
XAC_CACHE_CHECK(lex output file root, ac_cv_prog_lex_root,
X[# The minimal lex program is just a single line: %%.  But some broken lexes
X# (Solaris, I think it was) want two %% lines, so accommodate them.
Xecho '%%
X%%' | $LEX
Xif test -f lex.yy.c; then
X  ac_cv_prog_lex_root=lex.yy
Xelif test -f lexyy.c; then
X  ac_cv_prog_lex_root=lexyy
Xelse
X  AC_MSG_ERROR(cannot find output from $LEX; giving up)
Xfi])
XLEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
XAC_SUBST(LEX_OUTPUT_ROOT)dnl
X
XAC_CACHE_CHECK(whether yytext is a pointer, ac_cv_prog_lex_yytext_pointer,
X[# POSIX says lex can declare yytext either as a pointer or an array; the
X# default is implementation-dependent. Figure out which it is, since
X# not all implementations provide the %pointer and %array declarations.
Xac_cv_prog_lex_yytext_pointer=no
Xecho 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $LEXLIB"
XAC_TRY_LINK(`cat $LEX_OUTPUT_ROOT.c`, , ac_cv_prog_lex_yytext_pointer=yes)
XLIBS="$ac_save_LIBS"
Xrm -f "${LEX_OUTPUT_ROOT}.c"
X])
Xdnl
Xif test $ac_cv_prog_lex_yytext_pointer = yes; then
X  AC_DEFINE(YYTEXT_POINTER)
Xfi
X])
X
XAC_DEFUN(AC_PROG_INSTALL,
X[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
X# Find a good install program.  We prefer a C program (faster),
X# so one script is as good as another.  But avoid the broken or
X# incompatible versions:
X# SysV /etc/install, /usr/sbin/install
X# SunOS /usr/etc/install
X# IRIX /sbin/install
X# AIX /bin/install
X# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
X# AFS /usr/afsws/bin/install, which mishandles nonexistent args
X# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
X# ./install, which can be erroneously created by make from ./install.sh.
XAC_MSG_CHECKING(for a BSD compatible install)
Xif test -z "$INSTALL"; then
XAC_CACHE_VAL(ac_cv_path_install,
X[  IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
X  for ac_dir in $PATH; do
X    # Account for people who put trailing slashes in PATH elements.
X    case "$ac_dir/" in
X    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
X    *)
X      # OSF1 and SCO ODT 3.0 have their own names for install.
X      # Don't use installbsd from OSF since it installs stuff as root
X      # by default.
X      for ac_prog in ginstall scoinst install; do
X        if test -f $ac_dir/$ac_prog; then
X	  if test $ac_prog = install &&
X            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
X	    # AIX install.  It has an incompatible calling convention.
X	    :
X	  else
X	    ac_cv_path_install="$ac_dir/$ac_prog -c"
X	    break 2
X	  fi
X	fi
X      done
X      ;;
X    esac
X  done
X  IFS="$ac_save_IFS"
X])dnl
X  if test "${ac_cv_path_install+set}" = set; then
X    INSTALL="$ac_cv_path_install"
X  else
X    # As a last resort, use the slow shell script.  We don't cache a
X    # path for INSTALL within a source directory, because that will
X    # break other packages using the cache if that directory is
X    # removed, or if the path is relative.
X    INSTALL="$ac_install_sh"
X  fi
Xfi
Xdnl We do special magic for INSTALL instead of AC_SUBST, to get
Xdnl relative paths right.
XAC_MSG_RESULT($INSTALL)
X
X# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
X# It thinks the first close brace ends the variable substitution.
Xtest -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
XAC_SUBST(INSTALL_PROGRAM)dnl
X
Xtest -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
XAC_SUBST(INSTALL_SCRIPT)dnl
X
Xtest -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
XAC_SUBST(INSTALL_DATA)dnl
X])
X
XAC_DEFUN(AC_PROG_LN_S,
X[AC_MSG_CHECKING(whether ln -s works)
XAC_CACHE_VAL(ac_cv_prog_LN_S,
X[rm -f conftestdata
Xif ln -s X conftestdata 2>/dev/null
Xthen
X  rm -f conftestdata
X  ac_cv_prog_LN_S="ln -s"
Xelse
X  ac_cv_prog_LN_S=ln
Xfi])dnl
XLN_S="$ac_cv_prog_LN_S"
Xif test "$ac_cv_prog_LN_S" = "ln -s"; then
X  AC_MSG_RESULT(yes)
Xelse
X  AC_MSG_RESULT(no)
Xfi
XAC_SUBST(LN_S)dnl
X])
X
Xdefine(AC_RSH,
X[errprint(__file__:__line__: [$0] has been removed; replace it with equivalent code
X)m4exit(4)])
X
X
Xdnl ### Checks for header files
X
X
XAC_DEFUN(AC_HEADER_STDC,
X[AC_REQUIRE_CPP()dnl
XAC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc,
X[AC_TRY_CPP([#include <stdlib.h>
X#include <stdarg.h>
X#include <string.h>
X#include <float.h>], ac_cv_header_stdc=yes, ac_cv_header_stdc=no)
X
Xif test $ac_cv_header_stdc = yes; then
X  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
XAC_EGREP_HEADER(memchr, string.h, , ac_cv_header_stdc=no)
Xfi
X
Xif test $ac_cv_header_stdc = yes; then
X  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
XAC_EGREP_HEADER(free, stdlib.h, , ac_cv_header_stdc=no)
Xfi
X
Xif test $ac_cv_header_stdc = yes; then
X  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
XAC_TRY_RUN([#include <ctype.h>
X#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
X#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
X#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Xint main () { int i; for (i = 0; i < 256; i++)
Xif (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
Xexit (0); }
X], , ac_cv_header_stdc=no, :)
Xfi])
Xif test $ac_cv_header_stdc = yes; then
X  AC_DEFINE(STDC_HEADERS)
X  AC_DEFINE(HAVE_STDARG_H)
X  AC_DEFINE(HAVE_STDLIB_H)
X  AC_DEFINE(HAVE_STRING_H)
X  AC_DEFINE(HAVE_FLOAT_H)
Xfi
X])
X
XAC_DEFUN(AC_UNISTD_H,
X[AC_OBSOLETE([$0], [; instead use AC_CHECK_HEADERS(unistd.h)])dnl
XAC_CHECK_HEADER(unistd.h, AC_DEFINE(HAVE_UNISTD_H))])
X
XAC_DEFUN(AC_USG,
X[AC_OBSOLETE([$0],
X  [; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])dnl
XAC_MSG_CHECKING([for BSD string and memory functions])
XAC_TRY_LINK([#include <strings.h>], [rindex(0, 0); bzero(0, 0);],
X  [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); AC_DEFINE(USG)])])
X
X
Xdnl If memchr and the like aren't declared in <string.h>, include <memory.h>.
Xdnl To avoid problems, don't check for gcc2 built-ins.
XAC_DEFUN(AC_MEMORY_H,
X[AC_OBSOLETE([$0], [; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])dnl
XAC_MSG_CHECKING(whether string.h declares mem functions)
XAC_EGREP_HEADER(memchr, string.h, ac_found=yes, ac_found=no)
XAC_MSG_RESULT($ac_found)
Xif test $ac_found = no; then
X  AC_CHECK_HEADER(memory.h, [AC_DEFINE(NEED_MEMORY_H)])
Xfi
X])
X
XAC_DEFUN(AC_HEADER_MAJOR,
X[AC_CACHE_CHECK(whether sys/types.h defines makedev,
X  ac_cv_header_sys_types_h_makedev,
X[AC_TRY_LINK([#include <sys/types.h>], [return makedev(0, 0);],
X  ac_cv_header_sys_types_h_makedev=yes, ac_cv_header_sys_types_h_makedev=no)
X])
X
Xif test $ac_cv_header_sys_types_h_makedev = no; then
XAC_CHECK_HEADER(sys/mkdev.h, [AC_DEFINE(MAJOR_IN_MKDEV)])
X
X  if test $ac_cv_header_sys_mkdev_h = no; then
XAC_CHECK_HEADER(sys/sysmacros.h, [AC_DEFINE(MAJOR_IN_SYSMACROS)])
X  fi
Xfi
X])
X
XAC_DEFUN(AC_HEADER_DIRENT,
X[ac_header_dirent=no
XAC_CHECK_HEADERS_DIRENT(dirent.h sys/ndir.h sys/dir.h ndir.h,
X  [ac_header_dirent=$ac_hdr; break])
X# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
Xif test $ac_header_dirent = dirent.h; then
XAC_CHECK_LIB(c, opendir, :,
X  [AC_CHECK_LIB(dir, opendir, LIBS="$LIBS -ldir")])
Xelse
XAC_CHECK_LIB(c, opendir, :,
X  [AC_CHECK_LIB(x, opendir, LIBS="$LIBS -lx")])
Xfi
X])
X
Xdnl Like AC_CHECK_HEADER, except also make sure that HEADER-FILE
Xdnl defines the type `DIR'.  dirent.h on NextStep 3.2 doesn't.
Xdnl AC_CHECK_HEADER_DIRENT(HEADER-FILE, ACTION-IF-FOUND)
XAC_DEFUN(AC_CHECK_HEADER_DIRENT,
X[ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
XAC_MSG_CHECKING([for $1 that defines DIR])
XAC_CACHE_VAL(ac_cv_header_dirent_$ac_safe,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <$1>], [DIR *dirp = 0;],
X  eval "ac_cv_header_dirent_$ac_safe=yes",
X  eval "ac_cv_header_dirent_$ac_safe=no")])dnl
Xif eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  $2
Xelse
X  AC_MSG_RESULT(no)
Xfi
X])
X
Xdnl Like AC_CHECK_HEADERS, except succeed only for a HEADER-FILE that
Xdnl defines `DIR'.
Xdnl AC_CHECK_HEADERS_DIRENT(HEADER-FILE... [, ACTION])
Xdefine(AC_CHECK_HEADERS_DIRENT,
X[for ac_hdr in $1
Xdo
XAC_CHECK_HEADER_DIRENT($ac_hdr,
X[changequote(, )dnl
X  ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_hdr) $2])dnl
Xdone])
X
XAC_DEFUN(AC_DIR_HEADER,
X[AC_OBSOLETE([$0], [; instead use AC_HEADER_DIRENT])dnl
Xac_header_dirent=no
Xfor ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
X  AC_CHECK_HEADER_DIRENT($ac_hdr, [ac_header_dirent=$ac_hdr; break])
Xdone
X
Xcase "$ac_header_dirent" in
Xdirent.h) AC_DEFINE(DIRENT) ;;
Xsys/ndir.h) AC_DEFINE(SYSNDIR) ;;
Xsys/dir.h) AC_DEFINE(SYSDIR) ;;
Xndir.h) AC_DEFINE(NDIR) ;;
Xesac
X
XAC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
X[AC_TRY_RUN([#include <sys/types.h>
X#include <$ac_header_dirent>
Xint closedir(); main() { exit(closedir(opendir(".")) != 0); }],
X  ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
Xif test $ac_cv_func_closedir_void = yes; then
X  AC_DEFINE(VOID_CLOSEDIR)
Xfi
X])
X
XAC_DEFUN(AC_HEADER_STAT,
X[AC_CACHE_CHECK(whether stat file-mode macros are broken,
X  ac_cv_header_stat_broken,
X[AC_EGREP_CPP([You lose], [#include <sys/types.h>
X#include <sys/stat.h>
X
X#if defined(S_ISBLK) && defined(S_IFDIR)
X# if S_ISBLK (S_IFDIR)
XYou lose.
X# endif
X#endif
X
X#if defined(S_ISBLK) && defined(S_IFCHR)
X# if S_ISBLK (S_IFCHR)
XYou lose.
X# endif
X#endif
X
X#if defined(S_ISLNK) && defined(S_IFREG)
X# if S_ISLNK (S_IFREG)
XYou lose.
X# endif
X#endif
X
X#if defined(S_ISSOCK) && defined(S_IFREG)
X# if S_ISSOCK (S_IFREG)
XYou lose.
X# endif
X#endif
X], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)])
Xif test $ac_cv_header_stat_broken = yes; then
X  AC_DEFINE(STAT_MACROS_BROKEN)
Xfi
X])
X
XAC_DEFUN(AC_DECL_SYS_SIGLIST,
X[AC_CACHE_CHECK([for sys_siglist declaration in signal.h or unistd.h],
X  ac_cv_decl_sys_siglist,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <signal.h>
X/* NetBSD declares sys_siglist in unistd.h.  */
X#ifdef HAVE_UNISTD_H
X#include <unistd.h>
X#endif], [char *msg = *(sys_siglist + 1);],
X  ac_cv_decl_sys_siglist=yes, ac_cv_decl_sys_siglist=no)])
Xif test $ac_cv_decl_sys_siglist = yes; then
X  AC_DEFINE(SYS_SIGLIST_DECLARED)
Xfi
X])
X
XAC_DEFUN(AC_HEADER_SYS_WAIT,
X[AC_CACHE_CHECK([for sys/wait.h that is POSIX.1 compatible],
X  ac_cv_header_sys_wait_h,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/wait.h>
X#ifndef WEXITSTATUS
X#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
X#endif
X#ifndef WIFEXITED
X#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
X#endif], [int s;
Xwait (&s);
Xs = WIFEXITED (s) ? WEXITSTATUS (s) : 1;],
Xac_cv_header_sys_wait_h=yes, ac_cv_header_sys_wait_h=no)])
Xif test $ac_cv_header_sys_wait_h = yes; then
X  AC_DEFINE(HAVE_SYS_WAIT_H)
Xfi
X])
X
X
Xdnl ### Checks for typedefs
X
X
XAC_DEFUN(AC_TYPE_GETGROUPS,
X[AC_REQUIRE([AC_TYPE_UID_T])dnl
XAC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
X[AC_TRY_RUN(
Xchangequote(<<, >>)dnl
X<<
X/* Thanks to Mike Rendell for this test.  */
X#include <sys/types.h>
X#define NGID 256
X#undef MAX
X#define MAX(x, y) ((x) > (y) ? (x) : (y))
Xmain()
X{
X  gid_t gidset[NGID];
X  int i, n;
X  union { gid_t gval; long lval; }  val;
X
X  val.lval = -1;
X  for (i = 0; i < NGID; i++)
X    gidset[i] = val.gval;
X  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
X                 gidset);
X  /* Exit non-zero if getgroups seems to require an array of ints.  This
X     happens when gid_t is short but getgroups modifies an array of ints.  */
X  exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
X}
X>>,
Xchangequote([, ])dnl
X  ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int,
X  ac_cv_type_getgroups=cross)
Xif test $ac_cv_type_getgroups = cross; then
X  dnl When we can't run the test program (we are cross compiling), presume
X  dnl that <unistd.h> has either an accurate prototype for getgroups or none.
X  dnl Old systems without prototypes probably use int.
X  AC_EGREP_HEADER([getgroups.*int.*gid_t], unistd.h,
X		  ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int)
Xfi])
XAC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups)
X])
X
XAC_DEFUN(AC_TYPE_UID_T,
X[AC_CACHE_CHECK(for uid_t in sys/types.h, ac_cv_type_uid_t,
X[AC_EGREP_HEADER(uid_t, sys/types.h,
X  ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])
Xif test $ac_cv_type_uid_t = no; then
X  AC_DEFINE(uid_t, int)
X  AC_DEFINE(gid_t, int)
Xfi
X])
X
XAC_DEFUN(AC_TYPE_SIZE_T,
X[AC_CHECK_TYPE(size_t, unsigned)])
X
XAC_DEFUN(AC_TYPE_PID_T,
X[AC_CHECK_TYPE(pid_t, int)])
X
XAC_DEFUN(AC_TYPE_OFF_T,
X[AC_CHECK_TYPE(off_t, long)])
X
XAC_DEFUN(AC_TYPE_MODE_T,
X[AC_CHECK_TYPE(mode_t, int)])
X
Xdnl Note that identifiers starting with SIG are reserved by ANSI C.
XAC_DEFUN(AC_TYPE_SIGNAL,
X[AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <signal.h>
X#ifdef signal
X#undef signal
X#endif
X#ifdef __cplusplus
Xextern "C" void (*signal (int, void (*)(int)))(int);
X#else
Xvoid (*signal ()) ();
X#endif
X],
X[int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)])
XAC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal)
X])
X
X
Xdnl ### Checks for functions
X
X
XAC_DEFUN(AC_FUNC_CLOSEDIR_VOID,
X[AC_REQUIRE([AC_HEADER_DIRENT])dnl
XAC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
X[AC_TRY_RUN([#include <sys/types.h>
X#include <$ac_header_dirent>
Xint closedir(); main() { exit(closedir(opendir(".")) != 0); }],
X  ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
Xif test $ac_cv_func_closedir_void = yes; then
X  AC_DEFINE(CLOSEDIR_VOID)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_FNMATCH,
X[AC_CACHE_CHECK(for working fnmatch, ac_cv_func_fnmatch_works,
X# Some versions of Solaris or SCO have a broken fnmatch function.
X# So we run a test program.  If we are cross-compiling, take no chance.
X# Thanks to John Oleynick and Franc,ois Pinard for this test.
X[AC_TRY_RUN([main() { exit (fnmatch ("a*", "abc", 0) != 0); }],
Xac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no,
Xac_cv_func_fnmatch_works=no)])
Xif test $ac_cv_func_fnmatch_works = yes; then
X  AC_DEFINE(HAVE_FNMATCH)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_MMAP,
X[AC_CHECK_HEADERS(unistd.h)
XAC_CHECK_FUNCS(getpagesize)
XAC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
X[AC_TRY_RUN([
X/* Thanks to Mike Haertel and Jim Avera for this test.
X   Here is a matrix of mmap possibilities:
X	mmap private not fixed
X	mmap private fixed at somewhere currently unmapped
X	mmap private fixed at somewhere already mapped
X	mmap shared not fixed
X	mmap shared fixed at somewhere currently unmapped
X	mmap shared fixed at somewhere already mapped
X   For private mappings, we should verify that changes cannot be read()
X   back from the file, nor mmap's back from the file at a different
X   address.  (There have been systems where private was not correctly
X   implemented like the infamous i386 svr4.0, and systems where the
X   VM page cache was not coherent with the filesystem buffer cache
X   like early versions of FreeBSD and possibly contemporary NetBSD.)
X   For shared mappings, we should conversely verify that changes get
X   propogated back to all the places they're supposed to be.
X
X   Grep wants private fixed already mapped.
X   The main things grep needs to know about mmap are:
X   * does it exist and is it safe to write into the mmap'd area
X   * how to use it (BSD variants)  */
X#include <sys/types.h>
X#include <fcntl.h>
X#include <sys/mman.h>
X
X/* This mess was copied from the GNU getpagesize.h.  */
X#ifndef HAVE_GETPAGESIZE
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X
X/* Assume that all systems that can run configure have sys/param.h.  */
X# ifndef HAVE_SYS_PARAM_H
X#  define HAVE_SYS_PARAM_H 1
X# endif
X
X# ifdef _SC_PAGESIZE
X#  define getpagesize() sysconf(_SC_PAGESIZE)
X# else /* no _SC_PAGESIZE */
X#  ifdef HAVE_SYS_PARAM_H
X#   include <sys/param.h>
X#   ifdef EXEC_PAGESIZE
X#    define getpagesize() EXEC_PAGESIZE
X#   else /* no EXEC_PAGESIZE */
X#    ifdef NBPG
X#     define getpagesize() NBPG * CLSIZE
X#     ifndef CLSIZE
X#      define CLSIZE 1
X#     endif /* no CLSIZE */
X#    else /* no NBPG */
X#     ifdef NBPC
X#      define getpagesize() NBPC
X#     else /* no NBPC */
X#      ifdef PAGESIZE
X#       define getpagesize() PAGESIZE
X#      endif /* PAGESIZE */
X#     endif /* no NBPC */
X#    endif /* no NBPG */
X#   endif /* no EXEC_PAGESIZE */
X#  else /* no HAVE_SYS_PARAM_H */
X#   define getpagesize() 8192	/* punt totally */
X#  endif /* no HAVE_SYS_PARAM_H */
X# endif /* no _SC_PAGESIZE */
X
X#endif /* no HAVE_GETPAGESIZE */
X
X#ifdef __cplusplus
Xextern "C" { void *malloc(unsigned); }
X#else
Xchar *malloc();
X#endif
X
Xint
Xmain()
X{
X	char *data, *data2, *data3;
X	int i, pagesize;
X	int fd;
X
X	pagesize = getpagesize();
X
X	/*
X	 * First, make a file with some known garbage in it.
X	 */
X	data = malloc(pagesize);
X	if (!data)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		*(data + i) = rand();
X	umask(0);
X	fd = creat("conftestmmap", 0600);
X	if (fd < 0)
X		exit(1);
X	if (write(fd, data, pagesize) != pagesize)
X		exit(1);
X	close(fd);
X
X	/*
X	 * Next, try to mmap the file at a fixed address which
X	 * already has something else allocated at it.  If we can,
X	 * also make sure that we see the same garbage.
X	 */
X	fd = open("conftestmmap", O_RDWR);
X	if (fd < 0)
X		exit(1);
X	data2 = malloc(2 * pagesize);
X	if (!data2)
X		exit(1);
X	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
X	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
X	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data2 + i))
X			exit(1);
X
X	/*
X	 * Finally, make sure that changes to the mapped area
X	 * do not percolate back to the file as seen by read().
X	 * (This is a bug on some variants of i386 svr4.0.)
X	 */
X	for (i = 0; i < pagesize; ++i)
X		*(data2 + i) = *(data2 + i) + 1;
X	data3 = malloc(pagesize);
X	if (!data3)
X		exit(1);
X	if (read(fd, data3, pagesize) != pagesize)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data3 + i))
X			exit(1);
X	close(fd);
X	unlink("conftestmmap");
X	exit(0);
X}
X], ac_cv_func_mmap_fixed_mapped=yes, ac_cv_func_mmap_fixed_mapped=no,
Xac_cv_func_mmap_fixed_mapped=no)])
Xif test $ac_cv_func_mmap_fixed_mapped = yes; then
X  AC_DEFINE(HAVE_MMAP)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_GETPGRP,
X[AC_CACHE_CHECK(whether getpgrp takes no argument, ac_cv_func_getpgrp_void,
X[AC_TRY_RUN([
X/*
X * If this system has a BSD-style getpgrp(),
X * which takes a pid argument, exit unsuccessfully.
X *
X * Snarfed from Chet Ramey's bash pgrp.c test program
X */
X#include <stdio.h>
X#include <sys/types.h>
X
Xint     pid;
Xint     pg1, pg2, pg3, pg4;
Xint     ng, np, s, child;
X
Xmain()
X{
X        pid = getpid();
X        pg1 = getpgrp(0);
X        pg2 = getpgrp();
X        pg3 = getpgrp(pid);
X        pg4 = getpgrp(1);
X
X        /*
X         * If all of these values are the same, it's pretty sure that
X         * we're on a system that ignores getpgrp's first argument.
X         */
X        if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
X                exit(0);
X
X        child = fork();
X        if (child < 0)
X                exit(1);
X        else if (child == 0) {
X                np = getpid();
X                /*
X                 * If this is Sys V, this will not work; pgrp will be
X                 * set to np because setpgrp just changes a pgrp to be
X                 * the same as the pid.
X                 */
X                setpgrp(np, pg1);
X                ng = getpgrp(0);        /* Same result for Sys V and BSD */
X                if (ng == pg1) {
X                        exit(1);
X                } else {
X                        exit(0);
X                }
X        } else {
X                wait(&s);
X                exit(s>>8);
X        }
X}
X], ac_cv_func_getpgrp_void=yes, ac_cv_func_getpgrp_void=no,
X   AC_MSG_ERROR(cannot check getpgrp if cross compiling))
X])
Xif test $ac_cv_func_getpgrp_void = yes; then
X  AC_DEFINE(GETPGRP_VOID)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_SETPGRP,
X[AC_CACHE_CHECK(whether setpgrp takes no argument, ac_cv_func_setpgrp_void,
XAC_TRY_RUN([
X#ifdef HAVE_UNISTD_H
X#include <unistd.h>
X#endif
X
X/*
X * If this system has a BSD-style setpgrp, which takes arguments, exit
X * successfully.
X */
Xmain()
X{
X    if (setpgrp(1,1) == -1)
X	exit(0);
X    else
X	exit(1);
X}
X], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes,
X   AC_MSG_ERROR(cannot check setpgrp if cross compiling))
X)
Xif test $ac_cv_func_setpgrp_void = yes; then
X  AC_DEFINE(SETPGRP_VOID)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_VPRINTF,
X[AC_CHECK_FUNC(vprintf, AC_DEFINE(HAVE_VPRINTF))
Xif test "$ac_cv_func_vprintf" != yes; then
XAC_CHECK_FUNC(_doprnt, AC_DEFINE(HAVE_DOPRNT))
Xfi
X])
X
XAC_DEFUN(AC_FUNC_VFORK,
X[AC_REQUIRE([AC_TYPE_PID_T])dnl
XAC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H))
XAC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works,
X[AC_TRY_RUN([/* Thanks to Paul Eggert for first version of this test.  */
X#include <stdio.h>
X#include <sys/types.h>
X#include <sys/stat.h>
X#ifdef HAVE_UNISTD_H
X#include <unistd.h>
X#endif
X#ifdef HAVE_VFORK_H
X#include <vfork.h>
X#endif
X#ifdef HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X#if defined(HAVE_WAIT_H)
X#include <wait.h>
X#else
X#include <sys/wait.h>
X#endif
X/* On some sparc systems, changes by the child to local and incoming
X   argument registers are propagated back to the parent.
X   The compiler is told about this with #include <vfork.h>,
X   but some compilers (e.g. gcc -O) don't grok <vfork.h>.
X   Test for this by using a static variable whose address
X   is put into a register that is clobbered by the vfork.  */
X#ifndef	VMS
Xstatic int
X#ifdef __cplusplus
Xsparc_address_test (int arg)
X#else
Xsparc_address_test (arg) int arg;
X#endif
X{
X  static pid_t child;
X  if (!child) {
X    child = vfork ();
X    if (child < 0) {
X      perror ("vfork");
X      _exit(2);
X    }
X    if (!child) {
X      arg = getpid();
X      write(-1, "", 0);
X      _exit (arg);
X    }
X  }
X  return (0);
X}
X#endif
Xint exc = 0;
X
Xint
Xmain() {
X  pid_t parent = getpid ();
X  pid_t child;
X
X#ifndef	VMS
X  sparc_address_test(0);
X#endif
X
X  child = vfork ();
X
X  if (child == 0) {
X    /* Here is another test for sparc vfork register problems.
X       This test uses lots of local variables, at least
X       as many local variables as main has allocated so far
X       including compiler temporaries.  4 locals are enough for
X       gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
X       A buggy compiler should reuse the register of parent
X       for one of the local variables, since it will think that
X       parent can't possibly be used any more in this routine.
X       Assigning to the local variable will thus munge parent
X       in the parent process.  */
X    pid_t
X      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
X      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
X    /* Convince the compiler that p..p7 are live; otherwise, it might
X       use the same hardware register for all 8 local variables.  */
X    if (p != p1 || p != p2 || p != p3 || p != p4
X	|| p != p5 || p != p6 || p != p7)
X      exc = 1;
X
X    /* On some systems (e.g. IRIX 3.3),
X       vfork doesn't separate parent from child file descriptors.
X       If the child closes a descriptor before it execs or exits,
X       this munges the parent's descriptor as well.
X       Test for this by closing stdout in the child.  */
X    if (exc == 0)
X	exc = close(fileno(stdout)) != 0;
X    /*
X     * VMS hangs if we do not call execl()
X     */
X#ifdef HAVE_EXECL
X    /*
X     * On VMS, things hang unless the child calls exec()
X     */
X    if (exc == 0)
X	execl("/bin/true", "true", (char *)0);
X    else
X	execl("/bin/false", "false", (char *)0);
X#endif
X    _exit(exc);
X  } else {
X    int status;
X    struct stat st;
X
X    while (wait(&status) != child)
X      ;
X    exit(
X	 /* Was there some problem with vforking?  */
X	 child < 0
X
X	 /* Did the child fail?  (This shouldn't happen.)  */
X	 || status
X
X	 /* Did the vfork/compiler bug occur?  */
X	 || parent != getpid()
X
X	 /* Did the file descriptor bug occur?  */
X	 || fstat(fileno(stdout), &st) != 0
X	 );
X  }
X}],
Xac_cv_func_vfork_works=yes, ac_cv_func_vfork_works=no, AC_CHECK_FUNC(vfork)
Xac_cv_func_vfork_works=$ac_cv_func_vfork)])
Xif test $ac_cv_func_vfork_works = no; then
X  AC_DEFINE(vfork, fork)
Xelse
X  AC_DEFINE(HAVE_VFORK)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_WAIT3,
X[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage,
X[AC_TRY_RUN([#include <sys/types.h>
X#include <sys/time.h>
X#include <sys/resource.h>
X#include <stdio.h>
X/* HP-UX has wait3 but does not fill in rusage at all.  */
Xmain() {
X  struct rusage r;
X  int i;
X  /* Use a field that we can force nonzero --
X     voluntary context switches.
X     For systems like NeXT and OSF/1 that don't set it,
X     also use the system CPU time.  And page faults (I/O) for Linux.  */
X  r.ru_nvcsw = 0;
X  r.ru_utime.tv_sec = 0;
X  r.ru_utime.tv_usec = 0;
X  r.ru_stime.tv_sec = 0;
X  r.ru_stime.tv_usec = 0;
X  r.ru_majflt = r.ru_minflt = 0;
X  switch (fork()) {
X  case 0: /* Child.  */
X    sleep(1); /* Give up the CPU.  */
X    for (i=200000; --i > 0;) getpid(); /* Use up some CPU time */
X    _exit(0);
X  case -1: _exit(0); /* What can we do?  */
X  default: /* Parent.  */
X    wait3(&i, 0, &r);
X    sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
X    exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
X	 && r.ru_utime.tv_sec == 0 && r.ru_utime.tv_usec == 0
X	 && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
X  }
X}], ac_cv_func_wait3_rusage=yes, ac_cv_func_wait3_rusage=no,
Xac_cv_func_wait3_rusage=no)])
Xif test $ac_cv_func_wait3_rusage = yes; then
X  AC_DEFINE(HAVE_WAIT3)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_ALLOCA,
X[AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally.
X# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
X# for constant arguments.  Useless!
XAC_CACHE_CHECK([for working alloca.h], ac_cv_header_alloca_h,
X[AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));],
X  ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])
Xif test $ac_cv_header_alloca_h = yes; then
X  AC_DEFINE(HAVE_ALLOCA_H)
Xfi
X
XAC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works,
X[AC_TRY_LINK([
X#ifdef __GNUC__
X# define alloca __builtin_alloca
X#else
X# ifdef _MSC_VER
X#  include <malloc.h>
X#  define alloca _alloca
X# else
X#  if HAVE_ALLOCA_H
X#   include <alloca.h>
X#  else
X#   ifdef _AIX
X #pragma alloca
X#   else
X#    ifndef alloca /* predefined by HP cc +Olibcalls */
Xchar *alloca ();
X#    endif
X#   endif
X#  endif
X# endif
X#endif
X], [char *p = (char *) alloca(1);],
X  ac_cv_func_alloca_works=yes, ac_cv_func_alloca_works=no)])
Xif test $ac_cv_func_alloca_works = yes; then
X  AC_DEFINE(HAVE_ALLOCA)
Xfi
X
Xif test $ac_cv_func_alloca_works = no; then
X  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
X  # that cause trouble.  Some versions do not even contain alloca or
X  # contain a buggy version.  If you still want to use their alloca,
X  # use ar to extract alloca.o from them instead of compiling alloca.c.
X  ALLOCA=alloca.${ac_objext}
X  AC_DEFINE(C_ALLOCA)
X
XAC_CACHE_CHECK(whether alloca needs Cray hooks, ac_cv_os_cray,
X[AC_EGREP_CPP(webecray,
X[#if defined(CRAY) && ! defined(CRAY2)
Xwebecray
X#else
Xwenotbecray
X#endif
X], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
Xif test $ac_cv_os_cray = yes; then
Xfor ac_func in _getb67 GETB67 getb67; do
X  AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func)
X  break])
Xdone
Xfi
X
XAC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
X[AC_TRY_RUN([find_stack_direction ()
X{
X  static char *addr = 0;
X  auto char dummy;
X  if (addr == 0)
X    {
X      addr = &dummy;
X      return find_stack_direction ();
X    }
X  else
X    return (&dummy > addr) ? 1 : -1;
X}
Xmain ()
X{
X  exit (find_stack_direction() < 0);
X}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
X  ac_cv_c_stack_direction=0)])
XAC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
Xfi
XAC_SUBST(ALLOCA)dnl
X])
X
XAC_DEFUN(AC_FUNC_GETLOADAVG,
X[ac_have_func=no # yes means we've found a way to get the load average.
X
X# Some systems with -lutil have (and need) -lkvm as well, some do not.
X# On Solaris, -lkvm requires nlist from -lelf, so check that first
X# to get the right answer into the cache.
XAC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS")
XAC_CHECK_LIB(kvm, kvm_open, LIBS="-lkvm $LIBS")
X# Check for the 4.4BSD definition of getloadavg.
XAC_CHECK_LIB(util, getloadavg,
X  [LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes])
X
Xif test $ac_have_func = no; then
X  # There is a commonly available library for RS/6000 AIX.
X  # Since it is not a standard part of AIX, it might be installed locally.
X  ac_getloadavg_LIBS="$LIBS"; LIBS="-L/usr/local/lib $LIBS"
X  AC_CHECK_LIB(getloadavg, getloadavg,
X    LIBS="-lgetloadavg $LIBS", LIBS="$ac_getloadavg_LIBS")
Xfi
X
X# Make sure it is really in the library, if we think we found it.
XAC_REPLACE_FUNCS(getloadavg)
X
Xif test $ac_cv_func_getloadavg = yes; then
X  AC_DEFINE(HAVE_GETLOADAVG)
X  ac_have_func=yes
Xelse
X  # Figure out what our getloadavg.c needs.
X  ac_have_func=no
X  AC_CHECK_HEADER(sys/dg_sys_info.h,
X  [ac_have_func=yes; AC_DEFINE(DGUX)
X  AC_CHECK_LIB(dgc, dg_sys_info)])
X
X  # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
X  # uses stabs), but it is still SVR4.  We cannot check for <elf.h> because
X  # Irix 4.0.5F has the header but not the library.
X  if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
X    ac_have_func=yes; AC_DEFINE(SVR4)
X  fi
X
X  if test $ac_have_func = no; then
X    AC_CHECK_HEADER(inq_stats/cpustats.h,
X    [ac_have_func=yes; AC_DEFINE(UMAX)
X    AC_DEFINE(UMAX4_3)])
X  fi
X
X  if test $ac_have_func = no; then
X    AC_CHECK_HEADER(sys/cpustats.h,
X    [ac_have_func=yes; AC_DEFINE(UMAX)])
X  fi
X
X  if test $ac_have_func = no; then
X    AC_CHECK_HEADERS(mach/mach.h)
X  fi
X
X  AC_CHECK_HEADER(nlist.h,
X  [AC_DEFINE(NLIST_STRUCT)
X  AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un,
X  [AC_TRY_COMPILE([#include <nlist.h>],
X  [struct nlist n; n.n_un.n_name = 0;],
X  ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])
X  if test $ac_cv_struct_nlist_n_un = yes; then
X    AC_DEFINE(NLIST_NAME_UNION)
X  fi
X  ])dnl
Xfi # Do not have getloadavg in system libraries.
X
X# Some definitions of getloadavg require that the program be installed setgid.
Xdnl FIXME Don't hardwire the path of getloadavg.c in the top-level directory.
XAC_CACHE_CHECK(whether getloadavg requires setgid,
X  ac_cv_func_getloadavg_setgid,
X[AC_EGREP_CPP([Yowza Am I SETGID yet],
X[#include "$srcdir/getloadavg.c"
X#ifdef LDAV_PRIVILEGED
XYowza Am I SETGID yet
X#endif],
X  ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)])
Xif test $ac_cv_func_getloadavg_setgid = yes; then
X  NEED_SETGID=true; AC_DEFINE(GETLOADAVG_PRIVILEGED)
Xelse
X  NEED_SETGID=false
Xfi
XAC_SUBST(NEED_SETGID)dnl
X
Xif test $ac_cv_func_getloadavg_setgid = yes; then
X  AC_CACHE_CHECK(group of /dev/kmem, ac_cv_group_kmem,
X[changequote(, )dnl
X  # On Solaris, /dev/kmem is a symlink.  Get info on the real file.
X  ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
X  # If we got an error (system does not support symlinks), try without -L.
X  test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
X  ac_cv_group_kmem=`echo $ac_ls_output \
X    | sed -ne 's/[ 	][ 	]*/ /g;
X	       s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\)  *.*/\1/;
X	       / /s/.* //;p;'`
Xchangequote([, ])dnl
X])
X  KMEM_GROUP=$ac_cv_group_kmem
Xfi
XAC_SUBST(KMEM_GROUP)dnl
X])
X
XAC_DEFUN(AC_FUNC_UTIME_NULL,
X[AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null,
X[rm -f conftestdata; > conftestdata
X# Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
XAC_TRY_RUN([#include <sys/types.h>
X#include <sys/stat.h>
Xmain() {
Xstruct stat s, t;
Xexit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
X&& stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
X&& t.st_mtime - s.st_mtime < 120));
X}], ac_cv_func_utime_null=yes, ac_cv_func_utime_null=no,
X  ac_cv_func_utime_null=no)
Xrm -f core core.* *.core])
Xif test $ac_cv_func_utime_null = yes; then
X  AC_DEFINE(HAVE_UTIME_NULL)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_STRCOLL,
X[AC_CACHE_CHECK(for working strcoll, ac_cv_func_strcoll_works,
X[AC_TRY_RUN([#include <string.h>
Xmain ()
X{
X  exit (strcoll ("abc", "def") >= 0 ||
X	strcoll ("ABC", "DEF") >= 0 ||
X	strcoll ("123", "456") >= 0);
X}], ac_cv_func_strcoll_works=yes, ac_cv_func_strcoll_works=no,
Xac_cv_func_strcoll_works=no)])
Xif test $ac_cv_func_strcoll_works = yes; then
X  AC_DEFINE(HAVE_STRCOLL)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_SETVBUF_REVERSED,
X[AC_CACHE_CHECK(whether setvbuf arguments are reversed,
X  ac_cv_func_setvbuf_reversed,
X[AC_TRY_RUN([#include <stdio.h>
X/* If setvbuf has the reversed format, exit 0. */
Xmain () {
X  /* This call has the arguments reversed.
X     A reversed system may check and see that the address of main
X     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
X  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
X    exit(1);
X  putc('\r', stdout);
X  exit(0);			/* Non-reversed systems segv here.  */
X}], ac_cv_func_setvbuf_reversed=yes, ac_cv_func_setvbuf_reversed=no)
Xrm -f core core.* *.core])
Xif test $ac_cv_func_setvbuf_reversed = yes; then
X  AC_DEFINE(SETVBUF_REVERSED)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_GETMNTENT,
X[# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
XAC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS",
X  [AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS",
X    [AC_CHECK_LIB(gen, getmntent, LIBS="-lgen $LIBS")])])
XAC_CHECK_FUNC(getmntent, [AC_DEFINE(HAVE_GETMNTENT)])])
X
XAC_DEFUN(AC_FUNC_STRFTIME,
X[AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)],
X[# strftime is in -lintl on SCO UNIX.
XAC_CHECK_LIB(intl, strftime, 
X[AC_DEFINE(HAVE_STRFTIME)
XLIBS="-lintl $LIBS"])])])
X
XAC_DEFUN(AC_FUNC_MEMCMP,
X[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean,
X[AC_TRY_RUN([
Xmain()
X{
X  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
X  exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
X}
X], ac_cv_func_memcmp_clean=yes, ac_cv_func_memcmp_clean=no,
Xac_cv_func_memcmp_clean=no)])
Xtest $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
XAC_SUBST(LIBOBJS)dnl
X])
X
XAC_DEFUN(AC_FUNC_SELECT_ARGTYPES,
X[AC_MSG_CHECKING([types of arguments for select()])
X AC_CACHE_VAL(ac_cv_func_select_arg234,dnl
X [AC_CACHE_VAL(ac_cv_func_select_arg1,dnl
X  [AC_CACHE_VAL(ac_cv_func_select_arg5,dnl
X   [for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
X     for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
X      for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
X       AC_TRY_COMPILE(dnl
X[#ifdef HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
X#ifdef HAVE_SYS_TIME_H
X#include <sys/time.h>
X#endif
X#ifdef HAVE_SYS_SELECT_H
X#include <sys/select.h>
X#endif
X#ifdef HAVE_SYS_SOCKET_H
X#include <sys/socket.h>
X#endif
Xextern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);],,dnl
X        [ac_not_found=no ; break 3],ac_not_found=yes)
X      done
X     done
X    done
X   ])dnl AC_CACHE_VAL
X  ])dnl AC_CACHE_VAL
X ])dnl AC_CACHE_VAL
X if test "$ac_not_found" = yes; then
X  ac_cv_func_select_arg1=int 
X  ac_cv_func_select_arg234='int *' 
X  ac_cv_func_select_arg5='struct timeval *'
X fi
X AC_MSG_RESULT([$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5])
X AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1,$ac_cv_func_select_arg1)
X AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234,($ac_cv_func_select_arg234))
X AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5,($ac_cv_func_select_arg5))
X])
X
X
Xdnl ### Checks for structure members
X
X
XAC_DEFUN(AC_HEADER_TIME,
X[AC_CACHE_CHECK([whether time.h and sys/time.h may both be included],
X  ac_cv_header_time,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/time.h>
X#include <time.h>],
X[struct tm *tp;], ac_cv_header_time=yes, ac_cv_header_time=no)])
Xif test $ac_cv_header_time = yes; then
X  AC_DEFINE(TIME_WITH_SYS_TIME)
Xfi
X])
X
XAC_DEFUN(AC_STRUCT_TM,
X[AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h],
X  ac_cv_struct_tm,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <time.h>],
X[struct tm *tp; tp->tm_sec;],
X  ac_cv_struct_tm=time.h, ac_cv_struct_tm=sys/time.h)])
Xif test $ac_cv_struct_tm = sys/time.h; then
X  AC_DEFINE(TM_IN_SYS_TIME)
Xfi
X])
X
XAC_DEFUN(AC_STRUCT_TM_ZONE,
X[AC_REQUIRE([AC_STRUCT_TM])dnl
XAC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;],
X  ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])
Xif test "$ac_cv_struct_tm_zone" = yes; then
X  AC_DEFINE(HAVE_TM_ZONE)
Xelse
X  AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
X[AC_TRY_LINK(
Xchangequote(<<, >>)dnl
X<<#include <time.h>
X#ifndef tzname /* For SGI.  */
Xextern char *tzname[]; /* RS6000 and others reject char **tzname.  */
X#endif>>,
Xchangequote([, ])dnl
X[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
X  if test $ac_cv_var_tzname = yes; then
X    AC_DEFINE(HAVE_TZNAME)
X  fi
Xfi
X])
X
XAC_DEFUN(AC_STRUCT_ST_BLOCKS,
X[AC_CACHE_CHECK([for st_blocks in struct stat], ac_cv_struct_st_blocks,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>], [struct stat s; s.st_blocks;],
Xac_cv_struct_st_blocks=yes, ac_cv_struct_st_blocks=no)])
Xif test $ac_cv_struct_st_blocks = yes; then
X  AC_DEFINE(HAVE_ST_BLOCKS)
Xelse
X  LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
Xfi
XAC_SUBST(LIBOBJS)dnl
X])
X
XAC_DEFUN(AC_STRUCT_ST_BLKSIZE,
X[AC_CACHE_CHECK([for st_blksize in struct stat], ac_cv_struct_st_blksize,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>], [struct stat s; s.st_blksize;],
Xac_cv_struct_st_blksize=yes, ac_cv_struct_st_blksize=no)])
Xif test $ac_cv_struct_st_blksize = yes; then
X  AC_DEFINE(HAVE_ST_BLKSIZE)
Xfi
X])
X
XAC_DEFUN(AC_STRUCT_ST_RDEV,
X[AC_CACHE_CHECK([for st_rdev in struct stat], ac_cv_struct_st_rdev,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>], [struct stat s; s.st_rdev;],
Xac_cv_struct_st_rdev=yes, ac_cv_struct_st_rdev=no)])
Xif test $ac_cv_struct_st_rdev = yes; then
X  AC_DEFINE(HAVE_ST_RDEV)
Xfi
X])
X
X
Xdnl ### Checks for compiler characteristics
X
X
XAC_DEFUN(AC_C_CROSS,
X[AC_OBSOLETE([$0], [; it has been merged into AC_PROG_CC])])
X
XAC_DEFUN(AC_C_CHAR_UNSIGNED,
X[AC_CACHE_CHECK(whether char is unsigned, ac_cv_c_char_unsigned,
X[if test "$GCC" = yes; then
X  # GCC predefines this symbol on systems where it applies.
XAC_EGREP_CPP(yes,
X[#ifdef __CHAR_UNSIGNED__
X  yes
X#endif
X], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no)
Xelse
XAC_TRY_RUN(
X[/* volatile prevents gcc2 from optimizing the test away on sparcs.  */
X#if !defined(__STDC__) || __STDC__ != 1
X#define volatile
X#endif
Xmain() {
X  volatile char c = 255; exit(c < 0);
X}], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no)
Xfi])
Xif test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
X  AC_DEFINE(__CHAR_UNSIGNED__)
Xfi
X])
X
XAC_DEFUN(AC_C_LONG_DOUBLE,
X[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
X[if test "$GCC" = yes; then
X  ac_cv_c_long_double=yes
Xelse
XAC_TRY_RUN([int main() {
X/* The Stardent Vistra knows sizeof(long double), but does not support it.  */
Xlong double foo = 0.0;
X/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
Xexit(sizeof(long double) < sizeof(double)); }],
Xac_cv_c_long_double=yes, ac_cv_c_long_double=no)
Xfi])
Xif test $ac_cv_c_long_double = yes; then
X  AC_DEFINE(HAVE_LONG_DOUBLE)
Xfi
X])
X
XAC_DEFUN(AC_INT_16_BITS,
X[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)])dnl
XAC_MSG_CHECKING(whether int is 16 bits)
XAC_TRY_RUN([main() { exit(sizeof(int) != 2); }],
X [AC_MSG_RESULT(yes)
X AC_DEFINE(INT_16_BITS)], AC_MSG_RESULT(no))
X])
X
XAC_DEFUN(AC_LONG_64_BITS,
X[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)])dnl
XAC_MSG_CHECKING(whether long int is 64 bits)
XAC_TRY_RUN([main() { exit(sizeof(long int) != 8); }],
X [AC_MSG_RESULT(yes)
X AC_DEFINE(LONG_64_BITS)], AC_MSG_RESULT(no))
X])
X
XAC_DEFUN(AC_C_BIGENDIAN,
X[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
X[ac_cv_c_bigendian=unknown
X# See if sys/param.h defines the BYTE_ORDER macro.
XAC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/param.h>], [
X#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
X bogus endian macros
X#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
XAC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/param.h>], [
X#if BYTE_ORDER != BIG_ENDIAN
X not big endian
X#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
Xif test $ac_cv_c_bigendian = unknown; then
XAC_TRY_RUN([main () {
X  /* Are we little or big endian?  From Harbison&Steele.  */
X  union
X  {
X    long l;
X    char c[sizeof (long)];
X  } u;
X  u.l = 1;
X  exit (u.c[sizeof (long) - 1] == 1);
X}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes)
Xfi])
Xif test $ac_cv_c_bigendian = yes; then
X  AC_DEFINE(WORDS_BIGENDIAN)
Xfi
X])
X
Xdnl Do nothing if the compiler accepts the inline keyword.
Xdnl Otherwise define inline to __inline__ or __inline if one of those work,
Xdnl otherwise define inline to be empty.
XAC_DEFUN(AC_C_INLINE,
X[AC_CACHE_CHECK([for inline], ac_cv_c_inline,
X[ac_cv_c_inline=no
Xfor ac_kw in inline __inline__ __inline; do
X  AC_TRY_COMPILE(, [} $ac_kw foo() {], [ac_cv_c_inline=$ac_kw; break])
Xdone
X])
Xcase "$ac_cv_c_inline" in
X  inline | yes)
X	AC_DEFINE(HAVE_INLINE)
X	;;
X  no)	AC_DEFINE(inline, )
X	;;
X  *)	AC_DEFINE_UNQUOTED(inline, $ac_cv_c_inline)
X	AC_DEFINE(HAVE_INLINE)
X	;;
Xesac
X])
X
XAC_DEFUN(AC_C_CONST,
X[dnl This message is consistent in form with the other checking messages,
Xdnl and with the result message.
XAC_CACHE_CHECK([for working const], ac_cv_c_const,
X[AC_TRY_COMPILE(,
Xchangequote(<<, >>)dnl
X<<
X/* Ultrix mips cc rejects this.  */
Xtypedef int charset[2]; const charset x;
X/* SunOS 4.1.1 cc rejects this.  */
Xchar const *const *ccp;
Xchar **p;
X/* NEC SVR4.0.2 mips cc rejects this.  */
Xstruct point {int x, y;};
Xstatic struct point const zero = {0,0};
X/* AIX XL C 1.02.0.0 rejects this.
X   It does not let you subtract one const X* pointer from another in an arm
X   of an if-expression whose if-part is not a constant expression */
Xconst char *g = "string";
Xccp = &g + (g ? g-g : 0);
X/* HPUX 7.0 cc rejects these. */
X++ccp;
Xp = (char**) ccp;
Xccp = (char const *const *) p;
X{ /* SCO 3.2v4 cc rejects this.  */
X  char *t;
X  char const *s = 0 ? (char *) 0 : (char const *) 0;
X
X  *t++ = 0;
X}
X{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
X  int x[] = {25, 17};
X  const int *foo = &x[0];
X  ++foo;
X}
X{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
X  typedef const int *iptr;
X  iptr p = 0;
X  ++p;
X}
X{ /* AIX XL C 1.02.0.0 rejects this saying
X     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
X  struct s { int j; const int *ap[3]; };
X  struct s *b; b->j = 5;
X}
X{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
X  const int foo = 10;
X}
X>>,
Xchangequote([, ])dnl
Xac_cv_c_const=yes, ac_cv_c_const=no)])
Xif test $ac_cv_c_const = no; then
X  AC_DEFINE(const, )
Xfi
X])
X
XAC_DEFUN(AC_C_STRINGIZE, [
XAC_REQUIRE([AC_PROG_CPP])
XAC_MSG_CHECKING([for preprocessor stringizing operator])
XAC_CACHE_VAL(ac_cv_c_stringize,
XAC_EGREP_CPP([#teststring],[
X#define x(y) #y
X
Xchar *s = x(teststring);
X], ac_cv_c_stringize=no, ac_cv_c_stringize=yes))
Xif test "${ac_cv_c_stringize}" = yes
Xthen
X        AC_DEFINE(HAVE_STRINGIZE)
Xfi
XAC_MSG_RESULT([${ac_cv_c_stringize}])
X])dnl
X
Xdefine(AC_ARG_ARRAY,
X[errprint(__file__:__line__: [$0] has been removed; don't do unportable things with arguments
X)m4exit(4)])
X
Xdnl Check the object extension used by the compiler: typically .o or
Xdnl .obj.  If this is called, some other behaviour will change,
Xdnl determined by ac_objext.
XAC_DEFUN(AC_OBJEXT,
X[AC_MSG_CHECKING([for object suffix])
XAC_CACHE_VAL(ac_cv_objext,
X[rm -f conftest*
Xecho 'int i = 1;' > conftest.$ac_ext
Xif AC_TRY_EVAL(ac_compile); then
X  for ac_file in conftest.*; do
X    case $ac_file in
X    *.c) ;;
X    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
X    esac
X  done
Xelse
X  AC_MSG_ERROR([installation or configuration problem; compiler does not work])
Xfi
Xrm -f conftest*])
XAC_MSG_RESULT($ac_cv_objext)
XOBJEXT=$ac_cv_objext
Xac_objext=$ac_cv_objext
XAC_SUBST(OBJEXT)])
X
Xdnl Determine the linker flags (e.g. `-L' and `-l') for the Fortran 77
Xdnl intrinsic and run-time libraries that are required to successfully
Xdnl link a Fortran 77 program or shared library.  The output variable
Xdnl FLIBS is set to these flags.
Xdnl 
Xdnl This macro is intended to be used in those situations when it is
Xdnl necessary to mix, e.g. C++ and Fortran 77, source code into a single
Xdnl program or shared library.
Xdnl 
Xdnl For example, if object files from a C++ and Fortran 77 compiler must
Xdnl be linked together, then the C++ compiler/linker must be used for
Xdnl linking (since special C++-ish things need to happen at link time
Xdnl like calling global constructors, instantiating templates, enabling
Xdnl exception support, etc.).
Xdnl 
Xdnl However, the Fortran 77 intrinsic and run-time libraries must be
Xdnl linked in as well, but the C++ compiler/linker doesn't know how to
Xdnl add these Fortran 77 libraries.  Hence, the macro
Xdnl `AC_F77_LIBRARY_LDFLAGS' was created to determine these Fortran 77
Xdnl libraries.
Xdnl
Xdnl This macro was packaged in its current form by Matthew D. Langston
Xdnl <langston@SLAC.Stanford.EDU>.  However, nearly all of this macro
Xdnl came from the `OCTAVE_FLIBS' macro in `octave-2.0.13/aclocal.m4',
Xdnl and full credit should go to John W. Eaton for writing this
Xdnl extremely useful macro.  Thank you John.
Xdnl
Xdnl AC_F77_LIBRARY_LDFLAGS()
XAC_DEFUN(AC_F77_LIBRARY_LDFLAGS,
X[AC_MSG_CHECKING([for Fortran 77 libraries])
XAC_REQUIRE([AC_PROG_F77])
XAC_REQUIRE([AC_CANONICAL_HOST])
XAC_CACHE_VAL(ac_cv_flibs,
X[changequote(, )dnl
Xdnl Write a minimal program and compile it with -v.  I don't know what
Xdnl to do if your compiler doesn't have -v...
Xecho "      END" > conftest.f
Xfoutput=`${F77} -v -o conftest conftest.f 2>&1`
Xdnl
Xdnl The easiest thing to do for xlf output is to replace all the commas
Xdnl with spaces.  Try to only do that if the output is really from xlf,
Xdnl since doing that causes problems on other systems.
Xdnl
Xxlf_p=`echo $foutput | grep xlfentry`
Xif test -n "$xlf_p"; then
X  foutput=`echo $foutput | sed 's/,/ /g'`
Xfi
Xdnl
Xld_run_path=`echo $foutput | \
X  sed -n -e 's/^.*LD_RUN_PATH *= *\([^ ]*\).*/\1/p'`
Xdnl
Xdnl We are only supposed to find this on Solaris systems...
Xdnl Uh, the run path should be absolute, shouldn't it?
Xdnl
Xcase "$ld_run_path" in
X  /*)
X    if test "$ac_cv_prog_gcc" = yes; then
X      ld_run_path="-Xlinker -R -Xlinker $ld_run_path"
X    else
X      ld_run_path="-R $ld_run_path"
X    fi
X  ;;
X  *)
X    ld_run_path=
X  ;;
Xesac
Xdnl
Xflibs=
Xlflags=
Xdnl
Xdnl If want_arg is set, we know we want the arg to be added to the list,
Xdnl so we don't have to examine it.
Xdnl
Xwant_arg=
Xdnl
Xfor arg in $foutput; do
X  old_want_arg=$want_arg
X  want_arg=
Xdnl
Xdnl None of the options that take arguments expect the argument to
Xdnl start with a -, so pretend we didn't see anything special.
Xdnl
X  if test -n "$old_want_arg"; then
X    case "$arg" in
X      -*)
X        old_want_arg=
X      ;;
X    esac
X  fi
X  case "$old_want_arg" in
X    '')
X      case $arg in
X        /*.a)
X          exists=false
X          for f in $lflags; do
X            if test x$arg = x$f; then
X              exists=true
X            fi
X          done
X          if $exists; then
X            arg=
X          else
X            lflags="$lflags $arg"
X          fi
X        ;;
X        -bI:*)
X          exists=false
X          for f in $lflags; do
X            if test x$arg = x$f; then
X              exists=true
X            fi
X          done
X          if $exists; then
X            arg=
X          else
X            if test "$ac_cv_prog_gcc" = yes; then
X              lflags="$lflags -Xlinker $arg"
X            else
X              lflags="$lflags $arg"
X            fi
X          fi
X        ;;
X        -lang* | -lcrt0.o | -lc | -lgcc)
X          arg=
X        ;;
X        -[lLR])
X          want_arg=$arg
X          arg=
X        ;;
X        -[lLR]*)
X          exists=false
X          for f in $lflags; do
X            if test x$arg = x$f; then
X              exists=true
X            fi
X          done
X          if $exists; then
X            arg=
X          else
X            case "$arg" in
X              -lkernel32)
X                case "$canonical_host_type" in
X                  *-*-cygwin*)
X                    arg=
X                  ;;
X                  *)
X                    lflags="$lflags $arg"
X                  ;;
X                esac
X              ;;
X              -lm)
X              ;;
X              *)
X                lflags="$lflags $arg"
X              ;;
X            esac
X          fi
X        ;;
X        -u)
X          want_arg=$arg
X          arg=
X        ;;
X        -Y)
X          want_arg=$arg
X          arg=
X        ;;
X        *)
X          arg=
X        ;;
X      esac
X    ;;
X    -[lLR])
X      arg="$old_want_arg $arg"
X    ;;
X    -u)
X      arg="-u $arg"
X    ;;
X    -Y)
Xdnl
Xdnl Should probably try to ensure unique directory options here too.
Xdnl This probably only applies to Solaris systems, and then will only
Xdnl work with gcc...
Xdnl
X      arg=`echo $arg | sed -e 's%^P,%%'`
X      SAVE_IFS=$IFS
X      IFS=:
X      list=
X      for elt in $arg; do
X        list="$list -L$elt"
X      done
X      IFS=$SAVE_IFS
X      arg="$list"
X    ;;
X  esac
Xdnl
X  if test -n "$arg"; then
X    flibs="$flibs $arg"
X  fi
Xdone
Xif test -n "$ld_run_path"; then
X  flibs_result="$ld_run_path $flibs"
Xelse
X  flibs_result="$flibs"
Xfi
Xchangequote([, ])dnl
Xac_cv_flibs="$flibs_result"])
XFLIBS="$ac_cv_flibs"
XAC_SUBST(FLIBS)dnl
XAC_MSG_RESULT($FLIBS)
X])
X
X
Xdnl ### Checks for operating system services
X
X
XAC_DEFUN(AC_SYS_INTERPRETER,
X[# Pull the hash mark out of the macro call to avoid m4 problems.
Xac_msg="whether #! works in shell scripts"
XAC_CACHE_CHECK($ac_msg, ac_cv_sys_interpreter,
X[echo '#! /bin/cat
Xexit 69
X' > conftest
Xchmod u+x conftest
X(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null)
Xif test $? -ne 69; then
X   ac_cv_sys_interpreter=yes
Xelse
X   ac_cv_sys_interpreter=no
Xfi
Xrm -f conftest])
Xinterpval="$ac_cv_sys_interpreter"
X])
X
Xdefine(AC_HAVE_POUNDBANG,
X[errprint(__file__:__line__: [$0 has been replaced by AC_SYS_INTERPRETER, taking no arguments
X])m4exit(4)])
X
XAC_DEFUN(AC_SYS_LONG_FILE_NAMES,
X[AC_CACHE_CHECK(for long file names, ac_cv_sys_long_file_names,
X[ac_cv_sys_long_file_names=yes
X# Test for long file names in all the places we know might matter:
X#      .		the current directory, where building will happen
X#      $prefix/lib	where we will be installing things
X#      $exec_prefix/lib	likewise
X# eval it to expand exec_prefix.
X#      $TMPDIR		if set, where it might want to write temporary files
X# if $TMPDIR is not set:
X#      /tmp		where it might want to write temporary files
X#      /var/tmp		likewise
X#      /usr/tmp		likewise
Xif test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
X  ac_tmpdirs="$TMPDIR"
Xelse
X  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
Xfi
Xfor ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
X  test -d $ac_dir || continue
X  test -w $ac_dir || continue # It is less confusing to not echo anything here.
X  (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
X  (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
X  val=`cat $ac_dir/conftest9012345 2>/dev/null`
X  if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
X    ac_cv_sys_long_file_names=no
X    rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
X    break
X  fi
X  rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
Xdone])
Xif test $ac_cv_sys_long_file_names = yes; then
X  AC_DEFINE(HAVE_LONG_FILE_NAMES)
Xfi
X])
X
XAC_DEFUN(AC_SYS_RESTARTABLE_SYSCALLS,
X[AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls,
X[AC_TRY_RUN(
X[/* Exit 0 (true) if wait returns something other than -1,
X   i.e. the pid of the child, which means that wait was restarted
X   after getting the signal.  */
X#include <sys/types.h>
X#include <signal.h>
Xucatch (isig) { }
Xmain () {
X  int i = fork (), status;
X  if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
X  signal (SIGINT, ucatch);
X  status = wait(&i);
X  if (status == -1) wait(&i);
X  exit (status == -1);
X}
X], ac_cv_sys_restartable_syscalls=yes, ac_cv_sys_restartable_syscalls=no)])
Xif test $ac_cv_sys_restartable_syscalls = yes; then
X  AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS)
Xfi
X])
X
XAC_DEFUN(AC_PATH_X,
X[AC_REQUIRE_CPP()dnl Set CPP; we run AC_PATH_X_DIRECT conditionally.
X# If we find X, set shell vars x_includes and x_libraries to the
X# paths, otherwise set no_x=yes.
X# Uses ac_ vars as temps to allow command line to override cache and checks.
X# --without-x overrides everything else, but does not touch the cache.
XAC_MSG_CHECKING(for X)
X
XAC_ARG_WITH(x, [  --with-x                use the X Window System])
X# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
Xif test "x$with_x" = xno; then
X  # The user explicitly disabled X.
X  have_x=disabled
Xelse
X  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
X    # Both variables are already set.
X    have_x=yes
X  else
XAC_CACHE_VAL(ac_cv_have_x,
X[# One or both of the vars are not set, and there is no cached value.
Xac_x_includes=NO ac_x_libraries=NO
XAC_PATH_X_XMKMF
XAC_PATH_X_DIRECT
Xif test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
X  # Didn't find X anywhere.  Cache the known absence of X.
X  ac_cv_have_x="have_x=no"
Xelse
X  # Record where we found X for the cache.
X  ac_cv_have_x="have_x=yes \
X	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
Xfi])dnl
X  fi
X  eval "$ac_cv_have_x"
Xfi # $with_x != no
X
Xif test "$have_x" != yes; then
X  AC_MSG_RESULT($have_x)
X  no_x=yes
Xelse
X  # If each of the values was on the command line, it overrides each guess.
X  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
X  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
X  # Update the cache value to reflect the command line values.
X  ac_cv_have_x="have_x=yes \
X		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
X  AC_MSG_RESULT([libraries $x_libraries, headers $x_includes])
Xfi
X])
X
Xdnl Internal subroutine of AC_PATH_X.
Xdnl Set ac_x_includes and/or ac_x_libraries.
XAC_DEFUN(AC_PATH_X_XMKMF,
X[rm -fr conftestdir
Xif mkdir conftestdir; then
X  cd conftestdir
X  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
X  cat > Imakefile <<'EOF'
Xacfindx:
X	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
XEOF
X  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
X    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
X    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
X    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
X    for ac_extension in a so sl; do
X      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
X        test -f $ac_im_libdir/libX11.$ac_extension; then
X        ac_im_usrlibdir=$ac_im_libdir; break
X      fi
X    done
X    # Screen out bogus values from the imake configuration.  They are
X    # bogus both because they are the default anyway, and because
X    # using them would break gcc on systems where it needs fixed includes.
X    case "$ac_im_incroot" in
X	/usr/include) ;;
X	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
X    esac
X    case "$ac_im_usrlibdir" in
X	/usr/lib | /lib) ;;
X	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
X    esac
X  fi
X  cd ..
X  rm -fr conftestdir
Xfi
X])
X
Xdnl Internal subroutine of AC_PATH_X.
Xdnl Set ac_x_includes and/or ac_x_libraries.
XAC_DEFUN(AC_PATH_X_DIRECT,
X[if test "$ac_x_includes" = NO; then
X  # Guess where to find include files, by looking for this one X11 .h file.
X  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
X
X  # First, try using that file with no special directory specified.
XAC_TRY_CPP([#include <$x_direct_test_include>],
X[# We can compile using X headers with no special include directory.
Xac_x_includes=],
X[# Look for the header file in a standard set of common directories.
X# Check X11 before X11Rn because it is often a symlink to the current release.
X  for ac_dir in               \
X    /usr/X11/include          \
X    /usr/X11R6/include        \
X    /usr/X11R5/include        \
X    /usr/X11R4/include        \
X                              \
X    /usr/include/X11          \
X    /usr/include/X11R6        \
X    /usr/include/X11R5        \
X    /usr/include/X11R4        \
X                              \
X    /usr/local/X11/include    \
X    /usr/local/X11R6/include  \
X    /usr/local/X11R5/include  \
X    /usr/local/X11R4/include  \
X                              \
X    /usr/local/include/X11    \
X    /usr/local/include/X11R6  \
X    /usr/local/include/X11R5  \
X    /usr/local/include/X11R4  \
X                              \
X    /usr/X386/include         \
X    /usr/x386/include         \
X    /usr/XFree86/include/X11  \
X                              \
X    /usr/include              \
X    /usr/local/include        \
X    /usr/unsupported/include  \
X    /usr/athena/include       \
X    /usr/local/x11r5/include  \
X    /usr/lpp/Xamples/include  \
X                              \
X    /usr/openwin/include      \
X    /usr/openwin/share/include \
X    ; \
X  do
X    if test -r "$ac_dir/$x_direct_test_include"; then
X      ac_x_includes=$ac_dir
X      break
X    fi
X  done])
Xfi # $ac_x_includes = NO
X
Xif test "$ac_x_libraries" = NO; then
X  # Check for the libraries.
X
X  test -z "$x_direct_test_library" && x_direct_test_library=Xt
X  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
X
X  # See if we find them without any special options.
X  # Don't add to $LIBS permanently.
X  ac_save_LIBS="$LIBS"
X  LIBS="-l$x_direct_test_library $LIBS"
XAC_TRY_LINK(, [${x_direct_test_function}()],
X[LIBS="$ac_save_LIBS"
X# We can link X programs with no special library path.
Xac_x_libraries=],
X[LIBS="$ac_save_LIBS"
X# First see if replacing the include by lib works.
X# Check X11 before X11Rn because it is often a symlink to the current release.
Xfor ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
X    /usr/X11/lib          \
X    /usr/X11R6/lib        \
X    /usr/X11R5/lib        \
X    /usr/X11R4/lib        \
X                          \
X    /usr/lib/X11          \
X    /usr/lib/X11R6        \
X    /usr/lib/X11R5        \
X    /usr/lib/X11R4        \
X                          \
X    /usr/local/X11/lib    \
X    /usr/local/X11R6/lib  \
X    /usr/local/X11R5/lib  \
X    /usr/local/X11R4/lib  \
X                          \
X    /usr/local/lib/X11    \
X    /usr/local/lib/X11R6  \
X    /usr/local/lib/X11R5  \
X    /usr/local/lib/X11R4  \
X                          \
X    /usr/X386/lib         \
X    /usr/x386/lib         \
X    /usr/XFree86/lib/X11  \
X                          \
X    /usr/lib              \
X    /usr/local/lib        \
X    /usr/unsupported/lib  \
X    /usr/athena/lib       \
X    /usr/local/x11r5/lib  \
X    /usr/lpp/Xamples/lib  \
X    /lib/usr/lib/X11	  \
X                          \
X    /usr/openwin/lib      \
X    /usr/openwin/share/lib \
X    ; \
Xdo
Xdnl Don't even attempt the hair of trying to link an X program!
X  for ac_extension in a so sl; do
X    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
X      ac_x_libraries=$ac_dir
X      break 2
X    fi
X  done
Xdone])
Xfi # $ac_x_libraries = NO
X])
X
Xdnl Find additional X libraries, magic flags, etc.
XAC_DEFUN(AC_PATH_XTRA,
X[AC_REQUIRE([AC_PATH_X])dnl
Xif test "$no_x" = yes; then
X  # Not all programs may use this symbol, but it does not hurt to define it.
X  AC_DEFINE(X_DISPLAY_MISSING)
X  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
Xelse
X  if test -n "$x_includes"; then
X    X_CFLAGS="$X_CFLAGS -I$x_includes"
X  fi
X
X  # It would also be nice to do this for all -L options, not just this one.
X  if test -n "$x_libraries"; then
X    X_LIBS="$X_LIBS -L$x_libraries"
Xdnl FIXME banish uname from this macro!
X    # For Solaris; some versions of Sun CC require a space after -R and
X    # others require no space.  Words are not sufficient . . . .
X    case "`(uname -sr) 2>/dev/null`" in
X    "SunOS 5"*)
X      AC_MSG_CHECKING(whether -R must be followed by a space)
X      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
X      AC_TRY_LINK(, , ac_R_nospace=yes, ac_R_nospace=no)
X      if test $ac_R_nospace = yes; then
X	AC_MSG_RESULT(no)
X	X_LIBS="$X_LIBS -R$x_libraries"
X      else
X	LIBS="$ac_xsave_LIBS -R $x_libraries"
X	AC_TRY_LINK(, , ac_R_space=yes, ac_R_space=no)
X	if test $ac_R_space = yes; then
X	  AC_MSG_RESULT(yes)
X	  X_LIBS="$X_LIBS -R $x_libraries"
X	else
X	  AC_MSG_RESULT(neither works)
X	fi
X      fi
X      LIBS="$ac_xsave_LIBS"
X    esac
X  fi
X
X  # Check for system-dependent libraries X programs must link with.
X  # Do this before checking for the system-independent R6 libraries
X  # (-lICE), since we may need -lsocket or whatever for X linking.
X
X  if test "$ISC" = yes; then
X    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
X  else
X    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
X    # libraries were built with DECnet support.  And karl@cs.umb.edu says
X    # the Alpha needs dnet_stub (dnet does not exist).
X    AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
X    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
X      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
X	[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
X    fi
X
X    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
X    # to get the SysV transport functions.
X    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
X    # needs -lnsl.
X    # The nsl library prevents programs from opening the X display
X    # on Irix 5.2, according to dickey@clark.net.
X    AC_CHECK_FUNC(gethostbyname)
X    if test $ac_cv_func_gethostbyname = no; then
X      AC_CHECK_LIB(nsl, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
X    fi
X
X    # lieder@skyler.mavd.honeywell.com says without -lsocket,
X    # socket/setsockopt and other routines are undefined under SCO ODT
X    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
X    # on later versions), says simon@lia.di.epfl.ch: it contains
X    # gethostby* variants that don't use the nameserver (or something).
X    # -lsocket must be given before -lnsl if both are needed.
X    # We assume that if connect needs -lnsl, so does gethostbyname.
X    AC_CHECK_FUNC(connect)
X    if test $ac_cv_func_connect = no; then
X      AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
X	$X_EXTRA_LIBS)
X    fi
X
X    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
X    AC_CHECK_FUNC(remove)
X    if test $ac_cv_func_remove = no; then
X      AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
X    fi
X
X    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
X    AC_CHECK_FUNC(shmat)
X    if test $ac_cv_func_shmat = no; then
X      AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc")
X    fi
X  fi
X
X  # Check for libraries that X11R6 Xt/Xaw programs need.
X  ac_save_LDFLAGS="$LDFLAGS"
X  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
X  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
X  # check for ICE first), but we must link in the order -lSM -lICE or
X  # we get undefined symbols.  So assume we have SM if we have ICE.
X  # These have to be linked with before -lX11, unlike the other
X  # libraries we check for below, so use a different variable.
X  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
X  AC_CHECK_LIB(ICE, IceConnectionNumber,
X    [X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"], , $X_EXTRA_LIBS)
X  LDFLAGS="$ac_save_LDFLAGS"
X
Xfi
XAC_SUBST(X_CFLAGS)dnl
XAC_SUBST(X_PRE_LIBS)dnl
XAC_SUBST(X_LIBS)dnl
XAC_SUBST(X_EXTRA_LIBS)dnl
X])
X
Xdnl The old Cygwin32 macro is deprecated.
XAC_DEFUN(AC_CYGWIN32,
X[AC_OBSOLETE([$0], [; instead use AC_CYGWIN])dnl
XAC_CYGWIN])
X
Xdnl Check for Cygwin.  This is a way to set the right value for
Xdnl EXEEXT.
XAC_DEFUN(AC_CYGWIN,
X[AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin,
X[AC_TRY_COMPILE(,[
X#ifndef __CYGWIN__
X#define __CYGWIN__ __CYGWIN32__
X#endif
Xreturn __CYGWIN__;],
Xac_cv_cygwin=yes, ac_cv_cygwin=no)
Xrm -f conftest*])
XCYGWIN=
Xtest "$ac_cv_cygwin" = yes && CYGWIN=yes])
X
Xdnl Check for mingw32.  This is another way to set the right value for
Xdnl EXEEXT.
XAC_DEFUN(AC_MINGW32,
X[AC_CACHE_CHECK(for mingw32 environment, ac_cv_mingw32,
X[AC_TRY_COMPILE(,[return __MINGW32__;],
Xac_cv_mingw32=yes, ac_cv_mingw32=no)
Xrm -f conftest*])
XMINGW32=
Xtest "$ac_cv_mingw32" = yes && MINGW32=yes])
X
Xdnl Check for EMX/OS2.  This is another way to set the right value for
Xdnl EXEEXT.
XAC_DEFUN(AC_EMXOS2,
X[AC_CACHE_CHECK(for EMX/OS2 environment, ac_cv_emxos2,
X[AC_TRY_COMPILE(,[return __EMX__;],
Xac_cv_emxos2=yes, ac_cv_emxos2=no)
Xrm -f conftest*])
XAC_CACHE_VAL(ac_cv_libpre,
Xif test "$ac_cv_emxos2" = yes ; then
X  ac_cv_libpre=
Xelse
X  ac_cv_libpre=lib
Xfi
X)
XEMXOS2=
Xtest "$ac_cv_emxos2" = yes && EMXOS2=yes])
X
Xdnl Check for the extension used for executables.  This knows that we
Xdnl add .exe for Cygwin or mingw32.  Otherwise, it compiles a test
Xdnl executable.  If this is called, the executable extensions will be
Xdnl automatically used by link commands run by the configure script.
XAC_DEFUN(AC_EXEEXT,
X[AC_REQUIRE([AC_CYGWIN])
XAC_REQUIRE([AC_MINGW32])
XAC_REQUIRE([AC_EMXOS2])
XAC_MSG_CHECKING([for executable suffix])
XAC_CACHE_VAL(ac_cv_exeext,
X[if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
X  ac_cv_exeext=.exe
X  ac_cv_xexeext=""
Xelse
X  rm -f conftest*
X  echo 'int main () { return 0; }' > conftest.$ac_ext
X  ac_cv_exeext=
X  if AC_TRY_EVAL(ac_link); then
X    for file in conftest.*; do
X      case $file in
X      *.c | *.o | *.obj) ;;
X      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
X      esac
X    done
X  else
X    ccout=`eval "${CC-cc} 2>&1" 2> /dev/null`
X    ret=$?
X    nf=`echo "$ccout" | grep 'not found'`
X    if test $ret = 127 -a -n "$nf" ; then	# Korn Shell
X        ccout=""
X    fi
X    if test ! -n "$ccout" ; then
X        AC_MSG_ERROR([installation or configuration problem: C compiler ${CC-cc} not found.])
X    fi
X    AC_MSG_ERROR([installation or configuration problem: compiler cannot create executables.])
X  fi
X  (./conftest ; exit) 2> /dev/null
X  if test $? != 0 ; then
X	ac_cv_xexeext="${ac_cv_exeext}"
X	(./conftest${ac_cv_xexeext} ; exit) 2> /dev/null
X	if test $? != 0 ; then
X		ac_cv_xexeext=""
X	fi
X  fi
X  rm -f conftest*
X  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
X  test x"${ac_cv_xexeext}" = x && ac_cv_xexeext=no
Xfi])
XEXEEXT=""
XXEXEEXT=""
Xtest x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
Xtest x"${ac_cv_xexeext}" != xno && XEXEEXT=${ac_cv_xexeext}
XAC_MSG_RESULT(${ac_cv_exeext})
XAC_MSG_CHECKING([for executable calling suffix])
XAC_MSG_RESULT(${ac_cv_xexeext})
Xdnl Setting ac_exeext will implicitly change the ac_link command.
Xac_exeext=$EXEEXT
Xac_xexeext=$XEXEEXT
XAC_SUBST(EXEEXT)
XAC_SUBST(XEXEEXT)
X])
X
X
Xdnl ### Checks for UNIX variants
Xdnl These are kludges which should be replaced by a single POSIX check.
Xdnl They aren't cached, to discourage their use.
X
X
XAC_DEFUN(AC_AIX,
X[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
XAC_BEFORE([$0], [AC_TRY_RUN])dnl
XAC_MSG_CHECKING(for AIX)
XAC_EGREP_CPP(yes,
X[#ifdef _AIX
X  yes
X#endif
X], [AC_MSG_RESULT(yes); AC_DEFINE(_ALL_SOURCE)], AC_MSG_RESULT(no))
X])
X
XAC_DEFUN(AC_MINIX,
X[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
XAC_BEFORE([$0], [AC_TRY_RUN])dnl
XAC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=)
Xif test "$MINIX" = yes; then
X  AC_DEFINE(_POSIX_SOURCE)
X  AC_DEFINE(_POSIX_1_SOURCE, 2)
X  AC_DEFINE(_MINIX)
Xfi
X])
X
XAC_DEFUN(AC_ISC_POSIX,
X[AC_REQUIRE([AC_PROG_CC])dnl
XAC_BEFORE([$0], [AC_TRY_COMPILE])dnl
XAC_BEFORE([$0], [AC_TRY_RUN])dnl
XAC_MSG_CHECKING(for POSIXized ISC)
Xif test -d /etc/conf/kconfig.d &&
X  grep _POSIX_VERSION [/usr/include/sys/unistd.h] >/dev/null 2>&1
Xthen
X  AC_MSG_RESULT(yes)
X  ISC=yes # If later tests want to check for ISC.
X  AC_DEFINE(_POSIX_SOURCE)
X  if test "$GCC" = yes; then
X    CC="$CC -posix"
X  else
X    CC="$CC -Xp"
X  fi
Xelse
X  AC_MSG_RESULT(no)
X  ISC=
Xfi
X])
X
XAC_DEFUN(AC_XENIX_DIR,
X[AC_OBSOLETE([$0], [; instead use AC_HEADER_DIRENT])dnl
XAC_REQUIRE([AC_DIR_HEADER])dnl
XAC_MSG_CHECKING(for Xenix)
XAC_EGREP_CPP(yes,
X[#if defined(M_XENIX) && !defined(M_UNIX)
X  yes
X#endif
X], [AC_MSG_RESULT(yes); XENIX=yes], [AC_MSG_RESULT(no); XENIX=])
Xif test "$XENIX" = yes; then
X  # Make sure -ldir precedes -lx.
X  test $ac_header_dirent = dirent.h && LIBS="-ldir $LIBS"
X  LIBS="$LIBS -lx"
Xfi
X])
X
XAC_DEFUN(AC_DYNIX_SEQ,
X[AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT])dnl
XAC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS")
X])
X
XAC_DEFUN(AC_IRIX_SUN,
X[AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT or AC_CHECK_LIB(sun, getpwnam)])dnl
XAC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS")
X])
X
XAC_DEFUN(AC_SCO_INTL,
X[AC_OBSOLETE([$0], [; instead use AC_FUNC_STRFTIME])dnl
XAC_CHECK_LIB(intl, strftime, LIBS="-lintl $LIBS")
X])
END-of-smake-1.2.1/autoconf/acspecific.m4
echo x - smake-1.2.1/autoconf/autoconf
sed 's/^X//' >smake-1.2.1/autoconf/autoconf << 'END-of-smake-1.2.1/autoconf/autoconf'
X#! /bin/sh
X# @(#)autoconf	1.8 09/04/19 Copyright 1999-2009 J. Schilling
X#
X# autoconf -- create `configure' using m4 macros
X# Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
X
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2, or (at your option)
X# any later version.
X
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
X# GNU General Public License for more details.
X
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
X# 02111-1307, USA.
X
X# If given no args, create `configure' from template file `configure.in'.
X# With one arg, create a configure script on standard output from
X# the given template file.
X
Xusage="\
XUsage: autoconf [-h] [--help] [-m dir] [--macrodir=dir]
X       [-l dir] [--localdir=dir] [--version] [template-file]"
X
X# NLS nuisances.
X# Only set these to C if already set.  These must not be set unconditionally
X# because not all systems understand e.g. LANG=C (notably SCO).
X# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
X# Non-C LC_CTYPE values break the ctype check.
Xif test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
Xif test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
Xif test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
Xif test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
X
X: ${AC_MACRODIR=.}
X
X: ${M4=/usr/bin/gm4}
X$M4 < /dev/null 2> /dev/null || M4=/opt/sfw/bin/gm4
X$M4 < /dev/null 2> /dev/null || M4=/usr/sfw/bin/gm4
X$M4 < /dev/null 2> /dev/null || M4=/opt/csw/bin/gm4
X$M4 < /dev/null 2> /dev/null || M4=gm4
X$M4 < /dev/null 2> /dev/null || M4=m4
X
X: ${AWK=/usr/bin/gawk}
X$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=/opt/sfw/bin/gawk
X$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=/usr/sfw/bin/gawk
X$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=/opt/csw/bin/gawk
X$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=gawk
X$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=nawk
X$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=awk
X
Xcase "${M4}" in
X/*) # Handle the case that m4 has moved since we were configured.
X    # It may have been found originally in a build directory.
X    test -f "${M4}" || M4=/usr/sfw/bin/gm4
X    test -f "${M4}" || M4=m4 ;;
Xesac
X
X: ${TMPDIR=/tmp}
Xtmpout=${TMPDIR}/acout.$$
Xlocaldir=
Xshow_version=no
X
Xwhile test $# -gt 0 ; do
X   case "${1}" in
X      -h | --help | --h* )
X         echo "${usage}" 1>&2; exit 0 ;;
X      --localdir=* | --l*=* )
X         localdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
X         shift ;;
X      -l | --localdir | --l*)
X         shift
X         test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
X         localdir="${1}"
X         shift ;;
X      --macrodir=* | --m*=* )
X         AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
X         shift ;;
X      -m | --macrodir | --m* )
X         shift
X         test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
X         AC_MACRODIR="${1}"
X         shift ;;
X      --version | --v* )
X         show_version=yes; shift ;;
X      -- )     # Stop option processing
X        shift; break ;;
X      - )	# Use stdin as input.
X        break ;;
X      -* )
X        echo "${usage}" 1>&2; exit 1 ;;
X      * )
X        break ;;
X   esac
Xdone
X
Xif test $show_version = yes; then
X  version=`sed -n 's/define.AC_ACVERSION.[ 	]*\([0-9.]*\).*/\1/p' \
X    $AC_MACRODIR/acgeneral.m4`
X  echo "Autoconf version $version"
X  exit 0
Xfi
X
Xcase $# in
X  0) infile=configure.in ;;
X  1) infile="$1" ;;
X  *) echo "$usage" >&2; exit 1 ;;
Xesac
X
Xtrap 'rm -f $tmpin $tmpout; exit 1' 1 2 15
X
Xtmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's.
Xif test z$infile = z-; then
X  infile=$tmpin
X  cat > $infile
Xelif test ! -r "$infile"; then
X  echo "autoconf: ${infile}: No such file or directory" >&2
X  exit 1
Xfi
X
Xif test -n "$localdir"; then
X  use_localdir="-I$localdir -DAC_LOCALDIR=$localdir"
Xelse
X  use_localdir=
Xfi
X
X# Use the frozen version of Autoconf if available.
Xr= f=
X# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
Xcase `$M4 --help < /dev/null 2>&1` in
X*reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;;
X*traditional*) ;;
X*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;;
Xesac
X
X$M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
X  { rm -f $tmpin $tmpout; exit 2; }
X
X# You could add your own prefixes to pattern if you wanted to check for
X# them too, e.g. pattern='\(AC_\|ILT_\)', except that UNIX sed doesn't do
X# alternation.
Xpattern="AC_"
X
Xstatus=0
Xif grep "^[^#]*${pattern}" $tmpout > /dev/null 2>&1; then
X  echo "autoconf: Undefined macros:" >&2
X  sed -n "s/^[^#]*\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
X    while read macro; do
X      grep -n "^[^#]*$macro" $infile /dev/null
X      test $? -eq 1 && echo >&2 "***BUG in Autoconf--please report*** $macro"
X    done | sort -u >&2
X  status=1
Xfi
X
Xif test $# -eq 0; then
X  exec 4> configure; chmod +x configure
Xelse
X  exec 4>&1
Xfi
X
X# Put the real line numbers into configure to make config.log more helpful.
X$AWK '
X/__oline__/ { printf "%d:", NR + 1 }
X           { print }
X' $tmpout | sed '
X/__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
X' >&4
X
Xrm -f $tmpout
X
Xexit $status
END-of-smake-1.2.1/autoconf/autoconf
echo x - smake-1.2.1/autoconf/autoconf.m4
sed 's/^X//' >smake-1.2.1/autoconf/autoconf.m4 << 'END-of-smake-1.2.1/autoconf/autoconf.m4'
Xdnl Driver that loads the Autoconf macro files.
Xdnl Requires GNU m4.
Xdnl This file is part of Autoconf.
Xdnl Copyright (C) 1994 Free Software Foundation, Inc.
Xdnl
Xdnl This program is free software; you can redistribute it and/or modify
Xdnl it under the terms of the GNU General Public License as published by
Xdnl the Free Software Foundation; either version 2, or (at your option)
Xdnl any later version.
Xdnl
Xdnl This program is distributed in the hope that it will be useful,
Xdnl but WITHOUT ANY WARRANTY; without even the implied warranty of
Xdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Xdnl GNU General Public License for more details.
Xdnl
Xdnl You should have received a copy of the GNU General Public License
Xdnl along with this program; if not, write to the Free Software
Xdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Xdnl 02111-1307, USA.
Xdnl
Xdnl Written by David MacKenzie.
Xdnl
Xinclude(acgeneral.m4)dnl
Xbuiltin(include, acspecific.m4)dnl
Xbuiltin(include, acoldnames.m4)dnl
Xdnl Do not sinclude acsite.m4 here, because it may not be installed
Xdnl yet when Autoconf is frozen.
Xdnl Do not sinclude ./aclocal.m4 here, to prevent it from being frozen.
END-of-smake-1.2.1/autoconf/autoconf.m4
echo x - smake-1.2.1/autoconf/autoheader.m4
sed 's/^X//' >smake-1.2.1/autoconf/autoheader.m4 << 'END-of-smake-1.2.1/autoconf/autoheader.m4'
Xdnl Driver and redefinitions of some Autoconf macros for autoheader.
Xdnl This file is part of Autoconf.
Xdnl Copyright (C) 1994, 1995 Free Software Foundation, Inc.
Xdnl
Xdnl This program is free software; you can redistribute it and/or modify
Xdnl it under the terms of the GNU General Public License as published by
Xdnl the Free Software Foundation; either version 2, or (at your option)
Xdnl any later version.
Xdnl
Xdnl This program is distributed in the hope that it will be useful,
Xdnl but WITHOUT ANY WARRANTY; without even the implied warranty of
Xdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Xdnl GNU General Public License for more details.
Xdnl
Xdnl You should have received a copy of the GNU General Public License
Xdnl along with this program; if not, write to the Free Software
Xdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Xdnl 02111-1307, USA.
Xdnl
Xdnl Written by Roland McGrath.
Xdnl
Xinclude(acgeneral.m4)dnl
Xbuiltin(include, acspecific.m4)dnl
Xbuiltin(include, acoldnames.m4)dnl
X
Xdnl These are alternate definitions of some macros, which produce
Xdnl strings in the output marked with "@@@" so we can easily extract
Xdnl the information we want.  The `#' at the end of the first line of
Xdnl each definition seems to be necessary to prevent m4 from eating
Xdnl the newline, which makes the @@@ not always be at the beginning of
Xdnl a line.
X
Xdefine([AC_CHECK_FUNCS], [#
X@@@funcs="$funcs $1"@@@
Xifelse([$2], , , [
X# If it was found, we do:
X$2
X# If it was not found, we do:
X$3
X])
X])
X
Xdefine([AC_CHECK_HEADERS], [#
X@@@headers="$headers $1"@@@
Xifelse([$2], , , [
X# If it was found, we do:
X$2
X# If it was not found, we do:
X$3
X])
X])
X
Xdefine([AC_CHECK_HEADERS_DIRENT], [#
X@@@headers="$headers $1"@@@
X])
X
Xdefine([AC_CHECK_LIB], [#
X  ifelse([$3], , [
X@@@libs="$libs $1"@@@
X], [
X# If it was found, we do:
X$3
X# If it was not found, we do:
X$4
X])
X])
X
Xdefine([AC_HAVE_LIBRARY], [#
Xchangequote(<<, >>)dnl
Xdefine(<<AC_LIB_NAME>>, dnl
Xpatsubst(patsubst($1, <<lib\([^\.]*\)\.a>>, <<\1>>), <<-l>>, <<>>))dnl
Xchangequote([, ])dnl
X  ifelse([$2], , [
X@@@libs="$libs AC_LIB_NAME"@@@
X], [
X# If it was found, we do:
X$2
X# If it was not found, we do:
X$3
X])
X])
X
Xdefine([AC_CHECK_SIZEOF], [#
X@@@types="$types,$1"@@@
X])
X
Xdefine([AC_CONFIG_HEADER], [#
Xdefine([AC_CONFIG_H], patsubst($1, [ .*$], []))dnl
X@@@config_h=AC_CONFIG_H@@@
X])
X
Xdefine([AC_DEFINE], [#
Xifelse([$3],,[#
X@@@syms="$syms $1"@@@
X], [#
X@@@verbatim="$verbatim
X/* $3 */
X#undef $1
X"@@@
X])])
X
Xdefine([AC_DEFINE_UNQUOTED], [#
Xifelse([$3],,[#
X@@@syms="$syms $1"@@@
X], [#
X@@@verbatim="$verbatim
X/* $3 */
X#undef $1
X"@@@
X])])
END-of-smake-1.2.1/autoconf/autoheader.m4
echo x - smake-1.2.1/autoconf/config.guess
sed 's/^X//' >smake-1.2.1/autoconf/config.guess << 'END-of-smake-1.2.1/autoconf/config.guess'
X#! /bin/sh
X# @(#)config.guess	1.15 09/10/31 Copyright 1999-2009 J. Schilling
X#
X# Attempt to guess a canonical system name.
X#   Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
X#
X# This file is free software; you can redistribute it and/or modify it
X# under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful, but
X# WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
X# General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
X#
X# As a special exception to the GNU General Public License, if you
X# distribute this file as part of a program that contains a
X# configuration script generated by Autoconf, you may include it under
X# the same distribution terms that you use for the rest of that program.
X
X# Written by Per Bothner <bothner@cygnus.com>.
X# The master version of this file is at the FSF in /home/gd/gnu/lib.
X#
X# This script attempts to guess a canonical system name similar to
X# config.sub.  If it succeeds, it prints the system name on stdout, and
X# exits with 0.  Otherwise, it exits with 1.
X#
X# The plan is that this can be called by configure scripts if you
X# don't specify an explicit system type (host/target name).
X#
X# Only a few systems have been added to this list; please add others
X# (but try to keep the structure clean).
X#
X
X# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
X# (ghazi@noc.rutgers.edu 8/24/94.)
Xif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
X	PATH=$PATH:/.attbin ; export PATH
Xfi
X
XUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
XUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
XUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
XUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
X
Xtrap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
X
X# Note: order is significant - the case branches are not exclusive.
X
Xcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
X    alpha:OSF1:*:*)
X	if test $UNAME_RELEASE = "V4.0"; then
X		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
X	fi
X	# A Vn.n version is a released version.
X	# A Tn.n version is a released field test version.
X	# A Xn.n version is an unreleased experimental baselevel.
X	# 1.2 uses "1.2" for uname -r.
X	cat <<EOF >dummy.s
X	.globl main
X	.ent main
Xmain:
X	.frame \$30,0,\$26,0
X	.prologue 0
X	.long 0x47e03d80 # implver $0
X	lda \$2,259
X	.long 0x47e20c21 # amask $2,$1
X	srl \$1,8,\$2
X	sll \$2,2,\$2
X	sll \$0,3,\$0
X	addl \$1,\$0,\$0
X	addl \$2,\$0,\$0
X	ret \$31,(\$26),1
X	.end main
XEOF
X	${CC-cc} dummy.s -o dummy 2>/dev/null
X	if test "$?" = 0 ; then
X		./dummy
X		case "$?" in
X			7)
X				UNAME_MACHINE="alpha"
X				;;
X			15)
X				UNAME_MACHINE="alphaev5"
X				;;
X			14)
X				UNAME_MACHINE="alphaev56"
X				;;
X			10)
X				UNAME_MACHINE="alphapca56"
X				;;
X			16)
X				UNAME_MACHINE="alphaev6"
X				;;
X		esac
X	fi
X	rm -f dummy.s dummy
X	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
X	exit 0 ;;
X    21064:Windows_NT:50:3)
X	echo alpha-dec-winnt3.5
X	exit 0 ;;
X    *:FreeMiNT:*:*)
X	echo m68k-atari-freemint
X	exit 0 ;;
X    *:MiNT:*:*)
X	echo m68k-atari-mint
X	exit 0 ;;
X    *:TOS:*:*)
X	echo m68k-atari-tos
X	exit 0 ;;
X    Amiga*:UNIX_System_V:4.0:*)
X	echo m68k-cbm-sysv4
X	exit 0;;
X    amiga:NetBSD:*:*)
X      echo m68k-cbm-netbsd${UNAME_RELEASE}
X      exit 0 ;;
X    amiga:OpenBSD:*:*)
X	echo m68k-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    *:[Aa]miga[Oo][Ss]:*:*)
X	echo ${UNAME_MACHINE}-unknown-amigaos
X	exit 0 ;;
X    arc64:OpenBSD:*:*)
X	echo mips64el-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    arc:OpenBSD:*:*)
X	echo mipsel-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    hkmips:OpenBSD:*:*)
X	echo mips-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    pmax:OpenBSD:*:*)
X	echo mipsel-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    sgi:OpenBSD:*:*)
X	echo mips-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    wgrisc:OpenBSD:*:*)
X	echo mipsel-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
X	echo arm-acorn-riscix${UNAME_RELEASE}
X	exit 0;;
X    arm32:NetBSD:*:*)
X	echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
X	exit 0 ;;
X    SR2?01:HI-UX/MPP:*:*)
X	echo hppa1.1-hitachi-hiuxmpp
X	exit 0;;
X    Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*)
X	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
X	if test "`(/bin/universe) 2>/dev/null`" = att ; then
X		echo pyramid-pyramid-sysv3
X	else
X		echo pyramid-pyramid-bsd
X	fi
X	exit 0 ;;
X    NILE:*:*:dcosx)
X	echo pyramid-pyramid-svr4
X	exit 0 ;;
X    sun4H:SunOS:5.*:*)
X	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
X	exit 0 ;;
X    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
X	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
X	exit 0 ;;
X    i86pc:SunOS:5.*:*)
X	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
X	exit 0 ;;
X    sun4*:SunOS:6*:*)
X	# According to config.sub, this is the proper way to canonicalize
X	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
X	# it's likely to be more like Solaris than SunOS4.
X	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
X	exit 0 ;;
X    sun4*:SunOS:*:*)
X	case "`/usr/bin/arch -k`" in
X	    Series*|S4*)
X		UNAME_RELEASE=`uname -v`
X		;;
X	esac
X	# Japanese Language versions have a version number like `4.1.3-JL'.
X	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
X	exit 0 ;;
X    sun3*:SunOS:*:*)
X	echo m68k-sun-sunos${UNAME_RELEASE}
X	exit 0 ;;
X    sun*:*:4.2BSD:*)
X	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
X	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
X	case "`/bin/arch`" in
X	    sun3)
X		echo m68k-sun-sunos${UNAME_RELEASE}
X		;;
X	    sun4)
X		echo sparc-sun-sunos${UNAME_RELEASE}
X		;;
X	esac
X	exit 0 ;;
X    aushp:SunOS:*:*)
X	echo sparc-auspex-sunos${UNAME_RELEASE}
X	exit 0 ;;
X    atari*:NetBSD:*:*)
X	echo m68k-atari-netbsd${UNAME_RELEASE}
X	exit 0 ;;
X    atari*:OpenBSD:*:*)
X	echo m68k-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    sun3*:NetBSD:*:*)
X	echo m68k-sun-netbsd${UNAME_RELEASE}
X	exit 0 ;;
X    sun3*:OpenBSD:*:*)
X	echo m68k-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    mac68k:NetBSD:*:*)
X	echo m68k-apple-netbsd${UNAME_RELEASE}
X	exit 0 ;;
X    mac68k:OpenBSD:*:*)
X	echo m68k-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    mvme68k:OpenBSD:*:*)
X	echo m68k-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    mvme88k:OpenBSD:*:*)
X	echo m88k-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    powerpc:machten:*:*)
X	echo powerpc-apple-machten${UNAME_RELEASE}
X	exit 0 ;;
X    macppc:NetBSD:*:*)
X        echo powerpc-apple-netbsd${UNAME_RELEASE}
X        exit 0 ;;
X    RISC*:Mach:*:*)
X	echo mips-dec-mach_bsd4.3
X	exit 0 ;;
X    RISC*:ULTRIX:*:*)
X	echo mips-dec-ultrix${UNAME_RELEASE}
X	exit 0 ;;
X    VAX*:ULTRIX*:*:*)
X	echo vax-dec-ultrix${UNAME_RELEASE}
X	exit 0 ;;
X    2020:CLIX:*:*)
X	echo clipper-intergraph-clix${UNAME_RELEASE}
X	exit 0 ;;
X    mips:*:*:UMIPS | mips:*:*:RISCos)
X	sed 's/^	//' << EOF >dummy.c
X	int main (argc, argv) int argc; char **argv; {
X	#if defined (host_mips) && defined (MIPSEB)
X	#if defined (SYSTYPE_SYSV)
X	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
X	#endif
X	#if defined (SYSTYPE_SVR4)
X	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
X	#endif
X	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
X	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
X	#endif
X	#endif
X	  exit (-1);
X	}
XEOF
X	${CC-cc} dummy.c -o dummy \
X	  && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
X	  && rm dummy.c dummy && exit 0
X	rm -f dummy.c dummy
X	echo mips-mips-riscos${UNAME_RELEASE}
X	exit 0 ;;
X    Night_Hawk:Power_UNIX:*:*)
X	echo powerpc-harris-powerunix
X	exit 0 ;;
X    m88k:CX/UX:7*:*)
X	echo m88k-harris-cxux7
X	exit 0 ;;
X    m88k:*:4*:R4*)
X	echo m88k-motorola-sysv4
X	exit 0 ;;
X    m88k:*:3*:R3*)
X	echo m88k-motorola-sysv3
X	exit 0 ;;
X    AViiON:dgux:*:*)
X        # DG/UX returns AViiON for all architectures
X        UNAME_PROCESSOR=`/usr/bin/uname -p`
X        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
X	if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
X	     -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
X		echo m88k-dg-dgux${UNAME_RELEASE}
X	else
X		echo m88k-dg-dguxbcs${UNAME_RELEASE}
X	fi
X        else echo i586-dg-dgux${UNAME_RELEASE}
X        fi
X 	exit 0 ;;
X    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
X	echo m88k-dolphin-sysv3
X	exit 0 ;;
X    M88*:*:R3*:*)
X	# Delta 88k system running SVR3
X	echo m88k-motorola-sysv3
X	exit 0 ;;
X    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
X	echo m88k-tektronix-sysv3
X	exit 0 ;;
X    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
X	echo m68k-tektronix-bsd
X	exit 0 ;;
X    *:IRIX*:*:*)
X	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
X	exit 0 ;;
X    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
X	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
X	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
X    i?86:AIX:*:*)
X	echo i386-ibm-aix
X	exit 0 ;;
X    *:AIX:2:3)
X	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
X		sed 's/^		//' << EOF >dummy.c
X		#include <sys/systemcfg.h>
X
X		main()
X			{
X			if (!__power_pc())
X				exit(1);
X			puts("powerpc-ibm-aix3.2.5");
X			exit(0);
X			}
XEOF
X		${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
X		rm -f dummy.c dummy
X		echo rs6000-ibm-aix3.2.5
X	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
X		echo rs6000-ibm-aix3.2.4
X	else
X		echo rs6000-ibm-aix3.2
X	fi
X	exit 0 ;;
X    *:AIX:*:4)
X	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
X	if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
X		IBM_ARCH=rs6000
X	else
X		IBM_ARCH=powerpc
X	fi
X	if [ -x /usr/bin/oslevel ] ; then
X		IBM_REV=`/usr/bin/oslevel`
X	else
X		IBM_REV=4.${UNAME_RELEASE}
X	fi
X	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
X	exit 0 ;;
X    *:AIX:*:*)
X	echo rs6000-ibm-aix
X	exit 0 ;;
X    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
X	echo romp-ibm-bsd4.4
X	exit 0 ;;
X    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
X	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
X	exit 0 ;;                           # report: romp-ibm BSD 4.3
X    *:BOSX:*:*)
X	echo rs6000-bull-bosx
X	exit 0 ;;
X    DPX/2?00:B.O.S.:*:*)
X	echo m68k-bull-sysv3
X	exit 0 ;;
X    9000/[34]??:4.3bsd:1.*:*)
X	echo m68k-hp-bsd
X	exit 0 ;;
X    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
X	echo m68k-hp-bsd4.4
X	exit 0 ;;
X    9000/[34678]??:HP-UX:*:*)
X	case "${UNAME_MACHINE}" in
X	    9000/31? )            HP_ARCH=m68000 ;;
X	    9000/[34]?? )         HP_ARCH=m68k ;;
X	    9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 | 9000/820 | 9000/800 )
X              sed 's/^              //' << EOF >dummy.c
X              #include <stdlib.h>
X              #include <unistd.h>
X              
X              int main ()
X              {
X              #if defined(_SC_KERNEL_BITS)
X                  long bits = sysconf(_SC_KERNEL_BITS);
X              #endif 
X                  long cpu  = sysconf (_SC_CPU_VERSION);
X              
X                  switch (cpu) 
X              	{
X              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
X              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
X              	case CPU_PA_RISC2_0: 
X              #if defined(_SC_KERNEL_BITS)
X              	    switch (bits) 
X              		{
X              		case 64: puts ("hppa2.0w"); break;
X              		case 32: puts ("hppa2.0n"); break;
X              		default: puts ("hppa2.0"); break;
X              		} break;
X              #else  /* !defined(_SC_KERNEL_BITS) */
X              	    puts ("hppa2.0"); break;
X              #endif 
X              	default: puts ("hppa1.0"); break;
X              	}
X                  exit (0);
X              }
XEOF
X	(${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy`
X	rm -f dummy.c dummy
X	esac
X	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
X	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
X	exit 0 ;;
X    3050*:HI-UX:*:*)
X	sed 's/^	//' << EOF >dummy.c
X	#include <unistd.h>
X	int
X	main ()
X	{
X	  long cpu = sysconf (_SC_CPU_VERSION);
X	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
X	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
X	     results, however.  */
X	  if (CPU_IS_PA_RISC (cpu))
X	    {
X	      switch (cpu)
X		{
X		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
X		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
X		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
X		  default: puts ("hppa-hitachi-hiuxwe2"); break;
X		}
X	    }
X	  else if (CPU_IS_HP_MC68K (cpu))
X	    puts ("m68k-hitachi-hiuxwe2");
X	  else puts ("unknown-hitachi-hiuxwe2");
X	  exit (0);
X	}
XEOF
X	${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
X	rm -f dummy.c dummy
X	echo unknown-hitachi-hiuxwe2
X	exit 0 ;;
X    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
X	echo hppa1.1-hp-bsd
X	exit 0 ;;
X    9000/8??:4.3bsd:*:*)
X	echo hppa1.0-hp-bsd
X	exit 0 ;;
X    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
X	echo hppa1.1-hp-osf
X	exit 0 ;;
X    hp8??:OSF1:*:*)
X	echo hppa1.0-hp-osf
X	exit 0 ;;
X    i?86:OSF1:*:*)
X	if [ -x /usr/sbin/sysversion ] ; then
X	    echo ${UNAME_MACHINE}-unknown-osf1mk
X	else
X	    echo ${UNAME_MACHINE}-unknown-osf1
X	fi
X	exit 0 ;;
X    parisc*:Lites*:*:*)
X	echo hppa1.1-hp-lites
X	exit 0 ;;
X    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
X	echo c1-convex-bsd
X        exit 0 ;;
X    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
X	if getsysinfo -f scalar_acc
X	then echo c32-convex-bsd
X	else echo c2-convex-bsd
X	fi
X        exit 0 ;;
X    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
X	echo c34-convex-bsd
X        exit 0 ;;
X    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
X	echo c38-convex-bsd
X        exit 0 ;;
X    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
X	echo c4-convex-bsd
X        exit 0 ;;
X    CRAY*X-MP:*:*:*)
X	echo xmp-cray-unicos
X        exit 0 ;;
X    CRAY*Y-MP:*:*:*)
X	echo ymp-cray-unicos${UNAME_RELEASE}
X	exit 0 ;;
X    CRAY*[A-Z]90:*:*:*)
X	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
X	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
X	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
X	exit 0 ;;
X    CRAY*TS:*:*:*)
X	echo t90-cray-unicos${UNAME_RELEASE}
X	exit 0 ;;
X    CRAY-2:*:*:*)
X	echo cray2-cray-unicos
X        exit 0 ;;
X    F300:UNIX_System_V:*:*)
X        FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
X        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
X        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
X        exit 0 ;;
X    F301:UNIX_System_V:*:*)
X       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
X       exit 0 ;;
X    hp3[0-9][05]:NetBSD:*:*)
X	echo m68k-hp-netbsd${UNAME_RELEASE}
X	exit 0 ;;
X    hp300:OpenBSD:*:*)
X	echo m68k-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    sparc*:BSD/OS:*:*)
X	echo sparc-unknown-bsdi${UNAME_RELEASE}
X	exit 0 ;;
X    i?86:BSD/386:*:* | *:BSD/OS:*:*)
X	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
X	exit 0 ;;
X    *:FreeBSD:*:*)
X	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
X	exit 0 ;;
X    *:DragonFly:*:*)
X	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
X	exit 0 ;;
X    *:NetBSD:*:*)
X	echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
X	exit 0 ;;
X    *:OpenBSD:*:*)
X	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
X	exit 0 ;;
X    i*:CYGWIN*:*)
X	echo ${UNAME_MACHINE}-pc-cygwin
X	exit 0 ;;
X    i*:MINGW*:*)
X	echo ${UNAME_MACHINE}-pc-mingw32
X	exit 0 ;;
X    p*:CYGWIN*:*)
X	echo powerpcle-unknown-cygwin
X	exit 0 ;;
X    x86:Interix*:3*)
X	echo i586-pc-interix3
X	exit 0 ;;
X    prep*:SunOS:5.*:*)
X	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
X	exit 0 ;;
X    *:GNU:*:*)
X	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
X	exit 0 ;;
X    s390:Linux:*:* | s390x:Linux:*:*)
X	echo ${UNAME_MACHINE}-ibm-linux
X	exit 0 ;;
X    *:Linux:*:*)
X	# uname on the ARM produces all sorts of strangeness, and we need to
X	# filter it out.
X	case "$UNAME_MACHINE" in
X	  arm* | sa110*)	      UNAME_MACHINE="arm" ;;
X	esac
X
X	# The BFD linker knows what the default object file format is, so
X	# first see if it will tell us.
X	ld_help_string=`ld --help 2>&1`
X	ld_supported_emulations=`echo $ld_help_string \
X			 | sed -ne '/supported emulations:/!d
X				    s/[ 	][ 	]*/ /g
X				    s/.*supported emulations: *//
X				    s/ .*//
X				    p'`
X        case "$ld_supported_emulations" in
X	  i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
X	  i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
X	  sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
X	  armlinux)   echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
X	  m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
X	  elf32ppc)   echo "powerpc-unknown-linux-gnu"              ; exit 0 ;;
X	esac
X
X	if test "${UNAME_MACHINE}" = "alpha" ; then
X		sed 's/^	//'  <<EOF >dummy.s
X		.globl main
X		.ent main
X	main:
X		.frame \$30,0,\$26,0
X		.prologue 0
X		.long 0x47e03d80 # implver $0
X		lda \$2,259
X		.long 0x47e20c21 # amask $2,$1
X		srl \$1,8,\$2
X		sll \$2,2,\$2
X		sll \$0,3,\$0
X		addl \$1,\$0,\$0
X		addl \$2,\$0,\$0
X		ret \$31,(\$26),1
X		.end main
XEOF
X		LIBC=""
X		${CC-cc} dummy.s -o dummy 2>/dev/null
X		if test "$?" = 0 ; then
X			./dummy
X			case "$?" in
X			7)
X				UNAME_MACHINE="alpha"
X				;;
X			15)
X				UNAME_MACHINE="alphaev5"
X				;;
X			14)
X				UNAME_MACHINE="alphaev56"
X				;;
X			10)
X				UNAME_MACHINE="alphapca56"
X				;;
X			16)
X				UNAME_MACHINE="alphaev6"
X				;;
X			esac	
X
X			objdump --private-headers dummy | \
X			  grep ld.so.1 > /dev/null
X			if test "$?" = 0 ; then
X				LIBC="libc1"
X			fi
X		fi	
X		rm -f dummy.s dummy
X		echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
X	elif test "${UNAME_MACHINE}" = "mips" ; then
X	  cat >dummy.c <<EOF
Xmain(argc, argv)
X     int argc;
X     char *argv[];
X{
X#ifdef __MIPSEB__
X  printf ("%s-unknown-linux-gnu\n", argv[1]);
X#endif
X#ifdef __MIPSEL__
X  printf ("%sel-unknown-linux-gnu\n", argv[1]);
X#endif
X  return 0;
X}
XEOF
X	  ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
X	  rm -f dummy.c dummy
X	else
X	  # Either a pre-BFD a.out linker (linux-gnuoldld)
X	  # or one that does not give us useful --help.
X	  # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
X	  # If ld does not provide *any* "supported emulations:"
X	  # that means it is gnuoldld.
X	  echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
X	  test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
X
X	  case "${UNAME_MACHINE}" in
X	  i?86)
X	    VENDOR=pc;
X	    ;;
X	  *)
X	    VENDOR=unknown;
X	    ;;
X	  esac
X	  # Determine whether the default compiler is a.out or elf
X	  cat >dummy.c <<EOF
X#include <features.h>
Xmain(argc, argv)
X     int argc;
X     char *argv[];
X{
X#if defined __ELF__ || defined __SUNPRO_C
X# ifdef __GLIBC__
X#  if __GLIBC__ >= 2
X    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
X#  else
X    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
X#  endif
X# else
X   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
X# endif
X#else
X  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
X#endif
X  return 0;
X}
XEOF
X	  ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
X	  rm -f dummy.c dummy
X	fi ;;
X# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
X# are messed up and put the nodename in both sysname and nodename.
X    i?86:DYNIX/ptx:4*:*)
X	echo i386-sequent-sysv4
X	exit 0 ;;
X    i?86:UNIX_SV:4.2MP:2.*)
X        # Unixware is an offshoot of SVR4, but it has its own version
X        # number series starting with 2...
X        # I am not positive that other SVR4 systems won't match this,
X	# I just have to hope.  -- rms.
X        # Use sysv4.2uw... so that sysv4* matches it.
X	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
X	exit 0 ;;
X    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
X	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
X		echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
X	else
X		echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
X	fi
X	exit 0 ;;
X    i?86:MS-DOS:5:50)
X    	# DJGPP v2
X	echo ${UNAME_MACHINE}-pc-msdos
X        exit 0 ;;
X    i?86:*:5:*)
X        # Fixed at (any) Pentium or better
X        UNAME_MACHINE=i586
X        if [ ${UNAME_SYSTEM} = "UnixWare" ] ||
X	   [ ${UNAME_SYSTEM} = "OpenUNIX" ]; then
X            echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
X        else
X            echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
X        fi
X        exit 0 ;;
X    i?86:*:3.2:*)
X	if test -f /usr/options/cb.name; then
X		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
X		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
X	elif /bin/uname -X 2>/dev/null >/dev/null ; then
X		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
X		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
X		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
X			&& UNAME_MACHINE=i586
X		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
X	else
X		echo ${UNAME_MACHINE}-pc-sysv32
X	fi
X	exit 0 ;;
X    pc:*:*:*)
X        # uname -m prints for DJGPP always 'pc', but it prints nothing about
X        # the processor, so we play safe by assuming i386.
X	echo i386-pc-msdosdjgpp
X        exit 0 ;;
X    Intel:Mach:3*:*)
X	echo i386-pc-mach3
X	exit 0 ;;
X    paragon:*:*:*)
X	echo i860-intel-osf1
X	exit 0 ;;
X    i860:*:4.*:*) # i860-SVR4
X	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
X	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
X	else # Add other i860-SVR4 vendors below as they are discovered.
X	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
X	fi
X	exit 0 ;;
X    mini*:CTIX:SYS*5:*)
X	# "miniframe"
X	echo m68010-convergent-sysv
X	exit 0 ;;
X    M68*:*:R3V[567]*:*)
X	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
X    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
X	OS_REL=''
X	test -r /etc/.relid \
X	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
X	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
X	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
X	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
X	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
X    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
X        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
X          && echo i486-ncr-sysv4 && exit 0 ;;
X    m68*:LynxOS:2.*:*)
X	echo m68k-unknown-lynxos${UNAME_RELEASE}
X	exit 0 ;;
X    mc68030:UNIX_System_V:4.*:*)
X	echo m68k-atari-sysv4
X	exit 0 ;;
X    i?86:LynxOS:2.*:*)
X	echo i386-unknown-lynxos${UNAME_RELEASE}
X	exit 0 ;;
X    TSUNAMI:LynxOS:2.*:*)
X	echo sparc-unknown-lynxos${UNAME_RELEASE}
X	exit 0 ;;
X    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
X	echo rs6000-unknown-lynxos${UNAME_RELEASE}
X	exit 0 ;;
X    SM[BE]S:UNIX_SV:*:*)
X	echo mips-dde-sysv${UNAME_RELEASE}
X	exit 0 ;;
X    RM*:SINIX-*:*:*)
X	echo mips-sni-sysv4
X	exit 0 ;;
X    *:SINIX-*:*:*)
X	if uname -p 2>/dev/null >/dev/null ; then
X		UNAME_MACHINE=`(uname -p) 2>/dev/null`
X		echo ${UNAME_MACHINE}-sni-sysv4
X	else
X		echo ns32k-sni-sysv
X	fi
X	exit 0 ;;
X    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
X                           # says <Richard.M.Bartel@ccMail.Census.GOV>
X        echo i586-unisys-sysv4
X        exit 0 ;;
X    *:UNIX_System_V:4*:FTX*)
X	# From Gerald Hewes <hewes@openmarket.com>.
X	# How about differentiating between stratus architectures? -djm
X	echo hppa1.1-stratus-sysv4
X	exit 0 ;;
X    *:*:*:FTX*)
X	# From seanf@swdc.stratus.com.
X	echo i860-stratus-sysv4
X	exit 0 ;;
X    mc68*:A/UX:*:*)
X	echo m68k-apple-aux${UNAME_RELEASE}
X	exit 0 ;;
X    news*:NEWS-OS:*:6*)
X	echo mips-sony-newsos6
X	exit 0 ;;
X    R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
X	if [ -d /usr/nec ]; then
X	        echo mips-nec-sysv${UNAME_RELEASE}
X	else
X	        echo mips-unknown-sysv${UNAME_RELEASE}
X	fi
X        exit 0 ;;
X    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
X	echo powerpc-be-beos
X	exit 0 ;;
X    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
X	echo powerpc-apple-beos
X	exit 0 ;;
X    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
X	echo i586-pc-beos
X	exit 0 ;;
X    BeMac:Haiku:*:*)
X	echo powerpc-apple-haiku
X	exit ;;
X    BePC:Haiku:*:*)
X	echo i586-pc-haiku
X	exit ;;
X    "Power Macintosh":Rhapsody:*)
X	echo powerpc-apple-rhapsody${UNAME_RELEASE}
X	exit 0 ;;
X    "Power Macintosh":"Mac OS":*)
X	echo powerpc-apple-macosx${UNAME_RELEASE}
X	exit 0 ;;
X    "Power Macintosh":"Darwin":*)
X	echo powerpc-apple-macosx${UNAME_RELEASE}
X	exit 0 ;;
X    "i386":"Darwin":*)
X	echo i386-apple-macosx${UNAME_RELEASE}
X	exit 0 ;;
X    "x86":"Darwin":*)
X	echo i386-apple-macosx${UNAME_RELEASE}
X	exit 0 ;;
X    *:OS/2:*:*)
X        echo "i386-pc-os2_emx"
X	exit 0;;
X    *:OpenVMS:*:*)
X	UNAME_PROCESSOR=`uname -p | tr [A-Z] [a-z]`
X	echo "${UNAME_PROCESSOR}-hp-openvms"
X	exit 0;;
Xesac
X
X#echo '(No uname command or uname output not recognized.)' 1>&2
X#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
X
Xcat >dummy.c <<EOF
X#ifdef _SEQUENT_
X# include <sys/types.h>
X# include <sys/utsname.h>
X#endif
Xmain ()
X{
X#if defined (sony)
X#if defined (MIPSEB)
X  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
X     I don't know....  */
X  printf ("mips-sony-bsd\n"); exit (0);
X#else
X#include <sys/param.h>
X  printf ("m68k-sony-newsos%s\n",
X#ifdef NEWSOS4
X          "4"
X#else
X	  ""
X#endif
X         ); exit (0);
X#endif
X#endif
X
X#if defined (__arm) && defined (__acorn) && defined (__unix)
X  printf ("arm-acorn-riscix"); exit (0);
X#endif
X
X#if defined (hp300) && !defined (hpux)
X  printf ("m68k-hp-bsd\n"); exit (0);
X#endif
X
X#if defined (NeXT)
X#if !defined (__ARCHITECTURE__)
X#define __ARCHITECTURE__ "m68k"
X#endif
X  int version;
X  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
X  printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
X  exit (0);
X#endif
X
X#if defined (MULTIMAX) || defined (n16)
X#if defined (UMAXV)
X  printf ("ns32k-encore-sysv\n"); exit (0);
X#else
X#if defined (CMU)
X  printf ("ns32k-encore-mach\n"); exit (0);
X#else
X  printf ("ns32k-encore-bsd\n"); exit (0);
X#endif
X#endif
X#endif
X
X#if defined (__386BSD__)
X  printf ("i386-pc-bsd\n"); exit (0);
X#endif
X
X#if defined (sequent)
X#if defined (i386)
X  printf ("i386-sequent-dynix\n"); exit (0);
X#endif
X#if defined (ns32000)
X  printf ("ns32k-sequent-dynix\n"); exit (0);
X#endif
X#endif
X
X#if defined (_SEQUENT_)
X    struct utsname un;
X
X    uname(&un);
X
X    if (strncmp(un.version, "V2", 2) == 0) {
X	printf ("i386-sequent-ptx2\n"); exit (0);
X    }
X    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
X	printf ("i386-sequent-ptx1\n"); exit (0);
X    }
X    printf ("i386-sequent-ptx\n"); exit (0);
X
X#endif
X
X#if defined (vax)
X#if !defined (ultrix)
X  printf ("vax-dec-bsd\n"); exit (0);
X#else
X  printf ("vax-dec-ultrix\n"); exit (0);
X#endif
X#endif
X
X#if defined (alliant) && defined (i860)
X  printf ("i860-alliant-bsd\n"); exit (0);
X#endif
X
X  exit (1);
X}
XEOF
X
X${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
Xrm -f dummy.c dummy
X
X# Apollos put the system type in the environment.
X
Xtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
X
X# Convex versions that predate uname can use getsysinfo(1)
X
Xif [ -x /usr/convex/getsysinfo ]
Xthen
X    case `getsysinfo -f cpu_type` in
X    c1*)
X	echo c1-convex-bsd
X	exit 0 ;;
X    c2*)
X	if getsysinfo -f scalar_acc
X	then echo c32-convex-bsd
X	else echo c2-convex-bsd
X	fi
X	exit 0 ;;
X    c34*)
X	echo c34-convex-bsd
X	exit 0 ;;
X    c38*)
X	echo c38-convex-bsd
X	exit 0 ;;
X    c4*)
X	echo c4-convex-bsd
X	exit 0 ;;
X    esac
Xfi
X
Xif [ x$CONFIG_NOFAIL = xTRUE ]; then
X	echo unknownCPU-unknownMFR-unknownOS
X	exit 0
Xfi
X
X#echo '(Unable to guess system type)' 1>&2
X
Xexit 1
END-of-smake-1.2.1/autoconf/config.guess
echo x - smake-1.2.1/autoconf/config.sub
sed 's/^X//' >smake-1.2.1/autoconf/config.sub << 'END-of-smake-1.2.1/autoconf/config.sub'
X#! /bin/sh
X# @(#)config.sub	1.9 09/09/15 Copyright 1999-2009 J. Schilling
X#
X# Configuration validation subroutine script, version 1.1.
X#   Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
X# This file is (in principle) common to ALL GNU software.
X# The presence of a machine in this file suggests that SOME GNU software
X# can handle that machine.  It does not imply ALL GNU software can.
X#
X# This file is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 59 Temple Place - Suite 330,
X# Boston, MA 02111-1307, USA.
X
X# As a special exception to the GNU General Public License, if you
X# distribute this file as part of a program that contains a
X# configuration script generated by Autoconf, you may include it under
X# the same distribution terms that you use for the rest of that program.
X
X# Configuration subroutine to validate and canonicalize a configuration type.
X# Supply the specified configuration type as an argument.
X# If it is invalid, we print an error message on stderr and exit with code 1.
X# Otherwise, we print the canonical config type on stdout and succeed.
X
X# This file is supposed to be the same for all GNU packages
X# and recognize all the CPU types, system types and aliases
X# that are meaningful with *any* GNU software.
X# Each package is responsible for reporting which valid configurations
X# it does not support.  The user should be able to distinguish
X# a failure to support a valid configuration from a meaningless
X# configuration.
X
X# The goal of this file is to map all the various variations of a given
X# machine specification into a single specification in the form:
X#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
X# or in some cases, the newer four-part form:
X#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
X# It is wrong to echo any other type of specification.
X
Xif [ x$1 = x ]
Xthen
X	echo Configuration name missing. 1>&2
X	echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
X	echo "or     $0 ALIAS" 1>&2
X	echo where ALIAS is a recognized configuration type. 1>&2
X	exit 1
Xfi
X
X# First pass through any local machine types.
Xcase $1 in
X	*local*)
X		echo $1
X		exit 0
X		;;
X	*)
X	;;
Xesac
X
X# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
X# Here we must recognize all the valid KERNEL-OS combinations.
Xmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
Xcase $maybe_os in
X  linux-gnu*)
X    os=-$maybe_os
X    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
X    ;;
X  *)
X    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
X    if [ $basic_machine != $1 ]
X    then os=`echo $1 | sed 's/.*-/-/'`
X    else os=; fi
X    ;;
Xesac
X
X### Let's recognize common machines as not being operating systems so
X### that things like config.sub decstation-3100 work.  We also
X### recognize some manufacturers as not being operating systems, so we
X### can provide default operating systems below.
Xcase $os in
X	-sun*os*)
X		# Prevent following clause from handling this invalid input.
X		;;
X	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
X	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
X	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
X	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
X	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
X	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
X	-apple)
X		os=
X		basic_machine=$1
X		;;
X	-hiux*)
X		os=-hiuxwe2
X		;;
X	-sco5)
X		os=sco3.2v5
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
X		;;
X	-sco4)
X		os=-sco3.2v4
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
X		;;
X	-sco3.2.[4-9]*)
X		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
X		;;
X	-sco3.2v[4-9]*)
X		# Don't forget version if it is 3.2v4 or newer.
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
X		;;
X	-sco*)
X		os=-sco3.2v2
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
X		;;
X	-isc)
X		os=-isc2.2
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
X		;;
X	-clix*)
X		basic_machine=clipper-intergraph
X		;;
X	-isc*)
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
X		;;
X	-lynx*)
X		os=-lynxos
X		;;
X	-ptx*)
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
X		;;
X	-windowsnt*)
X		os=`echo $os | sed -e 's/windowsnt/winnt/'`
X		;;
X	-psos*)
X		os=-psos
X		;;
Xesac
X
X# Decode aliases for certain CPU-COMPANY combinations.
Xcase $basic_machine in
X	# Recognize the basic CPU types without company name.
X	# Some are omitted here because they have special meanings below.
X	tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
X		| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
X		| 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0? \
X		| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
X		| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
X		| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
X		| mipstx39 | mipstx39el \
X		| sparc | sparclet | sparclite | sparc64 | v850)
X		basic_machine=$basic_machine-unknown
X		;;
X
X	# We use `pc' rather than `unknown'
X	# because (1) that's what they normally are, and
X	# (2) the word "unknown" tends to confuse beginning users.
X	i[34567]86)
X	  basic_machine=$basic_machine-pc
X	  ;;
X	# Object if more than one company name word.
X	*-*-*)
X		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
X		exit 1
X		;;
X	# Recognize the basic CPU types with company name.
X	vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
X	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
X	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
X	      | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
X	      | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0?-* \
X	      | ia64-* \
X	      | alpha-* | alphaev5-* | alphaev56-* | alphaev6-* | we32k-* | cydra-* \
X	      | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
X	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
X	      | sparc64-* | mips64-* | mipsel-* \
X	      | mips64el-* | mips64orion-* | mips64orionel-*  \
X	      | mipstx39-* | mipstx39el-* \
X	      | f301-* \
X	      | x86-* | x86_64-* | amd64-*)
X		;;
X	# Recognize the various machine names and aliases which stand
X	# for a CPU type and a company and sometimes even an OS.
X	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
X		basic_machine=m68000-att
X		;;
X	3b*)
X		basic_machine=we32k-att
X		;;
X	alliant | fx80)
X		basic_machine=fx80-alliant
X		;;
X	altos | altos3068)
X		basic_machine=m68k-altos
X		;;
X	am29k)
X		basic_machine=a29k-none
X		os=-bsd
X		;;
X	amdahl)
X		basic_machine=580-amdahl
X		os=-sysv
X		;;
X	amiga | amiga-*)
X		basic_machine=m68k-cbm
X		;;
X	amigaos | amigados)
X		basic_machine=m68k-cbm
X		os=-amigaos
X		;;
X	amigaunix | amix)
X		basic_machine=m68k-cbm
X		os=-sysv4
X		;;
X	apollo68)
X		basic_machine=m68k-apollo
X		os=-sysv
X		;;
X	aux)
X		basic_machine=m68k-apple
X		os=-aux
X		;;
X	balance)
X		basic_machine=ns32k-sequent
X		os=-dynix
X		;;
X	convex-c1)
X		basic_machine=c1-convex
X		os=-bsd
X		;;
X	convex-c2)
X		basic_machine=c2-convex
X		os=-bsd
X		;;
X	convex-c32)
X		basic_machine=c32-convex
X		os=-bsd
X		;;
X	convex-c34)
X		basic_machine=c34-convex
X		os=-bsd
X		;;
X	convex-c38)
X		basic_machine=c38-convex
X		os=-bsd
X		;;
X	cray | ymp)
X		basic_machine=ymp-cray
X		os=-unicos
X		;;
X	cray2)
X		basic_machine=cray2-cray
X		os=-unicos
X		;;
X	[ctj]90-cray)
X		basic_machine=c90-cray
X		os=-unicos
X		;;
X	crds | unos)
X		basic_machine=m68k-crds
X		;;
X	da30 | da30-*)
X		basic_machine=m68k-da30
X		;;
X	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
X		basic_machine=mips-dec
X		;;
X	delta | 3300 | motorola-3300 | motorola-delta \
X	      | 3300-motorola | delta-motorola)
X		basic_machine=m68k-motorola
X		;;
X	delta88)
X		basic_machine=m88k-motorola
X		os=-sysv3
X		;;
X	dpx20 | dpx20-*)
X		basic_machine=rs6000-bull
X		os=-bosx
X		;;
X	dpx2* | dpx2*-bull)
X		basic_machine=m68k-bull
X		os=-sysv3
X		;;
X	ebmon29k)
X		basic_machine=a29k-amd
X		os=-ebmon
X		;;
X	elxsi)
X		basic_machine=elxsi-elxsi
X		os=-bsd
X		;;
X	encore | umax | mmax)
X		basic_machine=ns32k-encore
X		;;
X	fx2800)
X		basic_machine=i860-alliant
X		;;
X	genix)
X		basic_machine=ns32k-ns
X		;;
X	gmicro)
X		basic_machine=tron-gmicro
X		os=-sysv
X		;;
X	h3050r* | hiux*)
X		basic_machine=hppa1.1-hitachi
X		os=-hiuxwe2
X		;;
X	h8300hms)
X		basic_machine=h8300-hitachi
X		os=-hms
X		;;
X	harris)
X		basic_machine=m88k-harris
X		os=-sysv3
X		;;
X	hp300-*)
X		basic_machine=m68k-hp
X		;;
X	hp300bsd)
X		basic_machine=m68k-hp
X		os=-bsd
X		;;
X	hp300hpux)
X		basic_machine=m68k-hp
X		os=-hpux
X		;;
X	hp9k2[0-9][0-9] | hp9k31[0-9])
X		basic_machine=m68000-hp
X		;;
X	hp9k3[2-9][0-9])
X		basic_machine=m68k-hp
X		;;
X	hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
X		basic_machine=hppa1.1-hp
X		;;
X	hp9k8[0-9][0-9] | hp8[0-9][0-9])
X		basic_machine=hppa1.0-hp
X		;;
X	hppa-next)
X		os=-nextstep3
X		;;
X	i370-ibm* | ibm*)
X		basic_machine=i370-ibm
X		os=-mvs
X		;;
X# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
X	i[34567]86v32)
X		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
X		os=-sysv32
X		;;
X	i[34567]86v4*)
X		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
X		os=-sysv4
X		;;
X	i[34567]86v)
X		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
X		os=-sysv
X		;;
X	i[34567]86sol2)
X		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
X		os=-solaris2
X		;;
X	iris | iris4d)
X		basic_machine=mips-sgi
X		case $os in
X		    -irix*)
X			;;
X		    *)
X			os=-irix4
X			;;
X		esac
X		;;
X	isi68 | isi)
X		basic_machine=m68k-isi
X		os=-sysv
X		;;
X	m88k-omron*)
X		basic_machine=m88k-omron
X		;;
X	magnum | m3230)
X		basic_machine=mips-mips
X		os=-sysv
X		;;
X	merlin)
X		basic_machine=ns32k-utek
X		os=-sysv
X		;;
X	miniframe)
X		basic_machine=m68000-convergent
X		;;
X	mipsel*-linux*)
X		basic_machine=mipsel-unknown
X		os=-linux-gnu
X		;;
X	mips*-linux*)
X		basic_machine=mips-unknown
X		os=-linux-gnu
X		;;
X	mips3*-*)
X		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
X		;;
X	mips3*)
X		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
X		;;
X	ncr3000)
X		basic_machine=i486-ncr
X		os=-sysv4
X		;;
X	news | news700 | news800 | news900)
X		basic_machine=m68k-sony
X		os=-newsos
X		;;
X	news1000)
X		basic_machine=m68030-sony
X		os=-newsos
X		;;
X	news-3600 | risc-news)
X		basic_machine=mips-sony
X		os=-newsos
X		;;
X	next | m*-next )
X		basic_machine=m68k-next
X		case $os in
X		    -nextstep* )
X			;;
X		    -ns2*)
X		      os=-nextstep2
X			;;
X		    *)
X		      os=-nextstep3
X			;;
X		esac
X		;;
X	nh3000)
X		basic_machine=m68k-harris
X		os=-cxux
X		;;
X	nh[45]000)
X		basic_machine=m88k-harris
X		os=-cxux
X		;;
X	nindy960)
X		basic_machine=i960-intel
X		os=-nindy
X		;;
X	np1)
X		basic_machine=np1-gould
X		;;
X	pa-hitachi)
X		basic_machine=hppa1.1-hitachi
X		os=-hiuxwe2
X		;;
X	paragon)
X		basic_machine=i860-intel
X		os=-osf
X		;;
X	parisc-unknown)
X		basic_machine=parisc-unknown
X		;;
X	pbd)
X		basic_machine=sparc-tti
X		;;
X	pbb)
X		basic_machine=m68k-tti
X		;;
X        pc532 | pc532-*)
X		basic_machine=ns32k-pc532
X		;;
X	pentium | p5 | k5 | nexen)
X		basic_machine=i586-pc
X		;;
X	pentiumpro | p6 | k6 | 6x86)
X		basic_machine=i686-pc
X		;;
X	pentiumii | pentium2)
X		basic_machine=i786-pc
X		;;
X	pentium-* | p5-* | k5-* | nexen-*)
X		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
X		;;
X	pentiumpro-* | p6-* | k6-* | 6x86-*)
X		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
X		;;
X	pentiumii-* | pentium2-*)
X		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
X		;;
X	pn)
X		basic_machine=pn-gould
X		;;
X	power)	basic_machine=rs6000-ibm
X		;;
X	ppc)	basic_machine=powerpc-unknown
X	        ;;
X	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
X		;;
X	ppcle | powerpclittle | ppc-le | powerpc-little)
X		basic_machine=powerpcle-unknown
X	        ;;
X	ppcle-* | powerpclittle-*)
X		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
X		;;
X	ps2)
X		basic_machine=i386-ibm
X		;;
X	rm[46]00)
X		basic_machine=mips-siemens
X		;;
X	rtpc | rtpc-*)
X		basic_machine=romp-ibm
X		;;
X	s390 | s390-*)
X		basic_machine=s390-ibm
X		;;
X	s390x | s390x-*)
X		basic_machine=s390x-ibm
X		;;
X	sequent)
X		basic_machine=i386-sequent
X		;;
X	sh)
X		basic_machine=sh-hitachi
X		os=-hms
X		;;
X	sps7)
X		basic_machine=m68k-bull
X		os=-sysv2
X		;;
X	spur)
X		basic_machine=spur-unknown
X		;;
X	sun2)
X		basic_machine=m68000-sun
X		;;
X	sun2os3)
X		basic_machine=m68000-sun
X		os=-sunos3
X		;;
X	sun2os4)
X		basic_machine=m68000-sun
X		os=-sunos4
X		;;
X	sun3os3)
X		basic_machine=m68k-sun
X		os=-sunos3
X		;;
X	sun3os4)
X		basic_machine=m68k-sun
X		os=-sunos4
X		;;
X	sun4os3)
X		basic_machine=sparc-sun
X		os=-sunos3
X		;;
X	sun4os4)
X		basic_machine=sparc-sun
X		os=-sunos4
X		;;
X	sun4sol2)
X		basic_machine=sparc-sun
X		os=-solaris2
X		;;
X	sun3 | sun3-*)
X		basic_machine=m68k-sun
X		;;
X	sun4)
X		basic_machine=sparc-sun
X		;;
X	sun386 | sun386i | roadrunner)
X		basic_machine=i386-sun
X		;;
X	symmetry)
X		basic_machine=i386-sequent
X		os=-dynix
X		;;
X	tx39)
X		basic_machine=mipstx39-unknown
X		;;
X	tx39el)
X		basic_machine=mipstx39el-unknown
X		;;
X	tower | tower-32)
X		basic_machine=m68k-ncr
X		;;
X	udi29k)
X		basic_machine=a29k-amd
X		os=-udi
X		;;
X	ultra3)
X		basic_machine=a29k-nyu
X		os=-sym1
X		;;
X	vaxv)
X		basic_machine=vax-dec
X		os=-sysv
X		;;
X	vms)
X		basic_machine=vax-dec
X		os=-vms
X		;;
X	vpp*|vx|vx-*)
X               basic_machine=f301-fujitsu
X               ;;
X	vxworks960)
X		basic_machine=i960-wrs
X		os=-vxworks
X		;;
X	vxworks68)
X		basic_machine=m68k-wrs
X		os=-vxworks
X		;;
X	vxworks29k)
X		basic_machine=a29k-wrs
X		os=-vxworks
X		;;
X	xmp)
X		basic_machine=xmp-cray
X		os=-unicos
X		;;
X        xps | xps100)
X		basic_machine=xps100-honeywell
X		;;
X	none)
X		basic_machine=none-none
X		os=-none
X		;;
X
X# Here we handle the default manufacturer of certain CPU types.  It is in
X# some cases the only manufacturer, in others, it is the most popular.
X	mips)
X		if [ x$os = x-linux-gnu ]; then
X			basic_machine=mips-unknown
X		else
X			basic_machine=mips-mips
X		fi
X		;;
X	romp)
X		basic_machine=romp-ibm
X		;;
X	rs6000)
X		basic_machine=rs6000-ibm
X		;;
X	vax)
X		basic_machine=vax-dec
X		;;
X	pdp11)
X		basic_machine=pdp11-dec
X		;;
X	we32k)
X		basic_machine=we32k-att
X		;;
X	sparc)
X		basic_machine=sparc-sun
X		;;
X        cydra)
X		basic_machine=cydra-cydrome
X		;;
X	orion)
X		basic_machine=orion-highlevel
X		;;
X	orion105)
X		basic_machine=clipper-highlevel
X		;;
X	*)
X		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
X		exit 1
X		;;
Xesac
X
X# Here we canonicalize certain aliases for manufacturers.
Xcase $basic_machine in
X	*-digital*)
X		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
X		;;
X	*-commodore*)
X		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
X		;;
X	*)
X		;;
Xesac
X
X# Decode manufacturer-specific aliases for certain operating systems.
X
Xif [ x"$os" != x"" ]
Xthen
Xcase $os in
X        # First match some system type aliases
X        # that might get confused with valid system types.
X	# -solaris* is a basic system type, with this one exception.
X	-solaris1 | -solaris1.*)
X		os=`echo $os | sed -e 's|solaris1|sunos4|'`
X		;;
X	-solaris)
X		os=-solaris2
X		;;
X	-svr4*)
X		os=-sysv4
X		;;
X	-unixware*)
X		os=-sysv4.2uw
X		;;
X	-gnu/linux*)
X		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
X		;;
X	# First accept the basic system types.
X	# The portable systems comes first.
X	# Each alternative MUST END IN A *, to match a version number.
X	# -sysv* is not here because it comes later, after sysvr4.
X	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
X	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
X	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
X	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
X	      | -aos* \
X	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
X	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
X	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -dragonfly* | -riscix* \
X	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
X	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
X	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
X	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
X	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -os2* \
X	      | -interix* | -uwin* | -mks* | -rhapsody* | -macos* | -haiku* )
X	# Remember, each alternative MUST END IN *, to match a version number.
X		;;
X	-linux*)
X		os=`echo $os | sed -e 's|linux|linux-gnu|'`
X		;;
X	-sunos5*)
X		os=`echo $os | sed -e 's|sunos5|solaris2|'`
X		;;
X	-sunos6*)
X		os=`echo $os | sed -e 's|sunos6|solaris3|'`
X		;;
X	-osfrose*)
X		os=-osfrose
X		;;
X	-osf*)
X		os=-osf
X		;;
X	-utek*)
X		os=-bsd
X		;;
X	-dynix*)
X		os=-bsd
X		;;
X	-acis*)
X		os=-aos
X		;;
X	-ctix* | -uts*)
X		os=-sysv
X		;;
X	-ns2 )
X	        os=-nextstep2
X		;;
X	# Preserve the version number of sinix5.
X	-sinix5.*)
X		os=`echo $os | sed -e 's|sinix|sysv|'`
X		;;
X	-sinix*)
X		os=-sysv4
X		;;
X	-triton*)
X		os=-sysv3
X		;;
X	-oss*)
X		os=-sysv3
X		;;
X	-svr4)
X		os=-sysv4
X		;;
X	-svr3)
X		os=-sysv3
X		;;
X	# For sys5.3 apollo
X	-sys5.3)
X		os=-sysv3
X		;;
X	-sysvr4)
X		os=-sysv4
X		;;
X	# This must come after -sysvr4.
X	-sysv*)
X		;;
X	-xenix)
X		os=-xenix
X		;;
X	-freemint)
X		os=-freemint
X		;;
X	-mint)
X		os=-mint
X		;;
X	-tos)
X		os=-tos
X		;;
X
X	-none)
X		;;
X	*)
X		# Get rid of the `-' at the beginning of $os.
X		os=`echo $os | sed 's/[^-]*-//'`
X		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
X		exit 1
X		;;
Xesac
Xelse
X
X# Here we handle the default operating systems that come with various machines.
X# The value should be what the vendor currently ships out the door with their
X# machine or put another way, the most popular os provided with the machine.
X
X# Note that if you're going to try to match "-MANUFACTURER" here (say,
X# "-sun"), then you have to tell the case statement up towards the top
X# that MANUFACTURER isn't an operating system.  Otherwise, code above
X# will signal an error saying that MANUFACTURER isn't an operating
X# system, and we'll never get to this point.
X
Xcase $basic_machine in
X	*-acorn)
X		os=-riscix1.2
X		;;
X	arm*-semi)
X		os=-aout
X		;;
X        pdp11-*)
X		os=-none
X		;;
X	*-dec | vax-*)
X		os=-ultrix4.2
X		;;
X	m68*-apollo)
X		os=-domain
X		;;
X	i386-sun)
X		os=-sunos4.0.2
X		;;
X	m68000-sun)
X		os=-sunos3
X		# This also exists in the configure program, but was not the
X		# default.
X		# os=-sunos4
X		;;
X	*-tti)	# must be before sparc entry or we get the wrong os.
X		os=-sysv3
X		;;
X	sparc-* | *-sun)
X		os=-sunos4.1.1
X		;;
X	*-be)
X		os=-beos
X		;;
X	*-haiku)
X		os=-haiku
X		;;
X	*-ibm)
X		os=-aix
X		;;
X	*-hp)
X		os=-hpux
X		;;
X	*-hitachi)
X		os=-hiux
X		;;
X	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
X		os=-sysv
X		;;
X	*-cbm)
X		os=-amigaos
X		;;
X	*-dg)
X		os=-dgux
X		;;
X	*-dolphin)
X		os=-sysv3
X		;;
X	m68k-ccur)
X		os=-rtu
X		;;
X	m88k-omron*)
X		os=-luna
X		;;
X	*-next )
X		os=-nextstep
X		;;
X	*-sequent)
X		os=-ptx
X		;;
X	*-crds)
X		os=-unos
X		;;
X	*-ns)
X		os=-genix
X		;;
X	i370-*)
X		os=-mvs
X		;;
X	*-next)
X		os=-nextstep3
X		;;
X        *-gould)
X		os=-sysv
X		;;
X        *-highlevel)
X		os=-bsd
X		;;
X	*-encore)
X		os=-bsd
X		;;
X        *-sgi)
X		os=-irix
X		;;
X        *-siemens)
X		os=-sysv4
X		;;
X	*-masscomp)
X		os=-rtu
X		;;
X	f301-fujitsu)
X		os=-uxpv
X		;;
X	*)
X		os=-none
X		;;
Xesac
Xfi
X
X# Here we handle the case where we know the os, and the CPU type, but not the
X# manufacturer.  We pick the logical manufacturer.
Xvendor=unknown
Xcase $basic_machine in
X	*-unknown)
X		case $os in
X			-riscix*)
X				vendor=acorn
X				;;
X			-sunos*)
X				vendor=sun
X				;;
X			-aix*)
X				vendor=ibm
X				;;
X			-hpux*)
X				vendor=hp
X				;;
X			-hiux*)
X				vendor=hitachi
X				;;
X			-unos*)
X				vendor=crds
X				;;
X			-dgux*)
X				vendor=dg
X				;;
X			-luna*)
X				vendor=omron
X				;;
X			-genix*)
X				vendor=ns
X				;;
X			-mvs*)
X				vendor=ibm
X				;;
X			-ptx*)
X				vendor=sequent
X				;;
X			-vxsim* | -vxworks*)
X				vendor=wrs
X				;;
X			-aux*)
X				vendor=apple
X				;;
X		esac
X		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
X		;;
Xesac
X
Xecho $basic_machine$os
END-of-smake-1.2.1/autoconf/config.sub
echo x - smake-1.2.1/autoconf/configure
sed 's/^X//' >smake-1.2.1/autoconf/configure << 'END-of-smake-1.2.1/autoconf/configure'
X#! /bin/sh
X
X# From configure.in 1.202
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X#serial 18
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X# Guess values for system-dependent variables and create Makefiles.
X# Generated automatically using autoconf version 2.13 
X# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
X#
X# This configure script is free software; the Free Software Foundation
X# gives unlimited permission to copy, distribute and modify it.
X
X# Defaults:
Xac_help=
Xac_default_prefix=/usr/local
X# Any additions from configure.in:
Xac_help="$ac_help
X  --disable-largefile     omit support for large files"
X
X# Initialize some variables set by options.
X# The variables have the same names as the options, with
X# dashes changed to underlines.
Xbuild=NONE
Xcache_file=./config.cache
Xexec_prefix=NONE
Xhost=NONE
Xno_create=
Xnonopt=NONE
Xno_recursion=
Xprefix=NONE
Xprogram_prefix=NONE
Xprogram_suffix=NONE
Xprogram_transform_name=s,x,x,
Xsilent=
Xsite=
Xsrcdir=
Xtarget=NONE
Xverbose=
Xx_includes=NONE
Xx_libraries=NONE
Xbindir='${exec_prefix}/bin'
Xsbindir='${exec_prefix}/sbin'
Xlibexecdir='${exec_prefix}/libexec'
Xdatadir='${prefix}/share'
Xsysconfdir='${prefix}/etc'
Xsharedstatedir='${prefix}/com'
Xlocalstatedir='${prefix}/var'
Xlibdir='${exec_prefix}/lib'
Xincludedir='${prefix}/include'
Xoldincludedir='/usr/include'
Xinfodir='${prefix}/info'
Xmandir='${prefix}/man'
X
X# Initialize some other variables.
Xsubdirs=
XMFLAGS= MAKEFLAGS=
XSHELL=${CONFIG_SHELL-/bin/sh}
X# Maximum number of lines to put in a shell here document.
Xac_max_here_lines=12
X
Xac_prev=
Xfor ac_option
Xdo
X
X  # If the previous option needs an argument, assign it.
X  if test -n "$ac_prev"; then
X    eval "$ac_prev=\$ac_option"
X    ac_prev=
X    continue
X  fi
X
X  case "$ac_option" in
X  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
X  *) ac_optarg= ;;
X  esac
X
X  # Accept the important Cygnus configure options, so we can diagnose typos.
X
X  case "$ac_option" in
X
X  -bindir | --bindir | --bindi | --bind | --bin | --bi)
X    ac_prev=bindir ;;
X  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
X    bindir="$ac_optarg" ;;
X
X  -build | --build | --buil | --bui | --bu)
X    ac_prev=build ;;
X  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
X    build="$ac_optarg" ;;
X
X  -cache-file | --cache-file | --cache-fil | --cache-fi \
X  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
X    ac_prev=cache_file ;;
X  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
X  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
X    cache_file="$ac_optarg" ;;
X
X  -cc=* | --cc=* )
X    CC="$ac_optarg" ; echo using $CC as compiler ;;
X
X  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
X    ac_prev=datadir ;;
X  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
X  | --da=*)
X    datadir="$ac_optarg" ;;
X
X  -disable-* | --disable-*)
X    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
X    # Reject names that are not valid shell variable names.
X    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
X      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
X    fi
X    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
X    eval "enable_${ac_feature}=no" ;;
X
X  -enable-* | --enable-*)
X    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
X    # Reject names that are not valid shell variable names.
X    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
X      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
X    fi
X    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
X    case "$ac_option" in
X      *=*) ;;
X      *) ac_optarg=yes ;;
X    esac
X    eval "enable_${ac_feature}='$ac_optarg'" ;;
X
X  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
X  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
X  | --exec | --exe | --ex)
X    ac_prev=exec_prefix ;;
X  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
X  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
X  | --exec=* | --exe=* | --ex=*)
X    exec_prefix="$ac_optarg" ;;
X
X  -gas | --gas | --ga | --g)
X    # Obsolete; use --with-gas.
X    with_gas=yes ;;
X
X  -help | --help | --hel | --he)
X    # Omit some internal or obsolete options to make the list less imposing.
X    # This message is too long to be a string in the A/UX 3.1 sh.
X    cat << EOF
XUsage: configure [options] [host]
XOptions: [defaults in brackets after descriptions]
XConfiguration:
X  --cache-file=FILE       cache test results in FILE
X  --help                  print this message
X  --no-create             do not create output files
X  --quiet, --silent       do not print \`checking...' messages
X  --version               print the version of autoconf that created configure
XDirectory and file names:
X  --prefix=PREFIX         install architecture-independent files in PREFIX
X                          [$ac_default_prefix]
X  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
X                          [same as prefix]
X  --bindir=DIR            user executables in DIR [EPREFIX/bin]
X  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
X  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
X  --datadir=DIR           read-only architecture-independent data in DIR
X                          [PREFIX/share]
X  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
X  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
X                          [PREFIX/com]
X  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
X  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
X  --includedir=DIR        C header files in DIR [PREFIX/include]
X  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
X  --infodir=DIR           info documentation in DIR [PREFIX/info]
X  --mandir=DIR            man documentation in DIR [PREFIX/man]
X  --srcdir=DIR            find the sources in DIR [configure dir or ..]
X  --program-prefix=PREFIX prepend PREFIX to installed program names
X  --program-suffix=SUFFIX append SUFFIX to installed program names
X  --program-transform-name=PROGRAM
X                          run sed PROGRAM on installed program names
XEOF
X    cat << EOF
XHost type:
X  --build=BUILD           configure for building on BUILD [BUILD=HOST]
X  --host=HOST             configure for HOST [guessed]
X  --target=TARGET         configure for TARGET [TARGET=HOST]
XFeatures and packages:
X  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
X  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
X  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
X  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
X  --x-includes=DIR        X include files are in DIR
X  --x-libraries=DIR       X library files are in DIR
XEOF
X    if test -n "$ac_help"; then
X      echo "--enable and --with options recognized:$ac_help"
X    fi
X    exit 0 ;;
X
X  -host | --host | --hos | --ho)
X    ac_prev=host ;;
X  -host=* | --host=* | --hos=* | --ho=*)
X    host="$ac_optarg" ;;
X
X  -includedir | --includedir | --includedi | --included | --include \
X  | --includ | --inclu | --incl | --inc)
X    ac_prev=includedir ;;
X  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
X  | --includ=* | --inclu=* | --incl=* | --inc=*)
X    includedir="$ac_optarg" ;;
X
X  -infodir | --infodir | --infodi | --infod | --info | --inf)
X    ac_prev=infodir ;;
X  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
X    infodir="$ac_optarg" ;;
X
X  -libdir | --libdir | --libdi | --libd)
X    ac_prev=libdir ;;
X  -libdir=* | --libdir=* | --libdi=* | --libd=*)
X    libdir="$ac_optarg" ;;
X
X  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
X  | --libexe | --libex | --libe)
X    ac_prev=libexecdir ;;
X  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
X  | --libexe=* | --libex=* | --libe=*)
X    libexecdir="$ac_optarg" ;;
X
X  -localstatedir | --localstatedir | --localstatedi | --localstated \
X  | --localstate | --localstat | --localsta | --localst \
X  | --locals | --local | --loca | --loc | --lo)
X    ac_prev=localstatedir ;;
X  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
X  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
X  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
X    localstatedir="$ac_optarg" ;;
X
X  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
X    ac_prev=mandir ;;
X  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
X    mandir="$ac_optarg" ;;
X
X  -nfp | --nfp | --nf)
X    # Obsolete; use --without-fp.
X    with_fp=no ;;
X
X  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
X  | --no-cr | --no-c)
X    no_create=yes ;;
X
X  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
X  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
X    no_recursion=yes ;;
X
X  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
X  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
X  | --oldin | --oldi | --old | --ol | --o)
X    ac_prev=oldincludedir ;;
X  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
X  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
X  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
X    oldincludedir="$ac_optarg" ;;
X
X  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
X    ac_prev=prefix ;;
X  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
X    prefix="$ac_optarg" ;;
X
X  -program-prefix | --program-prefix | --program-prefi | --program-pref \
X  | --program-pre | --program-pr | --program-p)
X    ac_prev=program_prefix ;;
X  -program-prefix=* | --program-prefix=* | --program-prefi=* \
X  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
X    program_prefix="$ac_optarg" ;;
X
X  -program-suffix | --program-suffix | --program-suffi | --program-suff \
X  | --program-suf | --program-su | --program-s)
X    ac_prev=program_suffix ;;
X  -program-suffix=* | --program-suffix=* | --program-suffi=* \
X  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
X    program_suffix="$ac_optarg" ;;
X
X  -program-transform-name | --program-transform-name \
X  | --program-transform-nam | --program-transform-na \
X  | --program-transform-n | --program-transform- \
X  | --program-transform | --program-transfor \
X  | --program-transfo | --program-transf \
X  | --program-trans | --program-tran \
X  | --progr-tra | --program-tr | --program-t)
X    ac_prev=program_transform_name ;;
X  -program-transform-name=* | --program-transform-name=* \
X  | --program-transform-nam=* | --program-transform-na=* \
X  | --program-transform-n=* | --program-transform-=* \
X  | --program-transform=* | --program-transfor=* \
X  | --program-transfo=* | --program-transf=* \
X  | --program-trans=* | --program-tran=* \
X  | --progr-tra=* | --program-tr=* | --program-t=*)
X    program_transform_name="$ac_optarg" ;;
X
X  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
X  | -silent | --silent | --silen | --sile | --sil)
X    silent=yes ;;
X
X  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
X    ac_prev=sbindir ;;
X  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
X  | --sbi=* | --sb=*)
X    sbindir="$ac_optarg" ;;
X
X  -sharedstatedir | --sharedstatedir | --sharedstatedi \
X  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
X  | --sharedst | --shareds | --shared | --share | --shar \
X  | --sha | --sh)
X    ac_prev=sharedstatedir ;;
X  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
X  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
X  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
X  | --sha=* | --sh=*)
X    sharedstatedir="$ac_optarg" ;;
X
X  -site | --site | --sit)
X    ac_prev=site ;;
X  -site=* | --site=* | --sit=*)
X    site="$ac_optarg" ;;
X
X  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
X    ac_prev=srcdir ;;
X  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
X    srcdir="$ac_optarg" ;;
X
X  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
X  | --syscon | --sysco | --sysc | --sys | --sy)
X    ac_prev=sysconfdir ;;
X  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
X  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
X    sysconfdir="$ac_optarg" ;;
X
X  -target | --target | --targe | --targ | --tar | --ta | --t)
X    ac_prev=target ;;
X  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
X    target="$ac_optarg" ;;
X
X  -v | -verbose | --verbose | --verbos | --verbo | --verb)
X    verbose=yes ;;
X
X  -version | --version | --versio | --versi | --vers)
X    echo "configure generated by autoconf version 2.13"
X    exit 0 ;;
X
X  -with-* | --with-*)
X    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
X    # Reject names that are not valid shell variable names.
X    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
X      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
X    fi
X    ac_package=`echo $ac_package| sed 's/-/_/g'`
X    case "$ac_option" in
X      *=*) ;;
X      *) ac_optarg=yes ;;
X    esac
X    eval "with_${ac_package}='$ac_optarg'" ;;
X
X  -without-* | --without-*)
X    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
X    # Reject names that are not valid shell variable names.
X    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
X      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
X    fi
X    ac_package=`echo $ac_package| sed 's/-/_/g'`
X    eval "with_${ac_package}=no" ;;
X
X  --x)
X    # Obsolete; use --with-x.
X    with_x=yes ;;
X
X  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
X  | --x-incl | --x-inc | --x-in | --x-i)
X    ac_prev=x_includes ;;
X  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
X  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
X    x_includes="$ac_optarg" ;;
X
X  -x-libraries | --x-libraries | --x-librarie | --x-librari \
X  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
X    ac_prev=x_libraries ;;
X  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
X  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
X    x_libraries="$ac_optarg" ;;
X
X  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
X    ;;
X
X  *)
X    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
X      echo "configure: warning: $ac_option: invalid host type" 1>&2
X    fi
X    if test "x$nonopt" != xNONE; then
X      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
X    fi
X    nonopt="$ac_option"
X    ;;
X
X  esac
Xdone
X
Xif test -n "$ac_prev"; then
X  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Xfi
X
Xtrap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
X
X# File descriptor usage:
X# 0 standard input
X# 1 file creation
X# 2 errors and warnings
X# 3 some systems may open it to /dev/tty
X# 4 used on the Kubota Titan
X# 6 checking for... messages and results
X# 5 compiler messages saved in config.log
Xif test "$silent" = yes; then
X  exec 6>/dev/null
Xelse
X  exec 6>&1
Xfi
Xexec 5>./config.log
X
Xecho "\
XThis file contains any messages produced by compilers while
Xrunning configure, to aid debugging if configure makes a mistake.
X" 1>&5
X
X# Strip out --no-create and --no-recursion so they do not pile up.
X# Also quote any args containing shell metacharacters.
Xac_configure_args=
Xfor ac_arg
Xdo
X  case "$ac_arg" in
X  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
X  | --no-cr | --no-c) ;;
X  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
X  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
X  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
X  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
X  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
X  esac
Xdone
X
X# NLS nuisances.
X# Only set these to C if already set.  These must not be set unconditionally
X# because not all systems understand e.g. LANG=C (notably SCO).
X# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
X# Non-C LC_CTYPE values break the ctype check.
Xif test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
Xif test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
Xif test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
Xif test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
X
X# confdefs.h avoids OS command line length limits that DEFS can exceed.
Xrm -rf conftest* confdefs.h
X# AIX cpp loses on an empty file, so make sure it contains at least a newline.
Xecho > confdefs.h
X
X# A filename unique to this package, relative to the directory that
X# configure is in, which we can look for to find out if srcdir is correct.
Xac_unique_file=config.guess
X
X# Find the source files, if location was not specified.
Xif test -z "$srcdir"; then
X  ac_srcdir_defaulted=yes
X  # Try the directory containing this script, then its parent.
X  ac_prog=$0
X  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
X  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
X  srcdir=$ac_confdir
X  if test ! -r $srcdir/$ac_unique_file; then
X    srcdir=..
X  fi
Xelse
X  ac_srcdir_defaulted=no
Xfi
Xif test ! -r $srcdir/$ac_unique_file; then
X  if test "$ac_srcdir_defaulted" = yes; then
X    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
X  else
X    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
X  fi
Xfi
Xsrcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
X
X# Prefer explicitly selected file to automatically selected ones.
Xif test -z "$CONFIG_SITE"; then
X  if test "x$prefix" != xNONE; then
X    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
X  else
X    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
X  fi
Xfi
Xfor ac_site_file in $CONFIG_SITE; do
X  if test -r "$ac_site_file"; then
X    echo "loading site script $ac_site_file"
X    . "$ac_site_file"
X  fi
Xdone
X
Xif test -r "$cache_file"; then
X  echo "loading cache $cache_file"
X  . $cache_file
Xelse
X  echo "creating cache $cache_file"
X  > $cache_file
Xfi
X
Xac_ext=c
X# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Xac_cpp='$CPP $CPPFLAGS'
Xac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Xac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5'
Xcross_compiling=$ac_cv_prog_cc_cross
X
Xac_exeext=
Xac_xexeext=
Xac_objext=o
Xif (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
X  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
X  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
X    ac_n= ac_c='
X' ac_t='	'
X  else
X    ac_n=-n ac_c= ac_t=
X  fi
Xelse
X  ac_n= ac_c='\c' ac_t=
Xfi
X
X
X
Xac_aux_dir=
Xfor ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
X  if test -f $ac_dir/install-sh; then
X    ac_aux_dir=$ac_dir
X    ac_install_sh="$ac_aux_dir/install-sh -c"
X    break
X  elif test -f $ac_dir/install.sh; then
X    ac_aux_dir=$ac_dir
X    ac_install_sh="$ac_aux_dir/install.sh -c"
X    break
X  fi
Xdone
Xif test -z "$ac_aux_dir"; then
X  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
Xfi
Xac_config_guess=$ac_aux_dir/config.guess
Xac_config_sub=$ac_aux_dir/config.sub
Xac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
X
X
X# Make sure we can run config.sub.
Xif ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
Xelse { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
Xfi
X
Xecho $ac_n "checking host system type""... $ac_c" 1>&6
Xecho "configure:840: checking host system type" >&5
X
Xhost_alias=$host
Xcase "$host_alias" in
XNONE)
X  case $nonopt in
X  NONE)
X    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
X    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
X    fi ;;
X  *) host_alias=$nonopt ;;
X  esac ;;
Xesac
X
Xhost=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
Xhost_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
Xhost_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
Xhost_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
Xecho "$ac_t""$host" 1>&6
X
X
Xecho $ac_n "checking if sh is bash""... $ac_c" 1>&6
Xecho "configure:862: checking if sh is bash" >&5
Xif eval "test \"`echo '$''{'ac_cv_shell_is_bash'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xac_err=`< /dev/null sh --version 2> /dev/null | egrep 'GNU sh|bash'`
Xif test -n "$ac_err"; then
X	ac_cv_shell_is_bash=yes
Xelse
X	ac_cv_shell_is_bash=no
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_shell_is_bash" 1>&6
Xif test $ac_cv_shell_is_bash = yes; then
X  cat >> confdefs.h <<\EOF
X#define SHELL_IS_BASH 1
XEOF
X
Xfi
Xecho $ac_n "checking if /bin/sh is bash""... $ac_c" 1>&6
Xecho "configure:884: checking if /bin/sh is bash" >&5
Xif eval "test \"`echo '$''{'ac_cv_bin_shell_is_bash'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xac_err=`< /dev/null /bin/sh --version 2> /dev/null | egrep 'GNU sh|bash'`
Xif test -n "$ac_err"; then
X	ac_cv_bin_shell_is_bash=yes
Xelse
X	ac_cv_bin_shell_is_bash=no
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_bin_shell_is_bash" 1>&6
Xif test $ac_cv_bin_shell_is_bash = yes; then
X  cat >> confdefs.h <<\EOF
X#define BIN_SHELL_IS_BASH 1
XEOF
X
Xfi
Xecho $ac_n "checking whether sh -ce is broken""... $ac_c" 1>&6
Xecho "configure:906: checking whether sh -ce is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_shell_ce_is_broken'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xac_err=`sh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
Xif test -n "$ac_err"; then
X	ac_cv_shell_ce_is_broken=yes
Xelse
X	ac_cv_shell_ce_is_broken=no
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_shell_ce_is_broken" 1>&6
Xif test $ac_cv_shell_ce_is_broken = yes; then
X  cat >> confdefs.h <<\EOF
X#define SHELL_CE_IS_BROKEN 1
XEOF
X
Xfi
Xecho $ac_n "checking whether /bin/sh -ce is broken""... $ac_c" 1>&6
Xecho "configure:928: checking whether /bin/sh -ce is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_bin_shell_ce_is_broken'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xac_err=`/bin/sh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
Xif test -n "$ac_err"; then
X	ac_cv_bin_shell_ce_is_broken=yes
Xelse
X	ac_cv_bin_shell_ce_is_broken=no
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_bin_shell_ce_is_broken" 1>&6
Xif test $ac_cv_bin_shell_ce_is_broken = yes; then
X  cat >> confdefs.h <<\EOF
X#define BIN_SHELL_CE_IS_BROKEN 1
XEOF
X
Xfi
Xecho $ac_n "checking whether /bin/bosh is a working shell""... $ac_c" 1>&6
Xecho "configure:950: checking whether /bin/bosh is a working shell" >&5
Xif eval "test \"`echo '$''{'ac_cv_bin_shell_bosh'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xac_err=`< /dev/null /bin/bosh -c 'echo abc' 2> /dev/null | grep abc`
Xif test "$ac_err" != "abc"; then
X	ac_cv_bin_shell_bosh=no
Xelse
X	ac_err=`/bin/bosh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
X	if test -z "$ac_err"; then
X		ac_cv_bin_shell_bosh=yes
X	else
X		ac_cv_bin_shell_bosh=no
X	fi
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_bin_shell_bosh" 1>&6
Xif test $ac_cv_bin_shell_bosh = yes; then
X  cat >> confdefs.h <<\EOF
X#define BIN_SHELL_BOSH 1
XEOF
X
Xfi
Xecho $ac_n "checking whether /opt/schily/bin/bosh is a working shell""... $ac_c" 1>&6
Xecho "configure:977: checking whether /opt/schily/bin/bosh is a working shell" >&5
Xif eval "test \"`echo '$''{'ac_cv_opt_schily_bin_shell_bosh'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xac_err=`< /dev/null /opt/schily/bin/bosh -c 'echo abc' 2> /dev/null | grep abc`
Xif test "$ac_err" != "abc"; then
X	ac_cv_opt_schily_bin_shell_bosh=no
Xelse
X	ac_err=`/opt/schily/bin/bosh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
X	if test -z "$ac_err"; then
X		ac_cv_opt_schily_bin_shell_bosh=yes
X	else
X		ac_cv_opt_schily_bin_shell_bosh=no
X	fi
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_opt_schily_bin_shell_bosh" 1>&6
Xif test $ac_cv_opt_schily_bin_shell_bosh = yes; then
X  cat >> confdefs.h <<\EOF
X#define OPT_SCHILY_BIN_SHELL_BOSH 1
XEOF
X
Xfi
Xecho $ac_n "checking for object suffix""... $ac_c" 1>&6
Xecho "configure:1004: checking for object suffix" >&5
Xif eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  rm -f conftest*
Xecho 'int i = 1;' > conftest.$ac_ext
Xif { (eval echo configure:1010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  for ac_file in conftest.*; do
X    case $ac_file in
X    *.c) ;;
X    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
X    esac
X  done
Xelse
X  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_objext" 1>&6
XOBJEXT=$ac_cv_objext
Xac_objext=$ac_cv_objext
X
Xecho $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Xecho "configure:1028: checking for Cygwin environment" >&5
Xif eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1033 "configure"
X#include "confdefs.h"
X
Xint main() {
X
X#ifndef __CYGWIN__
X#define __CYGWIN__ __CYGWIN32__
X#endif
Xreturn __CYGWIN__;
X; return 0; }
XEOF
Xif { (eval echo configure:1044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_cygwin=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_cygwin=no
Xfi
Xrm -f conftest*
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_cygwin" 1>&6
XCYGWIN=
Xtest "$ac_cv_cygwin" = yes && CYGWIN=yes
Xecho $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Xecho "configure:1061: checking for mingw32 environment" >&5
Xif eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1066 "configure"
X#include "confdefs.h"
X
Xint main() {
Xreturn __MINGW32__;
X; return 0; }
XEOF
Xif { (eval echo configure:1073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_mingw32=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_mingw32=no
Xfi
Xrm -f conftest*
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_mingw32" 1>&6
XMINGW32=
Xtest "$ac_cv_mingw32" = yes && MINGW32=yes
Xecho $ac_n "checking for EMX/OS2 environment""... $ac_c" 1>&6
Xecho "configure:1090: checking for EMX/OS2 environment" >&5
Xif eval "test \"`echo '$''{'ac_cv_emxos2'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1095 "configure"
X#include "confdefs.h"
X
Xint main() {
Xreturn __EMX__;
X; return 0; }
XEOF
Xif { (eval echo configure:1102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_emxos2=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_emxos2=no
Xfi
Xrm -f conftest*
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_emxos2" 1>&6
Xif eval "test \"`echo '$''{'ac_cv_libpre'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$ac_cv_emxos2" = yes ; then
X  ac_cv_libpre=
Xelse
X  ac_cv_libpre=lib
Xfi
X
Xfi
X
XEMXOS2=
Xtest "$ac_cv_emxos2" = yes && EMXOS2=yes
X
X
X
Xecho $ac_n "checking for executable suffix""... $ac_c" 1>&6
Xecho "configure:1133: checking for executable suffix" >&5
Xif eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
X  ac_cv_exeext=.exe
X  ac_cv_xexeext=""
Xelse
X  rm -f conftest*
X  echo 'int main () { return 0; }' > conftest.$ac_ext
X  ac_cv_exeext=
X  if { (eval echo configure:1144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
X    for file in conftest.*; do
X      case $file in
X      *.c | *.o | *.obj) ;;
X      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
X      esac
X    done
X  else
X    ccout=`eval "${CC-cc} 2>&1" 2> /dev/null`
X    ret=$?
X    nf=`echo "$ccout" | grep 'not found'`
X    if test $ret = 127 -a -n "$nf" ; then	# Korn Shell
X        ccout=""
X    fi
X    if test ! -n "$ccout" ; then
X        { echo "configure: error: installation or configuration problem: C compiler ${CC-cc} not found." 1>&2; exit 1; }
X    fi
X    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
X  fi
X  (./conftest ; exit) 2> /dev/null
X  if test $? != 0 ; then
X	ac_cv_xexeext="${ac_cv_exeext}"
X	(./conftest${ac_cv_xexeext} ; exit) 2> /dev/null
X	if test $? != 0 ; then
X		ac_cv_xexeext=""
X	fi
X  fi
X  rm -f conftest*
X  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
X  test x"${ac_cv_xexeext}" = x && ac_cv_xexeext=no
Xfi
Xfi
X
XEXEEXT=""
XXEXEEXT=""
Xtest x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
Xtest x"${ac_cv_xexeext}" != xno && XEXEEXT=${ac_cv_xexeext}
Xecho "$ac_t""${ac_cv_exeext}" 1>&6
Xecho $ac_n "checking for executable calling suffix""... $ac_c" 1>&6
Xecho "configure:1183: checking for executable calling suffix" >&5
Xecho "$ac_t""${ac_cv_xexeext}" 1>&6
Xac_exeext=$EXEEXT
Xac_xexeext=$XEXEEXT
X
X
X
Xecho $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Xecho "configure:1191: checking how to run the C preprocessor" >&5
X# On Suns, sometimes $CPP names a directory.
Xif test -n "$CPP" && test -d "$CPP"; then
X  CPP=
Xfi
Xif test -z "$CPP"; then
Xif eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X    # This must be in double quotes, not single quotes, because CPP may get
X  # substituted into the Makefile and "${CC-cc}" will confuse make.
X  CPP="${CC-cc} -E"
X  # On the NeXT, cc -E runs the code through the compiler's parser,
X  # not just through cpp.
X  cat > conftest.$ac_ext <<EOF
X#line 1206 "configure"
X#include "confdefs.h"
X#include <assert.h>
XSyntax Error
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  :
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  CPP="${CC-cc} -E -traditional-cpp"
X  cat > conftest.$ac_ext <<EOF
X#line 1223 "configure"
X#include "confdefs.h"
X#include <assert.h>
XSyntax Error
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:1229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  :
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  CPP="${CC-cc} -nologo -E"
X  cat > conftest.$ac_ext <<EOF
X#line 1240 "configure"
X#include "confdefs.h"
X#include <assert.h>
XSyntax Error
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:1246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  :
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  CPP=/lib/cpp
Xfi
Xrm -f conftest*
Xfi
Xrm -f conftest*
Xfi
Xrm -f conftest*
X  ac_cv_prog_CPP="$CPP"
Xfi
X  CPP="$ac_cv_prog_CPP"
Xelse
X  ac_cv_prog_CPP="$CPP"
Xfi
Xecho "$ac_t""$CPP" 1>&6
X
Xecho $ac_n "checking if suncc/cc supports -m64""... $ac_c" 1>&6
Xecho "configure:1271: checking if suncc/cc supports -m64" >&5
Xif eval "test \"`echo '$''{'ac_cv_sun_cc64_opt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xsun_cc64=cc
Xsun_cc64_opt=''
Xac_cv_sun_cc64_opt=no
Xif test "$GCC" != yes; then
X	if test "$CC" = suncc; then
X		sun_cc64=suncc
X	fi
X	ac_err=`< /dev/null eval $sun_cc64 -m64 -c 2>&1 | grep illegal`
X	if test -n "$ac_err"; then
X		ac_cv_sun_cc64_opt=no
X	else
X		ac_cv_sun_cc64_opt=yes
X	fi
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_sun_cc64_opt" 1>&6
Xif test $ac_cv_sun_cc64_opt = yes; then
X  sun_cc64_opt='-m64'
Xfi
Xecho $ac_n "checking if HP cc supports -Ae""... $ac_c" 1>&6
Xecho "configure:1298: checking if HP cc supports -Ae" >&5
Xif eval "test \"`echo '$''{'ac_cv_hp_cc_ansi_opt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xhp_cc=cc
Xhp_cc_ansi_opt=''
Xac_cv_hp_cc_ansi_opt=no
Xif test "$GCC" != yes; then
X	os_name=`(uname -s) 2> /dev/null`
X	if test ."$os_name" = .HP-UX ; then
X		ac_err=`< /dev/null eval $hp_cc -Ae -c 2>&1 | grep 'Bundled.*option is available only'`
X		if test -n "$ac_err"; then
X			ac_cv_hp_cc_ansi_opt=no
X		else
X			ac_cv_hp_cc_ansi_opt=yes
X		fi
X	fi
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_hp_cc_ansi_opt" 1>&6
Xif test $ac_cv_hp_cc_ansi_opt = yes; then
X  hp_cc_ansi_opt='-Ae'
Xfi
Xecho $ac_n "checking if HP cc supports -O""... $ac_c" 1>&6
Xecho "configure:1325: checking if HP cc supports -O" >&5
Xif eval "test \"`echo '$''{'ac_cv_hp_cc_opt_opt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xhp_cc=cc
Xhp_cc_opt_opt=''
Xac_cv_hp_cc_opt_opt=no
Xif test "$GCC" != yes; then
X	os_name=`(uname -s) 2> /dev/null`
X	if test ."$os_name" = .HP-UX ; then
X		ac_err=`< /dev/null eval $hp_cc -O -c 2>&1 | grep 'Bundled.*option is available only'`
X		if test -n "$ac_err"; then
X			ac_cv_hp_cc_opt_opt=no
X		else
X			ac_cv_hp_cc_opt_opt=yes
X		fi
X	fi
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_hp_cc_opt_opt" 1>&6
Xif test $ac_cv_hp_cc_opt_opt = yes; then
X  hp_cc_opt_opt='-O'
Xfi
Xecho $ac_n "checking if HP cc supports -G""... $ac_c" 1>&6
Xecho "configure:1352: checking if HP cc supports -G" >&5
Xif eval "test \"`echo '$''{'ac_cv_hp_cc_gprof_opt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xhp_cc=cc
Xhp_cc_gprof_opt=''
Xac_cv_hp_cc_gprof_opt=no
Xif test "$GCC" != yes; then
X	os_name=`(uname -s) 2> /dev/null`
X	if test ."$os_name" = .HP-UX ; then
X		ac_err=`< /dev/null eval $hp_cc -O -c 2>&1 | grep 'Bundled.*option is available only'`
X		if test -n "$ac_err"; then
X			ac_cv_hp_cc_gprof_opt=no
X		else
X			ac_cv_hp_cc_gprof_opt=yes
X		fi
X	fi
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_hp_cc_gprof_opt" 1>&6
Xif test $ac_cv_hp_cc_gprof_opt = yes; then
X  hp_cc_gprof_opt='-G'
Xfi
X# Extract the first word of "ranlib", so it can be a program name with args.
Xset dummy ranlib; ac_word=$2
Xecho $ac_n "checking for $ac_word""... $ac_c" 1>&6
Xecho "configure:1381: checking for $ac_word" >&5
Xif eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test -n "$RANLIB"; then
X  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
Xelse
X  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
X  ac_dummy="$PATH"
X  for ac_dir in $ac_dummy; do
X    test -z "$ac_dir" && ac_dir=.
X    if test -f $ac_dir/$ac_word; then
X      ac_cv_prog_RANLIB="ranlib"
X      break
X    fi
X  done
X  IFS="$ac_save_ifs"
X  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Xfi
Xfi
XRANLIB="$ac_cv_prog_RANLIB"
Xif test -n "$RANLIB"; then
X  echo "$ac_t""$RANLIB" 1>&6
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xecho $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
Xecho "configure:1409: checking whether ${MAKE-make} sets \${MAKE}" >&5
Xset dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftestmake <<\EOF
Xall:
X	@echo 'ac_maketemp="${MAKE}"'
XEOF
X# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
Xeval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
Xif test -n "$ac_maketemp"; then
X  eval ac_cv_prog_make_${ac_make}_set=yes
Xelse
X  eval ac_cv_prog_make_${ac_make}_set=no
Xfi
Xrm -f conftestmake
Xfi
Xif eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  SET_MAKE=
Xelse
X  echo "$ac_t""no" 1>&6
X  SET_MAKE="MAKE=${MAKE-make}"
Xfi
X
X
Xecho $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Xecho "configure:1437: checking for ANSI C header files" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1442 "configure"
X#include "confdefs.h"
X#include <stdlib.h>
X#include <stdarg.h>
X#include <string.h>
X#include <float.h>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:1450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  ac_cv_header_stdc=yes
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_stdc=no
Xfi
Xrm -f conftest*
X
Xif test $ac_cv_header_stdc = yes; then
X  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Xcat > conftest.$ac_ext <<EOF
X#line 1467 "configure"
X#include "confdefs.h"
X#include <string.h>
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "memchr" >/dev/null 2>&1; then
X  :
Xelse
X  rm -rf conftest*
X  ac_cv_header_stdc=no
Xfi
Xrm -f conftest*
X
Xfi
X
Xif test $ac_cv_header_stdc = yes; then
X  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Xcat > conftest.$ac_ext <<EOF
X#line 1485 "configure"
X#include "confdefs.h"
X#include <stdlib.h>
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "free" >/dev/null 2>&1; then
X  :
Xelse
X  rm -rf conftest*
X  ac_cv_header_stdc=no
Xfi
Xrm -f conftest*
X
Xfi
X
Xif test $ac_cv_header_stdc = yes; then
X  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Xif test "$cross_compiling" = yes; then
X  :
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1506 "configure"
X#include "confdefs.h"
X#include <ctype.h>
X#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
X#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
X#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Xint main () { int i; for (i = 0; i < 256; i++)
Xif (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
Xexit (0); }
X
XEOF
Xif { (eval echo configure:1517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  :
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_header_stdc=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xfi
X
Xecho "$ac_t""$ac_cv_header_stdc" 1>&6
Xif test $ac_cv_header_stdc = yes; then
X  cat >> confdefs.h <<\EOF
X#define STDC_HEADERS 1
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define HAVE_STDARG_H 1
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define HAVE_STDLIB_H 1
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define HAVE_STRING_H 1
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define HAVE_FLOAT_H 1
XEOF
X
Xfi
X
Xfor ac_hdr in stdarg.h stdlib.h string.h float.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:1560: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1565 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:1570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X	echo $ac_n "checking for UNIX-98 compliant inttypes.h""... $ac_c" 1>&6
Xecho "configure:1596: checking for UNIX-98 compliant inttypes.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_inttypes'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1601 "configure"
X#include "confdefs.h"
X#include <inttypes.h>
Xint main() {
Xint8_t c; uint8_t uc; int16_t s; uint16_t us; int32_t i; uint32_t ui;
Xint64_t ll; uint64_t ull;
Xintptr_t ip; uintptr_t uip;
X; return 0; }
XEOF
Xif { (eval echo configure:1610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_inttypes=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_inttypes=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_header_inttypes" 1>&6
Xif test $ac_cv_header_inttypes = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_INTTYPES_H 1
XEOF
X
Xfi
Xecho $ac_n "checking for SUSv3 compliant stdint.h""... $ac_c" 1>&6
Xecho "configure:1630: checking for SUSv3 compliant stdint.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_stdint'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1635 "configure"
X#include "confdefs.h"
X#include <stdint.h>
Xint main() {
Xint8_t c; uint8_t uc; int16_t s; uint16_t us; int32_t i; uint32_t ui;
Xint64_t ll; uint64_t ull;
Xintptr_t ip; uintptr_t uip;
Xintmax_t im; uintmax_t uim;
X; return 0; }
XEOF
Xif { (eval echo configure:1645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_stdint=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_stdint=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_header_stdint" 1>&6
Xif test $ac_cv_header_stdint = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_STDINT_H 1
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define HAVE_TYPE_INTMAX_T 1
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define HAVE_TYPE_UINTMAX_T 1
XEOF
X
Xfi
Xac_xsave_LIBS="$LIBS"
XLIBS=""
Xac_header_dirent=no
Xfor ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Xecho "configure:1679: checking for $ac_hdr that defines DIR" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1684 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <$ac_hdr>
Xint main() {
XDIR *dirp = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:1692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  eval "ac_cv_header_dirent_$ac_safe=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_dirent_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X ac_header_dirent=$ac_hdr; break
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
Xif test $ac_header_dirent = dirent.h; then
Xecho $ac_n "checking for opendir in -lc""... $ac_c" 1>&6
Xecho "configure:1717: checking for opendir in -lc" >&5
Xac_lib_var=`echo c'_'opendir | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lc  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 1725 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar opendir();
X
Xint main() {
Xopendir()
X; return 0; }
XEOF
Xif { (eval echo configure:1736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  :
Xelse
X  echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Xecho "configure:1755: checking for opendir in -ldir" >&5
Xac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-ldir  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 1763 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar opendir();
X
Xint main() {
Xopendir()
X; return 0; }
XEOF
Xif { (eval echo configure:1774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  LIBS="$LIBS -ldir"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
Xelse
Xecho $ac_n "checking for opendir in -lc""... $ac_c" 1>&6
Xecho "configure:1798: checking for opendir in -lc" >&5
Xac_lib_var=`echo c'_'opendir | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lc  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 1806 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar opendir();
X
Xint main() {
Xopendir()
X; return 0; }
XEOF
Xif { (eval echo configure:1817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  :
Xelse
X  echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Xecho "configure:1836: checking for opendir in -lx" >&5
Xac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lx  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 1844 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar opendir();
X
Xint main() {
Xopendir()
X; return 0; }
XEOF
Xif { (eval echo configure:1855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  LIBS="$LIBS -lx"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
Xfi
X
Xlib_dir="$LIBS"
XLIBS="$ac_xsave_LIBS"
Xecho $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
Xecho "configure:1882: checking whether stat file-mode macros are broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1887 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
X
X#if defined(S_ISBLK) && defined(S_IFDIR)
X# if S_ISBLK (S_IFDIR)
XYou lose.
X# endif
X#endif
X
X#if defined(S_ISBLK) && defined(S_IFCHR)
X# if S_ISBLK (S_IFCHR)
XYou lose.
X# endif
X#endif
X
X#if defined(S_ISLNK) && defined(S_IFREG)
X# if S_ISLNK (S_IFREG)
XYou lose.
X# endif
X#endif
X
X#if defined(S_ISSOCK) && defined(S_IFREG)
X# if S_ISSOCK (S_IFREG)
XYou lose.
X# endif
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "You lose" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_header_stat_broken=yes
Xelse
X  rm -rf conftest*
X  ac_cv_header_stat_broken=no
Xfi
Xrm -f conftest*
X
Xfi
X
Xecho "$ac_t""$ac_cv_header_stat_broken" 1>&6
Xif test $ac_cv_header_stat_broken = yes; then
X  cat >> confdefs.h <<\EOF
X#define STAT_MACROS_BROKEN 1
XEOF
X
Xfi
X
Xecho $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Xecho "configure:1938: checking whether time.h and sys/time.h may both be included" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1943 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/time.h>
X#include <time.h>
Xint main() {
Xstruct tm *tp;
X; return 0; }
XEOF
Xif { (eval echo configure:1952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_time=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_time=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_header_time" 1>&6
Xif test $ac_cv_header_time = yes; then
X  cat >> confdefs.h <<\EOF
X#define TIME_WITH_SYS_TIME 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
Xecho "configure:1973: checking for sys/wait.h that is POSIX.1 compatible" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1978 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/wait.h>
X#ifndef WEXITSTATUS
X#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
X#endif
X#ifndef WIFEXITED
X#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
X#endif
Xint main() {
Xint s;
Xwait (&s);
Xs = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
X; return 0; }
XEOF
Xif { (eval echo configure:1994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_sys_wait_h=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_sys_wait_h=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
Xif test $ac_cv_header_sys_wait_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SYS_WAIT_H 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if select needs nonstd include files""... $ac_c" 1>&6
Xecho "configure:2015: checking if select needs nonstd include files" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_slect_nonstd_hdr'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2020 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/time.h>
Xint main() {
Xfd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);
X; return 0; }
XEOF
Xif { (eval echo configure:2028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_slect_nonstd_hdr=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_slect_nonstd_hdr=yes
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_header_slect_nonstd_hdr" 1>&6
Xif test $ac_cv_header_slect_nonstd_hdr = yes; then
X  cat >> confdefs.h <<\EOF
X#define SELECT_NONSTD_HDR 1
XEOF
X
Xfi
Xecho $ac_n "checking if sys/select.h is needed for select""... $ac_c" 1>&6
Xecho "configure:2048: checking if sys/select.h is needed for select" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_need_sys_select_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2053 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/time.h>
X#include <sys/select.h>
X#ifndef	SELECT_NONSTD_HDR
Xdo not compile if we do not need nonstandard headers
X#endif
Xint main() {
Xfd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);
X; return 0; }
XEOF
Xif { (eval echo configure:2065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_need_sys_select_h=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_need_sys_select_h=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_header_need_sys_select_h" 1>&6
Xif test $ac_cv_header_need_sys_select_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define NEED_SYS_SELECT_H 1
XEOF
X
Xfi
Xecho $ac_n "checking if sys/socket.h is needed for select""... $ac_c" 1>&6
Xecho "configure:2085: checking if sys/socket.h is needed for select" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_need_sys_socket_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2090 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/time.h>
X#include <sys/socket.h>
X#ifndef	SELECT_NONSTD_HDR
Xdo not compile if we do not need nonstandard headers
X#endif
Xint main() {
Xfd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);
X; return 0; }
XEOF
Xif { (eval echo configure:2102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_need_sys_socket_h=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_need_sys_socket_h=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_header_need_sys_socket_h" 1>&6
Xif test $ac_cv_header_need_sys_socket_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define NEED_SYS_SOCKET_H 1
XEOF
X
Xfi
Xfor ac_hdr in assert.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2125: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2130 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in stdio.h varargs.h stdarg.h stdlib.h stddef.h string.h strings.h unistd.h fcntl.h sys/file.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2165: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2170 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in getopt.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2205: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2210 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in limits.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2245: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2250 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in a.out.h aouthdr.h elf.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2285: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2290 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sysexits.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2325: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2330 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in malloc.h sgtty.h termios.h termio.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2365: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2370 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in pwd.h grp.h sys/acl.h acllib.h acl/libacl.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2405: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2410 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in signal.h siginfo.h sys/siginfo.h ucontext.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2445: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2450 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in shadow.h syslog.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2485: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2490 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/time.h sys/times.h utime.h sys/utime.h sys/ioctl.h sys/filio.h sys/param.h sys/systeminfo.h sys/sysctl.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2525: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2530 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/syscall.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2565: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2570 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in mach/machine.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2605: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2610 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in mntent.h sys/mntent.h sys/mnttab.h sys/mount.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2645: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2650 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/fork.h vfork.h wait.h sys/wait.h sys/resource.h procfs.h sys/procfs.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2685: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2690 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/utsname.h sys/priocntl.h sys/rtpriocntl.h sys/procset.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2725: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2730 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/mtio.h sys/tape.h sys/mman.h linux/pg.h camlib.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2765: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2770 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/shm.h sys/sem.h sys/ipc.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2805: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2810 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/dkio.h sys/dklabel.h sun/dkio.h sun/dklabel.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2845: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2850 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/types.h sys/stat.h types.h stat.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2885: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2890 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/stypes.h sys/filedesc.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2925: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2930 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/acct.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2965: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2970 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in poll.h sys/poll.h sys/select.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3005: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3010 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in netdb.h sys/socket.h netinet/in.h stropts.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3045: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3050 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in ieeefp.h fp.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3085: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3090 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in values.h float.h math.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3125: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3130 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in arpa/inet.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3165: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3170 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in bsd/dev/scsireg.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3205: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3210 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/bsdtty.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3245: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3250 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in linux/types.h linux/gfp.h asm/types.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3285: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3290 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in OS.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3325: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3330 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in os2.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3365: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3370 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in os2me.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3405: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3410 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in windows.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3445: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3450 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in ext2fs/ext2_fs.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3485: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3490 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in attr/xattr.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3525: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3530 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in crt_externs.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3565: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3570 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in fnmatch.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3605: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3610 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in libintl.h locale.h langinfo.h nl_types.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3645: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3650 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in ctype.h wctype.h wchar.h iconv.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3685: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3690 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in priv.h sys/priv.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3725: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3730 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in exec_attr.h secdb.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3765: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3770 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in direct.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3805: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3810 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in pthread.h thread.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3845: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3850 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in libgen.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3885: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3890 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in dlfcn.h link.h dl.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3925: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3930 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X
Xecho $ac_n "checking for header file containing  major(), minor() and makedev()""... $ac_c" 1>&6
Xecho "configure:3963: checking for header file containing  major(), minor() and makedev()" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_makedev'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_cv_header_makedev=none
Xcat > conftest.$ac_ext <<EOF
X#line 3969 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mkdev.h>
Xint main() {
Xint i = major(0); i = minor(0); i = makedev(0,0);
X; return 0; }
XEOF
Xif { (eval echo configure:3977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_makedev=sys/mkdev.h
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
Xif test $ac_cv_header_makedev = none; then
X  cat > conftest.$ac_ext <<EOF
X#line 3987 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/sysmacros.h>
Xint main() {
Xint i = major(0); i = minor(0); i = makedev(0,0);
X; return 0; }
XEOF
Xif { (eval echo configure:3995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_makedev=sys/sysmacros.h
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
Xfi
Xfi
X
Xecho "$ac_t""$ac_cv_header_makedev" 1>&6
Xif test $ac_cv_header_makedev = sys/mkdev.h; then
X  cat >> confdefs.h <<\EOF
X#define MAJOR_IN_MKDEV 1
XEOF
X
Xfi
Xif test $ac_cv_header_makedev = sys/sysmacros.h; then
X  cat >> confdefs.h <<\EOF
X#define MAJOR_IN_SYSMACROS 1
XEOF
X
Xfi
X
X
Xecho $ac_n "checking bits in minor device number""... $ac_c" 1>&6
Xecho "configure:4022: checking bits in minor device number" >&5
Xif eval "test \"`echo '$''{'ac_cv_dev_minor_bits'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4030 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#include <sys/types.h>
X#ifdef major
X#	define _FOUND_MAJOR_
X#endif
X
X#ifdef MAJOR_IN_MKDEV
X#	include <sys/mkdev.h>
X#	define _FOUND_MAJOR_
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	ifdef MAJOR_IN_SYSMACROS
X#		include <sys/sysmacros.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	if defined(hpux) || defined(__hpux__) || defined(__hpux)
X#		include <sys/mknod.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	define major(dev)		(((dev) >> 8) & 0xFF)
X#	define minor(dev)		((dev) & 0xFF)
X#	define makedev(majo, mino)	(((majo) << 8) | (mino))
X#endif
Xint
Xmain()
X{
X	long	l = 1;
X	int	i;
X	int	m;
X	int	c = 0;
X	FILE	*f=fopen("conftestval", "w");
X	int	maxloop = 32;
X
X	if (sizeof (long) > 4)
X		maxloop = 64;
X
X	if (!f) exit(1);
X
X	for (i=1, m=0; i <= maxloop; i++, l<<=1) {
X		if (minor(l) == 0 && c == 0)
X			c = m;
X		if (minor(l) != 0)
X			m = i;
X	}
X	fprintf(f, "%d\n", m);
X	exit(0);
X}
XEOF
Xif { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_dev_minor_bits=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_dev_minor_bits=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_dev_minor_bits" 1>&6
Xcat >> confdefs.h <<EOF
X#define DEV_MINOR_BITS $ac_cv_dev_minor_bits
XEOF
X
X
Xecho $ac_n "checking whether bits in minor device numbers are non contiguous""... $ac_c" 1>&6
Xecho "configure:4107: checking whether bits in minor device numbers are non contiguous" >&5
Xif eval "test \"`echo '$''{'ac_cv_dev_minor_noncontig'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4115 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#ifdef major
X#	define _FOUND_MAJOR_
X#endif
X
X#ifdef MAJOR_IN_MKDEV
X#	include <sys/mkdev.h>
X#	define _FOUND_MAJOR_
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	ifdef MAJOR_IN_SYSMACROS
X#		include <sys/sysmacros.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	if defined(hpux) || defined(__hpux__) || defined(__hpux)
X#		include <sys/mknod.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	define major(dev)		(((dev) >> 8) & 0xFF)
X#	define minor(dev)		((dev) & 0xFF)
X#	define makedev(majo, mino)	(((majo) << 8) | (mino))
X#endif
Xint
Xmain()
X{
X	long	l = 1;
X	int	i;
X	int	m;
X	int	c = 0;
X	int	maxloop = 32;
X
X	if (sizeof (long) > 4)
X		maxloop = 64;
X
X	for (i=1, m=0; i <= maxloop; i++, l<<=1) {
X		if (minor(l) == 0 && c == 0)
X			c = m;
X		if (minor(l) != 0)
X			m = i;
X	}
Xexit (m == c);}
XEOF
Xif { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_dev_minor_noncontig=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_dev_minor_noncontig=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_dev_minor_noncontig" 1>&6
Xif test $ac_cv_dev_minor_noncontig = yes; then
X  cat >> confdefs.h <<\EOF
X#define DEV_MINOR_NONCONTIG 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for _filbuf()""... $ac_c" 1>&6
Xecho "configure:4190: checking for _filbuf()" >&5
Xif eval "test \"`echo '$''{'ac_cv_func__filbuf'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4195 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xint main() {
XFILE    *f;
Xint     flag;
Xint     count;
Xchar    *ptr;
Xchar	c = 0;
Xf = fopen("confdefs.h", "r");
X_filbuf(f);
X_flsbuf(c, f);
Xflag  = f->_flag & _IONBF;
Xflag |= f->_flag & _IOERR;
Xflag |= f->_flag & _IOEOF;
Xcount = f->_cnt;
Xptr = (char *)f->_ptr;
Xfclose(f);
X; return 0; }
XEOF
Xif { (eval echo configure:4215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func__filbuf=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func__filbuf=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_func__filbuf" 1>&6
Xif test $ac_cv_func__filbuf = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE__FILBUF 1
XEOF
X
Xfi
Xecho $ac_n "checking for __filbuf()""... $ac_c" 1>&6
Xecho "configure:4235: checking for __filbuf()" >&5
Xif eval "test \"`echo '$''{'ac_cv_func___filbuf'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4240 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xint main() {
XFILE    *f;
Xint     flag;
Xint     count;
Xchar    *ptr;
Xchar	c = 0;
Xf = fopen("confdefs.h", "r");
X__filbuf(f);
X__flsbuf(c, f);
Xflag  = f->_flag & _IONBF;
Xflag |= f->_flag & _IOERR;
Xflag |= f->_flag & _IOEOF;
Xcount = f->_cnt;
Xptr = (char *)f->_ptr;
Xfclose(f);
X; return 0; }
XEOF
Xif { (eval echo configure:4260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func___filbuf=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func___filbuf=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_func___filbuf" 1>&6
Xif test $ac_cv_func___filbuf = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE___FILBUF 1
XEOF
X
Xfi
Xecho $ac_n "checking for USG derived STDIO""... $ac_c" 1>&6
Xecho "configure:4280: checking for USG derived STDIO" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_usg_stdio'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4285 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xint main() {
XFILE    *f;
Xint     flag;
Xint     count;
Xchar    *ptr;
Xchar	c = 0;
Xf = fopen("confdefs.h", "r");
X#ifdef	HAVE___FILBUF
X__filbuf(f);
X__flsbuf(c, f);
X#else
X#	ifdef	HAVE__FILBUF
X_filbuf(f);
X_flsbuf(c, f);
X#	else
Xno filbuf()
X#	endif
X#endif
Xflag  = f->_flag & _IONBF;
Xflag |= f->_flag & _IOERR;
Xflag |= f->_flag & _IOEOF;
Xcount = f->_cnt;
Xptr = (char *)f->_ptr;
Xfclose(f);
X; return 0; }
XEOF
Xif { (eval echo configure:4314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_header_usg_stdio=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_usg_stdio=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_header_usg_stdio" 1>&6
Xif test $ac_cv_header_usg_stdio = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_USG_STDIO 1
XEOF
X
Xfi
Xecho $ac_n "checking for errno definition in errno.h""... $ac_c" 1>&6
Xecho "configure:4334: checking for errno definition in errno.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_errno_def'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4339 "configure"
X#include "confdefs.h"
X#include <errno.h>
Xint main() {
Xerrno = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:4346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_errno_def=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_errno_def=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_header_errno_def" 1>&6
Xif test $ac_cv_header_errno_def = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ERRNO_DEF 1
XEOF
X
Xfi
Xecho $ac_n "checking for environ definition in unistd.h/stdlib.h""... $ac_c" 1>&6
Xecho "configure:4366: checking for environ definition in unistd.h/stdlib.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_environ_def'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4371 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_UNISTD_H
X#include <unistd.h>
X#else
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>	/* MSC no unistd.h but environ in stdlib.h */
X#endif
X#endif
X
Xint main() {
Xenviron = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:4386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_environ_def=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_environ_def=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_header_environ_def" 1>&6
Xif test $ac_cv_header_environ_def = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ENVIRON_DEF 1
XEOF
X
Xfi
Xecho $ac_n "checking for sys_siglist definition in signal.h""... $ac_c" 1>&6
Xecho "configure:4406: checking for sys_siglist definition in signal.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_sys_siglist_def'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4411 "configure"
X#include "confdefs.h"
X#include <signal.h>
Xint main() {
Xchar *cp = (char *)sys_siglist[0];
X; return 0; }
XEOF
Xif { (eval echo configure:4418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_sys_siglist_def=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_sys_siglist_def=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_header_sys_siglist_def" 1>&6
Xif test $ac_cv_header_sys_siglist_def = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SYS_SIGLIST_DEF 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for working const""... $ac_c" 1>&6
Xecho "configure:4439: checking for working const" >&5
Xif eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4444 "configure"
X#include "confdefs.h"
X
Xint main() {
X
X/* Ultrix mips cc rejects this.  */
Xtypedef int charset[2]; const charset x;
X/* SunOS 4.1.1 cc rejects this.  */
Xchar const *const *ccp;
Xchar **p;
X/* NEC SVR4.0.2 mips cc rejects this.  */
Xstruct point {int x, y;};
Xstatic struct point const zero = {0,0};
X/* AIX XL C 1.02.0.0 rejects this.
X   It does not let you subtract one const X* pointer from another in an arm
X   of an if-expression whose if-part is not a constant expression */
Xconst char *g = "string";
Xccp = &g + (g ? g-g : 0);
X/* HPUX 7.0 cc rejects these. */
X++ccp;
Xp = (char**) ccp;
Xccp = (char const *const *) p;
X{ /* SCO 3.2v4 cc rejects this.  */
X  char *t;
X  char const *s = 0 ? (char *) 0 : (char const *) 0;
X
X  *t++ = 0;
X}
X{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
X  int x[] = {25, 17};
X  const int *foo = &x[0];
X  ++foo;
X}
X{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
X  typedef const int *iptr;
X  iptr p = 0;
X  ++p;
X}
X{ /* AIX XL C 1.02.0.0 rejects this saying
X     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
X  struct s { int j; const int *ap[3]; };
X  struct s *b; b->j = 5;
X}
X{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
X  const int foo = 10;
X}
X
X; return 0; }
XEOF
Xif { (eval echo configure:4493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_c_const=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_c_const=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_c_const" 1>&6
Xif test $ac_cv_c_const = no; then
X  cat >> confdefs.h <<\EOF
X#define const 
XEOF
X
Xfi
X
Xecho $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Xecho "configure:4514: checking whether byte ordering is bigendian" >&5
Xif eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_cv_c_bigendian=unknown
X# See if sys/param.h defines the BYTE_ORDER macro.
Xcat > conftest.$ac_ext <<EOF
X#line 4521 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/param.h>
Xint main() {
X
X#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
X bogus endian macros
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:4532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  # It does; now see whether it defined to BIG_ENDIAN or not.
Xcat > conftest.$ac_ext <<EOF
X#line 4536 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/param.h>
Xint main() {
X
X#if BYTE_ORDER != BIG_ENDIAN
X not big endian
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:4547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_c_bigendian=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_c_bigendian=no
Xfi
Xrm -f conftest*
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
Xif test $ac_cv_c_bigendian = unknown; then
Xif test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4567 "configure"
X#include "confdefs.h"
Xmain () {
X  /* Are we little or big endian?  From Harbison&Steele.  */
X  union
X  {
X    long l;
X    char c[sizeof (long)];
X  } u;
X  u.l = 1;
X  exit (u.c[sizeof (long) - 1] == 1);
X}
XEOF
Xif { (eval echo configure:4580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_c_bigendian=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_c_bigendian=yes
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xfi
X
Xecho "$ac_t""$ac_cv_c_bigendian" 1>&6
Xif test $ac_cv_c_bigendian = yes; then
X  cat >> confdefs.h <<\EOF
X#define WORDS_BIGENDIAN 1
XEOF
X
Xfi
X
Xecho $ac_n "checking whether bitorder in bitfields is htol""... $ac_c" 1>&6
Xecho "configure:4604: checking whether bitorder in bitfields is htol" >&5
Xif eval "test \"`echo '$''{'ac_cv_c_bitfields_htol'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4612 "configure"
X#include "confdefs.h"
X
Xstruct {
X	unsigned char	x1:4;
X	unsigned char	x2:4;
X} a;
Xint
Xmain()
X{
Xchar	*cp;
X
Xcp = (char *)&a;
X*cp = 0x12;
Xexit(a.x1 == 2);}
XEOF
Xif { (eval echo configure:4628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_c_bitfields_htol=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_c_bitfields_htol=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_c_bitfields_htol" 1>&6
Xif test $ac_cv_c_bitfields_htol = yes; then
X  cat >> confdefs.h <<\EOF
X#define BITFIELDS_HTOL 1
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
Xecho "configure:4652: checking for preprocessor stringizing operator" >&5
Xif eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4657 "configure"
X#include "confdefs.h"
X
X#define x(y) #y
X
Xchar *s = x(teststring);
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "#teststring" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_c_stringize=no
Xelse
X  rm -rf conftest*
X  ac_cv_c_stringize=yes
Xfi
Xrm -f conftest*
X
Xfi
X
Xif test "${ac_cv_c_stringize}" = yes
Xthen
X        cat >> confdefs.h <<\EOF
X#define HAVE_STRINGIZE 1
XEOF
X
Xfi
Xecho "$ac_t""${ac_cv_c_stringize}" 1>&6
X
Xecho $ac_n "checking for inline""... $ac_c" 1>&6
Xecho "configure:4687: checking for inline" >&5
Xif eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_cv_c_inline=no
Xfor ac_kw in inline __inline__ __inline; do
X  cat > conftest.$ac_ext <<EOF
X#line 4694 "configure"
X#include "confdefs.h"
X
Xint main() {
X} $ac_kw foo() {
X; return 0; }
XEOF
Xif { (eval echo configure:4701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_c_inline=$ac_kw; break
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
Xdone
X
Xfi
X
Xecho "$ac_t""$ac_cv_c_inline" 1>&6
Xcase "$ac_cv_c_inline" in
X  inline | yes)
X	cat >> confdefs.h <<\EOF
X#define HAVE_INLINE 1
XEOF
X
X	;;
X  no)	cat >> confdefs.h <<\EOF
X#define inline 
XEOF
X
X	;;
X  *)	cat >> confdefs.h <<EOF
X#define inline $ac_cv_c_inline
XEOF
X
X	cat >> confdefs.h <<\EOF
X#define HAVE_INLINE 1
XEOF
X
X	;;
Xesac
X
Xecho $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Xecho "configure:4738: checking return type of signal handlers" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4743 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <signal.h>
X#ifdef signal
X#undef signal
X#endif
X#ifdef __cplusplus
Xextern "C" void (*signal (int, void (*)(int)))(int);
X#else
Xvoid (*signal ()) ();
X#endif
X
Xint main() {
Xint i;
X; return 0; }
XEOF
Xif { (eval echo configure:4760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_type_signal=void
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_type_signal=int
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_type_signal" 1>&6
Xcat >> confdefs.h <<EOF
X#define RETSIGTYPE $ac_cv_type_signal
XEOF
X
X
Xecho $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Xecho "configure:4779: checking for uid_t in sys/types.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4784 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "uid_t" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_uid_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_uid_t=no
Xfi
Xrm -f conftest*
X
Xfi
X
Xecho "$ac_t""$ac_cv_type_uid_t" 1>&6
Xif test $ac_cv_type_uid_t = no; then
X  cat >> confdefs.h <<\EOF
X#define uid_t int
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define gid_t int
XEOF
X
Xfi
X
Xecho $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
Xecho "configure:4813: checking type of array argument to getgroups" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_type_getgroups=cross
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4821 "configure"
X#include "confdefs.h"
X
X/* Thanks to Mike Rendell for this test.  */
X#include <sys/types.h>
X#define NGID 256
X#undef MAX
X#define MAX(x, y) ((x) > (y) ? (x) : (y))
Xmain()
X{
X  gid_t gidset[NGID];
X  int i, n;
X  union { gid_t gval; long lval; }  val;
X
X  val.lval = -1;
X  for (i = 0; i < NGID; i++)
X    gidset[i] = val.gval;
X  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
X                 gidset);
X  /* Exit non-zero if getgroups seems to require an array of ints.  This
X     happens when gid_t is short but getgroups modifies an array of ints.  */
X  exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
X}
X
XEOF
Xif { (eval echo configure:4846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X    ac_cv_type_getgroups=gid_t
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_type_getgroups=int
Xfi
Xrm -fr conftest*
Xfi
X
Xif test $ac_cv_type_getgroups = cross; then
X        cat > conftest.$ac_ext <<EOF
X#line 4860 "configure"
X#include "confdefs.h"
X#include <unistd.h>
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_getgroups=gid_t
Xelse
X  rm -rf conftest*
X  ac_cv_type_getgroups=int
Xfi
Xrm -f conftest*
X
Xfi
Xfi
X
Xecho "$ac_t""$ac_cv_type_getgroups" 1>&6
Xcat >> confdefs.h <<EOF
X#define GETGROUPS_T $ac_cv_type_getgroups
XEOF
X
X
Xecho $ac_n "checking for type long long""... $ac_c" 1>&6
Xecho "configure:4884: checking for type long long" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_longlong'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4889 "configure"
X#include "confdefs.h"
X
Xint main() {
Xlong long i;
X; return 0; }
XEOF
Xif { (eval echo configure:4896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_type_longlong=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_type_longlong=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_type_longlong" 1>&6
Xif test $ac_cv_type_longlong = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_LONGLONG 1
XEOF
X
Xfi
Xecho $ac_n "checking for type __int64""... $ac_c" 1>&6
Xecho "configure:4916: checking for type __int64" >&5
Xif eval "test \"`echo '$''{'ac_cv_type___int64'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4921 "configure"
X#include "confdefs.h"
X
Xint main() {
X__int64 i;
X; return 0; }
XEOF
Xif { (eval echo configure:4928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_type___int64=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_type___int64=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_type___int64" 1>&6
Xif test $ac_cv_type___int64 = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE___INT64 1
XEOF
X
Xfi
Xecho $ac_n "checking for type long double""... $ac_c" 1>&6
Xecho "configure:4948: checking for type long double" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_longdouble'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4953 "configure"
X#include "confdefs.h"
X
Xint main() {
Xlong double ld;
X; return 0; }
XEOF
Xif { (eval echo configure:4960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_type_longdouble=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_type_longdouble=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_type_longdouble" 1>&6
Xif test $ac_cv_type_longdouble = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_LONGDOUBLE 1
XEOF
X
Xfi
Xecho $ac_n "checking for prototypes""... $ac_c" 1>&6
Xecho "configure:4980: checking for prototypes" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_prototypes'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4988 "configure"
X#include "confdefs.h"
X
Xdoit(int i, ...)
X{return 0;}
Xint
Xmain(int ac, char *av[])
X{ doit(1, 2, 3);
Xexit(0);}
XEOF
Xif { (eval echo configure:4998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_type_prototypes=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_type_prototypes=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_type_prototypes" 1>&6
Xif test $ac_cv_type_prototypes = yes; then
X  cat >> confdefs.h <<\EOF
X#define PROTOTYPES 1
XEOF
X
Xfi
Xecho $ac_n "checking if compiler allows dynamic arrays""... $ac_c" 1>&6
Xecho "configure:5020: checking if compiler allows dynamic arrays" >&5
Xif eval "test \"`echo '$''{'ac_cv_dyn_arrays'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5025 "configure"
X#include "confdefs.h"
X
Xint main() {
Xextern int __aa(); int len = __aa(); char some_array[len];
X; return 0; }
XEOF
Xif { (eval echo configure:5032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_dyn_arrays=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_dyn_arrays=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_dyn_arrays" 1>&6
Xif test $ac_cv_dyn_arrays = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_DYN_ARRAYS 1
XEOF
X
Xfi
Xecho $ac_n "checking if compiler allows pragma weak""... $ac_c" 1>&6
Xecho "configure:5052: checking if compiler allows pragma weak" >&5
Xif eval "test \"`echo '$''{'ac_cv_pragma_weak'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5057 "configure"
X#include "confdefs.h"
X#pragma weak test2 = test1
Xint test1() {return 0;}
Xint main() {
Xreturn test2();
X; return 0; }
XEOF
Xif { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_pragma_weak=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_pragma_weak=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_pragma_weak" 1>&6
Xif test $ac_cv_pragma_weak = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_PRAGMA_WEAK 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Xecho "configure:5086: checking for uid_t in sys/types.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5091 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "uid_t" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_uid_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_uid_t=no
Xfi
Xrm -f conftest*
X
Xfi
X
Xecho "$ac_t""$ac_cv_type_uid_t" 1>&6
Xif test $ac_cv_type_uid_t = no; then
X  cat >> confdefs.h <<\EOF
X#define uid_t int
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define gid_t int
XEOF
X
Xfi
X
Xecho $ac_n "checking for size_t""... $ac_c" 1>&6
Xecho "configure:5120: checking for size_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5125 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_size_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_size_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_size_t" 1>&6
Xif test $ac_cv_type_size_t = no; then
X  cat >> confdefs.h <<\EOF
X#define size_t unsigned
XEOF
X
Xfi
X
Xecho $ac_n "checking for ssize_t""... $ac_c" 1>&6
Xecho "configure:5155: checking for ssize_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5160 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_ssize_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_ssize_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_ssize_t" 1>&6
Xif test $ac_cv_type_ssize_t = no; then
X  cat >> confdefs.h <<\EOF
X#define ssize_t int
XEOF
X
Xfi
X
Xecho $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
Xecho "configure:5190: checking for ptrdiff_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_ptrdiff_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5195 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])ptrdiff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_ptrdiff_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_ptrdiff_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_ptrdiff_t" 1>&6
Xif test $ac_cv_type_ptrdiff_t = no; then
X  cat >> confdefs.h <<\EOF
X#define ptrdiff_t int
XEOF
X
Xfi
X
Xecho $ac_n "checking for pid_t""... $ac_c" 1>&6
Xecho "configure:5225: checking for pid_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5230 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_pid_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_pid_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_pid_t" 1>&6
Xif test $ac_cv_type_pid_t = no; then
X  cat >> confdefs.h <<\EOF
X#define pid_t int
XEOF
X
Xfi
X
Xecho $ac_n "checking for off_t""... $ac_c" 1>&6
Xecho "configure:5260: checking for off_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5265 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_off_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_off_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_off_t" 1>&6
Xif test $ac_cv_type_off_t = no; then
X  cat >> confdefs.h <<\EOF
X#define off_t long
XEOF
X
Xfi
X
Xecho $ac_n "checking for mode_t""... $ac_c" 1>&6
Xecho "configure:5295: checking for mode_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5300 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_mode_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_mode_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_mode_t" 1>&6
Xif test $ac_cv_type_mode_t = no; then
X  cat >> confdefs.h <<\EOF
X#define mode_t int
XEOF
X
Xfi
X
Xecho $ac_n "checking for time_t""... $ac_c" 1>&6
Xecho "configure:5330: checking for time_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5335 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif
Xint main() {
Xtime_t t;
X; return 0; }
XEOF
Xif { (eval echo configure:5353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_type_time_t=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_type_time_t=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_type_time_t" 1>&6
Xif test $ac_cv_type_time_t = no; then
X  cat >> confdefs.h <<\EOF
X#define time_t long
XEOF
X
Xfi
Xecho $ac_n "checking for caddr_t""... $ac_c" 1>&6
Xecho "configure:5373: checking for caddr_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_caddr_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5378 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_caddr_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_caddr_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_caddr_t" 1>&6
Xif test $ac_cv_type_caddr_t = no; then
X  cat >> confdefs.h <<\EOF
X#define caddr_t char *
XEOF
X
Xfi
X
Xecho $ac_n "checking for daddr_t""... $ac_c" 1>&6
Xecho "configure:5408: checking for daddr_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_daddr_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5413 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])daddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_daddr_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_daddr_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_daddr_t" 1>&6
Xif test $ac_cv_type_daddr_t = no; then
X  cat >> confdefs.h <<\EOF
X#define daddr_t long
XEOF
X
Xfi
X
Xecho $ac_n "checking for dev_t""... $ac_c" 1>&6
Xecho "configure:5443: checking for dev_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5448 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_dev_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_dev_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_dev_t" 1>&6
Xif test $ac_cv_type_dev_t = no; then
X  cat >> confdefs.h <<\EOF
X#define dev_t unsigned short
XEOF
X
Xfi
X
Xecho $ac_n "checking for major_t""... $ac_c" 1>&6
Xecho "configure:5478: checking for major_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_major_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5483 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])major_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_major_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_major_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_major_t" 1>&6
Xif test $ac_cv_type_major_t = no; then
X  cat >> confdefs.h <<\EOF
X#define major_t dev_t
XEOF
X
Xfi
X
Xecho $ac_n "checking for minor_t""... $ac_c" 1>&6
Xecho "configure:5513: checking for minor_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_minor_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5518 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])minor_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_minor_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_minor_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_minor_t" 1>&6
Xif test $ac_cv_type_minor_t = no; then
X  cat >> confdefs.h <<\EOF
X#define minor_t dev_t
XEOF
X
Xfi
X
Xecho $ac_n "checking for ino_t""... $ac_c" 1>&6
Xecho "configure:5548: checking for ino_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5553 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_ino_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_ino_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_ino_t" 1>&6
Xif test $ac_cv_type_ino_t = no; then
X  cat >> confdefs.h <<\EOF
X#define ino_t unsigned long
XEOF
X
Xfi
X
Xecho $ac_n "checking for nlink_t""... $ac_c" 1>&6
Xecho "configure:5583: checking for nlink_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_nlink_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5588 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])nlink_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_nlink_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_nlink_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_nlink_t" 1>&6
Xif test $ac_cv_type_nlink_t = no; then
X  cat >> confdefs.h <<\EOF
X#define nlink_t unsigned long
XEOF
X
Xfi
X
Xecho $ac_n "checking for blksize_t""... $ac_c" 1>&6
Xecho "configure:5618: checking for blksize_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_blksize_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5623 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])blksize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_blksize_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_blksize_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_blksize_t" 1>&6
Xif test $ac_cv_type_blksize_t = no; then
X  cat >> confdefs.h <<\EOF
X#define blksize_t long
XEOF
X
Xfi
X
Xecho $ac_n "checking for blkcnt_t""... $ac_c" 1>&6
Xecho "configure:5653: checking for blkcnt_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_blkcnt_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5658 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])blkcnt_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_blkcnt_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_blkcnt_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_blkcnt_t" 1>&6
Xif test $ac_cv_type_blkcnt_t = no; then
X  cat >> confdefs.h <<\EOF
X#define blkcnt_t Intmax_t
XEOF
X
Xfi
X
Xecho $ac_n "checking for clock_t""... $ac_c" 1>&6
Xecho "configure:5688: checking for clock_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_clock_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5693 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X/*
X * time.h is needed because of a bug in Next Step.
X * Next Step needs time.h for clock_t
X */
X#ifdef	TIME_WITH_SYS_TIME
X#	ifndef	_INCL_SYS_TIME_H
X#	include <sys/time.h>
X#	define	_INCL_SYS_TIME_H
X#	endif
X#	ifndef	_INCL_TIME_H
X#	include <time.h>
X#	define	_INCL_TIME_H
X#	endif
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	ifndef	_INCL_SYS_TIME_H
X#	include <sys/time.h>
X#	define	_INCL_SYS_TIME_H
X#	endif
X#else
X#	ifndef	_INCL_TIME_H
X#	include <time.h>
X#	define	_INCL_TIME_H
X#	endif
X#endif
X#endif
X#ifdef	HAVE_SYS_TIMES_H
X#include <sys/times.h>
X#endif
X		
Xint main() {
Xclock_t t;
X; return 0; }
XEOF
Xif { (eval echo configure:5731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_type_clock_t=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_type_clock_t=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_type_clock_t" 1>&6
Xif test $ac_cv_type_clock_t = no; then
X  cat >> confdefs.h <<\EOF
X#define clock_t long
XEOF
X
Xfi
Xecho $ac_n "checking for socklen_t""... $ac_c" 1>&6
Xecho "configure:5751: checking for socklen_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5756 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#include <sys/socket.h>
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_socklen_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_socklen_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_socklen_t" 1>&6
Xif test $ac_cv_type_socklen_t = no; then
X  cat >> confdefs.h <<\EOF
X#define socklen_t int
XEOF
X
Xfi
Xecho $ac_n "checking for greg_t""... $ac_c" 1>&6
Xecho "configure:5786: checking for greg_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_type_greg_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5791 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#include <sys/frame.h>
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])greg_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_have_type_greg_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_have_type_greg_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_have_type_greg_t" 1>&6
X  ac_tr_type=HAVE_TYPE_`echo greg_t | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_type_greg_t = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_type 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if stack_t is declared in signal.h""... $ac_c" 1>&6
Xecho "configure:5823: checking if stack_t is declared in signal.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_stack_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5828 "configure"
X#include "confdefs.h"
X#include <signal.h>
Xint main() {
Xstack_t ss; ss.ss_size = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:5835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_stack_t=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_stack_t=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_stack_t" 1>&6
Xif test $ac_cv_stack_t = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_STACK_T 1
XEOF
X
Xfi
Xecho $ac_n "checking if siginfo_t is declared in signal.h""... $ac_c" 1>&6
Xecho "configure:5855: checking if siginfo_t is declared in signal.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_siginfo_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5860 "configure"
X#include "confdefs.h"
X#include <signal.h>
X#ifdef	HAVE_SIGINFO_H
X#include <siginfo.h>
X#else
X#ifdef	HAVE_SYS_SIGINFO_H
X#include <sys/siginfo.h>
X#endif
X#endif
Xint main() {
Xsiginfo_t si; si.si_signo = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:5874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_siginfo_t=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_siginfo_t=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_siginfo_t" 1>&6
Xif test $ac_cv_siginfo_t = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SIGINFO_T 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for u_char""... $ac_c" 1>&6
Xecho "configure:5895: checking for u_char" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_u_char'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5900 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])u_char[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_u_char=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_u_char=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_u_char" 1>&6
Xif test $ac_cv_type_u_char = no; then
X  cat >> confdefs.h <<\EOF
X#define u_char unsigned char
XEOF
X
Xfi
X
Xecho $ac_n "checking for u_short""... $ac_c" 1>&6
Xecho "configure:5930: checking for u_short" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_u_short'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5935 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])u_short[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_u_short=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_u_short=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_u_short" 1>&6
Xif test $ac_cv_type_u_short = no; then
X  cat >> confdefs.h <<\EOF
X#define u_short unsigned short
XEOF
X
Xfi
X
Xecho $ac_n "checking for u_int""... $ac_c" 1>&6
Xecho "configure:5965: checking for u_int" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_u_int'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5970 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])u_int[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_u_int=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_u_int=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_u_int" 1>&6
Xif test $ac_cv_type_u_int = no; then
X  cat >> confdefs.h <<\EOF
X#define u_int unsigned int
XEOF
X
Xfi
X
Xecho $ac_n "checking for u_long""... $ac_c" 1>&6
Xecho "configure:6000: checking for u_long" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_u_long'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6005 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])u_long[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_u_long=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_u_long=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_type_u_long" 1>&6
Xif test $ac_cv_type_u_long = no; then
X  cat >> confdefs.h <<\EOF
X#define u_long unsigned long
XEOF
X
Xfi
X
X
Xecho $ac_n "checking size of char""... $ac_c" 1>&6
Xecho "configure:6036: checking size of char" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6044 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(char));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_char=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_char=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_char" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_CHAR $ac_cv_sizeof_char
XEOF
X
X
Xecho $ac_n "checking size of short int""... $ac_c" 1>&6
Xecho "configure:6081: checking size of short int" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_short_int'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6089 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(short int));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_short_int=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_short_int=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_short_int" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
XEOF
X
X
Xecho $ac_n "checking size of int""... $ac_c" 1>&6
Xecho "configure:6126: checking size of int" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6134 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(int));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_int=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_int=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_int" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_INT $ac_cv_sizeof_int
XEOF
X
X
Xecho $ac_n "checking size of long int""... $ac_c" 1>&6
Xecho "configure:6171: checking size of long int" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6179 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(long int));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_long_int=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_long_int=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_long_int" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
XEOF
X
X
Xecho $ac_n "checking size of long long""... $ac_c" 1>&6
Xecho "configure:6216: checking size of long long" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6224 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(long long));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_long_long=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_long_long=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_long_long" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
XEOF
X
X
Xecho $ac_n "checking size of __int64""... $ac_c" 1>&6
Xecho "configure:6261: checking size of __int64" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6269 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(__int64));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof___int64=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof___int64=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof___int64" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF___INT64 $ac_cv_sizeof___int64
XEOF
X
X
Xecho $ac_n "checking size of char *""... $ac_c" 1>&6
Xecho "configure:6306: checking size of char *" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6314 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(char *));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_char_p=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_char_p=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_char_p" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
XEOF
X
X
X
Xecho $ac_n "checking size of unsigned char""... $ac_c" 1>&6
Xecho "configure:6352: checking size of unsigned char" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6360 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(unsigned char));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_unsigned_char=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_unsigned_char=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_unsigned_char" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_UNSIGNED_CHAR $ac_cv_sizeof_unsigned_char
XEOF
X
X
Xecho $ac_n "checking size of unsigned short int""... $ac_c" 1>&6
Xecho "configure:6397: checking size of unsigned short int" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short_int'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6405 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(unsigned short int));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_unsigned_short_int=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_unsigned_short_int=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_unsigned_short_int" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_UNSIGNED_SHORT_INT $ac_cv_sizeof_unsigned_short_int
XEOF
X
X
Xecho $ac_n "checking size of unsigned int""... $ac_c" 1>&6
Xecho "configure:6442: checking size of unsigned int" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6450 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(unsigned int));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_unsigned_int=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_unsigned_int=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
XEOF
X
X
Xecho $ac_n "checking size of unsigned long int""... $ac_c" 1>&6
Xecho "configure:6487: checking size of unsigned long int" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_int'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6495 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(unsigned long int));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_unsigned_long_int=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_unsigned_long_int=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_unsigned_long_int" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_UNSIGNED_LONG_INT $ac_cv_sizeof_unsigned_long_int
XEOF
X
X
Xecho $ac_n "checking size of unsigned long long""... $ac_c" 1>&6
Xecho "configure:6532: checking size of unsigned long long" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6540 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(unsigned long long));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_unsigned_long_long=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_unsigned_long_long=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_unsigned_long_long" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
XEOF
X
X
Xecho $ac_n "checking size of unsigned __int64""... $ac_c" 1>&6
Xecho "configure:6577: checking size of unsigned __int64" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_unsigned___int64'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6585 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(unsigned __int64));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_unsigned___int64=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_unsigned___int64=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_unsigned___int64" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_UNSIGNED___INT64 $ac_cv_sizeof_unsigned___int64
XEOF
X
X
Xecho $ac_n "checking size of unsigned char *""... $ac_c" 1>&6
Xecho "configure:6622: checking size of unsigned char *" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char_p'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6630 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(unsigned char *));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_unsigned_char_p=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_unsigned_char_p=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_unsigned_char_p" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_UNSIGNED_CHAR_P $ac_cv_sizeof_unsigned_char_p
XEOF
X
X
Xecho $ac_n "checking size of float""... $ac_c" 1>&6
Xecho "configure:6667: checking size of float" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6675 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(float));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_float=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_float=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_float" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_FLOAT $ac_cv_sizeof_float
XEOF
X
X
Xecho $ac_n "checking size of double""... $ac_c" 1>&6
Xecho "configure:6712: checking size of double" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6720 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(double));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_double=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_double=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_double" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_DOUBLE $ac_cv_sizeof_double
XEOF
X
X
Xecho $ac_n "checking size of long double""... $ac_c" 1>&6
Xecho "configure:6757: checking size of long double" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6765 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(long double));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_long_double=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_long_double=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_long_double" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
XEOF
X
X
X
Xecho $ac_n "checking size of size_t""... $ac_c" 1>&6
Xecho "configure:6803: checking size of size_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_size_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6811 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(size_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_size_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_size_t=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_size_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
XEOF
X
X
Xecho $ac_n "checking size of ssize_t""... $ac_c" 1>&6
Xecho "configure:6848: checking size of ssize_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_ssize_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6856 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(ssize_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_ssize_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_ssize_t=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_ssize_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t
XEOF
X
X
Xecho $ac_n "checking size of ptrdiff_t""... $ac_c" 1>&6
Xecho "configure:6893: checking size of ptrdiff_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_ptrdiff_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6901 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(ptrdiff_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_ptrdiff_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_ptrdiff_t=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_ptrdiff_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_PTRDIFF_T $ac_cv_sizeof_ptrdiff_t
XEOF
X
X
X
Xecho $ac_n "checking size of time_t""... $ac_c" 1>&6
Xecho "configure:6939: checking size of time_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6947 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(time_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:6969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_time_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_time_t=SIZEOF_LONG_INT
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_time_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
XEOF
X
X
Xecho $ac_n "checking size of wchar""... $ac_c" 1>&6
Xecho "configure:6989: checking size of wchar" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_wchar'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6997 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(L'a'));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_wchar=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_wchar=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_wchar" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_WCHAR $ac_cv_sizeof_wchar
XEOF
X
X
Xecho $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Xecho "configure:7028: checking size of wchar_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7036 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(wchar_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_wchar_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_wchar_t=SIZEOF_CHAR
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xecho "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
XEOF
X
X
X
Xecho $ac_n "checking if char is unsigned""... $ac_c" 1>&6
Xecho "configure:7077: checking if char is unsigned" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_char_unsigned'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_type_char_unsigned=no
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7085 "configure"
X#include "confdefs.h"
X
Xint
Xmain()
X{
X	char c;
X
X	c = -1;
X	exit(c < 0);}
XEOF
Xif { (eval echo configure:7096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_type_char_unsigned=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_type_char_unsigned=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_type_char_unsigned" 1>&6 
Xif test $ac_cv_type_char_unsigned = yes; then
X  cat >> confdefs.h <<\EOF
X#define CHAR_IS_UNSIGNED 1
XEOF
X
Xfi
Xecho $ac_n "checking if va_list is an array""... $ac_c" 1>&6
Xecho "configure:7118: checking if va_list is an array" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_va_list_array'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7123 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_STDARG_H
X#	include <stdarg.h>
X#else
X#	include <varargs.h>
X#endif
X
Xint main() {
X
Xva_list a, b;
X
Xa = b;
X; return 0; }
XEOF
Xif { (eval echo configure:7139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_type_va_list_array=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_type_va_list_array=yes
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_type_va_list_array" 1>&6 
Xif test $ac_cv_type_va_list_array = yes; then
X  cat >> confdefs.h <<\EOF
X#define VA_LIST_IS_ARRAY 1
XEOF
X
Xfi
Xecho $ac_n "checking for struct timeval in time.h or sys/time.h""... $ac_c" 1>&6
Xecho "configure:7159: checking for struct timeval in time.h or sys/time.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_timeval'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7164 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif
Xint main() {
Xstruct timeval tv;
X; return 0; }
XEOF
Xif { (eval echo configure:7182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_timeval=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_timeval=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_timeval" 1>&6
Xif test $ac_cv_struct_timeval = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_STRUCT_TIMEVAL 1
XEOF
X
Xfi
Xecho $ac_n "checking for struct timezone in time.h or sys/time.h""... $ac_c" 1>&6
Xecho "configure:7202: checking for struct timezone in time.h or sys/time.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_timezone'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7207 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif
Xint main() {
Xstruct timezone tz;
X; return 0; }
XEOF
Xif { (eval echo configure:7225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_timezone=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_timezone=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_timezone" 1>&6
Xif test $ac_cv_struct_timezone = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_STRUCT_TIMEZONE 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_type""... $ac_c" 1>&6
Xecho "configure:7245: checking if struct mtget contains mt_type" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_type'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7250 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_type = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_type=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_type=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_mtget_type" 1>&6
Xif test $ac_cv_struct_mtget_type = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_TYPE 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_model""... $ac_c" 1>&6
Xecho "configure:7278: checking if struct mtget contains mt_model" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_model'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7283 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_model = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_model=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_model=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_mtget_model" 1>&6
Xif test $ac_cv_struct_mtget_model = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_MODEL 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_dsreg""... $ac_c" 1>&6
Xecho "configure:7311: checking if struct mtget contains mt_dsreg" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_dsreg'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7316 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_dsreg = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_dsreg=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_dsreg=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_mtget_dsreg" 1>&6
Xif test $ac_cv_struct_mtget_dsreg = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_DSREG 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_dsreg1""... $ac_c" 1>&6
Xecho "configure:7344: checking if struct mtget contains mt_dsreg1" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_dsreg1'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7349 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_dsreg1 = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_dsreg1=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_dsreg1=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_mtget_dsreg1" 1>&6
Xif test $ac_cv_struct_mtget_dsreg1 = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_DSREG1 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_dsreg2""... $ac_c" 1>&6
Xecho "configure:7377: checking if struct mtget contains mt_dsreg2" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_dsreg2'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7382 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_dsreg2 = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_dsreg2=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_dsreg2=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_mtget_dsreg2" 1>&6
Xif test $ac_cv_struct_mtget_dsreg2 = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_DSREG2 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_gstat""... $ac_c" 1>&6
Xecho "configure:7410: checking if struct mtget contains mt_gstat" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_gstat'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7415 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_gstat = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_gstat=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_gstat=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_mtget_gstat" 1>&6
Xif test $ac_cv_struct_mtget_gstat = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_GSTAT 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_erreg""... $ac_c" 1>&6
Xecho "configure:7443: checking if struct mtget contains mt_erreg" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_erreg'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7448 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_erreg = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_erreg=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_erreg=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_mtget_erreg" 1>&6
Xif test $ac_cv_struct_mtget_erreg = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_ERREG 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_resid""... $ac_c" 1>&6
Xecho "configure:7476: checking if struct mtget contains mt_resid" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_resid'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7481 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_resid = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_resid=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_resid=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_mtget_resid" 1>&6
Xif test $ac_cv_struct_mtget_resid = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_RESID 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_fileno""... $ac_c" 1>&6
Xecho "configure:7509: checking if struct mtget contains mt_fileno" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_fileno'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7514 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_fileno = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_fileno=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_fileno=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_mtget_fileno" 1>&6
Xif test $ac_cv_struct_mtget_fileno = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_FILENO 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_blkno""... $ac_c" 1>&6
Xecho "configure:7542: checking if struct mtget contains mt_blkno" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_blkno'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7547 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_blkno = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_blkno=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_blkno=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_mtget_blkno" 1>&6
Xif test $ac_cv_struct_mtget_blkno = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_BLKNO 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_flags""... $ac_c" 1>&6
Xecho "configure:7575: checking if struct mtget contains mt_flags" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_flags'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7580 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_flags = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_flags=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_flags=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_mtget_flags" 1>&6
Xif test $ac_cv_struct_mtget_flags = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_FLAGS 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_bf""... $ac_c" 1>&6
Xecho "configure:7608: checking if struct mtget contains mt_bf" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_bf'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7613 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_bf = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_bf=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_bf=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_mtget_bf" 1>&6
Xif test $ac_cv_struct_mtget_bf = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_BF 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct rusage is declared in sys/resource.h""... $ac_c" 1>&6
Xecho "configure:7641: checking if struct rusage is declared in sys/resource.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_rusage'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7646 "configure"
X#include "confdefs.h"
X#include <sys/time.h>
X#include <sys/resource.h>
Xint main() {
Xstruct rusage r;
X; return 0; }
XEOF
Xif { (eval echo configure:7654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_rusage=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_rusage=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_rusage" 1>&6
Xif test $ac_cv_struct_rusage = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_STRUCT_RUSAGE 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct siginfo contains si_utime""... $ac_c" 1>&6
Xecho "configure:7674: checking if struct siginfo contains si_utime" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_si_utime'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7679 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/siginfo.h>
Xint main() {
Xstruct  siginfo si; si.si_utime = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_si_utime=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_si_utime=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_si_utime" 1>&6
Xif test $ac_cv_struct_si_utime = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SI_UTIME 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct sockaddr_storage is declared in socket.h""... $ac_c" 1>&6
Xecho "configure:7707: checking if struct sockaddr_storage is declared in socket.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7712 "configure"
X#include "confdefs.h"
X#include <sys/socket.h>
Xint main() {
Xstruct  sockaddr_storage ss; ss.ss_family = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_sockaddr_storage=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_sockaddr_storage=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
Xif test $ac_cv_struct_sockaddr_storage = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SOCKADDR_STORAGE 1
XEOF
X
Xfi
Xecho $ac_n "checking if an illegal declaration for union semun in sys/sem.h exists""... $ac_c" 1>&6
Xecho "configure:7739: checking if an illegal declaration for union semun in sys/sem.h exists" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_union_semun'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7744 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/ipc.h>
X#include <sys/sem.h>
Xint main() {
Xunion semun s;
X; return 0; }
XEOF
Xif { (eval echo configure:7753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_union_semun=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_union_semun=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_union_semun" 1>&6
Xif test $ac_cv_struct_union_semun = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UNION_SEMUN 1
XEOF
X
Xfi
Xecho $ac_n "checking if union wait is declared in wait.h or sys/wait.h""... $ac_c" 1>&6
Xecho "configure:7773: checking if union wait is declared in wait.h or sys/wait.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_union_wait'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7778 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	defined(HAVE_WAIT_H)
X#	include <wait.h>
X#else
X#include <sys/wait.h>
X#endif
Xint main() {
Xunion wait w;
X; return 0; }
XEOF
Xif { (eval echo configure:7790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_union_wait=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_union_wait=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_union_wait" 1>&6
Xif test $ac_cv_struct_union_wait = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UNION_WAIT 1
XEOF
X
Xfi
Xecho $ac_n "checking if union wait is used by default""... $ac_c" 1>&6
Xecho "configure:7810: checking if union wait is used by default" >&5
Xif eval "test \"`echo '$''{'ac_cv_use_union_wait'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7815 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	defined(HAVE_WAIT_H)
X#	include <wait.h>
X#else
X#include <sys/wait.h>
X#endif
Xxxzzy WTERMSIG(status)
Xxxzzy WCOREDUMP(status)
Xxxzzy WEXITSTATUS(status)
Xxxzzy WSTOPSIG(status)
Xxxzzy WIFSTOPPED(status)
Xxxzzy WIFSIGNALED(status)
Xxxzzy WIFEXITED(status)
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "xxzzy.*x_|xxzzy.*union" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_use_union_wait=yes
Xelse
X  rm -rf conftest*
X  ac_cv_use_union_wait=no
Xfi
Xrm -f conftest*
X
Xfi
Xecho "$ac_t""$ac_cv_use_union_wait" 1>&6
Xif test $ac_cv_use_union_wait = yes; then
X  cat >> confdefs.h <<\EOF
X#define USE_UNION_WAIT 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_spare1""... $ac_c" 1>&6
Xecho "configure:7850: checking if struct stat contains st_spare1" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_spare1'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7855 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_spare1 = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_spare1=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_spare1=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_st_spare1" 1>&6
Xif test $ac_cv_struct_st_spare1 = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_SPARE1 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_atimensec""... $ac_c" 1>&6
Xecho "configure:7883: checking if struct stat contains st_atimensec" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_atimensec'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7888 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_atimensec = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_atimensec=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_atimensec=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_st_atimensec" 1>&6
Xif test $ac_cv_struct_st_atimensec = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_ATIMENSEC 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_atime_n""... $ac_c" 1>&6
Xecho "configure:7916: checking if struct stat contains st_atime_n" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_atime_n'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7921 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_atime_n = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_atime_n=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_atime_n=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_st_atime_n" 1>&6
Xif test $ac_cv_struct_st_atime_n = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_ATIME_N 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_atim.tv_nsec""... $ac_c" 1>&6
Xecho "configure:7949: checking if struct stat contains st_atim.tv_nsec" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_nsec'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7954 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_atim.tv_nsec = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_nsec=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_nsec=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_st_nsec" 1>&6
Xif test $ac_cv_struct_st_nsec = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_NSEC 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_atim.st__tim.tv_nsec""... $ac_c" 1>&6
Xecho "configure:7982: checking if struct stat contains st_atim.st__tim.tv_nsec" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st__tim'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7987 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_atim.st__tim.tv_nsec = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:7995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st__tim=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st__tim=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_st__tim" 1>&6
Xif test $ac_cv_struct_st__tim = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST__TIM 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_atimespec.tv_nsec""... $ac_c" 1>&6
Xecho "configure:8015: checking if struct stat contains st_atimespec.tv_nsec" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_atimespec'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8020 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_atimespec.tv_nsec = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_atimespec=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_atimespec=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_st_atimespec" 1>&6
Xif test $ac_cv_struct_st_atimespec = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_ATIMESPEC 1
XEOF
X
Xfi
Xecho $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
Xecho "configure:8048: checking for st_blksize in struct stat" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8053 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct stat s; s.st_blksize;
X; return 0; }
XEOF
Xif { (eval echo configure:8061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_blksize=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_blksize=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_st_blksize" 1>&6
Xif test $ac_cv_struct_st_blksize = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_BLKSIZE 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
Xecho "configure:8082: checking for st_blocks in struct stat" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8087 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct stat s; s.st_blocks;
X; return 0; }
XEOF
Xif { (eval echo configure:8095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_blocks=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_blocks=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_st_blocks" 1>&6
Xif test $ac_cv_struct_st_blocks = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_BLOCKS 1
XEOF
X
Xelse
X  LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
Xfi
X
Xecho $ac_n "checking if struct stat contains st_fstype""... $ac_c" 1>&6
Xecho "configure:8118: checking if struct stat contains st_fstype" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_fstype'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8123 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_fstype[0] = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_fstype=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_fstype=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_st_fstype" 1>&6
Xif test $ac_cv_struct_st_fstype = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_FSTYPE 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_aclcnt""... $ac_c" 1>&6
Xecho "configure:8151: checking if struct stat contains st_aclcnt" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_aclcnt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8156 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_aclcnt = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_aclcnt=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_aclcnt=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_st_aclcnt" 1>&6
Xif test $ac_cv_struct_st_aclcnt = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_ACLCNT 1
XEOF
X
Xfi
Xecho $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
Xecho "configure:8184: checking for st_rdev in struct stat" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8189 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct stat s; s.st_rdev;
X; return 0; }
XEOF
Xif { (eval echo configure:8197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_rdev=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_rdev=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_st_rdev" 1>&6
Xif test $ac_cv_struct_st_rdev = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_RDEV 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if struct stat contains st_flag""... $ac_c" 1>&6
Xecho "configure:8218: checking if struct stat contains st_flag" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_flag'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8223 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_flag = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_flag=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_flag=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_st_flag" 1>&6
Xif test $ac_cv_struct_st_flag = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_FLAG 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_flags""... $ac_c" 1>&6
Xecho "configure:8251: checking if struct stat contains st_flags" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_flags'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8256 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_flags = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_flags=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_flags=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_st_flags" 1>&6
Xif test $ac_cv_struct_st_flags = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_FLAGS 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct dirent contains d_ino""... $ac_c" 1>&6
Xecho "configure:8284: checking if struct dirent contains d_ino" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_dirent_d_ino'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8289 "configure"
X#include "confdefs.h"
X
X/*
X * This must be kept in sync with schily/dirdesf.h
X */
X#ifdef	HAVE_SYS_TYPES_H
X#	include <sys/types.h>
X#endif
X#ifdef	HAVE_SYS_STAT_H
X#	include <sys/stat.h>
X#endif
X#	ifdef	HAVE_DIRENT_H		/* This a POSIX compliant system */
X#		include <dirent.h>
X#		define	_FOUND_DIR_
X#	else				/* This is a Pre POSIX system	 */
X
X#	define 	dirent	direct
X
X#	if	defined(HAVE_SYS_DIR_H)
X#		include <sys/dir.h>
X#		define	_FOUND_DIR_
X#	endif
X
X#	if	defined(HAVE_NDIR_H) && !defined(_FOUND_DIR_)
X#		include <ndir.h>
X#		define	_FOUND_DIR_
X#	endif
X
X#	if	defined(HAVE_SYS_NDIR_H) && !defined(_FOUND_DIR_)
X#		include <sys/ndir.h>
X#		define	_FOUND_DIR_
X#	endif
X#	endif	/* HAVE_DIRENT_H */
X				
Xint main() {
Xstruct  dirent d; d.d_ino = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_dirent_d_ino=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_dirent_d_ino=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_dirent_d_ino" 1>&6
Xif test $ac_cv_struct_dirent_d_ino = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_DIRENT_D_INO 1
XEOF
X
Xfi
Xecho $ac_n "checking if DIR * contains dd_fd""... $ac_c" 1>&6
Xecho "configure:8348: checking if DIR * contains dd_fd" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_dir_dd_fd'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8353 "configure"
X#include "confdefs.h"
X#include <dirent.h>
Xint main() {
XDIR d; d.dd_fd = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_dir_dd_fd=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_dir_dd_fd=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_dir_dd_fd" 1>&6
Xif test $ac_cv_struct_dir_dd_fd = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_DIR_DD_FD 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct utsname contains arch""... $ac_c" 1>&6
Xecho "configure:8380: checking if struct utsname contains arch" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_utsname_arch'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8385 "configure"
X#include "confdefs.h"
X#include <sys/utsname.h>
Xint main() {
Xstruct  utsname u; u.arch[0] = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_utsname_arch=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_utsname_arch=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_utsname_arch" 1>&6
Xif test $ac_cv_struct_utsname_arch = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UTSNAME_ARCH 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct utsname contains processor""... $ac_c" 1>&6
Xecho "configure:8412: checking if struct utsname contains processor" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_utsname_processor'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8417 "configure"
X#include "confdefs.h"
X#include <sys/utsname.h>
Xint main() {
Xstruct  utsname u; u.processor[0] = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_utsname_processor=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_utsname_processor=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_utsname_processor" 1>&6
Xif test $ac_cv_struct_utsname_processor = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UTSNAME_PROCESSOR 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct utsname contains sysname_host""... $ac_c" 1>&6
Xecho "configure:8444: checking if struct utsname contains sysname_host" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_utsname_sysname_host'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8449 "configure"
X#include "confdefs.h"
X#include <sys/utsname.h>
Xint main() {
Xstruct  utsname u; u.sysname_host[0] = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_utsname_sysname_host=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_utsname_sysname_host=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_utsname_sysname_host" 1>&6
Xif test $ac_cv_struct_utsname_sysname_host = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UTSNAME_SYSNAME_HOST 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct utsname contains release_host""... $ac_c" 1>&6
Xecho "configure:8476: checking if struct utsname contains release_host" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_utsname_release_host'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8481 "configure"
X#include "confdefs.h"
X#include <sys/utsname.h>
Xint main() {
Xstruct  utsname u; u.release_host[0] = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_utsname_release_host=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_utsname_release_host=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_utsname_release_host" 1>&6
Xif test $ac_cv_struct_utsname_release_host = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UTSNAME_RELEASE_HOST 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct utsname contains version_host""... $ac_c" 1>&6
Xecho "configure:8508: checking if struct utsname contains version_host" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_utsname_version_host'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8513 "configure"
X#include "confdefs.h"
X#include <sys/utsname.h>
Xint main() {
Xstruct  utsname u; u.version_host[0] = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_utsname_version_host=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_utsname_version_host=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_struct_utsname_version_host" 1>&6
Xif test $ac_cv_struct_utsname_version_host = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UTSNAME_VERSION_HOST 1
XEOF
X
Xfi
X
Xecho $ac_n "checking whether iconv() uses const char **""... $ac_c" 1>&6
Xecho "configure:8541: checking whether iconv() uses const char **" >&5
Xif eval "test \"`echo '$''{'ac_cv_iconv_const'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.c <<EOF
X#include <iconv.h>
XEOF
Xif { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:8548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | grep 'size_t.*iconv.*iconv_t.*const' >/dev/null 2>&1; then
X  ac_cv_iconv_const=yes
Xelse
X  ac_cv_iconv_const=no
Xfi
Xfi
X
Xecho "$ac_t""$ac_cv_iconv_const" 1>&6
Xif test $ac_cv_iconv_const = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ICONV_CONST 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if stat is declared""... $ac_c" 1>&6
Xecho "configure:8564: checking if stat is declared" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_decl_stat'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8569 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
X char *p = (char *) stat; 
X; return 0; }
XEOF
Xif { (eval echo configure:8578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_have_decl_stat=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_have_decl_stat=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_have_decl_stat" 1>&6
X  ac_tr_decl=HAVE_DECL_`echo stat | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_decl_stat = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_decl 1
XEOF
X
Xfi
Xecho $ac_n "checking if lstat is declared""... $ac_c" 1>&6
Xecho "configure:8599: checking if lstat is declared" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_decl_lstat'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8604 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
X char *p = (char *) lstat; 
X; return 0; }
XEOF
Xif { (eval echo configure:8613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_have_decl_lstat=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_have_decl_lstat=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_have_decl_lstat" 1>&6
X  ac_tr_decl=HAVE_DECL_`echo lstat | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_decl_lstat = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_decl 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
Xecho "configure:8635: checking for wait3 that fills in rusage" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_func_wait3_rusage=no
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8643 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/time.h>
X#include <sys/resource.h>
X#include <stdio.h>
X/* HP-UX has wait3 but does not fill in rusage at all.  */
Xmain() {
X  struct rusage r;
X  int i;
X  /* Use a field that we can force nonzero --
X     voluntary context switches.
X     For systems like NeXT and OSF/1 that don't set it,
X     also use the system CPU time.  And page faults (I/O) for Linux.  */
X  r.ru_nvcsw = 0;
X  r.ru_utime.tv_sec = 0;
X  r.ru_utime.tv_usec = 0;
X  r.ru_stime.tv_sec = 0;
X  r.ru_stime.tv_usec = 0;
X  r.ru_majflt = r.ru_minflt = 0;
X  switch (fork()) {
X  case 0: /* Child.  */
X    sleep(1); /* Give up the CPU.  */
X    for (i=200000; --i > 0;) getpid(); /* Use up some CPU time */
X    _exit(0);
X  case -1: _exit(0); /* What can we do?  */
X  default: /* Parent.  */
X    wait3(&i, 0, &r);
X    sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
X    exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
X	 && r.ru_utime.tv_sec == 0 && r.ru_utime.tv_usec == 0
X	 && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
X  }
X}
XEOF
Xif { (eval echo configure:8678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_wait3_rusage=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_wait3_rusage=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
Xif test $ac_cv_func_wait3_rusage = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_WAIT3 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for mlock""... $ac_c" 1>&6
Xecho "configure:8701: checking for mlock" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_mlock'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8709 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
X
Xmain()
X{
X	if (mlock(0, 0) < 0) {
X		if (errno == EINVAL || errno ==  ENOMEM ||
X		    errno == EPERM  || errno ==  EACCES)
X			exit(0);
X		exit(-1);
X	}
X	exit(0);
X}
XEOF
Xif { (eval echo configure:8729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_mlock=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_mlock=no
Xfi
Xrm -fr conftest*
Xfi
X
Xrm -f core core.* *.core
Xfi
X
Xecho "$ac_t""$ac_cv_func_mlock" 1>&6
Xif test $ac_cv_func_mlock = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MLOCK 1
XEOF
X
Xfi
Xecho $ac_n "checking for mlockall""... $ac_c" 1>&6
Xecho "configure:8752: checking for mlockall" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_mlockall'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8760 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <sys/mman.h>
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
X
Xint
Xmain()
X{
X	if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0) {
X		if (errno == EINVAL || errno ==  ENOMEM ||
X		    errno == EPERM  || errno ==  EACCES)
X			exit(0);
X		exit(-1);
X	}
X	exit(0);
X}
X
XEOF
Xif { (eval echo configure:8783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_mlockall=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_mlockall=no
Xfi
Xrm -fr conftest*
Xfi
X
Xrm -f core core.* *.core
Xfi
X
Xecho "$ac_t""$ac_cv_func_mlockall" 1>&6
Xif test $ac_cv_func_mlockall = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MLOCKALL 1
XEOF
X
Xfi
Xecho $ac_n "checking for va_copy""... $ac_c" 1>&6
Xecho "configure:8806: checking for va_copy" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_va_copy'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8811 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_STDARG_H
X#	include <stdarg.h>
X#else
X#	include <varargs.h>
X#endif
Xint main() {
X
Xva_list a, b;
X
Xva_copy(a, b);
X; return 0; }
XEOF
Xif { (eval echo configure:8826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_va_copy=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_va_copy=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_func_va_copy" 1>&6
Xif test $ac_cv_func_va_copy = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_VA_COPY 1
XEOF
X
Xfi
Xecho $ac_n "checking for __va_copy""... $ac_c" 1>&6
Xecho "configure:8846: checking for __va_copy" >&5
Xif eval "test \"`echo '$''{'ac_cv_func__va_copy'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8851 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_STDARG_H
X#	include <stdarg.h>
X#else
X#	include <varargs.h>
X#endif
Xint main() {
X
Xva_list a, b;
X
X__va_copy(a, b);
X; return 0; }
XEOF
Xif { (eval echo configure:8866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func__va_copy=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func__va_copy=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_func__va_copy" 1>&6
Xif test $ac_cv_func__va_copy = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE__VA_COPY 1
XEOF
X
Xfi
Xecho $ac_n "checking for working ecvt() ""... $ac_c" 1>&6
Xecho "configure:8886: checking for working ecvt() " >&5
Xif eval "test \"`echo '$''{'ac_cv_func_ecvt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8894 "configure"
X#include "confdefs.h"
X
Xextern	char *ecvt();
X
Xsprintf(s)
X	char	*s;
X{
X	strcpy(s, "DEAD");
X}
X
Xint
Xmain()
X{
X	int a, b;
X
X/*	exit (strcmp("DEAD", ecvt(1.9, 2, &a, &b)) == 0);*/
X	exit (strcmp("19", ecvt(1.9, 2, &a, &b)) != 0);
X}
XEOF
Xif { (eval echo configure:8914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_ecvt=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_ecvt=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_func_ecvt" 1>&6
Xif test $ac_cv_func_ecvt = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ECVT 1
XEOF
X
Xfi
Xecho $ac_n "checking for working fcvt() ""... $ac_c" 1>&6
Xecho "configure:8936: checking for working fcvt() " >&5
Xif eval "test \"`echo '$''{'ac_cv_func_fcvt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8944 "configure"
X#include "confdefs.h"
X
Xextern	char *fcvt();
X
Xsprintf(s)
X	char	*s;
X{
X	strcpy(s, "DEAD");
X}
X
Xint
Xmain()
X{
X	int a, b;
X
X/*	exit (strcmp("DEAD", fcvt(1.9, 2, &a, &b)) == 0);*/
X	exit (strcmp("190", fcvt(1.9, 2, &a, &b)) != 0);
X}
XEOF
Xif { (eval echo configure:8964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_fcvt=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_fcvt=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_func_fcvt" 1>&6
Xif test $ac_cv_func_fcvt = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_FCVT 1
XEOF
X
Xfi
Xecho $ac_n "checking for working gcvt() ""... $ac_c" 1>&6
Xecho "configure:8986: checking for working gcvt() " >&5
Xif eval "test \"`echo '$''{'ac_cv_func_gcvt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8994 "configure"
X#include "confdefs.h"
X
Xextern	char *gcvt();
X
Xsprintf(s)
X	char	*s;
X{
X	strcpy(s, "DEAD");
X}
X
Xint
Xmain()
X{
X	char	buf[32];
X
X/*	exit (strcmp("DEAD", gcvt(1.9, 10, buf)) == 0);*/
X	exit (strcmp("1.9", gcvt(1.9, 10, buf)) != 0);
X}
XEOF
Xif { (eval echo configure:9014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_gcvt=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_gcvt=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_func_gcvt" 1>&6
Xif test $ac_cv_func_gcvt = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_GCVT 1
XEOF
X
Xfi
Xecho $ac_n "checking for __dtoa""... $ac_c" 1>&6
Xecho "configure:9036: checking for __dtoa" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_dtoa'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9041 "configure"
X#include "confdefs.h"
Xextern  char *__dtoa();
Xint main() {
Xint decpt; int sign; char *ep; char *bp;
Xbp = __dtoa(0.0, 2, 6, &decpt, &sign, &ep);
X; return 0; }
XEOF
Xif { (eval echo configure:9049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_dtoa=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_dtoa=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_func_dtoa" 1>&6
Xif test $ac_cv_func_dtoa = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_DTOA 1
XEOF
X
Xfi
Xecho $ac_n "checking for __dtoa that needs result ptr""... $ac_c" 1>&6
Xecho "configure:9069: checking for __dtoa that needs result ptr" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_dtoa_r'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9077 "configure"
X#include "confdefs.h"
X
Xextern	char *__dtoa();
Xint
Xmain()
X{
X#ifdef	HAVE_DTOA
X	int	decpt, sign;
X	char	*bp;
X	char	*ep;
X	char	*result;
X
X	result = 0;
X	bp = __dtoa(1.9, 2, 5, &decpt, &sign, &ep, &result);
X	exit(result == 0);
X#else
X	exit(1);
X#endif
X}
XEOF
Xif { (eval echo configure:9098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_dtoa_r=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_dtoa_r=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_func_dtoa_r" 1>&6
Xif test $ac_cv_func_dtoa_r = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_DTOA_R 1
XEOF
X
Xfi
Xfor ac_hdr in unistd.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:9123: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9128 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:9133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getpagesize
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:9162: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9167 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:9190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xecho $ac_n "checking for mmap that needs ptr to size""... $ac_c" 1>&6
Xecho "configure:9215: checking for mmap that needs ptr to size" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_mmap_sizep'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_func_mmap_sizep=no
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9223 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <fcntl.h>
X#include <signal.h>
X#include <setjmp.h>
X#include <sys/mman.h>
X
X#ifndef MAP_FILE
X#define MAP_FILE   0		/* Needed on Apollo Domain/OS */
X#endif
X
X/* This mess was copied from the GNU getpagesize.h.  */
X#ifndef HAVE_GETPAGESIZE
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X
X/* Assume that all systems that can run configure have sys/param.h.  */
X# ifndef HAVE_SYS_PARAM_H
X#  define HAVE_SYS_PARAM_H 1
X# endif
X
X# ifdef _SC_PAGESIZE
X#  define getpagesize() sysconf(_SC_PAGESIZE)
X# else /* no _SC_PAGESIZE */
X#  ifdef HAVE_SYS_PARAM_H
X#   include <sys/param.h>
X#   ifdef EXEC_PAGESIZE
X#    define getpagesize() EXEC_PAGESIZE
X#   else /* no EXEC_PAGESIZE */
X#    ifdef NBPG
X#     define getpagesize() NBPG * CLSIZE
X#     ifndef CLSIZE
X#      define CLSIZE 1
X#     endif /* no CLSIZE */
X#    else /* no NBPG */
X#     ifdef NBPC
X#      define getpagesize() NBPC
X#     else /* no NBPC */
X#      ifdef PAGESIZE
X#       define getpagesize() PAGESIZE
X#      endif /* PAGESIZE */
X#     endif /* no NBPC */
X#    endif /* no NBPG */
X#   endif /* no EXEC_PAGESIZE */
X#  else /* no HAVE_SYS_PARAM_H */
X#   define getpagesize() 8192	/* punt totally */
X#  endif /* no HAVE_SYS_PARAM_H */
X# endif /* no _SC_PAGESIZE */
X
X#endif /* no HAVE_GETPAGESIZE */
X
X#ifdef __cplusplus
Xextern "C" { void *malloc(unsigned); }
X#else
Xchar *malloc();
X#endif
X
Xjmp_buf jenv;
X
Xint
Xintr()
X{
X	signal(SIGSEGV, intr);
X	longjmp(jenv, 1);
X}
X
Xint
Xmain()
X{
X	char *data, *data2;
X	int i, pagesize, ps;
X	int fd;
X
X	pagesize = getpagesize();
X
X	/*
X	 * First, make a file with some known garbage in it.
X	 */
X	data = malloc(pagesize);
X	if (!data)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		*(data + i) = rand();
X	umask(0);
X	fd = creat("conftestmmap", 0600);
X	if (fd < 0)
X		exit(1);
X	if (write(fd, data, pagesize) != pagesize)
X		exit(1);
X	close(fd);
X
X	/*
X	 * Next, try to mmap the file at a fixed address which
X	 * already has something else allocated at it.  If we can,
X	 * also make sure that we see the same garbage.
X	 */
X	fd = open("conftestmmap", O_RDWR);
X	if (fd < 0)
X		exit(1);
X
X	/*
X	 * Keep a copy, Apollo modifies the value...
X	 */
X	ps = pagesize;
X
X	/*
X	 * Apollo mmap() is not a syscall but a library function and fails
X	 * if it tries to dereference 'ps'. We must use setjmp in order to
X	 * catch the failure.
X	 */
X	signal(SIGSEGV, intr);
X	if (setjmp(jenv) == 0) {
X		data2 = mmap(0, ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L);
X	} else {
X		data2 = (char *)-1;
X	}
X	if (data2 != (char *)-1)
X		exit(1);
X
X	signal(SIGSEGV, intr);
X	if (setjmp(jenv) == 0) {
X		data2 = mmap(0, &ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L);
X	} else {
X		data2 = (char *)-1;
X	}
X	if (data2 == (char *)-1)
X		exit(1);
X
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data2 + i))
X			exit(1);
X
X	close(fd);
X	unlink("conftestmmap");
X	exit(0);
X}
X
XEOF
Xif { (eval echo configure:9364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_mmap_sizep=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_mmap_sizep=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_func_mmap_sizep" 1>&6
Xif test $ac_cv_func_mmap_sizep = yes; then
X  cat >> confdefs.h <<\EOF
X#define _MMAP_WITH_SIZEP 1
XEOF
X
Xfi
X
Xfor ac_hdr in unistd.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:9390: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9395 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:9400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getpagesize
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:9429: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9434 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:9457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xecho $ac_n "checking for working mmap""... $ac_c" 1>&6
Xecho "configure:9482: checking for working mmap" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_func_mmap_fixed_mapped=no
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9490 "configure"
X#include "confdefs.h"
X
X/* Thanks to Mike Haertel and Jim Avera for this test.
X   Here is a matrix of mmap possibilities:
X	mmap private not fixed
X	mmap private fixed at somewhere currently unmapped
X	mmap private fixed at somewhere already mapped
X	mmap shared not fixed
X	mmap shared fixed at somewhere currently unmapped
X	mmap shared fixed at somewhere already mapped
X   For private mappings, we should verify that changes cannot be read()
X   back from the file, nor mmap's back from the file at a different
X   address.  (There have been systems where private was not correctly
X   implemented like the infamous i386 svr4.0, and systems where the
X   VM page cache was not coherent with the filesystem buffer cache
X   like early versions of FreeBSD and possibly contemporary NetBSD.)
X   For shared mappings, we should conversely verify that changes get
X   propogated back to all the places they're supposed to be.
X
X   Grep wants private fixed already mapped.
X   The main things grep needs to know about mmap are:
X   * does it exist and is it safe to write into the mmap'd area
X   * how to use it (BSD variants)  */
X#include <sys/types.h>
X#include <fcntl.h>
X#include <sys/mman.h>
X
X/*
X * Needed for Apollo Domain/OS and may be for others?
X */
X#ifdef	_MMAP_WITH_SIZEP
X#	define	mmap_sizeparm(s)	(&(s))
X#else
X#	define	mmap_sizeparm(s)	(s)
X#endif
X
X/* This mess was copied from the GNU getpagesize.h.  */
X#ifndef HAVE_GETPAGESIZE
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X
X/* Assume that all systems that can run configure have sys/param.h.  */
X# ifndef HAVE_SYS_PARAM_H
X#  define HAVE_SYS_PARAM_H 1
X# endif
X
X# ifdef _SC_PAGESIZE
X#  define getpagesize() sysconf(_SC_PAGESIZE)
X# else /* no _SC_PAGESIZE */
X#  ifdef HAVE_SYS_PARAM_H
X#   include <sys/param.h>
X#   ifdef EXEC_PAGESIZE
X#    define getpagesize() EXEC_PAGESIZE
X#   else /* no EXEC_PAGESIZE */
X#    ifdef NBPG
X#     define getpagesize() NBPG * CLSIZE
X#     ifndef CLSIZE
X#      define CLSIZE 1
X#     endif /* no CLSIZE */
X#    else /* no NBPG */
X#     ifdef NBPC
X#      define getpagesize() NBPC
X#     else /* no NBPC */
X#      ifdef PAGESIZE
X#       define getpagesize() PAGESIZE
X#      endif /* PAGESIZE */
X#     endif /* no NBPC */
X#    endif /* no NBPG */
X#   endif /* no EXEC_PAGESIZE */
X#  else /* no HAVE_SYS_PARAM_H */
X#   define getpagesize() 8192	/* punt totally */
X#  endif /* no HAVE_SYS_PARAM_H */
X# endif /* no _SC_PAGESIZE */
X
X#endif /* no HAVE_GETPAGESIZE */
X
X#ifdef __cplusplus
Xextern "C" { void *malloc(unsigned); }
X#else
Xchar *malloc();
X#endif
X
Xint
Xmain()
X{
X	char *data, *data2, *data3;
X	int i, pagesize;
X	int fd;
X
X	pagesize = getpagesize();
X
X	/*
X	 * First, make a file with some known garbage in it.
X	 */
X	data = malloc(pagesize);
X	if (!data)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		*(data + i) = rand();
X	umask(0);
X	fd = creat("conftestmmap", 0600);
X	if (fd < 0)
X		exit(1);
X	if (write(fd, data, pagesize) != pagesize)
X		exit(1);
X	close(fd);
X
X	/*
X	 * Next, try to mmap the file at a fixed address which
X	 * already has something else allocated at it.  If we can,
X	 * also make sure that we see the same garbage.
X	 */
X	fd = open("conftestmmap", O_RDWR);
X	if (fd < 0)
X		exit(1);
X	data2 = malloc(2 * pagesize);
X	if (!data2)
X		exit(1);
X	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
X	if (data2 != mmap(data2, mmap_sizeparm(pagesize), PROT_READ | PROT_WRITE,
X	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data2 + i))
X			exit(1);
X
X	/*
X	 * Finally, make sure that changes to the mapped area
X	 * do not percolate back to the file as seen by read().
X	 * (This is a bug on some variants of i386 svr4.0.)
X	 */
X	for (i = 0; i < pagesize; ++i)
X		*(data2 + i) = *(data2 + i) + 1;
X	data3 = malloc(pagesize);
X	if (!data3)
X		exit(1);
X	if (read(fd, data3, pagesize) != pagesize)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data3 + i))
X			exit(1);
X	close(fd);
X	unlink("conftestmmap");
X	exit(0);
X}
X
XEOF
Xif { (eval echo configure:9639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_mmap_fixed_mapped=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_mmap_fixed_mapped=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
Xif test $ac_cv_func_mmap_fixed_mapped = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MMAP 1
XEOF
X
Xfi
X
Xfor ac_hdr in unistd.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:9665: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9670 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:9675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getpagesize
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:9704: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9709 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:9732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xecho $ac_n "checking for mmap that needs ptr to size""... $ac_c" 1>&6
Xecho "configure:9757: checking for mmap that needs ptr to size" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_mmap_sizep'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_func_mmap_sizep=no
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9765 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <fcntl.h>
X#include <signal.h>
X#include <setjmp.h>
X#include <sys/mman.h>
X
X#ifndef MAP_FILE
X#define MAP_FILE   0		/* Needed on Apollo Domain/OS */
X#endif
X
X/* This mess was copied from the GNU getpagesize.h.  */
X#ifndef HAVE_GETPAGESIZE
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X
X/* Assume that all systems that can run configure have sys/param.h.  */
X# ifndef HAVE_SYS_PARAM_H
X#  define HAVE_SYS_PARAM_H 1
X# endif
X
X# ifdef _SC_PAGESIZE
X#  define getpagesize() sysconf(_SC_PAGESIZE)
X# else /* no _SC_PAGESIZE */
X#  ifdef HAVE_SYS_PARAM_H
X#   include <sys/param.h>
X#   ifdef EXEC_PAGESIZE
X#    define getpagesize() EXEC_PAGESIZE
X#   else /* no EXEC_PAGESIZE */
X#    ifdef NBPG
X#     define getpagesize() NBPG * CLSIZE
X#     ifndef CLSIZE
X#      define CLSIZE 1
X#     endif /* no CLSIZE */
X#    else /* no NBPG */
X#     ifdef NBPC
X#      define getpagesize() NBPC
X#     else /* no NBPC */
X#      ifdef PAGESIZE
X#       define getpagesize() PAGESIZE
X#      endif /* PAGESIZE */
X#     endif /* no NBPC */
X#    endif /* no NBPG */
X#   endif /* no EXEC_PAGESIZE */
X#  else /* no HAVE_SYS_PARAM_H */
X#   define getpagesize() 8192	/* punt totally */
X#  endif /* no HAVE_SYS_PARAM_H */
X# endif /* no _SC_PAGESIZE */
X
X#endif /* no HAVE_GETPAGESIZE */
X
X#ifdef __cplusplus
Xextern "C" { void *malloc(unsigned); }
X#else
Xchar *malloc();
X#endif
X
Xjmp_buf jenv;
X
Xint
Xintr()
X{
X	signal(SIGSEGV, intr);
X	longjmp(jenv, 1);
X}
X
Xint
Xmain()
X{
X	char *data, *data2;
X	int i, pagesize, ps;
X	int fd;
X
X	pagesize = getpagesize();
X
X	/*
X	 * First, make a file with some known garbage in it.
X	 */
X	data = malloc(pagesize);
X	if (!data)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		*(data + i) = rand();
X	umask(0);
X	fd = creat("conftestmmap", 0600);
X	if (fd < 0)
X		exit(1);
X	if (write(fd, data, pagesize) != pagesize)
X		exit(1);
X	close(fd);
X
X	/*
X	 * Next, try to mmap the file at a fixed address which
X	 * already has something else allocated at it.  If we can,
X	 * also make sure that we see the same garbage.
X	 */
X	fd = open("conftestmmap", O_RDWR);
X	if (fd < 0)
X		exit(1);
X
X	/*
X	 * Keep a copy, Apollo modifies the value...
X	 */
X	ps = pagesize;
X
X	/*
X	 * Apollo mmap() is not a syscall but a library function and fails
X	 * if it tries to dereference 'ps'. We must use setjmp in order to
X	 * catch the failure.
X	 */
X	signal(SIGSEGV, intr);
X	if (setjmp(jenv) == 0) {
X		data2 = mmap(0, ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L);
X	} else {
X		data2 = (char *)-1;
X	}
X	if (data2 != (char *)-1)
X		exit(1);
X
X	signal(SIGSEGV, intr);
X	if (setjmp(jenv) == 0) {
X		data2 = mmap(0, &ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L);
X	} else {
X		data2 = (char *)-1;
X	}
X	if (data2 == (char *)-1)
X		exit(1);
X
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data2 + i))
X			exit(1);
X
X	close(fd);
X	unlink("conftestmmap");
X	exit(0);
X}
X
XEOF
Xif { (eval echo configure:9906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_mmap_sizep=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_mmap_sizep=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_func_mmap_sizep" 1>&6
Xif test $ac_cv_func_mmap_sizep = yes; then
X  cat >> confdefs.h <<\EOF
X#define _MMAP_WITH_SIZEP 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if mmap works to get shared memory""... $ac_c" 1>&6
Xecho "configure:9929: checking if mmap works to get shared memory" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_smmap'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_func_smmap=no
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9937 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <sys/mman.h>
X
X#ifndef	MAP_ANONYMOUS
X#	ifdef	MAP_ANON
X#		define MAP_ANONYMOUS MAP_ANON
X#	endif
X#endif
X
X/*
X * Needed for Apollo Domain/OS and may be for others?
X */
X#ifdef	_MMAP_WITH_SIZEP
X#	define	mmap_sizeparm(s)	(&(s))
X#else
X#	define	mmap_sizeparm(s)	(s)
X#endif
X
Xchar *
Xmkshare()
X{
X        int     size = 8192;
X        int     f;
X        char    *addr;
X
X#ifdef  MAP_ANONYMOUS   /* HP/UX */
X        f = -1;
X        addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, f, 0);
X#else
X        if ((f = open("/dev/zero", 2)) < 0)
X                exit(1);
X        addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED, f, 0);
X#endif
X        if (addr == (char *)-1)
X                exit(1);
X        close(f);
X
X        return (addr);
X}
X
Xint
Xmain()
X{
X        char    *addr;
X        
X        addr = mkshare();
X        *addr = 'I';
X
X        switch (fork()) {
X
X        case -1:
X                printf("help\n"); exit(1);
X
X        case 0: /* child */
X                *addr = 'N';
X                _exit(0);
X                break;
X        default: /* parent */
X                wait(0);
X                sleep(1);
X                break;
X        }
X
X        if (*addr != 'N')
X                exit(1);
X        exit(0);
X}
X
XEOF
Xif { (eval echo configure:10009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_smmap=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_smmap=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_func_smmap" 1>&6
Xif test $ac_cv_func_smmap = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SMMAP 1
XEOF
X
Xfi
Xecho $ac_n "checking if shmget works to get shared memory""... $ac_c" 1>&6
Xecho "configure:10031: checking if shmget works to get shared memory" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_shmget'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_func_shmget=no
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10039 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <sys/ipc.h>
X#include <sys/shm.h>
Xint
Xmain()
X{
X	int	id;
X
X	id = shmget(IPC_PRIVATE, 0x1, IPC_CREAT|0600);
X	if (id == -1)
X		exit(1);
X	shmctl(id, IPC_RMID, 0);
X        exit(0);
X}
X
XEOF
Xif { (eval echo configure:10058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_shmget=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_shmget=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_func_shmget" 1>&6
Xif test $ac_cv_func_shmget = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SHMGET 1
XEOF
X
Xfi
X# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
X# for constant arguments.  Useless!
Xecho $ac_n "checking for working alloca.h""... $ac_c" 1>&6
Xecho "configure:10082: checking for working alloca.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10087 "configure"
X#include "confdefs.h"
X#include <alloca.h>
Xint main() {
Xchar *p = alloca(2 * sizeof(int));
X; return 0; }
XEOF
Xif { (eval echo configure:10094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_header_alloca_h=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_alloca_h=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_header_alloca_h" 1>&6
Xif test $ac_cv_header_alloca_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ALLOCA_H 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for alloca""... $ac_c" 1>&6
Xecho "configure:10115: checking for alloca" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10120 "configure"
X#include "confdefs.h"
X
X#ifdef __GNUC__
X# define alloca __builtin_alloca
X#else
X# ifdef _MSC_VER
X#  include <malloc.h>
X#  define alloca _alloca
X# else
X#  if HAVE_ALLOCA_H
X#   include <alloca.h>
X#  else
X#   ifdef _AIX
X #pragma alloca
X#   else
X#    ifndef alloca /* predefined by HP cc +Olibcalls */
Xchar *alloca ();
X#    endif
X#   endif
X#  endif
X# endif
X#endif
X
Xint main() {
Xchar *p = (char *) alloca(1);
X; return 0; }
XEOF
Xif { (eval echo configure:10148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_alloca_works=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_alloca_works=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_func_alloca_works" 1>&6
Xif test $ac_cv_func_alloca_works = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ALLOCA 1
XEOF
X
Xfi
X
Xif test $ac_cv_func_alloca_works = no; then
X  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
X  # that cause trouble.  Some versions do not even contain alloca or
X  # contain a buggy version.  If you still want to use their alloca,
X  # use ar to extract alloca.o from them instead of compiling alloca.c.
X  ALLOCA=alloca.${ac_objext}
X  cat >> confdefs.h <<\EOF
X#define C_ALLOCA 1
XEOF
X
X
Xecho $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
Xecho "configure:10180: checking whether alloca needs Cray hooks" >&5
Xif eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10185 "configure"
X#include "confdefs.h"
X#if defined(CRAY) && ! defined(CRAY2)
Xwebecray
X#else
Xwenotbecray
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "webecray" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_os_cray=yes
Xelse
X  rm -rf conftest*
X  ac_cv_os_cray=no
Xfi
Xrm -f conftest*
X
Xfi
X
Xecho "$ac_t""$ac_cv_os_cray" 1>&6
Xif test $ac_cv_os_cray = yes; then
Xfor ac_func in _getb67 GETB67 getb67; do
X  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:10210: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10215 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:10238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  cat >> confdefs.h <<EOF
X#define CRAY_STACKSEG_END $ac_func
XEOF
X
X  break
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xdone
Xfi
X
Xecho $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
Xecho "configure:10265: checking stack direction for C alloca" >&5
Xif eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_c_stack_direction=0
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10273 "configure"
X#include "confdefs.h"
Xfind_stack_direction ()
X{
X  static char *addr = 0;
X  auto char dummy;
X  if (addr == 0)
X    {
X      addr = &dummy;
X      return find_stack_direction ();
X    }
X  else
X    return (&dummy > addr) ? 1 : -1;
X}
Xmain ()
X{
X  exit (find_stack_direction() < 0);
X}
XEOF
Xif { (eval echo configure:10292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_c_stack_direction=1
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_c_stack_direction=-1
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_c_stack_direction" 1>&6
Xcat >> confdefs.h <<EOF
X#define STACK_DIRECTION $ac_cv_c_stack_direction
XEOF
X
Xfi
X
Xecho $ac_n "checking if quotactl is an ioctl""... $ac_c" 1>&6
Xecho "configure:10314: checking if quotactl is an ioctl" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_quotaioctl'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10319 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/fs/ufs_quota.h>
Xint main() {
Xstruct quotctl q; ioctl(0, Q_QUOTACTL, &q)
X; return 0; }
XEOF
Xif { (eval echo configure:10327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_quotaioctl=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_quotaioctl=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_func_quotaioctl" 1>&6 
Xif test $ac_cv_func_quotaioctl = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_QUOTAIOCTL 1
XEOF
X
Xfi
Xecho $ac_n "checking for file locking via fcntl""... $ac_c" 1>&6
Xecho "configure:10347: checking for file locking via fcntl" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_fcntl_lock'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10352 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <fcntl.h>
Xint main() {
X
Xstruct flock fl;
Xfcntl(0, F_SETLK, &fl);
X; return 0; }
XEOF
Xif { (eval echo configure:10363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_fcntl_lock=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_fcntl_lock=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_func_fcntl_lock" 1>&6
Xif test $ac_cv_func_fcntl_lock = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_FCNTL_LOCKF 1
XEOF
X
Xfi
Xecho $ac_n "checking for uname""... $ac_c" 1>&6
Xecho "configure:10383: checking for uname" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10388 "configure"
X#include "confdefs.h"
X#include <sys/utsname.h>
Xint main() {
Xstruct	utsname un;
Xuname(&un);
X; return 0; }
XEOF
Xif { (eval echo configure:10396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_uname=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_uname=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_func_uname" 1>&6
Xif test $ac_cv_func_uname = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UNAME 1
XEOF
X
Xfi
Xfor ac_func in execl
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:10418: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10423 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:10446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for vfork.h""... $ac_c" 1>&6
Xecho "configure:10472: checking for vfork.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10477 "configure"
X#include "confdefs.h"
X#include <vfork.h>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:10482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  cat >> confdefs.h <<\EOF
X#define HAVE_VFORK_H 1
XEOF
X
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xecho $ac_n "checking for working vfork""... $ac_c" 1>&6
Xecho "configure:10507: checking for working vfork" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  echo $ac_n "checking for vfork""... $ac_c" 1>&6
Xecho "configure:10513: checking for vfork" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10518 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char vfork(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar vfork();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_vfork) || defined (__stub___vfork)
Xchoke me
X#else
Xvfork();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:10541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_vfork=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_vfork=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  :
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xac_cv_func_vfork_works=$ac_cv_func_vfork
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10563 "configure"
X#include "confdefs.h"
X/* Thanks to Paul Eggert for first version of this test.  */
X#include <stdio.h>
X#include <sys/types.h>
X#include <sys/stat.h>
X#ifdef HAVE_UNISTD_H
X#include <unistd.h>
X#endif
X#ifdef HAVE_VFORK_H
X#include <vfork.h>
X#endif
X#ifdef HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X#if defined(HAVE_WAIT_H)
X#include <wait.h>
X#else
X#include <sys/wait.h>
X#endif
X/* On some sparc systems, changes by the child to local and incoming
X   argument registers are propagated back to the parent.
X   The compiler is told about this with #include <vfork.h>,
X   but some compilers (e.g. gcc -O) don't grok <vfork.h>.
X   Test for this by using a static variable whose address
X   is put into a register that is clobbered by the vfork.  */
X#ifndef	VMS
Xstatic int
X#ifdef __cplusplus
Xsparc_address_test (int arg)
X#else
Xsparc_address_test (arg) int arg;
X#endif
X{
X  static pid_t child;
X  if (!child) {
X    child = vfork ();
X    if (child < 0) {
X      perror ("vfork");
X      _exit(2);
X    }
X    if (!child) {
X      arg = getpid();
X      write(-1, "", 0);
X      _exit (arg);
X    }
X  }
X  return (0);
X}
X#endif
Xint exc = 0;
X
Xint
Xmain() {
X  pid_t parent = getpid ();
X  pid_t child;
X
X#ifndef	VMS
X  sparc_address_test(0);
X#endif
X
X  child = vfork ();
X
X  if (child == 0) {
X    /* Here is another test for sparc vfork register problems.
X       This test uses lots of local variables, at least
X       as many local variables as main has allocated so far
X       including compiler temporaries.  4 locals are enough for
X       gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
X       A buggy compiler should reuse the register of parent
X       for one of the local variables, since it will think that
X       parent can't possibly be used any more in this routine.
X       Assigning to the local variable will thus munge parent
X       in the parent process.  */
X    pid_t
X      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
X      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
X    /* Convince the compiler that p..p7 are live; otherwise, it might
X       use the same hardware register for all 8 local variables.  */
X    if (p != p1 || p != p2 || p != p3 || p != p4
X	|| p != p5 || p != p6 || p != p7)
X      exc = 1;
X
X    /* On some systems (e.g. IRIX 3.3),
X       vfork doesn't separate parent from child file descriptors.
X       If the child closes a descriptor before it execs or exits,
X       this munges the parent's descriptor as well.
X       Test for this by closing stdout in the child.  */
X    if (exc == 0)
X	exc = close(fileno(stdout)) != 0;
X    /*
X     * VMS hangs if we do not call execl()
X     */
X#ifdef HAVE_EXECL
X    /*
X     * On VMS, things hang unless the child calls exec()
X     */
X    if (exc == 0)
X	execl("/bin/true", "true", (char *)0);
X    else
X	execl("/bin/false", "false", (char *)0);
X#endif
X    _exit(exc);
X  } else {
X    int status;
X    struct stat st;
X
X    while (wait(&status) != child)
X      ;
X    exit(
X	 /* Was there some problem with vforking?  */
X	 child < 0
X
X	 /* Did the child fail?  (This shouldn't happen.)  */
X	 || status
X
X	 /* Did the vfork/compiler bug occur?  */
X	 || parent != getpid()
X
X	 /* Did the file descriptor bug occur?  */
X	 || fstat(fileno(stdout), &st) != 0
X	 );
X  }
X}
XEOF
Xif { (eval echo configure:10688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_vfork_works=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_vfork_works=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_func_vfork_works" 1>&6
Xif test $ac_cv_func_vfork_works = no; then
X  cat >> confdefs.h <<\EOF
X#define vfork fork
XEOF
X
Xelse
X  cat >> confdefs.h <<\EOF
X#define HAVE_VFORK 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for sys_siglist""... $ac_c" 1>&6
Xecho "configure:10716: checking for sys_siglist" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_sys_siglist'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10724 "configure"
X#include "confdefs.h"
X
Xint
Xmain()
X{ extern char *sys_siglist[];
Xif (sys_siglist[1] == 0)
X	exit(1);
Xexit(0);}
XEOF
Xif { (eval echo configure:10734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_sys_siglist=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_sys_siglist=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_func_sys_siglist" 1>&6
Xif test $ac_cv_func_sys_siglist = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SYS_SIGLIST 1
XEOF
X
Xfi
Xecho $ac_n "checking for BSD compliant getpgrp""... $ac_c" 1>&6
Xecho "configure:10756: checking for BSD compliant getpgrp" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_bsd_getpgrp'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10764 "configure"
X#include "confdefs.h"
X
Xint
Xmain()
X{ long p;
X/*
X * POSIX getpgrp() has void parameter...
X */
X	p = getpgrp(-1);
X	if (p == getpgrp(1) && p == getpgrp(getpid()))
X		exit(1);
Xexit(0);}
XEOF
Xif { (eval echo configure:10778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_bsd_getpgrp=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_bsd_getpgrp=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_func_bsd_getpgrp" 1>&6
Xif test $ac_cv_func_bsd_getpgrp = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BSD_GETPGRP 1
XEOF
X
Xfi
Xecho $ac_n "checking for BSD compliant setpgrp""... $ac_c" 1>&6
Xecho "configure:10800: checking for BSD compliant setpgrp" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_bsd_setpgrp'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10808 "configure"
X#include "confdefs.h"
X
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
Xint
Xmain()
X{ errno = 0;
X/*
X * Force illegal pid on BSD
X */
Xif (setpgrp(-1, 100) < 0 && errno == ESRCH)
X	exit(0);
Xexit(1);}
XEOF
Xif { (eval echo configure:10825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_bsd_setpgrp=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_bsd_setpgrp=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_func_bsd_setpgrp" 1>&6
Xif test $ac_cv_func_bsd_setpgrp = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BSD_SETPGRP 1
XEOF
X
Xfi
Xecho $ac_n "checking for C99 compliant isinf""... $ac_c" 1>&6
Xecho "configure:10847: checking for C99 compliant isinf" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_c99_isinf'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10852 "configure"
X#include "confdefs.h"
X#include <math.h>
Xint main() {
X double	d;
X#ifndef	isinf
XThe isinf macro is not defined
X#endif
Xreturn (isinf(d));
X
X; return 0; }
XEOF
Xif { (eval echo configure:10864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_c99_isinf=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_c99_isinf=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_func_c99_isinf" 1>&6
Xif test $ac_cv_func_c99_isinf = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_C99_ISINF 1
XEOF
X
Xfi
Xecho $ac_n "checking for C99 compliant isnan""... $ac_c" 1>&6
Xecho "configure:10884: checking for C99 compliant isnan" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_c99_isnan'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10889 "configure"
X#include "confdefs.h"
X#include <math.h>
Xint main() {
X double	d;
X#ifndef	isnan
XThe isnan macro is not defined
X#endif
Xreturn (isnan(d));
X
X; return 0; }
XEOF
Xif { (eval echo configure:10901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_c99_isnan=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_c99_isnan=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_func_c99_isnan" 1>&6
Xif test $ac_cv_func_c99_isnan = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_C99_ISNAN 1
XEOF
X
Xfi
Xecho $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
Xecho "configure:10921: checking for sigsetjmp" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_sigsetjmp'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10926 "configure"
X#include "confdefs.h"
X
X#include <setjmp.h>
Xint main() {
X
Xsigjmp_buf jb;
Xsigsetjmp(jb, 1);
X; return 0; }
XEOF
Xif { (eval echo configure:10936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_sigsetjmp=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_sigsetjmp=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_func_sigsetjmp" 1>&6
Xif test $ac_cv_func_sigsetjmp = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SIGSETJMP 1
XEOF
X
Xfi
Xecho $ac_n "checking for siglongjmp""... $ac_c" 1>&6
Xecho "configure:10956: checking for siglongjmp" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_siglongjmp'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10961 "configure"
X#include "confdefs.h"
X
X#include <setjmp.h>
Xint main() {
X
Xsigjmp_buf jb;
Xsigsetjmp(jb, 1);
Xsiglongjmp(jb, 1);
X; return 0; }
XEOF
Xif { (eval echo configure:10972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_siglongjmp=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_siglongjmp=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_func_siglongjmp" 1>&6
Xif test $ac_cv_func_siglongjmp = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SIGLONGJMP 1
XEOF
X
Xfi
Xfor ac_func in access eaccess euidaccess
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:10994: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10999 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in memchr memcpy memmove memset
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11049: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11054 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in brk sbrk strerror nice flock lockf fchdir statvfs quotactl
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11104: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11109 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in realpath resolvepath
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11159: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11164 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in dup dup2
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11214: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11219 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getcwd shmat semget
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11269: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11274 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in lstat readlink symlink link rename mkfifo mknod
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11324: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11329 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in setreuid setresuid seteuid setuid
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11379: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11384 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in setregid setresgid setegid setgid
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11434: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11439 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getuid geteuid getgid getegid
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11489: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11494 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getpid getppid
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11544: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11549 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getpgid setpgid getsid setsid
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11599: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11604 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getpgrp setpgrp
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11654: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11659 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getspnam getspwnam
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11709: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11714 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in sync fsync fork forkx vforkx forkall forkallx wait wait4 waitid waitpid getrusage getrlimit setrlimit ulimit
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11764: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11769 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in execl execle execlp execv execve execvp
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11819: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11824 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getexecname
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11874: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11879 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getprogname setprogname
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11929: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11934 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in gethostid gethostname getdomainname getpagesize getdtablesize
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11984: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11989 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in gettimeofday settimeofday time stime gethrtime
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12039: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12044 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in ftime tzset mktime gmtime localtime timegm timelocal
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12094: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12099 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in ctime cftime ascftime strftime
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12149: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12154 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in poll select isastream
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12204: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12209 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in chown fchown lchown chmod fchmod lchmod times utime utimes futimes lutimes
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12259: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12264 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in futimens utimensat
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12314: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12319 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in ecvt_r fcvt_r gcvt_r
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12369: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12374 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in econvert fconvert gconvert
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12424: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12429 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in isinf isnan
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12479: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12484 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in rand drand48
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12534: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12539 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in strtol strtoll strtoul strtoull strtod
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12589: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12594 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in setpriority DosSetPriority
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12644: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12649 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in DosAllocSharedMem
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12699: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12704 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in seekdir fdopendir
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12754: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12759 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in openat fstatat fchownat futimesat renameat unlinkat
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12809: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12814 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in attropen
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12864: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12869 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in __accessat
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12919: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12924 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in accessat
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12974: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12979 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in mkdirat faccessat fchmodat linkat mkfifoat mknodat readlinkat symlinkat
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13029: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13034 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in popen pclose _popen _pclose
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13084: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13089 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in strsignal str2sig sig2str
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13139: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13144 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in kill killpg
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13194: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13199 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in signal sigrelse sigprocmask sigsetmask sigset sigaltstack
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13249: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13254 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in sleep usleep yield
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13304: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13309 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in tcgetattr tcsetattr tcgetpgrp tcsetpgrp
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13359: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13364 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getenv putenv setenv unsetenv
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13414: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13419 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in snprintf strcasecmp
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13469: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13474 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in strcat strncat strcmp strncmp strcpy strlcpy strncpy strdup strlen strchr strrchr
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13524: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13529 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in wcscat wcsncat wcscmp wcsncmp wcscpy wcslcpy wcsncpy wcsdup wcslen wcschr wcsrchr
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13579: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13584 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in wcwidth wcswidth wctype iswctype
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13634: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13639 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in malloc calloc valloc realloc memalign posix_memalign
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13689: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13694 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in madvise
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13744: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13749 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in mktemp mkstemp
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13799: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13804 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in chflags fchflags fflagstostr strtofflags
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13854: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13859 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in fnmatch
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13909: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13914 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in truncate ftruncate
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13964: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13969 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getppriv setppriv priv_set
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14019: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14024 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getroles privbit_set
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14074: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14079 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in setlocale localeconv nl_langinfo
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14129: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14134 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in setbuf setvbuf
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14184: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14189 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in clone_area create_area delete_area
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14239: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14244 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X
Xecho Checking for POSIX violations by the POSIX.1-2008 standard:
Xfor ac_func in fexecl fexecle fexecv fexecve
Xdo
Xecho $ac_n "checking for raw availability of $ac_func""... $ac_c" 1>&6
Xecho "configure:14296: checking for raw availability of $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_rfunc_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14301 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X$ac_func();
X
X; return 0; }
XEOF
Xif { (eval echo configure:14314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_rfunc_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_rfunc_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_rfunc_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_RAW_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in fspawnv fspawnl fspawnv_nowait
Xdo
Xecho $ac_n "checking for raw availability of $ac_func""... $ac_c" 1>&6
Xecho "configure:14341: checking for raw availability of $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_rfunc_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14346 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X$ac_func();
X
X; return 0; }
XEOF
Xif { (eval echo configure:14359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_rfunc_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_rfunc_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_rfunc_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_RAW_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X
Xfor ac_func in getline fgetline
Xdo
Xecho $ac_n "checking for raw availability of $ac_func""... $ac_c" 1>&6
Xecho "configure:14387: checking for raw availability of $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_rfunc_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14392 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X$ac_func();
X
X; return 0; }
XEOF
Xif { (eval echo configure:14405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_rfunc_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_rfunc_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_rfunc_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_RAW_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xecho End of tests for POSIX violations by the POSIX.1-2008 standard.
X
Xecho $ac_n "checking if dirfd is defined or function""... $ac_c" 1>&6
Xecho "configure:14432: checking if dirfd is defined or function" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_dirfd'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14437 "configure"
X#include "confdefs.h"
X#include <dirent.h>
Xint main() {
X
X#ifndef dirfd
X	char *p = (char *) dirfd;
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:14447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_have_dirfd=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_have_dirfd=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_have_dirfd" 1>&6
X  ac_tr_dfunc=HAVE_`echo dirfd | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_dirfd = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if iswprint is defined or function""... $ac_c" 1>&6
Xecho "configure:14469: checking if iswprint is defined or function" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_iswprint'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14474 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
X#ifdef	HAVE_WCTYPE_H
X#include <wctype.h>
X#endif
X
Xint main() {
X
X#ifndef iswprint
X	char *p = (char *) iswprint;
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:14491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_have_iswprint=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_have_iswprint=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_have_iswprint" 1>&6
X  ac_tr_dfunc=HAVE_`echo iswprint | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_iswprint = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if finite is defined or function""... $ac_c" 1>&6
Xecho "configure:14513: checking if finite is defined or function" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_finite'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14518 "configure"
X#include "confdefs.h"
X#include <ieeefp.h>
Xint main() {
X
X#ifndef finite
X	char *p = (char *) finite;
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:14528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_have_finite=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_have_finite=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_have_finite" 1>&6
X  ac_tr_dfunc=HAVE_`echo finite | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_finite = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
Xecho $ac_n "checking if isnand is defined or function""... $ac_c" 1>&6
Xecho "configure:14549: checking if isnand is defined or function" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_isnand'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14554 "configure"
X#include "confdefs.h"
X#include <ieeefp.h>
Xint main() {
X
X#ifndef isnand
X	char *p = (char *) isnand;
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:14564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_have_isnand=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_have_isnand=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_have_isnand" 1>&6
X  ac_tr_dfunc=HAVE_`echo isnand | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_isnand = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if we may not define our own malloc()""... $ac_c" 1>&6
Xecho "configure:14586: checking if we may not define our own malloc()" >&5
Xif eval "test \"`echo '$''{'ac_cv_no_user_malloc'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14594 "configure"
X#include "confdefs.h"
X
Xstatic int mcalled;
Xchar *
Xmalloc(s)
X	int	s;
X{
X	extern	char *sbrk();
X
X	/*
X	 * Don't ask me why, but with Cygwin on 64 Bit Vista this hangs
X	 * infinitely and is undebuggable unless we call write() here...
X	 */
X	write(2, "", 0);
X	mcalled++;
X	_exit(0);
X	return (sbrk(s));
X}
X
Xfree(p) char *p;{}
X	
Xmain()
X{
X#ifdef	HAVE_STRDUP
X	strdup("aaa");
X#else
X	exit(0);
X#endif
X	exit(1);}
XEOF
Xif { (eval echo configure:14625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_no_user_malloc=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_no_user_malloc=yes
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_no_user_malloc" 1>&6
Xif test $ac_cv_no_user_malloc = yes; then
X  cat >> confdefs.h <<\EOF
X#define NO_USER_MALLOC 1
XEOF
X
Xfi
Xecho $ac_n "checking for working extern long timezone ""... $ac_c" 1>&6
Xecho "configure:14647: checking for working extern long timezone " >&5
Xif eval "test \"`echo '$''{'ac_cv_var_timezone'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14655 "configure"
X#include "confdefs.h"
X
Xextern	long	timezone;
X
Xint
Xmain()
X{
X	exit(timezone != 0);
X}
XEOF
Xif { (eval echo configure:14666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_var_timezone=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_var_timezone=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_var_timezone" 1>&6
Xif test $ac_cv_var_timezone = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_VAR_TIMEZONE 1
XEOF
X
Xfi
Xecho $ac_n "checking for extern timezone in time.h or sys/time.h""... $ac_c" 1>&6
Xecho "configure:14688: checking for extern timezone in time.h or sys/time.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_var_timezone_def'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14693 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif
Xint main() {
Xtimezone = 1;
X; return 0; }
XEOF
Xif { (eval echo configure:14711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_var_timezone_def=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_var_timezone_def=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_var_timezone_def" 1>&6
Xif test $ac_cv_var_timezone_def = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_VAR_TIMEZONE_DEF 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if link() allows hard links on symlinks""... $ac_c" 1>&6
Xecho "configure:14732: checking if link() allows hard links on symlinks" >&5
Xif eval "test \"`echo '$''{'ac_cv_hard_symlinks'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14740 "configure"
X#include "confdefs.h"
X
Xmain()
X{
X	int	ret = 0;
X
X	unlink("confdefs.f1");
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	if (symlink("confdefs.f1", "confdefs.l1") < 0)
X		ret = 1;
X	if (link("confdefs.l1", "confdefs.h1") < 0)
X		ret = 1;
X
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	exit(ret);
X}
XEOF
Xif { (eval echo configure:14762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_hard_symlinks=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_hard_symlinks=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_hard_symlinks" 1>&6
Xif test $ac_cv_hard_symlinks = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_HARD_SYMLINKS 1
XEOF
X
Xfi
Xecho $ac_n "checking if link() does not folow symlinks""... $ac_c" 1>&6
Xecho "configure:14784: checking if link() does not folow symlinks" >&5
Xif eval "test \"`echo '$''{'ac_cv_link_nofollow'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14792 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <sys/stat.h>
X
Xmain()
X{
X	int	ret = 0;
X	int	f;
X	struct stat sb;
X
X	unlink("confdefs.f1");
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	f = creat("confdefs.f1", 0666);
X	close(f);
X	if (symlink("confdefs.f1", "confdefs.l1") < 0)
X		ret = 1;
X	if (link("confdefs.l1", "confdefs.h1") < 0)
X		ret = 1;
X
X	stat("confdefs.f1", &sb);
X	if (sb.st_nlink == 2)
X		ret = 1;
X
X	unlink("confdefs.f1");
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	exit(ret);
X}
XEOF
Xif { (eval echo configure:14826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_link_nofollow=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_link_nofollow=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_link_nofollow" 1>&6
Xif test $ac_cv_link_nofollow = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_LINK_NOFOLLOW 1
XEOF
X
Xfi
Xfor ac_hdr in unistd.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:14851: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14856 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:14861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xecho $ac_n "checking if access() does implement E_OK""... $ac_c" 1>&6
Xecho "configure:14888: checking if access() does implement E_OK" >&5
Xif eval "test \"`echo '$''{'ac_cv_access_e_ok'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14896 "configure"
X#include "confdefs.h"
X
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X#ifndef	R_OK
X#define	R_OK	4	/* Test for Read permission */
X#define	W_OK	2	/* Test for Write permission */
X#define	X_OK	1	/* Test for eXecute permission */
X#define	F_OK	0	/* Test for existence of File */
X#endif
X
X#ifndef	E_OK
X#ifdef	EFF_ONLY_OK
X#define	E_OK	EFF_ONLY_OK /* Irix */
X#else
X#ifdef	EUID_OK
X#define	E_OK	EUID_OK	/* UNICOS (0400) */
X#else
X#define	E_OK	010	/* Test effective uids */
X#endif
X#endif
X#endif
X
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
X
Xmain()
X{
X#ifdef	_MSC_VER
X/*
X * If we use "cl" to compile and call access(".", E_OK|F_OK), the program will
X * cause an exception that results in a popup window. For this reason, the test
X * is disabled for "cl",  it would not work anyway.
X */	
X	int	ret = 1;
X#else
X	int	ret = 0;
X
X	if (access(".", F_OK) != 0)
X		ret = 1;
X	else if (access(".", E_OK|F_OK) != 0)
X		ret = 1;
X	else if (access(".", (R_OK<<4)|F_OK) == 0)
X		ret = 1;
X#endif
X
X	exit(ret);
X}
XEOF
Xif { (eval echo configure:14949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_access_e_ok=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_access_e_ok=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xecho "$ac_t""$ac_cv_access_e_ok" 1>&6
Xif test $ac_cv_access_e_ok = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ACCESS_E_OK 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for fseeko()""... $ac_c" 1>&6
Xecho "configure:14972: checking for fseeko()" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_fseeko'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14977 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xint main() {
Xreturn !fseeko;
X; return 0; }
XEOF
Xif { (eval echo configure:14984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_fseeko=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_fseeko=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_func_fseeko" 1>&6
Xif test $ac_cv_func_fseeko = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_FSEEKO 1
XEOF
X
Xfi
Xecho $ac_n "checking for ftello()""... $ac_c" 1>&6
Xecho "configure:15004: checking for ftello()" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_ftello'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15009 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xint main() {
Xreturn !ftello;
X; return 0; }
XEOF
Xif { (eval echo configure:15016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_ftello=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_ftello=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_func_ftello" 1>&6
Xif test $ac_cv_func_ftello = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_FTELLO 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
Xecho "configure:15037: checking for dlopen in -lc" >&5
Xac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lc  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 15045 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar dlopen();
X
Xint main() {
Xdlopen()
X; return 0; }
XEOF
Xif { (eval echo configure:15056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_dl=""
Xelse
X  echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Xecho "configure:15075: checking for dlopen in -ldl" >&5
Xac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-ldl  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 15083 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar dlopen();
X
Xint main() {
Xdlopen()
X; return 0; }
XEOF
Xif { (eval echo configure:15094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_dl="-ldl"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_dl"
Xfor ac_func in dlopen dlclose dlsym dlerror
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15121: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15126 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in shl_load shl_unload shl_gethandle
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15176: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15181 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in LoadLibrary FreeLibrary GetProcAddress
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15231: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15236 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
XLIBS="$ac_save_LIBS"
X
Xecho $ac_n "checking for rcmd in -lsocket""... $ac_c" 1>&6
Xecho "configure:15286: checking for rcmd in -lsocket" >&5
Xac_lib_var=`echo socket'_'rcmd | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lsocket  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 15294 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar rcmd();
X
Xint main() {
Xrcmd()
X; return 0; }
XEOF
Xif { (eval echo configure:15305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_socket="-lsocket"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_socket"
Xecho $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6
Xecho "configure:15328: checking for inet_ntoa in -lnsl" >&5
Xac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lnsl  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 15336 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar inet_ntoa();
X
Xint main() {
Xinet_ntoa()
X; return 0; }
XEOF
Xif { (eval echo configure:15347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_nsl="-lnsl"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
XLIBS="$LIBS $lib_nsl"
Xfor ac_func in rcmd socket socketpair
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15371: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15376 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getservbyname inet_ntoa
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15426: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15431 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getaddrinfo getnameinfo
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15481: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15486 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
XLIBS="$ac_save_LIBS"
X
Xac_save_LIBS="$LIBS"
Xecho $ac_n "checking for res_init in -lc""... $ac_c" 1>&6
Xecho "configure:15537: checking for res_init in -lc" >&5
Xac_lib_var=`echo c'_'res_init | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lc  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 15545 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar res_init();
X
Xint main() {
Xres_init()
X; return 0; }
XEOF
Xif { (eval echo configure:15556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_resolv=""
Xelse
X  echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for res_init in -lresolv""... $ac_c" 1>&6
Xecho "configure:15575: checking for res_init in -lresolv" >&5
Xac_lib_var=`echo resolv'_'res_init | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lresolv  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 15583 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar res_init();
X
Xint main() {
Xres_init()
X; return 0; }
XEOF
Xif { (eval echo configure:15594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_resolv="-lresolv"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
XLIBS="$ac_save_LIBS"
X
X# Check whether --enable-largefile or --disable-largefile was given.
Xif test "${enable_largefile+set}" = set; then
X  enableval="$enable_largefile"
X  :
Xfi
X
X   if test "$enable_largefile" != no; then
X
X     echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
Xecho "configure:15627: checking for special C compiler options needed for large files" >&5
Xif eval "test \"`echo '$''{'ac_cv_sys_largefile_CC'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_cv_sys_largefile_CC=no
X        largefile_cc_opt=""
X        if test "$GCC" != yes; then
X	  # IRIX 6.2 and later do not support large files by default,
X	  # so use the C compiler's -n32 option if that helps.
X	  cat > conftest.$ac_ext <<EOF
X#line 15637 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X    /* Check that off_t can represent 2**63 - 1 correctly.
X       We can't simply "#define LARGE_OFF_T 9223372036854775807",
X       since some C++ compilers masquerading as C compilers
X       incorrectly reject 9223372036854775807.  */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
X  
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:15653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  :
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_save_CC="${CC-cc}"
X	     CC="$CC -n32"
X	     cat > conftest.$ac_ext <<EOF
X#line 15662 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X    /* Check that off_t can represent 2**63 - 1 correctly.
X       We can't simply "#define LARGE_OFF_T 9223372036854775807",
X       since some C++ compilers masquerading as C compilers
X       incorrectly reject 9223372036854775807.  */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
X  
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:15678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_sys_largefile_CC=' -n32'
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
X	     CC="$ac_save_CC"
Xfi
Xrm -f conftest*
X        fi
Xfi
X
Xecho "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
X     if test "$ac_cv_sys_largefile_CC" != no; then
X       CC="$CC$ac_cv_sys_largefile_CC"
X       largefile_cc_opt="$ac_cv_sys_largefile_CC"
X     fi
X
X     echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
Xecho "configure:15699: checking for _FILE_OFFSET_BITS value needed for large files" >&5
Xif eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_cv_sys_file_offset_bits=no
X      cat > conftest.$ac_ext <<EOF
X#line 15705 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X    /* Check that off_t can represent 2**63 - 1 correctly.
X       We can't simply "#define LARGE_OFF_T 9223372036854775807",
X       since some C++ compilers masquerading as C compilers
X       incorrectly reject 9223372036854775807.  */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
X  
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:15721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  :
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  cat > conftest.$ac_ext <<EOF
X#line 15728 "configure"
X#include "confdefs.h"
X#define _FILE_OFFSET_BITS 64
X#include <sys/types.h>
X    /* Check that off_t can represent 2**63 - 1 correctly.
X       We can't simply "#define LARGE_OFF_T 9223372036854775807",
X       since some C++ compilers masquerading as C compilers
X       incorrectly reject 9223372036854775807.  */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
X  
X	   
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:15746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_sys_file_offset_bits=64
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
X   if test "$ac_cv_sys_file_offset_bits" != no; then
X     cat >> confdefs.h <<EOF
X#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
XEOF
X
X   fi
X     echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
Xecho "configure:15766: checking for _LARGE_FILES value needed for large files" >&5
Xif eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_cv_sys_large_files=no
X      cat > conftest.$ac_ext <<EOF
X#line 15772 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X    /* Check that off_t can represent 2**63 - 1 correctly.
X       We can't simply "#define LARGE_OFF_T 9223372036854775807",
X       since some C++ compilers masquerading as C compilers
X       incorrectly reject 9223372036854775807.  */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
X  
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:15788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  :
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  cat > conftest.$ac_ext <<EOF
X#line 15795 "configure"
X#include "confdefs.h"
X#define _LARGE_FILES 1
X#include <sys/types.h>
X    /* Check that off_t can represent 2**63 - 1 correctly.
X       We can't simply "#define LARGE_OFF_T 9223372036854775807",
X       since some C++ compilers masquerading as C compilers
X       incorrectly reject 9223372036854775807.  */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
X  
X	   
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:15813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_sys_large_files=1
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_sys_large_files" 1>&6
X   if test "$ac_cv_sys_large_files" != no; then
X     cat >> confdefs.h <<EOF
X#define _LARGE_FILES $ac_cv_sys_large_files
XEOF
X
X   fi
X     echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
Xecho "configure:15833: checking for _LARGEFILE_SOURCE value needed for large files" >&5
Xif eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_cv_sys_largefile_source=no
X      cat > conftest.$ac_ext <<EOF
X#line 15839 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xint main() {
Xreturn !fseeko;
X; return 0; }
XEOF
Xif { (eval echo configure:15846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  :
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  cat > conftest.$ac_ext <<EOF
X#line 15853 "configure"
X#include "confdefs.h"
X#define _LARGEFILE_SOURCE 1
X#include <stdio.h>
X	   
Xint main() {
Xreturn !fseeko;
X; return 0; }
XEOF
Xif { (eval echo configure:15862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_sys_largefile_source=1
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_sys_largefile_source" 1>&6
X   if test "$ac_cv_sys_largefile_source" != no; then
X     cat >> confdefs.h <<EOF
X#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
XEOF
X
X   fi
X   fi
X  
Xecho $ac_n "checking if system supports Large Files at all""... $ac_c" 1>&6
Xecho "configure:15884: checking if system supports Large Files at all" >&5
Xif eval "test \"`echo '$''{'ac_cv_largefiles'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15889 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#include <sys/types.h>
Xint main() {
X
X/*
X * Check that off_t can represent 2**63 - 1 correctly.
X * We can't simply "#define LARGE_OFF_T 9223372036854775807",
X * since some C++ compilers masquerading as C compilers
X * incorrectly reject 9223372036854775807.
X */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
Xreturn !fseeko;
Xreturn !ftello;
X; return 0; }
XEOF
Xif { (eval echo configure:15909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_largefiles=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_largefiles=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_largefiles" 1>&6
X	if test $ac_cv_largefiles = yes; then
X		cat >> confdefs.h <<\EOF
X#define HAVE_LARGEFILES 1
XEOF
X
X	fi
X
Xcat >> confdefs.h <<EOF
X#define HOST_ALIAS "$host_alias"
XEOF
X
Xcat >> confdefs.h <<EOF
X#define HOST_SUB "$host"
XEOF
X
Xcat >> confdefs.h <<EOF
X#define HOST_CPU "$host_cpu"
XEOF
X
Xcat >> confdefs.h <<EOF
X#define HOST_VENDOR "$host_vendor"
XEOF
X
Xcat >> confdefs.h <<EOF
X#define HOST_OS "$host_os"
XEOF
X
X
X
Xecho $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
Xecho "configure:15952: checking for crypt in -lc" >&5
Xac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lc  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 15960 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar crypt();
X
Xint main() {
Xcrypt()
X; return 0; }
XEOF
Xif { (eval echo configure:15971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_crypt=""
Xelse
X  echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
Xecho "configure:15990: checking for crypt in -lcrypt" >&5
Xac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lcrypt  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 15998 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar crypt();
X
Xint main() {
Xcrypt()
X; return 0; }
XEOF
Xif { (eval echo configure:16009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_crypt="-lcrypt"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_crypt"
Xfor ac_func in crypt
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16037: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16042 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
XLIBS="$ac_save_LIBS"
X
Xecho $ac_n "checking for gettext in -lc""... $ac_c" 1>&6
Xecho "configure:16092: checking for gettext in -lc" >&5
Xac_lib_var=`echo c'_'gettext | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS="-lc  $LIBS"
Xcat > conftest.$ac_ext <<EOF
X#line 16100 "configure"
X#include "confdefs.h"
X#include <libintl.h>
Xint main() {
X
X	char *p = (char *) gettext;
X
X	return ((int)p);
X
X; return 0; }
XEOF
Xif { (eval echo configure:16111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_intl=""
Xelse
X  echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
Xecho "configure:16130: checking for gettext in -lintl" >&5
Xac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS="-lintl  $LIBS"
Xcat > conftest.$ac_ext <<EOF
X#line 16138 "configure"
X#include "confdefs.h"
X#include <libintl.h>
Xint main() {
X
X	char *p = (char *) gettext;
X
X	return ((int)p);
X
X; return 0; }
XEOF
Xif { (eval echo configure:16149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_intl="-lintl"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_intl"
Xecho $ac_n "checking if gettext is defined or function""... $ac_c" 1>&6
Xecho "configure:16175: checking if gettext is defined or function" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_gettext'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16180 "configure"
X#include "confdefs.h"
X#include <libintl.h>
Xint main() {
X
X#ifndef gettext
X	char *p = (char *) gettext;
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:16190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_have_gettext=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_have_gettext=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_have_gettext" 1>&6
X  ac_tr_dfunc=HAVE_`echo gettext | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_gettext = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
XLIBS="$ac_save_LIBS"
X
Xecho $ac_n "checking for iconv_open in -lc""... $ac_c" 1>&6
Xecho "configure:16213: checking for iconv_open in -lc" >&5
Xac_lib_var=`echo c'_'iconv_open | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS="-lc  $LIBS"
Xcat > conftest.$ac_ext <<EOF
X#line 16221 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X	char *p = (char *) iconv_open;
X
X	return ((int)p);
X
X; return 0; }
XEOF
Xif { (eval echo configure:16232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_iconv=""
Xelse
X  echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
Xecho "configure:16251: checking for iconv_open in -liconv" >&5
Xac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS="-liconv  $LIBS"
Xcat > conftest.$ac_ext <<EOF
X#line 16259 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X	char *p = (char *) iconv_open;
X
X	return ((int)p);
X
X; return 0; }
XEOF
Xif { (eval echo configure:16270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_iconv="-liconv"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_iconv"
Xecho $ac_n "checking if iconv is defined or function""... $ac_c" 1>&6
Xecho "configure:16296: checking if iconv is defined or function" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_iconv'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16301 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X#ifndef iconv
X	char *p = (char *) iconv;
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:16311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_have_iconv=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_have_iconv=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_have_iconv" 1>&6
X  ac_tr_dfunc=HAVE_`echo iconv | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_iconv = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
Xecho $ac_n "checking if iconv_open is defined or function""... $ac_c" 1>&6
Xecho "configure:16332: checking if iconv_open is defined or function" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_iconv_open'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16337 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X#ifndef iconv_open
X	char *p = (char *) iconv_open;
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:16347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_have_iconv_open=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_have_iconv_open=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_have_iconv_open" 1>&6
X  ac_tr_dfunc=HAVE_`echo iconv_open | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_iconv_open = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
Xecho $ac_n "checking if iconv_close is defined or function""... $ac_c" 1>&6
Xecho "configure:16368: checking if iconv_close is defined or function" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_iconv_close'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16373 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X#ifndef iconv_close
X	char *p = (char *) iconv_close;
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:16383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_have_iconv_close=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_have_iconv_close=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_have_iconv_close" 1>&6
X  ac_tr_dfunc=HAVE_`echo iconv_close | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_iconv_close = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
Xecho $ac_n "checking if libiconv is defined or function""... $ac_c" 1>&6
Xecho "configure:16404: checking if libiconv is defined or function" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_libiconv'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16409 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X#ifndef libiconv
X	char *p = (char *) libiconv;
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:16419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_have_libiconv=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_have_libiconv=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_have_libiconv" 1>&6
X  ac_tr_dfunc=HAVE_`echo libiconv | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_libiconv = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
Xecho $ac_n "checking if libiconv_open is defined or function""... $ac_c" 1>&6
Xecho "configure:16440: checking if libiconv_open is defined or function" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_libiconv_open'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16445 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X#ifndef libiconv_open
X	char *p = (char *) libiconv_open;
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:16455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_have_libiconv_open=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_have_libiconv_open=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_have_libiconv_open" 1>&6
X  ac_tr_dfunc=HAVE_`echo libiconv_open | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_libiconv_open = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
Xecho $ac_n "checking if libiconv_close is defined or function""... $ac_c" 1>&6
Xecho "configure:16476: checking if libiconv_close is defined or function" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_libiconv_close'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16481 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X#ifndef libiconv_close
X	char *p = (char *) libiconv_close;
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:16491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_have_libiconv_close=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_have_libiconv_close=no
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_have_libiconv_close" 1>&6
X  ac_tr_dfunc=HAVE_`echo libiconv_close | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_libiconv_close = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
XLIBS="$ac_save_LIBS"
X
Xif test $ac_cv_header_camlib_h = yes; then
X  scsi_lib=-lcam
X  lib_scsi=-lcam
Xfi
X
Xif test "$ac_cv_header_sys_acl_h" = yes; then
X
X  echo "checking for Posix Access Control List support" 1>&6
Xecho "configure:16521: checking for Posix Access Control List support" >&5
X  echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
Xecho "configure:16523: checking for acl_get_file in -lacl" >&5
Xac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lacl  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 16531 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar acl_get_file();
X
Xint main() {
Xacl_get_file()
X; return 0; }
XEOF
Xif { (eval echo configure:16542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_acl="-lacl"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
X  echo $ac_n "checking for acl_get_file in -lpacl""... $ac_c" 1>&6
Xecho "configure:16563: checking for acl_get_file in -lpacl" >&5
Xac_lib_var=`echo pacl'_'acl_get_file | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lpacl  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 16571 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar acl_get_file();
X
Xint main() {
Xacl_get_file()
X; return 0; }
XEOF
Xif { (eval echo configure:16582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_acl="-lpacl"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
X
X		
X	if test ".$lib_acl" != .; then
X		lib_acl_test="$lib_acl"
X	fi
X
X  ac_save_LIBS="$LIBS"
X  LIBS="$LIBS $lib_acl"
X  for ac_func in acl_get_file acl_set_file acl_from_text acl_to_text acl_free acl_delete_def_file
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16613: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16618 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X  for ac_func in acl_extended_file
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16668: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16673 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X  for ac_func in acl_get_entry
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16723: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16728 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X  LIBS="$ac_save_LIBS"
X
X  echo "checking for Solaris Access Control List support" 1>&6
Xecho "configure:16778: checking for Solaris Access Control List support" >&5
X  echo $ac_n "checking for acltotext in -lsec""... $ac_c" 1>&6
Xecho "configure:16780: checking for acltotext in -lsec" >&5
Xac_lib_var=`echo sec'_'acltotext | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lsec  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 16788 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar acltotext();
X
Xint main() {
Xacltotext()
X; return 0; }
XEOF
Xif { (eval echo configure:16799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_acl="-lsec"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
X  ac_save_LIBS="$LIBS"
X  LIBS="$LIBS $lib_acl"
X  for ac_func in acl facl aclfromtext acltotext
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16824: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16829 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X  LIBS="$ac_save_LIBS"
X
X  
X  echo "checking for HP-UX Access Control List support" 1>&6
Xecho "configure:16880: checking for HP-UX Access Control List support" >&5
X  for ac_func in getacl fgetacl setacl fsetacl strtoacl acltostr cpacl fcpacl chownacl setaclentry fsetaclentry
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16884: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16889 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X
X  
Xfi
X
Xif test "$ac_cv_header_attr_xattr_h" = yes; then
X  echo "checking for Linux flavor Extended Attribute support" 1>&6
Xecho "configure:16942: checking for Linux flavor Extended Attribute support" >&5
X  echo $ac_n "checking for getxattr in -lattr""... $ac_c" 1>&6
Xecho "configure:16944: checking for getxattr in -lattr" >&5
Xac_lib_var=`echo attr'_'getxattr | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lattr  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 16952 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar getxattr();
X
Xint main() {
Xgetxattr()
X; return 0; }
XEOF
Xif { (eval echo configure:16963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_attr="-lattr"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
X  ac_save_LIBS="$LIBS"
X  LIBS="$LIBS $lib_attr"
X  for ac_func in getxattr setxattr listxattr lgetxattr lsetxattr llistxattr
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16988: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16993 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:17016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X  LIBS="$ac_save_LIBS"
Xfi
X
Xecho "checking for RBAC support" 1>&6
Xecho "configure:17044: checking for RBAC support" >&5
Xecho $ac_n "checking for getuserattr in -lsecdb""... $ac_c" 1>&6
Xecho "configure:17046: checking for getuserattr in -lsecdb" >&5
Xac_lib_var=`echo secdb'_'getuserattr | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lsecdb  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 17054 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar getuserattr();
X
Xint main() {
Xgetuserattr()
X; return 0; }
XEOF
Xif { (eval echo configure:17065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_secdb="-lsecdb"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_secdb"
Xfor ac_func in getauthattr getuserattr getexecattr getprofattr
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:17090: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17095 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:17118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
XLIBS="$ac_save_LIBS"
X
Xecho "checking for gmatch() support" 1>&6
Xecho "configure:17145: checking for gmatch() support" >&5
Xecho $ac_n "checking for gmatch in -lgen""... $ac_c" 1>&6
Xecho "configure:17147: checking for gmatch in -lgen" >&5
Xac_lib_var=`echo gen'_'gmatch | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lgen  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 17155 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar gmatch();
X
Xint main() {
Xgmatch()
X; return 0; }
XEOF
Xif { (eval echo configure:17166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_gen="-lgen"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_gen"
Xfor ac_func in gmatch
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:17191: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17196 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:17219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
XLIBS="$ac_save_LIBS"
X
Xfor ac_func in thr_yield
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:17248: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17253 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:17276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X
Xecho $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Xecho "configure:17302: checking for pthread_create in -lpthread" >&5
Xac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lpthread  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 17310 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar pthread_create();
X
Xint main() {
Xpthread_create()
X; return 0; }
XEOF
Xif { (eval echo configure:17321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_pthread="-lpthread"
Xelse
X  echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
Xecho "configure:17340: checking for pthread_create in -lc" >&5
Xac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lc  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 17348 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar pthread_create();
X
Xint main() {
Xpthread_create()
X; return 0; }
XEOF
Xif { (eval echo configure:17359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_pthread=""
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_pthread"
Xfor ac_func in pthread_create pthread_kill
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:17387: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17392 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:17415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in pthread_mutex_lock pthread_cond_wait pthread_spin_lock
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:17442: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17447 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:17470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
XLIBS="$ac_save_LIBS"
X
Xecho $ac_n "checking for clock_gettime in -lc""... $ac_c" 1>&6
Xecho "configure:17497: checking for clock_gettime in -lc" >&5
Xac_lib_var=`echo c'_'clock_gettime | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lc  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 17505 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar clock_gettime();
X
Xint main() {
Xclock_gettime()
X; return 0; }
XEOF
Xif { (eval echo configure:17516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_rt=""
Xelse
X  echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for clock_gettime in -lrt""... $ac_c" 1>&6
Xecho "configure:17535: checking for clock_gettime in -lrt" >&5
Xac_lib_var=`echo rt'_'clock_gettime | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lrt  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 17543 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar clock_gettime();
X
Xint main() {
Xclock_gettime()
X; return 0; }
XEOF
Xif { (eval echo configure:17554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_rt="-lrt"
Xelse
X  echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for clock_gettime in -lposix4""... $ac_c" 1>&6
Xecho "configure:17573: checking for clock_gettime in -lposix4" >&5
Xac_lib_var=`echo posix4'_'clock_gettime | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lposix4  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 17581 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar clock_gettime();
X
Xint main() {
Xclock_gettime()
X; return 0; }
XEOF
Xif { (eval echo configure:17592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X  lib_rt="-lposix4"
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
Xfi
X
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_rt"
Xfor ac_func in clock_gettime clock_settime clock_getres
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:17622: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17627 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:17650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in sched_getparam sched_setparam sched_getscheduler sched_setscheduler
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:17677: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17682 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:17705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in sched_yield
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:17732: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17737 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:17760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in nanosleep
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:17787: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17792 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:17815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  echo "$ac_t""no" 1>&6
Xfi
Xdone
X
XLIBS="$ac_save_LIBS"
X
Xecho $ac_n "checking for /dev/tty""... $ac_c" 1>&6
Xecho "configure:17842: checking for /dev/tty" >&5
Xif test -r /dev/tty; then
X	echo yes
X	cat >> confdefs.h <<\EOF
X#define HAVE_DEV_TTY 1
XEOF
X
Xelse
X	echo no
Xfi
Xecho $ac_n "checking for /dev/null""... $ac_c" 1>&6
Xecho "configure:17853: checking for /dev/null" >&5
Xif test -r /dev/null; then
X	echo yes
X	cat >> confdefs.h <<\EOF
X#define HAVE_DEV_NULL 1
XEOF
X
Xelse
X	echo no
Xfi
Xecho $ac_n "checking for /dev/zero""... $ac_c" 1>&6
Xecho "configure:17864: checking for /dev/zero" >&5
Xif test -r /dev/zero; then
X	echo yes
X	cat >> confdefs.h <<\EOF
X#define HAVE_DEV_ZERO 1
XEOF
X
Xelse
X	echo no
Xfi
X
XUNAME=`uname || true`
X
Xif test ."$UNAME" = .Linux; then
X
X
Xecho $ac_n "checking if Linux include file linux/ext2_fs.h is broken""... $ac_c" 1>&6
Xecho "configure:17881: checking if Linux include file linux/ext2_fs.h is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_broken_linux_ext2_fs_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17886 "configure"
X#include "confdefs.h"
X
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <linux/ext2_fs.h>
X#endif
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:17896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_broken_linux_ext2_fs_h=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_broken_linux_ext2_fs_h=yes
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_broken_linux_ext2_fs_h" 1>&6
Xif test $ac_cv_broken_linux_ext2_fs_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BROKEN_LINUX_EXT2_FS_H 1
XEOF
X
Xfi
Xecho $ac_n "checking if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken""... $ac_c" 1>&6
Xecho "configure:17916: checking if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_broken_src_linux_ext2_fs_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS"
X		cat > conftest.$ac_ext <<EOF
X#line 17922 "configure"
X#include "confdefs.h"
X
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <linux/ext2_fs.h>
X#endif
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:17932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_broken_src_linux_ext2_fs_h=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_broken_src_linux_ext2_fs_h=yes
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_broken_src_linux_ext2_fs_h" 1>&6
XCPPFLAGS=$___CPPFLAGS
Xif test $ac_cv_broken_src_linux_ext2_fs_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BROKEN_SRC_LINUX_EXT2_FS_H 1
XEOF
X
Xfi
Xif test .$ac_cv_broken_linux_ext2_fs_h = .no -o .$ac_cv_broken_src_linux_ext2_fs_h = .no; then
X	#
X	# If either /usr/include/linux/ex2_fs.h works or
X	# /usr/src/linux/include/linux/ex2_fs.h works, we will
X	# #define HAVE_USABLE_LINUX_EXT2_FS_H
X	#
X	# If HAVE_USABLE_LINUX_EXT2_FS_H is defined, a simple
X	# #include <linux/ex2_fs.h> will work.
X	#
X	ac_cv_usable_linux_ext2_fs_h=yes
X	cat >> confdefs.h <<\EOF
X#define HAVE_USABLE_LINUX_EXT2_FS_H 1
XEOF
X
Xelse
X	ac_cv_usable_linux_ext2_fs_h=no
Xfi
Xecho $ac_n "checking if Linux include file scsi/scsi.h is broken""... $ac_c" 1>&6
Xecho "configure:17970: checking if Linux include file scsi/scsi.h is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_broken_scsi_scsi_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17975 "configure"
X#include "confdefs.h"
X
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <scsi/scsi.h>
X#endif
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:17985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_broken_scsi_scsi_h=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_broken_scsi_scsi_h=yes
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_broken_scsi_scsi_h" 1>&6
Xif test $ac_cv_broken_scsi_scsi_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BROKEN_SCSI_SCSI_H 1
XEOF
X
Xfi
Xecho $ac_n "checking if Linux include file /usr/src/linux/include/scsi/scsi.h is broken""... $ac_c" 1>&6
Xecho "configure:18005: checking if Linux include file /usr/src/linux/include/scsi/scsi.h is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_broken_src_scsi_scsi_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS"
X                cat > conftest.$ac_ext <<EOF
X#line 18011 "configure"
X#include "confdefs.h"
X
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <scsi/scsi.h>
X#endif
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:18021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_broken_src_scsi_scsi_h=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_broken_src_scsi_scsi_h=yes
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_broken_src_scsi_scsi_h" 1>&6
XCPPFLAGS=$___CPPFLAGS
Xif test $ac_cv_broken_src_scsi_scsi_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BROKEN_SRC_SCSI_SCSI_H 1
XEOF
X
Xfi
Xecho $ac_n "checking if Linux include file scsi/sg.h is broken""... $ac_c" 1>&6
Xecho "configure:18042: checking if Linux include file scsi/sg.h is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_broken_scsi_sg_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 18047 "configure"
X#include "confdefs.h"
X
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <sys/types.h>
X#include <scsi/sg.h>
X#endif
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:18058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_broken_scsi_sg_h=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_broken_scsi_sg_h=yes
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_broken_scsi_sg_h" 1>&6
Xif test $ac_cv_broken_scsi_sg_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BROKEN_SCSI_SG_H 1
XEOF
X
Xfi
Xecho $ac_n "checking if Linux include file /usr/src/linux/include/scsi/sg.h is broken""... $ac_c" 1>&6
Xecho "configure:18078: checking if Linux include file /usr/src/linux/include/scsi/sg.h is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_broken_src_scsi_sg_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS"
X                cat > conftest.$ac_ext <<EOF
X#line 18084 "configure"
X#include "confdefs.h"
X
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <sys/types.h>
X#include <scsi/sg.h>
X#endif
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:18095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_broken_src_scsi_sg_h=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_broken_src_scsi_sg_h=yes
Xfi
Xrm -f conftest*
Xfi
X
Xecho "$ac_t""$ac_cv_broken_src_scsi_sg_h" 1>&6
XCPPFLAGS=$___CPPFLAGS
Xif test $ac_cv_broken_src_scsi_sg_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BROKEN_SRC_SCSI_SG_H 1
XEOF
X
Xfi
X
Xif test .$ac_cv_broken_src_scsi_scsi_h = .yes; then
X	may_linux_src_include=no
Xfi
Xif test .$ac_cv_broken_src_linux_ext2_fs_h = .yes; then
X	may_linux_src_include=no
Xfi
Xif test .$may_linux_src_include = .no; then
X	echo
X	echo "Warning: *** /usr/src/linux/include contains broken include files ***"
X	echo "Warning: *** /usr/src/linux/include is not used this reason ***"
X	echo "Warning: This may result in the inability to use recent Linux kernel interfaces" 
X	echo
Xfi
Xif test .$ac_cv_usable_linux_ext2_fs_h = .no; then
X	echo
X	echo "Warning: *** linux/ext2_fs.h is not usable at all ***"
X	echo "Warning: *** This makes it impossible to support Linux file flags ***"
X	echo "You may try to compile using 'make COPTX=-DTRY_EXT2_FS'"
X	echo
X	sleep 10
Xfi
Xfi	# Linux only tests
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
Xtrap '' 1 2 15
Xcat > confcache <<\EOF
X# This file is a shell script that caches the results of configure
X# tests run on this system so they can be shared between configure
X# scripts and configure runs.  It is not useful on other systems.
X# If it contains results you don't want to keep, you may remove or edit it.
X#
X# By default, configure uses ./config.cache as the cache file,
X# creating it if it does not exist already.  You can give configure
X# the --cache-file=FILE option to use a different cache file; that is
X# what configure does when it calls configure scripts in
X# subdirectories, so they share the cache.
X# Giving --cache-file=/dev/null disables caching, for debugging configure.
X# config.status only pays attention to the cache file if you give it the
X# --recheck option to rerun configure.
X#
XEOF
X# The following way of writing the cache mishandles newlines in values,
X# but we know of no workaround that is simple, portable, and efficient.
X# So, don't put newlines in cache variables' values.
X# Ultrix sh set writes to stderr and can't be redirected directly,
X# and sets the high bit in the cache file unless we assign to the vars.
X(set) 2>&1 |
X  case `(ac_space=' '; set | grep ac_space) 2>&1` in
X  *ac_space=\ *)
X    # `set' does not quote correctly, so add quotes (double-quote substitution
X    # turns \\\\ into \\, and sed turns \\ into \).
X    sed -n \
X      -e "s/'/'\\\\''/g" \
X      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
X    ;;
X  *)
X    # `set' quotes correctly as required by POSIX, so do not add quotes.
X    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
X    ;;
X  esac >> confcache
Xif cmp -s $cache_file confcache; then
X  :
Xelse
X  if test -w $cache_file; then
X    echo "updating cache $cache_file"
X    cat confcache > $cache_file
X  else
X    echo "not updating unwritable cache $cache_file"
X  fi
Xfi
Xrm -f confcache
X
Xtrap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
X
Xtest "x$prefix" = xNONE && prefix=$ac_default_prefix
X# Let make expand exec_prefix.
Xtest "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
X
X# Any assignment to VPATH causes Sun make to only execute
X# the first set of double-colon rules, so remove it if not needed.
X# If there is a colon in the path, we need to keep it.
Xif test "x$srcdir" = x.; then
X  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
Xfi
X
Xtrap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
X
XDEFS=-DHAVE_CONFIG_H
X
X# Without the "./", some shells look in PATH for config.status.
X: ${CONFIG_STATUS=./config.status}
X
Xecho creating $CONFIG_STATUS
Xrm -f $CONFIG_STATUS
Xcat > $CONFIG_STATUS <<EOF
X#! /bin/sh
X# Generated automatically by configure.
X# Run this file to recreate the current configuration.
X# This directory was configured as follows,
X# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
X#
X# $0 $ac_configure_args
X#
X# Compiler output produced by configure, useful for debugging
X# configure, is in ./config.log if it exists.
X
Xac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Xfor ac_option
Xdo
X  case "\$ac_option" in
X  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
X    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
X    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
X  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
X    echo "$CONFIG_STATUS generated by autoconf version 2.13"
X    exit 0 ;;
X  -help | --help | --hel | --he | --h)
X    echo "\$ac_cs_usage"; exit 0 ;;
X  *) echo "\$ac_cs_usage"; exit 1 ;;
X  esac
Xdone
X
Xac_given_srcdir=$srcdir
X
Xtrap 'rm -fr `echo "rules.cnf xconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
XEOF
Xcat >> $CONFIG_STATUS <<EOF
X
X# Protect against being on the right side of a sed subst in config.status.
Xsed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
X s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
X$ac_vpsub
X$extrasub
Xs%@SHELL@%$SHELL%g
Xs%@CFLAGS@%$CFLAGS%g
Xs%@CPPFLAGS@%$CPPFLAGS%g
Xs%@CXXFLAGS@%$CXXFLAGS%g
Xs%@FFLAGS@%$FFLAGS%g
Xs%@DEFS@%$DEFS%g
Xs%@LDFLAGS@%$LDFLAGS%g
Xs%@LIBS@%$LIBS%g
Xs%@exec_prefix@%$exec_prefix%g
Xs%@prefix@%$prefix%g
Xs%@program_transform_name@%$program_transform_name%g
Xs%@bindir@%$bindir%g
Xs%@sbindir@%$sbindir%g
Xs%@libexecdir@%$libexecdir%g
Xs%@datadir@%$datadir%g
Xs%@sysconfdir@%$sysconfdir%g
Xs%@sharedstatedir@%$sharedstatedir%g
Xs%@localstatedir@%$localstatedir%g
Xs%@libdir@%$libdir%g
Xs%@includedir@%$includedir%g
Xs%@oldincludedir@%$oldincludedir%g
Xs%@infodir@%$infodir%g
Xs%@mandir@%$mandir%g
Xs%@host@%$host%g
Xs%@host_alias@%$host_alias%g
Xs%@host_cpu@%$host_cpu%g
Xs%@host_vendor@%$host_vendor%g
Xs%@host_os@%$host_os%g
Xs%@OBJEXT@%$OBJEXT%g
Xs%@EXEEXT@%$EXEEXT%g
Xs%@XEXEEXT@%$XEXEEXT%g
Xs%@CPP@%$CPP%g
Xs%@RANLIB@%$RANLIB%g
Xs%@SET_MAKE@%$SET_MAKE%g
Xs%@LIBOBJS@%$LIBOBJS%g
Xs%@ALLOCA@%$ALLOCA%g
Xs%@may_linux_src_include@%$may_linux_src_include%g
Xs%@largefile_cc_opt@%$largefile_cc_opt%g
Xs%@sun_cc64_opt@%$sun_cc64_opt%g
Xs%@hp_cc_ansi_opt@%$hp_cc_ansi_opt%g
Xs%@hp_cc_opt_opt@%$hp_cc_opt_opt%g
Xs%@hp_cc_gprof_opt@%$hp_cc_gprof_opt%g
Xs%@lib_crypt@%$lib_crypt%g
Xs%@lib_resolv@%$lib_resolv%g
Xs%@lib_intl@%$lib_intl%g
Xs%@lib_iconv@%$lib_iconv%g
Xs%@scsi_lib@%$scsi_lib%g
Xs%@lib_scsi@%$lib_scsi%g
Xs%@lib_acl@%$lib_acl%g
Xs%@lib_acl_test@%$lib_acl_test%g
Xs%@lib_attr@%$lib_attr%g
Xs%@lib_secdb@%$lib_secdb%g
Xs%@lib_gen@%$lib_gen%g
Xs%@lib_pthread@%$lib_pthread%g
Xs%@lib_rt@%$lib_rt%g
Xs%@lib_dl@%$lib_dl%g
Xs%@lib_dir@%$lib_dir%g
X
XCEOF
XEOF
X
Xcat >> $CONFIG_STATUS <<\EOF
X
X# Split the substitutions into bite-sized pieces for seds with
X# small command number limits, like on Digital OSF/1 and HP-UX.
Xac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
Xac_file=1 # Number of current file.
Xac_beg=1 # First line for current file.
Xac_end=$ac_max_sed_cmds # Line after last line for current file.
Xac_more_lines=:
Xac_sed_cmds=""
Xwhile $ac_more_lines; do
X  if test $ac_beg -gt 1; then
X    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
X  else
X    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
X  fi
X  if test ! -s conftest.s$ac_file; then
X    ac_more_lines=false
X    rm -f conftest.s$ac_file
X  else
X    if test -z "$ac_sed_cmds"; then
X      ac_sed_cmds="sed -f conftest.s$ac_file"
X    else
X      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
X    fi
X    ac_file=`expr $ac_file + 1`
X    ac_beg=$ac_end
X    ac_end=`expr $ac_end + $ac_max_sed_cmds`
X  fi
Xdone
Xif test -z "$ac_sed_cmds"; then
X  ac_sed_cmds=cat
Xfi
XEOF
X
Xcat >> $CONFIG_STATUS <<EOF
X
XCONFIG_FILES=\${CONFIG_FILES-"rules.cnf"}
XEOF
Xcat >> $CONFIG_STATUS <<\EOF
Xfor ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
X  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
X  case "$ac_file" in
X  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
X       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
X  *) ac_file_in="${ac_file}.in" ;;
X  esac
X
X  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
X
X  # Remove last slash and all that follows it.  Not all systems have dirname.
X  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
X  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
X    # The file is in a subdirectory.
X    test ! -d "$ac_dir" && mkdir "$ac_dir"
X    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
X    # A "../" for each directory in $ac_dir_suffix.
X    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
X  else
X    ac_dir_suffix= ac_dots=
X  fi
X
X  case "$ac_given_srcdir" in
X  .)  srcdir=.
X      if test -z "$ac_dots"; then top_srcdir=.
X      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
X  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
X  *) # Relative path.
X    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
X    top_srcdir="$ac_dots$ac_given_srcdir" ;;
X  esac
X
X
X  echo creating "$ac_file"
X  rm -f "$ac_file"
X  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
X  case "$ac_file" in
X  *Makefile*) ac_comsub="1i\\
X# $configure_input" ;;
X  *) ac_comsub= ;;
X  esac
X
X  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
X  sed -e "$ac_comsub
Xs%@configure_input@%$configure_input%g
Xs%@srcdir@%$srcdir%g
Xs%@top_srcdir@%$top_srcdir%g
X" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Xfi; done
Xrm -f conftest.s*
X
X# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
X# NAME is the cpp macro being defined and VALUE is the value it is being given.
X#
X# ac_d sets the value in "#define NAME VALUE" lines.
Xac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
Xac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
Xac_dC='\3'
Xac_dD='%g'
X# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Xac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
Xac_uB='\([ 	]\)%\1#\2define\3'
Xac_uC=' '
Xac_uD='\4%g'
X# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Xac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
Xac_eB='$%\1#\2define\3'
Xac_eC=' '
Xac_eD='%g'
X
Xif test "${CONFIG_HEADERS+set}" != set; then
XEOF
Xcat >> $CONFIG_STATUS <<EOF
X  CONFIG_HEADERS="xconfig.h"
XEOF
Xcat >> $CONFIG_STATUS <<\EOF
Xfi
Xfor ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
X  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
X  case "$ac_file" in
X  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
X       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
X  *) ac_file_in="${ac_file}.in" ;;
X  esac
X
X  echo creating $ac_file
X
X  rm -f conftest.frag conftest.in conftest.out
X  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
X  cat $ac_file_inputs > conftest.in
X
XEOF
X
X# Transform confdefs.h into a sed script conftest.vals that substitutes
X# the proper values into config.h.in to produce config.h.  And first:
X# Protect against being on the right side of a sed subst in config.status.
X# Protect against being in an unquoted here document in config.status.
Xrm -f conftest.vals
Xcat > conftest.hdr <<\EOF
Xs/[\\&%]/\\&/g
Xs%[\\$`]%\\&%g
Xs%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
Xs%ac_d%ac_u%gp
Xs%ac_u%ac_e%gp
XEOF
Xsed -n -f conftest.hdr confdefs.h > conftest.vals
Xrm -f conftest.hdr
X
X# This sed command replaces #undef with comments.  This is necessary, for
X# example, in the case of _POSIX_SOURCE, which is predefined and required
X# on some systems where configure will not decide to define it.
Xcat >> conftest.vals <<\EOF
Xs%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
XEOF
X
X# Break up conftest.vals because some shells have a limit on
X# the size of here documents, and old seds have small limits too.
X
Xrm -f conftest.tail
Xwhile :
Xdo
X  ac_lines=`grep -c . conftest.vals`
X  # grep -c gives empty output for an empty file on some AIX systems.
X  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
X  # Write a limited-size here document to conftest.frag.
X  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
X  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
X  echo 'CEOF
X  sed -f conftest.frag conftest.in > conftest.out
X  rm -f conftest.in
X  mv conftest.out conftest.in
X' >> $CONFIG_STATUS
X  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
X  rm -f conftest.vals
X  mv conftest.tail conftest.vals
Xdone
Xrm -f conftest.vals
X
Xcat >> $CONFIG_STATUS <<\EOF
X  rm -f conftest.frag conftest.h
X  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
X  cat conftest.in >> conftest.h
X  rm -f conftest.in
X  if cmp -s $ac_file conftest.h 2>/dev/null; then
X    echo "$ac_file is unchanged"
X    rm -f conftest.h
X  else
X    # Remove last slash and all that follows it.  Not all systems have dirname.
X      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
X      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
X      # The file is in a subdirectory.
X      test ! -d "$ac_dir" && mkdir "$ac_dir"
X    fi
X    rm -f $ac_file
X    mv conftest.h $ac_file
X  fi
Xfi; done
X
XEOF
Xcat >> $CONFIG_STATUS <<EOF
X
XEOF
Xcat >> $CONFIG_STATUS <<\EOF
X
Xexit 0
XEOF
Xchmod +x $CONFIG_STATUS
Xrm -fr confdefs* $ac_clean_files
Xtest "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
X
END-of-smake-1.2.1/autoconf/configure
echo x - smake-1.2.1/autoconf/configure.in
sed 's/^X//' >smake-1.2.1/autoconf/configure.in << 'END-of-smake-1.2.1/autoconf/configure.in'
Xdnl @(#)configure.in	1.202 09/12/31 Copyright 1998-2009 J. Schilling
Xdnl Process this file with autoconf to produce a configure script.
XAC_REVISION(1.202)dnl
X
Xdnl AC_INIT(xconfig.h.in)
XAC_INIT(config.guess)
XAC_CONFIG_HEADER(xconfig.h)
XAC_CANONICAL_HOST
X
Xdnl Checks for programs.
XAC_SHELL_BASH
XAC_BIN_SHELL_BASH
XAC_SHELL_CE_BROKEN
XAC_BIN_SHELL_CE_BROKEN
XAC_BIN_SHELL_BOSH
XAC_OPT_SCHILY_BIN_SHELL_BOSH
Xdnl CC=${CC-cc}
Xdnl AC_PROG_CC
XAC_OBJEXT
XAC_EXEEXT
XAC_PROG_CPP
XAC_SUN_CC64_OPT
XAC_HP_CC_ANSI_OPT
XAC_HP_CC_OPT_OPT
XAC_HP_CC_GPROF_OPT
Xdnl AC_PROG_INSTALL
XAC_PROG_RANLIB
XAC_PROG_MAKE_SET
X
Xdnl Checks for header files.
XAC_HEADER_STDC
XAC_CHECK_HEADERS(stdarg.h stdlib.h string.h float.h)	dnl AC_HEADER_STDC in particular
XAC_HEADER_INTTYPES
XAC_HEADER_STDINT
Xac_xsave_LIBS="$LIBS"
XLIBS=""
XAC_HEADER_DIRENT
Xlib_dir="$LIBS"
XLIBS="$ac_xsave_LIBS"
XAC_HEADER_STAT
XAC_HEADER_TIME
XAC_HEADER_SYS_WAIT
Xdnl check whether select() needs sys/select.h
XAC_HEADER_SYS_SELECT
Xdnl check whether select() needs sys/socket.h (BeOS)
XAC_HEADER_SELECT2
XAC_CHECK_HEADERS(assert.h)
XAC_CHECK_HEADERS(stdio.h varargs.h stdarg.h stdlib.h stddef.h string.h strings.h unistd.h fcntl.h sys/file.h)
XAC_CHECK_HEADERS(getopt.h)
XAC_CHECK_HEADERS(limits.h)
XAC_CHECK_HEADERS(a.out.h aouthdr.h elf.h)
XAC_CHECK_HEADERS(sysexits.h)
XAC_CHECK_HEADERS(malloc.h sgtty.h termios.h termio.h)
XAC_CHECK_HEADERS(pwd.h grp.h sys/acl.h acllib.h acl/libacl.h)
XAC_CHECK_HEADERS(signal.h siginfo.h sys/siginfo.h ucontext.h)
XAC_CHECK_HEADERS(shadow.h syslog.h)
XAC_CHECK_HEADERS(sys/time.h sys/times.h utime.h sys/utime.h sys/ioctl.h sys/filio.h sys/param.h sys/systeminfo.h sys/sysctl.h)
XAC_CHECK_HEADERS(sys/syscall.h)
XAC_CHECK_HEADERS(mach/machine.h)
XAC_CHECK_HEADERS(mntent.h sys/mntent.h sys/mnttab.h sys/mount.h)
XAC_CHECK_HEADERS(sys/fork.h vfork.h wait.h sys/wait.h sys/resource.h procfs.h sys/procfs.h)
XAC_CHECK_HEADERS(sys/utsname.h sys/priocntl.h sys/rtpriocntl.h sys/procset.h)
XAC_CHECK_HEADERS(sys/mtio.h sys/tape.h sys/mman.h linux/pg.h camlib.h)
XAC_CHECK_HEADERS(sys/shm.h sys/sem.h sys/ipc.h)
XAC_CHECK_HEADERS(sys/dkio.h sys/dklabel.h sun/dkio.h sun/dklabel.h)
XAC_CHECK_HEADERS(sys/types.h sys/stat.h types.h stat.h)
XAC_CHECK_HEADERS(sys/stypes.h sys/filedesc.h)
XAC_CHECK_HEADERS(sys/acct.h)
XAC_CHECK_HEADERS(poll.h sys/poll.h sys/select.h)
XAC_CHECK_HEADERS(netdb.h sys/socket.h netinet/in.h stropts.h)
XAC_CHECK_HEADERS(ieeefp.h fp.h)
XAC_CHECK_HEADERS(values.h float.h math.h)
XAC_CHECK_HEADERS(arpa/inet.h)
XAC_CHECK_HEADERS(bsd/dev/scsireg.h)
Xdnl Check for HP-UX sys/bsdtty.h (needed for TIOCGPGRP)
XAC_CHECK_HEADERS(sys/bsdtty.h)
Xdnl Check for Linux kernel definitions
XAC_CHECK_HEADERS(linux/types.h linux/gfp.h asm/types.h)
Xdnl Check for BeOS kernel definitions (e.g. B_PAGE_SIZE)
XAC_CHECK_HEADERS(OS.h)
Xdnl needed for newer OS/2 versions of EMX
XAC_CHECK_HEADERS(os2.h)
XAC_CHECK_HEADERS(os2me.h)
Xdnl Check for MS-Win's junkyard
XAC_CHECK_HEADERS(windows.h)
Xdnl Check for moving Linux targets caused by missing concepts
XAC_CHECK_HEADERS(ext2fs/ext2_fs.h)
Xdnl Check for Linux Extended File Attributes definitions
XAC_CHECK_HEADERS(attr/xattr.h)
Xdnl Check for Mas OS X ac, av, env delarations
XAC_CHECK_HEADERS(crt_externs.h)
XAC_CHECK_HEADERS(fnmatch.h)
XAC_CHECK_HEADERS(libintl.h locale.h langinfo.h nl_types.h)
XAC_CHECK_HEADERS(ctype.h wctype.h wchar.h iconv.h)
XAC_CHECK_HEADERS(priv.h sys/priv.h)
XAC_CHECK_HEADERS(exec_attr.h secdb.h)
XAC_CHECK_HEADERS(direct.h)
XAC_CHECK_HEADERS(pthread.h thread.h)
XAC_CHECK_HEADERS(libgen.h)
XAC_CHECK_HEADERS(dlfcn.h link.h dl.h)
X
Xdnl from aclocal.m4 (uses AC_TRY_COMPILE)
XAC_HEADER_MAKEDEV
X
Xdnl don't use GNU original
Xdnl from GNU acspecific.m4 (uses AC_CHECK_HEADER)
Xdnl AC_HEADER_MAJOR
X
XAC_CHECK_MINOR_BITS
XAC_CHECK_MINOR_NONCONTIG
X
XAC_HEADER_USG_STDIO
XAC_HEADER_ERRNO_DEF
XAC_HEADER_ENVIRON_DEF
XAC_HEADER_SYS_SIGLIST_DEF
X
Xdnl Checks for typedefs, structures, and compiler characteristics.
XAC_C_CONST
XAC_C_BIGENDIAN
XAC_C_BITFIELDS
XAC_C_STRINGIZE
XAC_C_INLINE
XAC_TYPE_SIGNAL
XAC_TYPE_GETGROUPS
XAC_TYPE_LONGLONG
XAC_TYPE___INT64
XAC_TYPE_LONGDOUBLE
XAC_TYPE_PROTOTYPES
Xdnl AC_USER_MALLOC must be past AC_CHECK_FUNCS(strdup)
XAC_DYN_ARRAYS
XAC_PRAGMA_WEAK
X
XAC_TYPE_UID_T
XAC_TYPE_SIZE_T
XAC_CHECK_TYPE(ssize_t, int)
XAC_CHECK_TYPE(ptrdiff_t, int)
XAC_TYPE_PID_T
XAC_TYPE_OFF_T
XAC_TYPE_MODE_T
XAC_TYPE_TIME_T
XAC_CHECK_TYPE(caddr_t, char *)
XAC_CHECK_TYPE(daddr_t, long)
XAC_CHECK_TYPE(dev_t, unsigned short)
XAC_CHECK_TYPE(major_t, dev_t)
XAC_CHECK_TYPE(minor_t, dev_t)
XAC_CHECK_TYPE(ino_t, unsigned long)
XAC_CHECK_TYPE(nlink_t, unsigned long)
XAC_CHECK_TYPE(blksize_t, long)
XAC_CHECK_TYPE(blkcnt_t, Intmax_t)
XAC_TYPE_CLOCK_T
XAC_TYPE_SOCKLEN_T
XAC_HAVE_TYPE([#include <sys/frame.h>], greg_t)
XAC_TYPE_STACK_T
XAC_TYPE_SIGINFO_T
X
Xdnl These types are present on all UNIX systems but should be avoided
Xdnl for portability.
Xdnl On Apollo/Domain OS we don't have them....
Xdnl Better include <utypes.h> and use Uchar, Uint & Ulong
XAC_CHECK_TYPE(u_char, unsigned char)
XAC_CHECK_TYPE(u_short, unsigned short)
XAC_CHECK_TYPE(u_int, unsigned int)
XAC_CHECK_TYPE(u_long, unsigned long)
X
XAC_CHECK_SIZEOF(char)
XAC_CHECK_SIZEOF(short int)
XAC_CHECK_SIZEOF(int)
XAC_CHECK_SIZEOF(long int)
XAC_CHECK_SIZEOF(long long)
XAC_CHECK_SIZEOF(__int64)
XAC_CHECK_SIZEOF(char *)
X
XAC_CHECK_SIZEOF(unsigned char)
XAC_CHECK_SIZEOF(unsigned short int)
XAC_CHECK_SIZEOF(unsigned int)
XAC_CHECK_SIZEOF(unsigned long int)
XAC_CHECK_SIZEOF(unsigned long long)
XAC_CHECK_SIZEOF(unsigned __int64)
XAC_CHECK_SIZEOF(unsigned char *)
XAC_CHECK_SIZEOF(float)
XAC_CHECK_SIZEOF(double)
XAC_CHECK_SIZEOF(long double)
X
XAC_CHECK_SIZEOF(size_t)
XAC_CHECK_SIZEOF(ssize_t)
XAC_CHECK_SIZEOF(ptrdiff_t)
X
Xdnl This call must be past AC_CHECK_SIZEOF(long int)
XAC_CHECK_SIZE_TIME_T
XAC_CHECK_SIZE_WCHAR
XAC_CHECK_SIZE_WCHAR_T
X
Xdnl # AC_TYPE_SIZE_T_		# Defines HAVE_SIZE_T / NO_SIZE_T
XAC_TYPE_CHAR
XAC_TYPE_VA_LIST
XAC_STRUCT_TIMEVAL
XAC_STRUCT_TIMEZONE
XAC_STRUCT_MTGET_TYPE
XAC_STRUCT_MTGET_MODEL
XAC_STRUCT_MTGET_DSREG
XAC_STRUCT_MTGET_DSREG1
XAC_STRUCT_MTGET_DSREG2
XAC_STRUCT_MTGET_GSTAT
XAC_STRUCT_MTGET_ERREG
XAC_STRUCT_MTGET_RESID
XAC_STRUCT_MTGET_FILENO
XAC_STRUCT_MTGET_BLKNO
XAC_STRUCT_MTGET_FLAGS
XAC_STRUCT_MTGET_BF
XAC_STRUCT_RUSAGE
XAC_STRUCT_SI_UTIME
XAC_STRUCT_SOCKADDR_STORAGE
XAC_STRUCT_UNION_SEMUN
XAC_STRUCT_UNION_WAIT
XAC_USE_STRUCT_UNION_WAIT
XAC_STRUCT_ST_SPARE1
XAC_STRUCT_ST_ATIMENSEC
XAC_STRUCT_ST_ATIME_N
XAC_STRUCT_ST_NSEC
XAC_STRUCT_ST__TIM
XAC_STRUCT_ST_ATIMESPEC
XAC_STRUCT_ST_BLKSIZE
XAC_STRUCT_ST_BLOCKS
XAC_STRUCT_ST_FSTYPE
XAC_STRUCT_ST_ACLCNT
XAC_STRUCT_ST_RDEV
XAC_STRUCT_ST_FLAG
XAC_STRUCT_ST_FLAGS
XAC_STRUCT_DIRENT_D_INO
XAC_STRUCT_DIR_DD_FD
XAC_STRUCT_UTSNAME_ARCH
XAC_STRUCT_UTSNAME_PROCESSOR
XAC_STRUCT_UTSNAME_SYSNAME_HOST
XAC_STRUCT_UTSNAME_RELEASE_HOST
XAC_STRUCT_UTSNAME_VERSION_HOST
X
Xdnl Check whether iconv() uses const char ** arguments
XAC_ICONV_CONST
X
Xdnl Check whether we are able to get the address of a function
Xdnl or whether the symbol is declared and usable as rhs
XAC_CHECK_DECLARE([
X#include <sys/types.h>
X#include <sys/stat.h>], stat)
XAC_CHECK_DECLARE([
X#include <sys/types.h>
X#include <sys/stat.h>], lstat)
X
Xdnl Checks for library functions.
XAC_FUNC_WAIT3
XAC_FUNC_MLOCK
XAC_FUNC_MLOCKALL
XAC_FUNC_VA_COPY
XAC_FUNC__VA_COPY
XAC_FUNC_ECVT
XAC_FUNC_FCVT
XAC_FUNC_GCVT
XAC_FUNC_DTOA
XAC_FUNC_DTOA_R
XjsAC_FUNC_MMAP
XAC_MMAP_SIZEP
XAC_FUNC_SMMAP
XAC_FUNC_SHMGET
XAC_FUNC_ALLOCA
XAC_FUNC_QUOTAIOCTL
XAC_FUNC_FCNTL_LOCKF
XAC_FUNC_UNAME
XAC_CHECK_FUNCS(execl)
XAC_FUNC_VFORK
XAC_FUNC_SYS_SIGLIST
XAC_FUNC_BSD_GETPGRP
XAC_FUNC_BSD_SETPGRP
XAC_FUNC_C99_ISINF
XAC_FUNC_C99_ISNAN
XAC_FUNC_SIGSETJMP
XAC_FUNC_SIGLONGJMP
XAC_CHECK_FUNCS(access eaccess euidaccess)
XAC_CHECK_FUNCS(memchr memcpy memmove memset)
XAC_CHECK_FUNCS(brk sbrk strerror nice flock lockf fchdir statvfs quotactl)
XAC_CHECK_FUNCS(realpath resolvepath)
XAC_CHECK_FUNCS(dup dup2)
XAC_CHECK_FUNCS(getcwd shmat semget)
XAC_CHECK_FUNCS(lstat readlink symlink link rename mkfifo mknod)
XAC_CHECK_FUNCS(setreuid setresuid seteuid setuid)
XAC_CHECK_FUNCS(setregid setresgid setegid setgid)
XAC_CHECK_FUNCS(getuid geteuid getgid getegid)
XAC_CHECK_FUNCS(getpid getppid)
XAC_CHECK_FUNCS(getpgid setpgid getsid setsid)
XAC_CHECK_FUNCS(getpgrp setpgrp)
Xdnl			getspwnam() on HP-UX is in libsec.a
XAC_CHECK_FUNCS(getspnam getspwnam)
XAC_CHECK_FUNCS(sync fsync fork forkx vforkx forkall forkallx wait wait4 waitid waitpid getrusage getrlimit setrlimit ulimit)
XAC_CHECK_FUNCS(execl execle execlp execv execve execvp)
XAC_CHECK_FUNCS(getexecname)
XAC_CHECK_FUNCS(getprogname setprogname)
XAC_CHECK_FUNCS(gethostid gethostname getdomainname getpagesize getdtablesize)
XAC_CHECK_FUNCS(gettimeofday settimeofday time stime gethrtime)
XAC_CHECK_FUNCS(ftime tzset mktime gmtime localtime timegm timelocal)
XAC_CHECK_FUNCS(ctime cftime ascftime strftime)
XAC_CHECK_FUNCS(poll select isastream)
XAC_CHECK_FUNCS(chown fchown lchown chmod fchmod lchmod times utime utimes futimes lutimes)
XAC_CHECK_FUNCS(futimens utimensat)
Xdnl AC_CHECK_FUNCS(ecvt fcvt gcvt)
XAC_CHECK_FUNCS(ecvt_r fcvt_r gcvt_r)
XAC_CHECK_FUNCS(econvert fconvert gconvert)
XAC_CHECK_FUNCS(isinf isnan)
XAC_CHECK_FUNCS(rand drand48)
XAC_CHECK_FUNCS(strtol strtoll strtoul strtoull strtod)
XAC_CHECK_FUNCS(setpriority DosSetPriority)
XAC_CHECK_FUNCS(DosAllocSharedMem)
XAC_CHECK_FUNCS(seekdir fdopendir)
Xdnl These are POSIX.1 functions (syscalls on Solaris)
XAC_CHECK_FUNCS(openat fstatat fchownat futimesat renameat unlinkat)
Xdnl This is a library function for the Solaris extended attr interface
XAC_CHECK_FUNCS(attropen)
Xdnl This appeared on Solaris 11 Build 63
XAC_CHECK_FUNCS(__accessat)
Xdnl This appeared not yet in POSIX
XAC_CHECK_FUNCS(accessat)
Xdnl This are POSIX extensions not found on Solaris 10
XAC_CHECK_FUNCS(mkdirat faccessat fchmodat linkat mkfifoat mknodat readlinkat symlinkat)
XAC_CHECK_FUNCS(popen pclose _popen _pclose)
XAC_CHECK_FUNCS(strsignal str2sig sig2str)
XAC_CHECK_FUNCS(kill killpg)
XAC_CHECK_FUNCS(signal sigrelse sigprocmask sigsetmask sigset sigaltstack)
XAC_CHECK_FUNCS(sleep usleep yield)
XAC_CHECK_FUNCS(tcgetattr tcsetattr tcgetpgrp tcsetpgrp)
XAC_CHECK_FUNCS(getenv putenv setenv unsetenv)
XAC_CHECK_FUNCS(snprintf strcasecmp)
XAC_CHECK_FUNCS(strcat strncat strcmp strncmp strcpy strlcpy strncpy strdup strlen strchr strrchr)
XAC_CHECK_FUNCS(wcscat wcsncat wcscmp wcsncmp wcscpy wcslcpy wcsncpy wcsdup wcslen wcschr wcsrchr)
XAC_CHECK_FUNCS(wcwidth wcswidth wctype iswctype)
XAC_CHECK_FUNCS(malloc calloc valloc realloc memalign posix_memalign)
XAC_CHECK_FUNCS(madvise)
XAC_CHECK_FUNCS(mktemp mkstemp)
XAC_CHECK_FUNCS(chflags fchflags fflagstostr strtofflags)
XAC_CHECK_FUNCS(fnmatch)
XAC_CHECK_FUNCS(truncate ftruncate)
XAC_CHECK_FUNCS(getppriv setppriv priv_set)
XAC_CHECK_FUNCS(getroles privbit_set)
XAC_CHECK_FUNCS(setlocale localeconv nl_langinfo)
XAC_CHECK_FUNCS(setbuf setvbuf)
XAC_CHECK_FUNCS(clone_area create_area delete_area)
X
Xdnl The official POSIX rule is not to define "new" interfaces that
Xdnl are in conflict with older interfaces of the same name.
Xdnl Our interfaces fexec*() have been defined and published in 1982.
Xdnl The new POSIX interfaces define a different interface and the
Xdnl new POSIX interfaces even use names that are not compatible with
Xdnl POSIX rules. The new POSIX interfaces in question should be called
Xdnl fdexec*() to follow the rules of other similar POSIX functions.
Xdnl
Xdnl We use AC_RCHECK_FUNCS() because some Linux distros define a
Xdnl fexecve() that returns ENOSYS an AC_CHECK_FUNCS() would return FALSE
Xdnl
Xecho Checking for POSIX violations by the POSIX.1-2008 standard:
XAC_RCHECK_FUNCS(fexecl fexecle fexecv fexecve)
XAC_RCHECK_FUNCS(fspawnv fspawnl fspawnv_nowait)
X
Xdnl A similar problem exists with the new POSIX.1-2008 interfaces 
Xdnl getline() and fgetline(). These interfaces are also incompatible
Xdnl with our interfaces defined in 1982.
XAC_RCHECK_FUNCS(getline fgetline)
Xecho End of tests for POSIX violations by the POSIX.1-2008 standard.
X
Xdnl Check whether a symbol is either defined in an include file or
Xdnl otherwise usable (e.g. as function)
XAC_CHECK_DFUNC([#include <dirent.h>], dirfd)
X
XAC_CHECK_DFUNC([
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
X#ifdef	HAVE_WCTYPE_H
X#include <wctype.h>
X#endif
X], iswprint)
X
XAC_CHECK_DFUNC([#include <ieeefp.h>], finite)
XAC_CHECK_DFUNC([#include <ieeefp.h>], isnand)
X
Xdnl Checks for typedefs, structures, and compiler characteristics.
Xdnl that need results from the AC_CHECK_FUNCS() calls.
XAC_USER_MALLOC
Xdnl AC_USER_XCVT test macro does not yet work
XAC_VAR_TIMEZONE
XAC_VAR_TIMEZONE_DEF
X
Xdnl Checks for OS characteristics.
XAC_HARD_SYMLINKS
XAC_LINK_NOFOLLOW
XAC_ACCESS_E_OK
X
Xdnl Need to check this in default compilation mode to find out
Xdnl whether this platform supports both functions by default too.
Xdnl We cannot use the standard tests because they would find
Xdnl that fseeko()/ftello() are present in small file mode on
Xdnl Limnux while there is no prototype for these functions.
XAC_SMALL_FSEEKO
XAC_SMALL_FTELLO
X
XAC_CHECK_LIB(c, dlopen, lib_dl="",
X  [AC_CHECK_LIB(dl, dlopen, lib_dl="-ldl")])
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_dl"
XAC_CHECK_FUNCS(dlopen dlclose dlsym dlerror)
XAC_CHECK_FUNCS(shl_load shl_unload shl_gethandle)
XAC_CHECK_FUNCS(LoadLibrary FreeLibrary GetProcAddress)
XLIBS="$ac_save_LIBS"
X
Xdnl ??? AC_CHECK_LIB(socket, socket, lib_socket="-lsocket")
Xdnl
XAC_CHECK_LIB(socket, rcmd, lib_socket="-lsocket")
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_socket"
XAC_CHECK_LIB(nsl, inet_ntoa, lib_nsl="-lnsl")
XLIBS="$LIBS $lib_nsl"
XAC_CHECK_FUNCS(rcmd socket socketpair)
XAC_CHECK_FUNCS(getservbyname inet_ntoa)
XAC_CHECK_FUNCS(getaddrinfo getnameinfo)
XLIBS="$ac_save_LIBS"
X
Xac_save_LIBS="$LIBS"
XAC_CHECK_LIB(c, res_init, lib_resolv="",
X  [AC_CHECK_LIB(resolv, res_init, lib_resolv="-lresolv")])
XLIBS="$ac_save_LIBS"
X
Xdnl Check for largefile support
Xdnl Do this last to make sure that no large file definition
Xdnl in confdefs.h will modify our results
XAC_SYS_LARGEFILE
Xdnl Warning do not run this test. it interferes with the test
Xdnl AC_CHECK_FUNCS(fseeko ftello) from above.
Xdnl The test AC_HAVE_LARGEFILES will check whether ftello/fseeko
Xdnl are available in Large File mode
Xdnl AC_FUNC_FSEEKO
XAC_HAVE_LARGEFILES
X
XAC_DEFINE_UNQUOTED_STRING(HOST_ALIAS,$host_alias)
XAC_DEFINE_UNQUOTED_STRING(HOST_SUB,$host)
XAC_DEFINE_UNQUOTED_STRING(HOST_CPU,$host_cpu)
XAC_DEFINE_UNQUOTED_STRING(HOST_VENDOR,$host_vendor)
XAC_DEFINE_UNQUOTED_STRING(HOST_OS,$host_os)
X
Xdnl AC_CHECK_LIB(crypt, crypt, lib_crypt="-lcrypt")
X
XAC_CHECK_LIB(c, crypt, lib_crypt="",
X  [AC_CHECK_LIB(crypt, crypt, lib_crypt="-lcrypt")])
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_crypt"
XAC_CHECK_FUNCS(crypt)
XLIBS="$ac_save_LIBS"
X
XAC_CHECK_ILIB([#include <libintl.h>], c, gettext, lib_intl="",
X  [AC_CHECK_ILIB([#include <libintl.h>], intl, gettext, lib_intl="-lintl")])
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_intl"
XAC_CHECK_DFUNC([#include <libintl.h>], gettext)
XLIBS="$ac_save_LIBS"
X
XAC_CHECK_ILIB([#include <iconv.h>], c, iconv_open, lib_iconv="",
X    [AC_CHECK_ILIB([#include <iconv.h>], iconv, iconv_open, lib_iconv="-liconv")])
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_iconv"
XAC_CHECK_DFUNC([#include <iconv.h>], iconv)
XAC_CHECK_DFUNC([#include <iconv.h>], iconv_open)
XAC_CHECK_DFUNC([#include <iconv.h>], iconv_close)
Xdnl GNU libiconv on Linux and Cygwin may make "configure" fail :-(
XAC_CHECK_DFUNC([#include <iconv.h>], libiconv)
XAC_CHECK_DFUNC([#include <iconv.h>], libiconv_open)
XAC_CHECK_DFUNC([#include <iconv.h>], libiconv_close)
XLIBS="$ac_save_LIBS"
X
Xif test $ac_cv_header_camlib_h = yes; then
X  scsi_lib=-lcam
X  lib_scsi=-lcam
Xfi
X
Xif test "$ac_cv_header_sys_acl_h" = yes; then
X
X  AC_CHECKING(for Posix Access Control List support)
X  AC_CHECK_LIB(acl, acl_get_file, lib_acl="-lacl")
X  AC_CHECK_LIB(pacl, acl_get_file, lib_acl="-lpacl")
X
X	dnl If $lib_acl is nonempty, save it in $lib_acl_test
X	
X	if test ".$lib_acl" != .; then
X		lib_acl_test="$lib_acl"
X	fi
X
X  ac_save_LIBS="$LIBS"
X  LIBS="$LIBS $lib_acl"
X  AC_CHECK_FUNCS(acl_get_file acl_set_file acl_from_text acl_to_text acl_free acl_delete_def_file)
X  AC_CHECK_FUNCS(acl_extended_file)
X  AC_CHECK_FUNCS(acl_get_entry)
X  LIBS="$ac_save_LIBS"
X
X  AC_CHECKING(for Solaris Access Control List support)
X  AC_CHECK_LIB(sec, acltotext, lib_acl="-lsec")
X  ac_save_LIBS="$LIBS"
X  LIBS="$LIBS $lib_acl"
X  AC_CHECK_FUNCS(acl facl aclfromtext acltotext)
X  LIBS="$ac_save_LIBS"
X
X  dnl On Solaris, there is no need for lib_acl_test as acl(2) is in -libc
X
X  AC_CHECKING(for HP-UX Access Control List support)
X  AC_CHECK_FUNCS(getacl fgetacl setacl fsetacl strtoacl acltostr cpacl fcpacl chownacl setaclentry fsetaclentry)
X
X  dnl XXX lib_acl_test: How do we test for ACLs on HP-UX?
X
Xfi
X
Xif test "$ac_cv_header_attr_xattr_h" = yes; then
X  AC_CHECKING(for Linux flavor Extended Attribute support)
X  AC_CHECK_LIB(attr, getxattr, lib_attr="-lattr")
X  ac_save_LIBS="$LIBS"
X  LIBS="$LIBS $lib_attr"
X  AC_CHECK_FUNCS(getxattr setxattr listxattr lgetxattr lsetxattr llistxattr)
X  LIBS="$ac_save_LIBS"
Xfi
X
XAC_CHECKING(for RBAC support)
XAC_CHECK_LIB(secdb, getuserattr, lib_secdb="-lsecdb")
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_secdb"
XAC_CHECK_FUNCS(getauthattr getuserattr getexecattr getprofattr)
XLIBS="$ac_save_LIBS"
X
XAC_CHECKING(for gmatch() support)
XAC_CHECK_LIB(gen, gmatch, lib_gen="-lgen")
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_gen"
XAC_CHECK_FUNCS(gmatch)
XLIBS="$ac_save_LIBS"
X
XAC_CHECK_FUNCS(thr_yield)
X
XAC_CHECK_LIB(pthread, pthread_create, lib_pthread="-lpthread",
X  [AC_CHECK_LIB(c, pthread_create, lib_pthread="")])
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_pthread"
XAC_CHECK_FUNCS(pthread_create pthread_kill)
XAC_CHECK_FUNCS(pthread_mutex_lock pthread_cond_wait pthread_spin_lock)
XLIBS="$ac_save_LIBS"
X
XAC_CHECK_LIB(c, clock_gettime, lib_rt="",
X  [AC_CHECK_LIB(rt, clock_gettime, lib_rt="-lrt",
X  [AC_CHECK_LIB(posix4, clock_gettime, lib_rt="-lposix4")])])
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_rt"
XAC_CHECK_FUNCS(clock_gettime clock_settime clock_getres)
XAC_CHECK_FUNCS(sched_getparam sched_setparam sched_getscheduler sched_setscheduler)
XAC_CHECK_FUNCS(sched_yield)
XAC_CHECK_FUNCS(nanosleep)
XLIBS="$ac_save_LIBS"
X
Xdnl Misc OS checks.
XAC_MSG_CHECKING(for /dev/tty)
Xif test -r /dev/tty; then
X	echo yes
X	AC_DEFINE(HAVE_DEV_TTY)
Xelse
X	echo no
Xfi
XAC_MSG_CHECKING(for /dev/null)
Xif test -r /dev/null; then
X	echo yes
X	AC_DEFINE(HAVE_DEV_NULL)
Xelse
X	echo no
Xfi
XAC_MSG_CHECKING(for /dev/zero)
Xif test -r /dev/zero; then
X	echo yes
X	AC_DEFINE(HAVE_DEV_ZERO)
Xelse
X	echo no
Xfi
X
Xdnl Checks for OS madness.
XUNAME=`uname || true`
X
Xif test ."$UNAME" = .Linux; then
X
Xdnl Linux madness tests:
X
XAC_BROKEN_LINUX_EXT2_FS_H
XAC_BROKEN_SRC_LINUX_EXT2_FS_H
Xif test .$ac_cv_broken_linux_ext2_fs_h = .no -o .$ac_cv_broken_src_linux_ext2_fs_h = .no; then
X	#
X	# If either /usr/include/linux/ex2_fs.h works or
X	# /usr/src/linux/include/linux/ex2_fs.h works, we will
X	# #define HAVE_USABLE_LINUX_EXT2_FS_H
X	#
X	# If HAVE_USABLE_LINUX_EXT2_FS_H is defined, a simple
X	# #include <linux/ex2_fs.h> will work.
X	#
X	ac_cv_usable_linux_ext2_fs_h=yes
X	AC_DEFINE(HAVE_USABLE_LINUX_EXT2_FS_H)
Xelse
X	ac_cv_usable_linux_ext2_fs_h=no
Xfi
XAC_BROKEN_SCSI_SCSI_H
XAC_BROKEN_SRC_SCSI_SCSI_H
XAC_BROKEN_SCSI_SG_H
XAC_BROKEN_SRC_SCSI_SG_H
X
Xif test .$ac_cv_broken_src_scsi_scsi_h = .yes; then
X	may_linux_src_include=no
Xfi
Xif test .$ac_cv_broken_src_linux_ext2_fs_h = .yes; then
X	may_linux_src_include=no
Xfi
Xif test .$may_linux_src_include = .no; then
X	echo
X	echo "Warning: *** /usr/src/linux/include contains broken include files ***"
X	echo "Warning: *** /usr/src/linux/include is not used this reason ***"
X	echo "Warning: This may result in the inability to use recent Linux kernel interfaces" 
X	echo
Xfi
Xif test .$ac_cv_usable_linux_ext2_fs_h = .no; then
X	echo
X	echo "Warning: *** linux/ext2_fs.h is not usable at all ***"
X	echo "Warning: *** This makes it impossible to support Linux file flags ***"
X	echo "You may try to compile using 'make COPTX=-DTRY_EXT2_FS'"
X	echo
X	sleep 10
Xfi
Xfi	# Linux only tests
X
XAC_SUBST(may_linux_src_include)
X
XAC_SUBST(largefile_cc_opt)
XAC_SUBST(sun_cc64_opt)
XAC_SUBST(hp_cc_ansi_opt)
XAC_SUBST(hp_cc_opt_opt)
XAC_SUBST(hp_cc_gprof_opt)
X
XAC_SUBST(lib_crypt)
XAC_SUBST(lib_resolv)
XAC_SUBST(lib_intl)
XAC_SUBST(lib_iconv)
XAC_SUBST(scsi_lib)
XAC_SUBST(lib_scsi)
XAC_SUBST(lib_acl)
XAC_SUBST(lib_acl_test)
XAC_SUBST(lib_attr)
XAC_SUBST(lib_secdb)
XAC_SUBST(lib_gen)
XAC_SUBST(lib_pthread)
XAC_SUBST(lib_rt)
XAC_SUBST(lib_dl)
XAC_SUBST(lib_dir)
X
XAC_OUTPUT(rules.cnf)
END-of-smake-1.2.1/autoconf/configure.in
echo x - smake-1.2.1/autoconf/install-sh
sed 's/^X//' >smake-1.2.1/autoconf/install-sh << 'END-of-smake-1.2.1/autoconf/install-sh'
X#! /bin/sh
X#
X# install - install a program, script, or datafile
X# This comes from X11R5 (mit/util/scripts/install.sh).
X#
X# Copyright 1991 by the Massachusetts Institute of Technology
X#
X# Permission to use, copy, modify, distribute, and sell this software and its
X# documentation for any purpose is hereby granted without fee, provided that
X# the above copyright notice appear in all copies and that both that
X# copyright notice and this permission notice appear in supporting
X# documentation, and that the name of M.I.T. not be used in advertising or
X# publicity pertaining to distribution of the software without specific,
X# written prior permission.  M.I.T. makes no representations about the
X# suitability of this software for any purpose.  It is provided "as is"
X# without express or implied warranty.
X#
X# Calling this script install-sh is preferred over install.sh, to prevent
X# `make' implicit rules from creating a file called install from it
X# when there is no Makefile.
X#
X# This script is compatible with the BSD install script, but was written
X# from scratch.  It can only install one file at a time, a restriction
X# shared with many OS's install programs.
X
X
X# set DOITPROG to echo to test this script
X
X# Don't use :- since 4.3BSD and earlier shells don't like it.
Xdoit="${DOITPROG-}"
X
X
X# put in absolute paths if you don't have them in your path; or use env. vars.
X
Xmvprog="${MVPROG-mv}"
Xcpprog="${CPPROG-cp}"
Xchmodprog="${CHMODPROG-chmod}"
Xchownprog="${CHOWNPROG-chown}"
Xchgrpprog="${CHGRPPROG-chgrp}"
Xstripprog="${STRIPPROG-strip}"
Xrmprog="${RMPROG-rm}"
Xmkdirprog="${MKDIRPROG-mkdir}"
X
Xtransformbasename=""
Xtransform_arg=""
Xinstcmd="$mvprog"
Xchmodcmd="$chmodprog 0755"
Xchowncmd=""
Xchgrpcmd=""
Xstripcmd=""
Xrmcmd="$rmprog -f"
Xmvcmd="$mvprog"
Xsrc=""
Xdst=""
Xdir_arg=""
X
Xwhile [ x"$1" != x ]; do
X    case $1 in
X	-c) instcmd="$cpprog"
X	    shift
X	    continue;;
X
X	-d) dir_arg=true
X	    shift
X	    continue;;
X
X	-m) chmodcmd="$chmodprog $2"
X	    shift
X	    shift
X	    continue;;
X
X	-o) chowncmd="$chownprog $2"
X	    shift
X	    shift
X	    continue;;
X
X	-g) chgrpcmd="$chgrpprog $2"
X	    shift
X	    shift
X	    continue;;
X
X	-s) stripcmd="$stripprog"
X	    shift
X	    continue;;
X
X	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
X	    shift
X	    continue;;
X
X	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
X	    shift
X	    continue;;
X
X	*)  if [ x"$src" = x ]
X	    then
X		src=$1
X	    else
X		# this colon is to work around a 386BSD /bin/sh bug
X		:
X		dst=$1
X	    fi
X	    shift
X	    continue;;
X    esac
Xdone
X
Xif [ x"$src" = x ]
Xthen
X	echo "install:	no input file specified"
X	exit 1
Xelse
X	true
Xfi
X
Xif [ x"$dir_arg" != x ]; then
X	dst=$src
X	src=""
X	
X	if [ -d $dst ]; then
X		instcmd=:
X	else
X		instcmd=mkdir
X	fi
Xelse
X
X# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
X# might cause directories to be created, which would be especially bad 
X# if $src (and thus $dsttmp) contains '*'.
X
X	if [ -f $src -o -d $src ]
X	then
X		true
X	else
X		echo "install:  $src does not exist"
X		exit 1
X	fi
X	
X	if [ x"$dst" = x ]
X	then
X		echo "install:	no destination specified"
X		exit 1
X	else
X		true
X	fi
X
X# If destination is a directory, append the input filename; if your system
X# does not like double slashes in filenames, you may need to add some logic
X
X	if [ -d $dst ]
X	then
X		dst="$dst"/`basename $src`
X	else
X		true
X	fi
Xfi
X
X## this sed command emulates the dirname command
Xdstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
X
X# Make sure that the destination directory exists.
X#  this part is taken from Noah Friedman's mkinstalldirs script
X
X# Skip lots of stat calls in the usual case.
Xif [ ! -d "$dstdir" ]; then
XdefaultIFS='	
X'
XIFS="${IFS-${defaultIFS}}"
X
XoIFS="${IFS}"
X# Some sh's can't handle IFS=/ for some reason.
XIFS='%'
Xset - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
XIFS="${oIFS}"
X
Xpathcomp=''
X
Xwhile [ $# -ne 0 ] ; do
X	pathcomp="${pathcomp}${1}"
X	shift
X
X	if [ ! -d "${pathcomp}" ] ;
X        then
X		$mkdirprog "${pathcomp}"
X	else
X		true
X	fi
X
X	pathcomp="${pathcomp}/"
Xdone
Xfi
X
Xif [ x"$dir_arg" != x ]
Xthen
X	$doit $instcmd $dst &&
X
X	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
X	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
X	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
X	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
Xelse
X
X# If we're going to rename the final executable, determine the name now.
X
X	if [ x"$transformarg" = x ] 
X	then
X		dstfile=`basename $dst`
X	else
X		dstfile=`basename $dst $transformbasename | 
X			sed $transformarg`$transformbasename
X	fi
X
X# don't allow the sed command to completely eliminate the filename
X
X	if [ x"$dstfile" = x ] 
X	then
X		dstfile=`basename $dst`
X	else
X		true
X	fi
X
X# Make a temp file name in the proper directory.
X
X	dsttmp=$dstdir/#inst.$$#
X
X# Move or copy the file name to the temp name
X
X	$doit $instcmd $src $dsttmp &&
X
X	trap "rm -f ${dsttmp}" 0 &&
X
X# and set any options; do chmod last to preserve setuid bits
X
X# If any of these fail, we abort the whole thing.  If we want to
X# ignore errors from any of these, just make sure not to ignore
X# errors from the above "$doit $instcmd $src $dsttmp" command.
X
X	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
X	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
X	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
X	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
X
X# Now rename the file to the real destination.
X
X	$doit $rmcmd -f $dstdir/$dstfile &&
X	$doit $mvcmd $dsttmp $dstdir/$dstfile 
X
Xfi &&
X
X
Xexit 0
END-of-smake-1.2.1/autoconf/install-sh
echo x - smake-1.2.1/autoconf/rules.cnf.in
sed 's/^X//' >smake-1.2.1/autoconf/rules.cnf.in << 'END-of-smake-1.2.1/autoconf/rules.cnf.in'
X# @(#)rules.cnf.in	1.22 09/11/05 Copyright 1998-2009 J. Schilling
X
XEXEEXT= @EXEEXT@
XXEXEEXT= @XEXEEXT@
XOBJEXT= @OBJEXT@
X
XLARGEFILE_CC_OPT= @largefile_cc_opt@
XSUN_CC64_OPT= @sun_cc64_opt@	# Used on e.g. Solaris and Linux
XHP_CC_ANSI_OPT= @hp_cc_ansi_opt@	# Used on HP-UX
XHP_CC_OPT_OPT= @hp_cc_opt_opt@	# Used on HP-UX
XHP_CC_GPROF_OPT= @hp_cc_gprof_opt@	# Used on HP-UX
X
XMAY_LINUX_SRC_INCLUDE= @may_linux_src_include@
X
XSCSILIB= @scsi_lib@
XLIB_SCSI= @lib_scsi@
XLIB_RESOLV= @lib_resolv@
XLIB_CRYPT= @lib_crypt@
XLIB_INTL= @lib_intl@
XLIB_ICONV= @lib_iconv@
XLIB_ACL= @lib_acl@		# Full (test/set) ACL users like star
XLIB_ACL_TEST= @lib_acl_test@	# Test only ACL users like libfind
XLIB_ATTR = @lib_attr@
XLIB_SECDB = @lib_secdb@
XLIB_GEN = @lib_gen@
XLIB_PTHREAD = @lib_pthread@
XLIB_RT = @lib_rt@
XLIB_DL= @lib_dl@
XLIB_DIR= @lib_dir@
END-of-smake-1.2.1/autoconf/rules.cnf.in
echo x - smake-1.2.1/autoconf/xconfig.h.in
sed 's/^X//' >smake-1.2.1/autoconf/xconfig.h.in << 'END-of-smake-1.2.1/autoconf/xconfig.h.in'
X/* @(#)xconfig.h.in	1.189 10/02/28 Copyright 1998-2009 J. Schilling */
X/*
X *	Dynamic autoconf C-include code.
X *
X *	Copyright (c) 1998-2009 J. Schilling
X */
X
X/*
X * Header Files
X */
X#undef PROTOTYPES	/* if Compiler supports ANSI C prototypes */
X#undef HAVE_INLINE	/* if Compiler supports "inline" keyword */
X#undef HAVE_ASSERT_H	/* to use stdio.h */
X#undef HAVE_STDIO_H	/* to use stdio.h */
X#undef HAVE_STDARG_H	/* to use stdarg.h, else use varargs.h NOTE: SaberC on a Sun has prototypes but no stdarg.h */
X#undef HAVE_VARARGS_H	/* to use use varargs.h NOTE: The free HP-UX C-compiler has stdarg.h but no PROTOTYPES */
X#undef HAVE_STDLIB_H	/* to use general utility defines (malloc(), size_t ...) and general C library prototypes */
X#undef HAVE_STDDEF_H	/* to use offsetof(), ptrdiff_t, wchar_t, size_t */
X#undef HAVE_STRING_H	/* to get NULL and ANSI C string function prototypes */
X#undef HAVE_STRINGS_H	/* to get BSD string function prototypes */
X#undef STDC_HEADERS	/* if ANSI compliant stdlib.h, stdarg.h, string.h, float.h are present */
X#undef HAVE_UNISTD_H	/* to get POSIX syscall prototypes XXX sys/file.h fcntl.h (unixstd/fctl)XXX*/
X#undef HAVE_GETOPT_H	/* to get getopt() prototype from getopt.h instead of unistd.h */
X#undef HAVE_LIMITS_H	/* to get POSIX numeric limits constants */
X#undef HAVE_A_OUT_H	/* if a.out.h is present (may be a system using a.out format) */
X#undef HAVE_AOUTHDR_H	/* if aouthdr.h is present. This is a COFF system */
X#undef HAVE_ELF_H	/* if elf.h is present. This is an ELF system */
X#undef HAVE_FCNTL_H	/* to access, O_XXX constants for open(), otherwise use sys/file.h */
X#undef HAVE_SYS_FILE_H	/* to use O_XXX constants for open() and flock() defs */
X#undef HAVE_INTTYPES_H	/* to use UNIX-98 inttypes.h */
X#undef HAVE_STDINT_H	/* to use SUSv3 stdint.h */
X#undef HAVE_DIRENT_H	/* to use POSIX dirent.h */
X#undef HAVE_SYS_DIR_H	/* to use BSD sys/dir.h */
X#undef HAVE_NDIR_H	/* to use ndir.h */
X#undef HAVE_SYS_NDIR_H	/* to use sys/ndir.h */
X#undef HAVE_ALLOCA_H	/* if alloca.h exists */
X#undef HAVE_MALLOC_H	/* if malloc.h exists */
X#undef HAVE_SGTTY_H	/* if sgtty.h exists */
X#undef HAVE_TERMIOS_H	/* to use POSIX termios.h */
X#undef HAVE_TERMIO_H	/* to use SVR4 termio.h */
X#undef HAVE_PWD_H	/* if pwd.h exists */
X#undef HAVE_GRP_H	/* if grp.h exists */
X#undef HAVE_SIGNAL_H	/* if signal.h exists */
X#undef HAVE_SIGINFO_H	/* if siginfo.h exists */
X#undef HAVE_SYS_SIGINFO_H /* if sys/siginfo.h exists */
X#undef HAVE_UCONTEXT_H	/* if ucontext.h exists */
X#undef HAVE_SYS_ACL_H	/* to use <sys/acl.h> for ACL definitions */
X#undef HAVE_ACLLIB_H	/* if HP-UX <acllib.h> is present */
X#undef HAVE_ACL_LIBACL_H /* if Linux <acl/libacl.h> is present */
X#undef HAVE_SHADOW_H	/* if shadow.h exists */
X#undef HAVE_SYSLOG_H	/* if syslog.h exists */
X#undef HAVE_SYS_TIME_H	/* may include sys/time.h for struct timeval */
X#undef TIME_WITH_SYS_TIME	/* may include both time.h and sys/time.h */
X#undef HAVE_TIMES	/* to use times() and sys/times.h */
X#undef HAVE_SYS_TIMES_H	/* may include sys/times.h for struct tms */
X#undef HAVE_UTIME		/* to use AT&T utime() and utimbuf */
X#undef HAVE_UTIMES		/* to use BSD utimes() and sys/time.h */
X#undef HAVE_FUTIMES		/* to use BSD futimes() and sys/time.h */
X#undef HAVE_LUTIMES		/* to use BSD lutimes() and sys/time.h */
X#undef HAVE_UTIME_H		/* to use utime.h for the utimbuf structure declaration, else declare struct utimbuf yourself */
X#undef HAVE_SYS_UTIME_H		/* to use sys/utime.h if utime.h does not exist */
X#undef HAVE_SYS_IOCTL_H		/* if sys/ioctl.h is present */
X#undef HAVE_SYS_FILIO_H		/* if sys/ioctl.h is present */
X#undef HAVE_SYS_PARAM_H		/* if sys/param.h is present */
X#undef HAVE_MACH_MACHINE_H	/* if mach/machine.h is present */
X#undef HAVE_MNTENT_H		/* if mntent.h is present */
X#undef HAVE_SYS_MNTENT_H	/* if sys/mntent.h is present */
X#undef HAVE_SYS_MNTTAB_H	/* if sys/mnttab.h is present */
X#undef HAVE_SYS_MOUNT_H		/* if sys/mount.h is present */
X#undef HAVE_WAIT_H		/* to use wait.h for prototypes and union wait */
X#undef HAVE_SYS_WAIT_H		/* else use sys/wait.h */
X#undef HAVE_SYS_RESOURCE_H	/* to use sys/resource.h for rlimit() and wait3() */
X#undef HAVE_PROCFS_H		/* to use procfs.h instead of sys/procfs.h (Solaris forces profcs-2) */
X#undef HAVE_SYS_PROCFS_H	/* to use sys/procfs.h for wait3() emulation */
X#undef HAVE_SYS_SYSTEMINFO_H	/* to use SVr4 sysinfo() */
X#undef HAVE_SYS_SYSCTL_H	/* to use BSD sysctl() */
X#undef HAVE_SYS_UTSNAME_H	/* to use uname() */
X#undef HAVE_SYS_PRIOCNTL_H	/* to use SVr4 priocntl() instead of nice()/setpriority() */
X#undef HAVE_SYS_RTPRIOCNTL_H	/* if the system supports SVr4 real time classes */
X#undef HAVE_SYS_PROCSET_H	/* if the system supports SVr4 process sets */
X#undef HAVE_SYS_SYSCALL_H	/* to use syscall() */
X#undef HAVE_SYS_MTIO_H		/* to use mtio definitions from sys/mtio.h */
X#undef HAVE_SYS_TAPE_H		/* to use mtio definitions from AIX sys/tape.h */
X#undef HAVE_SYS_MMAN_H		/* to use definitions for mmap()/madvise()... from sys/mman.h */
X#undef HAVE_SYS_SHM_H		/* to use definitions for shmget() ... from sys/shm.h */
X#undef HAVE_SYS_SEM_H		/* to use definitions for semget() ... from sys/sem.h */
X#undef HAVE_SYS_IPC_H		/* to use definitions for ftok() ... from sys/ipc.h */
X#undef MAJOR_IN_MKDEV		/* if we should include sys/mkdev.h to get major()/minor()/makedev() */
X#undef MAJOR_IN_SYSMACROS	/* if we should include sys/sysmacros.h to get major()/minor()/makedev() */
X#undef HAVE_SYS_DKIO_H		/* if we may include sys/dkio.h for disk ioctls */
X#undef HAVE_SYS_DKLABEL_H	/* if we may include sys/dklabel.h for disk label */
X#undef HAVE_SUN_DKIO_H		/* if we may include sun/dkio.h for disk ioctls */
X#undef HAVE_SUN_DKLABEL_H	/* if we may include sun/dklabel.h for disk label */
X#undef HAVE_SYS_TYPES_H		/* if we may include sys/types.h (the standard) */
X#undef HAVE_SYS_STYPES_H	/* if we may include sys/stypes.h (JOS) */
X#undef HAVE_SYS_FILEDESC_H	/* if we may include sys/filedesc.h (JOS) */
X#undef HAVE_SYS_STAT_H		/* if we may include sys/stat.h (the standard) */
X#undef HAVE_SYS_ACCT_H		/* if we may include sys/acct.h */
X#undef HAVE_TYPES_H		/* if we may include types.h (rare cases e.g. ATARI TOS) */
X#undef HAVE_STAT_H		/* if we may include stat.h (rare cases e.g. ATARI TOS) */
X#undef HAVE_POLL_H		/* if we may include poll.h to use poll() */
X#undef HAVE_SYS_POLL_H		/* if we may include sys/poll.h to use poll() */
X#undef HAVE_SYS_SELECT_H	/* if we may have sys/select.h nonstandard use for select() on some systems*/
X#undef NEED_SYS_SELECT_H	/* if we need sys/select.h to use select() (this is nonstandard) */
X#undef HAVE_NETDB_H		/* if we have netdb.h for get*by*() and rcmd() */
X#undef HAVE_SYS_SOCKET_H	/* if we have sys/socket.h for socket() */
X#undef NEED_SYS_SOCKET_H	/* if we need sys/socket.h to use select() (this is nonstandard) */
X#undef HAVE_NETINET_IN_H	/* if we have netinet/in.h */
X#undef HAVE_STROPTS_H		/* if we have stropts.h */
X#undef HAVE_LINUX_PG_H		/* if we may include linux/pg.h for PP ATAPI sypport */
X#undef HAVE_CAMLIB_H		/* if we may include camlib.h for CAM SCSI transport definitions */
X#undef HAVE_IEEEFP_H		/* if we may include ieeefp.h for finite()/isnand() */
X#undef HAVE_FP_H		/* if we may include fp.h for FINITE()/IS_INF()/IS_NAN() */
X#undef HAVE_VALUES_H		/* if we may include values.h for MAXFLOAT */
X#undef HAVE_FLOAT_H		/* if we may include float.h for FLT_MAX */
X#undef HAVE_MATH_H		/* if we may include math.h for e.g. isinf()/isnan() */
X#undef HAVE__FILBUF		/* if we have _filbuf() for USG derived STDIO */
X#undef HAVE___FILBUF		/* if we have __filbuf() for USG derived STDIO */
X#undef HAVE_USG_STDIO		/* if we have USG derived STDIO */
X#undef HAVE_ERRNO_DEF		/* if we have errno definition in <errno.h> */
X#undef HAVE_ENVIRON_DEF		/* if we have environ definition in <unistd.h> */
X#undef HAVE_SYS_SIGLIST_DEF	/* if we have sys_siglist definition in <signal.h> */
X#undef HAVE_SYS_FORK_H		/* if we should include sys/fork.h for forkx() definitions */
X#undef HAVE_VFORK_H		/* if we should include vfork.h for vfork() definitions */
X#undef HAVE_ARPA_INET_H		/* if we have arpa/inet.h (missing on BeOS) */
X				/* BeOS has inet_ntoa() in <netdb.h> */
X#undef HAVE_BSD_DEV_SCSIREG_H	/* if we have a NeXT Step compatible sg driver */
X#undef HAVE_LINUX_TYPES_H	/* if we may include linux/types.h */
X#undef HAVE_LINUX_GFP_H		/* if we may include linux/gfp.h */
X#undef HAVE_ASM_TYPES_H		/* if we may include asm/types.h */
X#undef HAVE_SYS_BSDTTY_H	/* if we have sys/bsdtty.h on HP-UX for TIOCGPGRP */
X#undef HAVE_OS_H		/* if we have the BeOS kernel definitions in OS.h */
X#undef HAVE_OS2_H		/* if we have the OS/2 definitions in os2.h */
X#undef HAVE_OS2ME_H		/* if we have the OS/2 definitions in os2me.h */
X#undef HAVE_WINDOWS_H		/* if we have the MS-Win definitions in windows.h */
X#undef HAVE_EXT2FS_EXT2_FS_H	/* if we have the Linux moving target ext2fs/ext2_fs.h */
X#undef HAVE_ATTR_XATTR_H	/* if we have the Linux Extended File Attr definitions in attr/xattr.h */
X#undef HAVE_CRT_EXTERNS_H	/* if we have the Mac OS X env definitions in crt_externs.h */
X#undef HAVE_FNMATCH_H		/* if we may include fnmatch.h */
X#undef HAVE_DIRECT_H		/* if we may include direct.h  (MSVC for getcwd()/chdir()/mkdir()/rmdir()) */
X#undef HAVE_SYSEXITS_H		/* if we may include sysexits.h */
X
X#undef HAVE_LIBINTL_H		/* if we may include libintl.h */
X#undef HAVE_LOCALE_H		/* if we may include locale.h */
X#undef HAVE_LANGINFO_H		/* if we may include langinfo.h */
X#undef HAVE_NL_TYPES_H		/* if we may include nl_types.h */
X#undef HAVE_CTYPE_H		/* if we may include ctype.h */
X#undef HAVE_WCTYPE_H		/* if we may include wctype.h */
X#undef HAVE_WCHAR_H		/* if we may include wchar.h */
X#undef HAVE_ICONV_H		/* if we may include iconv.h */
X
X#undef HAVE_PRIV_H		/* if we may include priv.h */
X#undef HAVE_SYS_PRIV_H		/* if we may include sys/priv.h */
X#undef HAVE_EXEC_ATTR_H		/* if we may include exec_attr.h */
X#undef HAVE_SECDB_H		/* if we may include secdb.h */
X#undef HAVE_PTHREAD_H		/* if we may include pthread.h */
X#undef HAVE_THREAD_H		/* if we may include thread.h */
X
X#undef HAVE_LIBGEN_H		/* if we may include libgen.h */
X
X#undef HAVE_DLFCN_H		/* if we may include dlfcn.h */
X#undef HAVE_LINK_H		/* if we may include linh.h */
X#undef HAVE_DL_H		/* if we may include dl.h */
X
X/*
X * Convert to SCHILY name
X */
X#ifdef	STDC_HEADERS
X#	ifndef	HAVE_STDC_HEADERS
X#		define	HAVE_STDC_HEADERS
X#	endif
X#endif
X
X#ifdef	HAVE_ELF_H
X#define	HAVE_ELF			/* This system uses ELF */
X#else
X#	ifdef	HAVE_AOUTHDR_H
X#	define	HAVE_COFF		/* This system uses COFF */
X#	else
X#		ifdef HAVE_A_OUT_H
X#		define HAVE_AOUT	/* This system uses AOUT */
X#		endif
X#	endif
X#endif
X
X/*
X * Function declarations
X */
X#undef HAVE_DECL_STAT		/* Whether <sys/stat.h> defines extern stat(); */
X#undef HAVE_DECL_LSTAT		/* Whether <sys/stat.h> defines extern lstat(); */
X
X/*
X * Library Functions
X */
X#undef HAVE_ACCESS		/* access() is present in libc */
X#undef HAVE_EACCESS		/* eaccess() is present in libc */
X#undef HAVE_EUIDACCESS		/* euidaccess() is present in libc */
X#undef HAVE_ACCESS_E_OK		/* access() implements E_OK (010) for effective UIDs */
X#undef HAVE_CRYPT		/* crypt() is present in libc or libcrypt */
X#undef HAVE_STRERROR		/* strerror() is present in libc */
X#undef HAVE_MEMCHR		/* memchr() is present in libc */
X#undef HAVE_MEMCPY		/* memcpy() is present in libc */
X#undef HAVE_MEMMOVE		/* memmove() is present in libc */
X#undef HAVE_MEMSET		/* memset() is present in libc */
X#undef HAVE_MADVISE		/* madvise() is present in libc */
X#undef HAVE_MLOCK		/* mlock() is present in libc */
X#undef HAVE_MLOCKALL		/* working mlockall() is present in libc */
X#undef HAVE_MMAP		/* working mmap() is present in libc */
X#undef _MMAP_WITH_SIZEP		/* mmap() needs address of size parameter */
X#undef HAVE_FLOCK		/* *BSD flock() is present in libc */
X#undef HAVE_LOCKF		/* lockf() is present in libc (XOPEN) */
X#undef HAVE_FCNTL_LOCKF		/* file locking via fcntl() is present in libc */
X#undef HAVE_FCHDIR		/* fchdir() is present in libc */
X#undef HAVE_FDOPENDIR		/* fdopendir() is present in libc */
X#undef HAVE_OPENAT		/* openat() is present in libc */
X#undef HAVE_ATTROPEN		/* attropen() is present in libc */
X#undef HAVE_FSTATAT		/* fstatat() is present in libc */
X#undef HAVE_FCHOWNAT		/* fchownat() is present in libc */
X#undef HAVE_FUTIMESAT		/* futimesat() is present in libc */
X#undef HAVE_RENAMEAT		/* renameat() is present in libc */
X#undef HAVE_UNLINKAT		/* unlinkat() is present in libc */
X#undef HAVE___ACCESSAT		/* __accessat() is present in libc */
X#undef HAVE_ACCESSAT		/* accessat() is present in libc */
X#undef HAVE_REALPATH		/* realpath() is present in libc */
X#undef HAVE_RESOLVEPATH		/* resolvepath() is present in libc */
X/*
X * See e.g. http://www.die.net/doc/linux/man/man2/mkdirat.2.html
X */
X#undef HAVE_MKDIRAT		/* mkdirat() is present in libc */
X#undef HAVE_FACCESSAT		/* faccessat() is present in libc */
X#undef HAVE_FCHMODAT		/* fchmodat() is present in libc */
X#undef HAVE_LINKAT		/* inkat() is present in libc */
X#undef HAVE_MKFIFOAT		/* mkfifoat() is present in libc */
X#undef HAVE_MKNODKAT		/* mknodat() is present in libc */
X#undef HAVE_READLINKAT		/* readlinkat() is present in libc */
X#undef HAVE_SYMLINKAT		/* symlinkat() is present in libc */
X#undef HAVE_FUTIMENS		/* futimens() is present in libc */
X#undef HAVE_UTIMENSAT		/* utimensat() is present in libc */
X#undef HAVE_POPEN		/* popen() is present in libc */
X#undef HAVE_PCLOSE		/* pclose() is present in libc */
X#undef HAVE__POPEN		/* _popen() is present in libc */
X#undef HAVE__PCLOSE		/* _pclose() is present in libc */
X#undef HAVE_STATVFS		/* statvfs() is present in libc */
X#undef HAVE_QUOTACTL		/* quotactl() is present in libc */
X#undef HAVE_QUOTAIOCTL		/* use ioctl(f, Q_QUOTACTL, &q) instead of quotactl() */
X#undef HAVE_GETPID		/* getpid() is present in libc */
X#undef HAVE_GETPPID		/* getppid() is present in libc */
X#undef HAVE_SETREUID		/* setreuid() is present in libc */
X#undef HAVE_SETRESUID		/* setresuid() is present in libc */
X#undef HAVE_SETEUID		/* seteuid() is present in libc */
X#undef HAVE_SETUID		/* setuid() is present in libc */
X#undef HAVE_SETREGID		/* setregid() is present in libc */
X#undef HAVE_SETRESGID		/* setresgid() is present in libc */
X#undef HAVE_SETEGID		/* setegid() is present in libc */
X#undef HAVE_SETGID		/* setgid() is present in libc */
X#undef HAVE_GETUID		/* getuid() is present in libc */
X#undef HAVE_GETEUID		/* geteuid() is present in libc */
X#undef HAVE_GETGID		/* getgid() is present in libc */
X#undef HAVE_GETEGID		/* getegid() is present in libc */
X#undef HAVE_GETPGID		/* getpgid() is present in libc (POSIX) */
X#undef HAVE_SETPGID		/* setpgid() is present in libc (POSIX) */
X#undef HAVE_GETPGRP		/* getpgrp() is present in libc (ANY) */
X#undef HAVE_GETSID		/* getsid() is present in libc (POSIX) */
X#undef HAVE_SETSID		/* setsid() is present in libc (POSIX) */
X#undef HAVE_SETPGRP		/* setpgrp() is present in libc (ANY) */
X#undef HAVE_BSD_GETPGRP		/* getpgrp() in libc is BSD-4.2 compliant */
X#undef HAVE_BSD_SETPGRP		/* setpgrp() in libc is BSD-4.2 compliant */
X#undef HAVE_GETSPNAM		/* getspnam() in libc (SVR4 compliant) */
X#undef HAVE_GETSPWNAM		/* getspwnam() in libsec.a (HP-UX) */
X#undef HAVE_SYNC		/* sync() is present in libc */
X#undef HAVE_FSYNC		/* fsync() is present in libc */
X#undef HAVE_TCGETATTR		/* tcgetattr() is present in libc */
X#undef HAVE_TCSETATTR		/* tcsetattr() is present in libc */
X#undef HAVE_TCGETPGRP		/* tcgetpgrp() is present in libc */
X#undef HAVE_TCSETPGRP		/* tcsetpgrp() is present in libc */
X#undef HAVE_WAIT		/* wait() is present in libc */
X#undef HAVE_WAIT3		/* working wait3() is present in libc */
X#undef HAVE_WAIT4		/* wait4() is present in libc */
X#undef HAVE_WAITID		/* waitid() is present in libc */
X#undef HAVE_WAITPID		/* waitpid() is present in libc */
X#undef HAVE_GETHOSTID		/* gethostid() is present in libc */
X#undef HAVE_GETHOSTNAME		/* gethostname() is present in libc */
X#undef HAVE_GETDOMAINNAME	/* getdomainname() is present in libc */
X#undef HAVE_GETPAGESIZE		/* getpagesize() is present in libc */
X#undef HAVE_GETDTABLESIZE	/* getdtablesize() is present in libc */
X#undef HAVE_GETRUSAGE		/* getrusage() is present in libc */
X#undef HAVE_GETRLIMIT		/* getrlimit() is present in libc */
X#undef HAVE_SETRLIMIT		/* setrlimit() is present in libc */
X#undef HAVE_ULIMIT		/* ulimit() is present in libc */
X#undef HAVE_GETTIMEOFDAY	/* gettimeofday() is present in libc */
X#undef HAVE_SETTIMEOFDAY	/* settimeofday() is present in libc */
X#undef HAVE_VAR_TIMEZONE	/* extern long timezone is present in libc */
X#undef HAVE_VAR_TIMEZONE_DEF	/* extern long timezone is present in time.h */
X#undef HAVE_TIME		/* time() is present in libc */
X#undef HAVE_GMTIME		/* gmtime() is present in libc */
X#undef HAVE_LOCALTIME		/* localtime() is present in libc */
X#undef HAVE_MKTIME		/* mktime() is present in libc */
X#undef HAVE_TIMEGM		/* timegm() is present in libc */
X#undef HAVE_TIMELOCAL		/* timelocal() is present in libc */
X#undef HAVE_FTIME		/* ftime() is present in libc */
X#undef HAVE_STIME		/* stime() is present in libc */
X#undef HAVE_TZSET		/* tzset() is present in libc */
X#undef HAVE_CTIME		/* ctime() is present in libc */
X#undef HAVE_CFTIME		/* cftime() is present in libc */
X#undef HAVE_ASCFTIME		/* ascftime() is present in libc */
X#undef HAVE_STRFTIME		/* strftime() is present in libc */
X#undef HAVE_GETHRTIME		/* gethrtime() is present in libc */
X#undef HAVE_POLL		/* poll() is present in libc */
X#undef HAVE_SELECT		/* select() is present in libc */
X#undef HAVE_ISASTREAM		/* isastream() is present in libc */
X#undef HAVE_CHMOD		/* chmod() is present in libc */
X#undef HAVE_FCHMOD		/* fchmod() is present in libc */
X#undef HAVE_LCHMOD		/* lchmod() is present in libc */
X#undef HAVE_CHOWN		/* chown() is present in libc */
X#undef HAVE_FCHOWN		/* fchown() is present in libc */
X#undef HAVE_LCHOWN		/* lchown() is present in libc */
X#undef HAVE_TRUNCATE		/* truncate() is present in libc */
X#undef HAVE_FTRUNCATE		/* ftruncate() is present in libc */
X#undef HAVE_BRK			/* brk() is present in libc */
X#undef HAVE_SBRK		/* sbrk() is present in libc */
X#undef HAVE_VA_COPY		/* va_copy() is present in varargs.h/stdarg.h */
X#undef HAVE__VA_COPY		/* __va_copy() is present in varargs.h/stdarg.h */
X#undef HAVE_DTOA		/* BSD-4.4 __dtoa() is present in libc */
X#undef HAVE_DTOA_R		/* BSD-4.4 __dtoa() with result ptr (reentrant) */
X#undef HAVE_DUP			/* dup() is present in libc */
X#undef HAVE_DUP2		/* dup2() is present in libc */
X#undef HAVE_GETCWD		/* POSIX getcwd() is present in libc */
X#undef HAVE_SMMAP		/* may map anonymous memory to get shared mem */
X#undef HAVE_SHMAT		/* shmat() is present in libc */
X#undef HAVE_SHMGET		/* shmget() is present in libc and working */
X#undef HAVE_SEMGET		/* semget() is present in libc */
X#undef HAVE_LSTAT		/* lstat() is present in libc */
X#undef HAVE_READLINK		/* readlink() is present in libc */
X#undef HAVE_SYMLINK		/* symlink() is present in libc */
X#undef HAVE_LINK		/* link() is present in libc */
X#undef HAVE_HARD_SYMLINKS	/* link() allows hard links on symlinks */
X#undef HAVE_LINK_NOFOLLOW	/* link() does not follow symlinks when hard linking symlinks */
X#undef HAVE_RENAME		/* rename() is present in libc */
X#undef HAVE_MKFIFO		/* mkfifo() is present in libc */
X#undef HAVE_MKNOD		/* mknod() is present in libc */
X#undef HAVE_ECVT		/* ecvt() is present in libc */
X#undef HAVE_FCVT		/* fcvt() is present in libc */
X#undef HAVE_GCVT		/* gcvt() is present in libc */
X#undef HAVE_ECVT_R		/* ecvt_r() is present in libc */
X#undef HAVE_FCVT_R		/* fcvt_r() is present in libc */
X#undef HAVE_GCVT_R		/* gcvt_r() is present in libc */
X#undef HAVE_ECONVERT		/* econvert() is present in libc */
X#undef HAVE_FCONVERT		/* fconvert() is present in libc */
X#undef HAVE_GCONVERT		/* gconvert() is present in libc */
X#undef HAVE_ISINF		/* isinf() is present in libc */
X#undef HAVE_ISNAN		/* isnan() is present in libc */
X#undef HAVE_C99_ISINF		/* isinf() is present in math.h/libc */
X#undef HAVE_C99_ISNAN		/* isnan() is present in math.h/libc */
X#undef HAVE_FINITE		/* finite() is present in libc/ieeefp.h (SVr4) */
X#undef HAVE_ISNAND		/* isnand() is present in libc/ieeefp.h (SVr4) */
X#undef HAVE_RAND		/* rand() is present in libc */
X#undef HAVE_DRAND48		/* drand48() is present in libc */
X#undef HAVE_ICONV		/* iconv() is present in libiconv */
X#undef HAVE_ICONV_OPEN		/* iconv_open() is present in libiconv */
X#undef HAVE_ICONV_CLOSE		/* iconv_close() is present in libiconc */
X#undef HAVE_LIBICONV		/* libiconv() is present in libiconv */
X#undef HAVE_LIBICONV_OPEN	/* libiconv_open() is present in liiconv */
X#undef HAVE_LIBICONV_CLOSE	/* libiconv_close() is present in libiconv */
X#undef HAVE_SETPRIORITY		/* setpriority() is present in libc */
X#undef HAVE_NICE		/* nice() is present in libc */
X#undef HAVE_DOSSETPRIORITY	/* DosSetPriority() is present in libc */
X#undef HAVE_DOSALLOCSHAREDMEM	/* DosAllocSharedMem() is present in libc */
X#undef HAVE_SEEKDIR		/* seekdir() is present in libc */
X#undef HAVE_GETENV		/* getenv() is present in libc */
X#undef HAVE_PUTENV		/* putenv() is present in libc (preferred function) */
X#undef HAVE_SETENV		/* setenv() is present in libc (use instead of putenv()) */
X#undef HAVE_UNSETENV		/* unsetenv() is present in libc */
X#undef HAVE_UNAME		/* uname() is present in libc */
X#undef HAVE_SNPRINTF		/* snprintf() is present in libc */
X#undef HAVE_STRCAT		/* strcat() is present in libc */
X#undef HAVE_STRNCAT		/* strncat() is present in libc */
X#undef HAVE_STRCMP		/* strcmp() is present in libc */
X#undef HAVE_STRNCMP		/* strncmp() is present in libc */
X#undef HAVE_STRCPY		/* strcpy() is present in libc */
X#undef HAVE_STRLCPY		/* strlcpy() is present in libc */
X#undef HAVE_STRNCPY		/* strncpy() is present in libc */
X#undef HAVE_STRDUP		/* strdup() is present in libc */
X#undef HAVE_STRLEN		/* strlen() is present in libc */
X#undef HAVE_STRCHR		/* strchr() is present in libc */
X#undef HAVE_STRRCHR		/* strrchr() is present in libc */
X#undef HAVE_STRCASECMP		/* strcasecmp() is present in libc */
X#undef HAVE_STRTOL		/* strtol() is present in libc */
X#undef HAVE_STRTOLL		/* strtoll() is present in libc */
X#undef HAVE_STRTOUL		/* strtoul() is present in libc */
X#undef HAVE_STRTOULL		/* strtoull() is present in libc */
X#undef HAVE_STRTOD		/* strtold() is present in libc */
X#undef HAVE_STRSIGNAL		/* strsignal() is present in libc */
X#undef HAVE_STR2SIG		/* str2sig() is present in libc */
X#undef HAVE_SIG2STR		/* sig2str() is present in libc */
X#undef HAVE_SIGSETJMP		/* sigsetjmp() is present in libc */
X#undef HAVE_SIGLONGJMP		/* siglongjmp() is present in libc */
X#undef HAVE_KILL		/* kill() is present in libc */
X#undef HAVE_KILLPG		/* killpg() is present in libc */
X#undef HAVE_SIGNAL		/* signal() is present in libc */
X#undef HAVE_SIGRELSE		/* sigrelse() is present in libc */
X#undef HAVE_SIGPROCMASK		/* sigprocmask() is present in libc (POSIX) */
X#undef HAVE_SIGSETMASK		/* sigsetmask() is present in libc (BSD) */
X#undef HAVE_SIGSET		/* sigset() is present in libc (POSIX) */
X#undef HAVE_SIGALTSTACK		/* sigaltstack() is present in libc (POSIX) */
X#undef HAVE_SYS_SIGLIST		/* char *sys_siglist[] is present in libc */
X#undef HAVE_SLEEP		/* sleep() is present in libc */
X#undef HAVE_USLEEP		/* usleep() is present in libc */
X#undef HAVE_FORK		/* fork() is present in libc */
X#undef HAVE_FORKX		/* forkx() is present in libc */
X#undef HAVE_FORKALL		/* forkall() is present in libc */
X#undef HAVE_FORKALLX		/* forkallx() is present in libc */
X#undef HAVE_VFORK		/* working vfork() is present in libc */
X#undef HAVE_VFORKX		/* working vforkx() is present in libc */
X#undef HAVE_EXECL		/* execl() is present in libc */
X#undef HAVE_EXECLE		/* execle() is present in libc */
X#undef HAVE_EXECLP		/* execlp() is present in libc */
X#undef HAVE_EXECV		/* execv() is present in libc */
X#undef HAVE_EXECVE		/* execve() is present in libc */
X#undef HAVE_EXECVP		/* execvp() is present in libc */
X#undef HAVE_GETEXECNAME		/* getexecname() is present in libc */
X#undef HAVE_GETPROGNAME		/* getprogname() is present in libc */
X#undef HAVE_SETPROGNAME		/* setprogname() is present in libc */
X#undef HAVE_ALLOCA		/* alloca() is present (else use malloc())*/
X#undef HAVE_MALLOC		/* malloc() is present in libc */
X#undef HAVE_CALLOC		/* calloc() is present in libc */
X#undef HAVE_REALLOC		/* realloc() is present in libc */
X#undef HAVE_VALLOC		/* valloc() is present in libc (else use malloc())*/
X#undef HAVE_MEMALIGN		/* memalign() is present in libc */
X#undef HAVE_POSIX_MEMALIGN	/* posix_memalign() is present in libc */
X#undef vfork
X#undef HAVE_WCSCAT		/* wcscat() is present in libc */
X#undef HAVE_WCSNCAT		/* wcsncat() is present in libc */
X#undef HAVE_WCSCMP		/* wcscmp() is present in libc */
X#undef HAVE_WCSNCMP		/* wcsncmp() is present in libc */
X#undef HAVE_WCSCPY		/* wcscpy() is present in libc */
X#undef HAVE_WCSLCPY		/* wcsncpy() is present in libc */
X#undef HAVE_WCSNCPY		/* wcsncpy() is present in libc */
X#undef HAVE_WCSDUP		/* wcsdup() is present in libc */
X#undef HAVE_WCSLEN		/* wcslen() is present in libc */
X#undef HAVE_WCSCHR		/* wcschr() is present in libc */
X#undef HAVE_WCSRCHR		/* wcsrchr() is present in libc */
X#undef HAVE_WCWIDTH		/* wcwidth() is present in libc */
X#undef HAVE_WCSWIDTH		/* wcswidth() is present in libc */
X#undef HAVE_WCTYPE		/* wctype() is present in libc */
X#undef HAVE_ISWCTYPE		/* iswctype() is present in libc */
X
X
X#undef HAVE_CHFLAGS		/* chflags() is present in libc */
X#undef HAVE_FCHFLAGS		/* fchflags() is present in libc */
X#undef HAVE_FFLAGSTOSTR		/* fflagstostr() is present in libc */
X#undef HAVE_STRTOFFLAGS		/* strtofflags() is present in libc */
X
X#undef HAVE_GETTEXT		/* gettext() is present in -lintl */
X#undef HAVE_SETLOCALE		/* setlocale() is present in libc */
X#undef HAVE_LOCALECONV		/* localeconv() is present in libc */
X#undef HAVE_NL_LANGINFO		/* nl_langinfo() is present in libc */
X
X#undef HAVE_SETBUF		/* setbuf() is present in libc */
X#undef HAVE_SETVBUF		/* setvbuf() is present in libc */
X
X#undef HAVE_FNMATCH		/* fnmatch() is present in libc */
X
X#undef HAVE_MKTEMP		/* mktemp() is present in libc */
X#undef HAVE_MKSTEMP		/* mkstemp() is present in libc */
X
X#undef HAVE_GETPPRIV		/* getppriv() is present in libc */
X#undef HAVE_SETPPRIV		/* setppriv() is present in libc */
X#undef HAVE_PRIV_SET		/* priv_set() is present in libc */
X#undef HAVE_GETROLES		/* getroles() is present in libc (AIX) */
X#undef HAVE_PRIVBIT_SET		/* privbit_set() is present in libc (AIX) */
X
X#undef HAVE_GETAUTHATTR		/* getauthattr() is present in -lsecdb */
X#undef HAVE_GETUSERATTR		/* getuserattr() is present in -lsecdb */
X#undef HAVE_GETEXECATTR		/* getexecattr() is present in -lsecdb */
X#undef HAVE_GETPROFATTR		/* getprofattr() is present in -lsecdb */
X
X#undef HAVE_GMATCH		/* gmatch() is present in -lgen */
X
X#undef HAVE_CLONE_AREA		/* clone_area() is present in libc */
X#undef HAVE_CREATE_AREA		/* create_area() is present in libc */
X#undef HAVE_DELETE_AREA		/* delete_area() is present in libc */
X
X#undef HAVE_DLOPEN		/* dlopen() is present in libc */
X#undef HAVE_DLCLOSE		/* dlclose() is present in libc */
X#undef HAVE_DLSYM		/* dlsym() is present in libc */
X#undef HAVE_DLERROR		/* dlerror() is present in libc */
X#undef HAVE_SHL_LOAD		/* shl_load() is present in libc */
X#undef HAVE_SHL_UNLOAD		/* shl_unload() is present in libc */
X#undef HAVE_SHL_GETHANDLE	/* shl_gethandle() is present in libc */
X#undef HAVE_LOADLOBRARY		/* LoadLibrary() as present in libc */
X#undef HAVE_FREELIBRARY		/* FreeLibrary() is present in libc */
X#undef HAVE_GETPROCADDRESS	/* GetProcAddress() is present in libc */
X
X#undef HAVE_YIELD		/* yield() is present in libc */
X#undef HAVE_THR_YIELD		/* thr_yield() is present in libc */
X
X#undef HAVE_PTHREAD_CREATE	/* pthread_create() is present in libpthread */
X#undef HAVE_PTHREAD_KILL	/* pthread_kill() is present in libpthread */
X#undef HAVE_PTHREAD_MUTEX_LOCK	/* pthread_mutex_lock() is present in libpthread */
X#undef HAVE_PTHREAD_COND_WAIT	/* pthread_cond_wait() is present in libpthread */
X#undef HAVE_PTHREAD_SPIN_LOCK	/* pthread_spin_lock() is present in libpthread */
X
X#undef HAVE_CLOCK_GETTIME	/* clock_gettime() is present in librt */
X#undef HAVE_CLOCK_SETTIME	/* clock_settime() is present in librt */
X#undef HAVE_CLOCK_GETRES	/* clock_getres() is present in librt */
X#undef HAVE_SCHED_GETPARAM	/* sched_getparam() is present in librt */
X#undef HAVE_SCHED_SETPARAM	/* sched_setparam() is present in librt */
X#undef HAVE_SCHED_GETSCHEDULER	/* sched_getscheduler() is present in librt */
X#undef HAVE_SCHED_SETSCHEDULER	/* sched_setscheduler() is present in librt */
X#undef HAVE_SCHED_YIELD		/* sched_yield() is present in librt */
X#undef HAVE_NANOSLEEP		/* nanosleep() is present in librt */
X
X#undef HAVE_DIRFD		/* dirfd() is present in libc */
X#undef HAVE_ISWPRINT		/* iswprint() is present in libc */
X
X/*
X * Functions that we defined in 1982 but where POSIX.1-2008 defined
X * a POSIX violating incompatible definition.
X * We use AC_RCHECK_FUNCS(), so we get HAVE_RAW_* results as some
X * Linux distros have fexecve() that returns ENOSYS.
X */
X#undef HAVE_RAW_FEXECL		/* fexecl() */
X#undef HAVE_RAW_FEXECLE		/* fexecle() */
X#undef HAVE_RAW_FEXECV		/* fexecv() */
X#undef HAVE_RAW_FEXECVE		/* fexecve() */
X#undef HAVE_RAW_FSPAWNV		/* fspawnv() */
X#undef HAVE_RAW_FSPAWNL		/* fspawnl() */
X#undef HAVE_RAW_FSPAWNV_NOWAIT	/* fspawnv_nowait() */
X#undef HAVE_RAW_GETLINE		/* getline() */
X#undef HAVE_RAW_FGETLINE	/* fgetline() */
X
X
X/*
X * Misc OS stuff
X */
X#undef HAVE_DEV_TTY		/* /dev/tty present */
X#undef HAVE_DEV_NULL		/* /dev/null present */
X#undef HAVE_DEV_ZERO		/* /dev/zero present */
X
X/*
X * Misc OS programs
X */
X#undef	SHELL_IS_BASH		/* sh is bash */
X#undef	BIN_SHELL_IS_BASH	/* /bin/sh is bash */
X#undef	SHELL_CE_IS_BROKEN	/* sh -ce is broken */
X#undef	BIN_SHELL_CE_IS_BROKEN	/* /bin/sh -ce is broken */
X#undef	BIN_SHELL_BOSH		/* /bin/bosh is a working Bourne Shell */
X#undef	OPT_SCHILY_BIN_SHELL_BOSH /* /opt/schily/bin/bosh is a working Bourne Shell */
X
X/*
X * OS madness
X */
X#undef HAVE_BROKEN_LINUX_EXT2_FS_H	/* whether <linux/ext2_fs.h> is broken */
X#undef HAVE_BROKEN_SRC_LINUX_EXT2_FS_H	/* whether /usr/src/linux/include/linux/ext2_fs.h is broken */
X#undef HAVE_USABLE_LINUX_EXT2_FS_H	/* whether linux/ext2_fs.h is usable at all */
X#undef HAVE_BROKEN_SCSI_SCSI_H		/* whether <scsi/scsi.h> is broken */
X#undef HAVE_BROKEN_SRC_SCSI_SCSI_H	/* whether /usr/src/linux/include/scsi/scsi.h is broken */
X#undef HAVE_BROKEN_SCSI_SG_H		/* whether <scsi/sg.h> is broken */
X#undef HAVE_BROKEN_SRC_SCSI_SG_H	/* whether /usr/src/linux/include/scsi/sg.h is broken */
X
X/*
X * Linux Extended File Attributes
X */
X#undef HAVE_GETXATTR		/* getxattr()				*/
X#undef HAVE_SETXATTR		/* setxattr()				*/
X#undef HAVE_LISTXATTR		/* listxattr()				*/
X#undef HAVE_LGETXATTR		/* lgetxattr()				*/
X#undef HAVE_LSETXATTR		/* lsetxattr()				*/
X#undef HAVE_LLISTXATTR		/* llistxattr()				*/
X
X/*
X * Important:	This must be a result from a check _before_ the Large File test
X *		has been run. It then tells us whether these functions are
X *		available even when not in Large File mode.
X *
X *	Do not run the AC_FUNC_FSEEKO test from the GNU tar Large File test
X *	siute. It will use the same cache names and interfere with our test.
X *	Instead use the tests AC_SMALL_FSEEKO/AC_SMALL/STELLO and make sure
X *	they are placed before the large file tests.
X */
X#undef HAVE_FSEEKO		/* fseeko() is present in default compile mode */
X#undef HAVE_FTELLO		/* ftello() is present in default compile mode */
X
X#undef HAVE_RCMD		/* rcmd() is present in libc/libsocket */
X#undef HAVE_SOCKET		/* socket() is present in libc/libsocket */
X#undef HAVE_SOCKETPAIR		/* socketpair() is present in libc/libsocket */
X#undef HAVE_GETSERVBYNAME	/* getservbyname() is present in libc/libsocket */
X#undef HAVE_INET_NTOA		/* inet_ntoa() is present in libc/libsocket */
X#undef HAVE_GETADDRINFO		/* getaddrinfo() is present in libc/libsocket */
X#undef HAVE_GETNAMEINFO		/* getnameinfo() is present in libc/libsocket */
X
X#if	defined(HAVE_QUOTACTL) || defined(HAVE_QUOTAIOCTL)
X#	define HAVE_QUOTA	/* The system inludes quota */
X#endif
X
X/*
X * We need to test for the include files too because Apollo Domain/OS has a
X * libc that includes the functions but the includes files are not visible
X * from the BSD compile environment.
X *
X * ATARI MiNT has a non-working shmget(), so we test for it separately.
X */
X#if	defined(HAVE_SHMAT) && defined(HAVE_SHMGET) && \
X	defined(HAVE_SYS_SHM_H) && defined(HAVE_SYS_IPC_H)
X#	define	HAVE_USGSHM	/* USG shared memory is present */
X#endif
X#if	defined(HAVE_SEMGET) && defined(HAVE_SYS_SHM_H) && defined(HAVE_SYS_IPC_H)
X#	define	HAVE_USGSEM	/* USG semaphores are present */
X#endif
X
X#if	defined(HAVE_GETPGRP) && !defined(HAVE_BSD_GETPGRP)
X#define	HAVE_POSIX_GETPGRP 1	/* getpgrp() in libc is POSIX compliant */
X#endif
X#if	defined(HAVE_SETPGRP) && !defined(HAVE_BSD_SETPGRP)
X#define	HAVE_POSIX_SETPGRP 1	/* setpgrp() in libc is POSIX compliant */
X#endif
X
X/*
X * Structures
X */
X#undef HAVE_MTGET_TYPE		/* if struct mtget contains mt_type (drive type) */
X#undef HAVE_MTGET_MODEL		/* if struct mtget contains mt_model (drive type) */
X#undef HAVE_MTGET_DSREG		/* if struct mtget contains mt_dsreg (drive status) */
X#undef HAVE_MTGET_DSREG1	/* if struct mtget contains mt_dsreg1 (drive status msb) */
X#undef HAVE_MTGET_DSREG2	/* if struct mtget contains mt_dsreg2 (drive status lsb) */
X#undef HAVE_MTGET_GSTAT		/* if struct mtget contains mt_gstat (generic status) */
X#undef HAVE_MTGET_ERREG		/* if struct mtget contains mt_erreg (error register) */
X#undef HAVE_MTGET_RESID		/* if struct mtget contains mt_resid (residual count) */
X#undef HAVE_MTGET_FILENO	/* if struct mtget contains mt_fileno (file #) */
X#undef HAVE_MTGET_BLKNO		/* if struct mtget contains mt_blkno (block #) */
X#undef HAVE_MTGET_FLAGS		/* if struct mtget contains mt_flags (flags) */
X#undef HAVE_MTGET_BF		/* if struct mtget contains mt_bf (optimum blocking factor) */
X#undef HAVE_STRUCT_TIMEVAL	/* have struct timeval in time.h or sys/time.h */
X#undef HAVE_STRUCT_TIMEZONE	/* have struct timezone in time.h or sys/time.h */
X#undef HAVE_STRUCT_RUSAGE	/* have struct rusage in sys/resource.h */
X#undef HAVE_SI_UTIME		/* if struct siginfo contains si_utime */
X#undef HAVE_UNION_SEMUN		/* have an illegal definition for union semun in sys/sem.h */
X#undef HAVE_UNION_WAIT		/* have union wait in wait.h */
X#undef USE_UNION_WAIT		/* union wait in wait.h is used by default */
X#undef HAVE_DIRENT_D_INO	/* have d_ino in struct dirent */
X#undef HAVE_DIR_DD_FD		/* have dd_fd in DIR * */
X/*
X * SCO UnixWare has st_atim.st__tim.tv_nsec but the st_atim.tv_nsec tests also
X * succeeds. If you use st_atim.tv_nsec on UnixWare, you get a warning about
X * illegal structure usage. For this reason, your code needs to have
X * #ifdef HAVE_ST__TIM before #ifdef HAVE_ST_NSEC.
X */
X#undef HAVE_ST_SPARE1		/* if struct stat contains st_spare1 (usecs) */
X#undef HAVE_ST_ATIMENSEC	/* if struct stat contains st_atimensec (nanosecs) */
X#undef HAVE_ST_ATIME_N		/* if struct stat contains st_atime_n (nanosecs) */
X#undef HAVE_ST_NSEC		/* if struct stat contains st_atim.tv_nsec (nanosecs) */
X#undef HAVE_ST__TIM		/* if struct stat contains st_atim.st__tim.tv_nsec (nanosecs) */
X#undef HAVE_ST_ATIMESPEC	/* if struct stat contains st_atimespec.tv_nsec (nanosecs) */
X#undef HAVE_ST_BLKSIZE		/* if struct stat contains st_blksize */
X#undef HAVE_ST_BLOCKS		/* if struct stat contains st_blocks */
X#undef HAVE_ST_FSTYPE		/* if struct stat contains st_fstype */
X#undef HAVE_ST_ACLCNT		/* if struct stat contains st_aclcnt */
X#undef HAVE_ST_RDEV		/* if struct stat contains st_rdev */
X#undef HAVE_ST_FLAG		/* if struct stat contains st_flag */
X#undef HAVE_ST_FLAGS		/* if struct stat contains st_flags */
X#undef STAT_MACROS_BROKEN	/* if the macros S_ISDIR, S_ISREG .. don't work */
X
X#undef HAVE_UTSNAME_ARCH	/* if struct utsname contains processor as arch */
X#undef HAVE_UTSNAME_PROCESSOR	/* if struct utsname contains processor */
X#undef HAVE_UTSNAME_SYSNAME_HOST /* if struct utsname contains sysname_host */
X#undef HAVE_UTSNAME_RELEASE_HOST /* if struct utsname contains release_host */
X#undef HAVE_UTSNAME_VERSION_HOST /* if struct utsname contains version_host */
X
X#undef DEV_MINOR_BITS		/* # if bits needed to hold minor device number */
X#undef DEV_MINOR_NONCONTIG	/* if bits in minor device number are noncontiguous */
X
X#undef HAVE_SOCKADDR_STORAGE	/* if socket.h defines struct sockaddr_storage */
X
X
X/*
X * Byteorder/Bitorder
X */
X#define	HAVE_C_BIGENDIAN	/* Flag that WORDS_BIGENDIAN test was done */
X#undef WORDS_BIGENDIAN		/* If using network byte order             */
X#define	HAVE_C_BITFIELDS	/* Flag that BITFIELDS_HTOL test was done  */
X#undef BITFIELDS_HTOL		/* If high bits come first in structures   */
X
X/*
X * Types/Keywords
X */
X#undef SIZEOF_CHAR
X#undef SIZEOF_SHORT_INT
X#undef SIZEOF_INT
X#undef SIZEOF_LONG_INT
X#undef SIZEOF_LONG_LONG
X#undef SIZEOF___INT64
X#undef SIZEOF_CHAR_P
X#undef SIZEOF_UNSIGNED_CHAR
X#undef SIZEOF_UNSIGNED_SHORT_INT
X#undef SIZEOF_UNSIGNED_INT
X#undef SIZEOF_UNSIGNED_LONG_INT
X#undef SIZEOF_UNSIGNED_LONG_LONG
X#undef SIZEOF_UNSIGNED___INT64
X#undef SIZEOF_UNSIGNED_CHAR_P
X#undef SIZEOF_FLOAT
X#undef SIZEOF_DOUBLE
X#undef SIZEOF_LONG_DOUBLE
X
X#undef SIZEOF_SIZE_T
X#undef SIZEOF_SSIZE_T
X#undef SIZEOF_PTRDIFF_T
X
X#undef SIZEOF_TIME_T
X#undef SIZEOF_WCHAR		/* sizeof (L'a')	*/
X#undef SIZEOF_WCHAR_T		/* sizeof (wchar_t)	*/
X
X#undef HAVE_LONGLONG		/* Compiler defines long long type */
X#undef HAVE___INT64		/* Compiler defines __int64 type */
X#undef HAVE_LONGDOUBLE		/* Compiler defines long double type */
X#undef CHAR_IS_UNSIGNED		/* Compiler defines char to be unsigned */
X
X#undef const			/* Define to empty if const doesn't work */
X#undef uid_t			/* To be used if uid_t is not present  */
X#undef gid_t			/* To be used if gid_t is not present  */
X#undef size_t			/* To be used if size_t is not present */
X#undef ssize_t			/* To be used if ssize_t is not present */
X#undef ptrdiff_t		/* To be used if ptrdiff_t is not present */
X#undef pid_t			/* To be used if pid_t is not present  */
X#undef off_t			/* To be used if off_t is not present  */
X#undef mode_t			/* To be used if mode_t is not present */
X#undef time_t			/* To be used if time_t is not present */
X#undef caddr_t			/* To be used if caddr_t is not present */
X#undef daddr_t			/* To be used if daddr_t is not present */
X#undef dev_t			/* To be used if dev_t is not present */
X#undef major_t			/* To be used if major_t is not present */
X#undef minor_t			/* To be used if minor_t is not present */
X#undef ino_t			/* To be used if ino_t is not present */
X#undef nlink_t			/* To be used if nlink_t is not present */
X#undef blksize_t		/* To be used if blksize_t is not present */
X#undef blkcnt_t			/* To be used if blkcnt_t is not present */
X
X#undef	HAVE_TYPE_INTMAX_T	/* if <stdint.h> defines intmax_t */
X#undef	HAVE_TYPE_UINTMAX_T	/* if <stdint.h> defines uintmax_t */
X
X#undef	HAVE_TYPE_GREG_T	/* if <sys/frame.h> defines greg_t */
X
X#undef	HAVE_STACK_T		/* if <signal.h> defines stack_t */
X#undef	HAVE_SIGINFO_T		/* if <signal.h> defines siginfo_t */
X
X/*
X * Important:	Next Step needs time.h for clock_t (because of a bug)
X */
X#undef clock_t			/* To be used if clock_t is not present */
X#undef socklen_t		/* To be used if socklen_t is not present */
X
X/*
X * These types are present on all UNIX systems but should be avoided
X * for portability.
X * On Apollo/Domain OS we don't have them....
X *
X * Better include <schily/utypes.h> and use Uchar, Uint & Ulong
X */
X#undef u_char			/* To be used if u_char is not present	*/
X#undef u_short			/* To be used if u_short is not present	*/
X#undef u_int			/* To be used if u_int is not present	*/
X#undef u_long			/* To be used if u_long is not present	*/
X
X/*#undef HAVE_SIZE_T*/
X/*#undef NO_SIZE_T*/
X#undef VA_LIST_IS_ARRAY		/* va_list is an array */
X#undef GETGROUPS_T
X#define GID_T		GETGROUPS_T
X
X/*
X * Define as the return type of signal handlers (int or void).
X */
X#undef RETSIGTYPE
X
X/*
X * Defined in case that we have iconv(iconv_t, const char **, site_t *, ...)
X */
X#undef HAVE_ICONV_CONST
X
X/*
X * Defines needed to get large file support.
X */
X#ifdef	USE_LARGEFILES
X
X#undef	HAVE_LARGEFILES
X
X#ifdef	HAVE_LARGEFILES		/* If we have working largefiles at all	   */
X				/* This is not defined with glibc-2.1.3	   */
X
X#undef _FILE_OFFSET_BITS	/* # of bits in off_t if settable	   */
X#undef _LARGEFILE_SOURCE	/* To make ftello() visible (HP-UX 10.20). */
X#undef _LARGE_FILES		/* Large file defined on AIX-style hosts.  */
X#undef _XOPEN_SOURCE		/* To make ftello() visible (glibc 2.1.3). */
X				/* XXX We don't use this because glibc2.1.3*/
X				/* XXX is bad anyway. If we define	   */
X				/* XXX _XOPEN_SOURCE we will loose caddr_t */
X
X#undef HAVE_FSEEKO		/* Do we need this? If HAVE_LARGEFILES is  */
X				/* defined, we have fseeko()		   */
X
X#endif	/* HAVE_LARGEFILES */
X#endif	/* USE_LARGEFILES */
X
X#ifdef USE_ACL			/* Enable/disable ACL support */
X/*
X * POSIX ACL support
X */
X#undef HAVE_ACL_GET_FILE	/* acl_get_file() function */
X#undef HAVE_ACL_SET_FILE	/* acl_set_file() function */
X#undef HAVE_ACL_GET_ENTRY	/* acl_get_entry() function */
X#undef HAVE_ACL_FROM_TEXT	/* acl_from_text() function */
X#undef HAVE_ACL_TO_TEXT		/* acl_to_text() function */
X#undef HAVE_ACL_FREE		/* acl_free() function */
X#undef HAVE_ACL_DELETE_DEF_FILE	/* acl_delete_def_file() function */
X#undef HAVE_ACL_EXTENDED_FILE	/* acl_extended_file() function (Linux only)*/
X
X#if defined(HAVE_ACL_GET_FILE) && defined(HAVE_ACL_SET_FILE) && \
X    defined(HAVE_ACL_FROM_TEXT) && defined(HAVE_ACL_TO_TEXT) && \
X    defined(HAVE_ACL_FREE)
X#	define	HAVE_POSIX_ACL	1 /* POSIX ACL's present */
X#endif
X
X/*
X * Sun ACL support.
X * Note: unfortunately, HP-UX has an (undocumented) acl() function in libc.
X */
X#undef HAVE_ACL			/* acl() function */
X#undef HAVE_FACL		/* facl() function */
X#undef HAVE_ACLFROMTEXT		/* aclfromtext() function */
X#undef HAVE_ACLTOTEXT		/* acltotext() function */
X
X#if defined(HAVE_ACL) && defined(HAVE_FACL) && \
X    defined(HAVE_ACLFROMTEXT) && defined(HAVE_ACLTOTEXT)
X#	define	HAVE_SUN_ACL	1 /* Sun ACL's present */
X#endif
X
X/*
X * HP-UX ACL support.
X * Note: unfortunately, HP-UX has an (undocumented) acl() function in libc.
X */
X#undef HAVE_GETACL		/* getacl() function */
X#undef HAVE_FGETACL		/* fgetacl() function */
X#undef HAVE_SETACL		/* setacl() function */
X#undef HAVE_FSETACL		/* fsetacl() function */
X#undef HAVE_STRTOACL		/* strtoacl() function */
X#undef HAVE_ACLTOSTR		/* acltostr() function */
X#undef HAVE_CPACL		/* cpacl() function */
X#undef HAVE_FCPACL		/* fcpacl() function */
X#undef HAVE_CHOWNACL		/* chownacl() function */
X#undef HAVE_SETACLENTRY		/* setaclentry() function */
X#undef HAVE_FSETACLENTRY	/* fsetaclentry() function */
X
X#if defined(HAVE_GETACL) && defined(HAVE_FGETACL) && \
X    defined(HAVE_SETACL) && defined(HAVE_FSETACL) && \
X    defined(HAVE_STRTOACL) && defined(HAVE_ACLTOTEXT)
X#	define	HAVE_HP_ACL	1 /* HP-UX ACL's present */
X#endif
X
X/*
X * Global definition whether ACL support is present.
X * As HP-UX differs too much from other implementations, HAVE_HP_ACL is not
X * included in HAVE_ANY_ACL.
X */
X#if defined(HAVE_POSIX_ACL) || defined(HAVE_SUN_ACL)
X#	define	HAVE_ANY_ACL	1 /* Any ACL implementation present */
X#endif
X
X#endif	/* USE_ACL */
X
X/*
X * Misc CC / LD related stuff
X */
X#undef NO_USER_MALLOC		/* If we cannot define our own malloc()	*/
X#undef NO_USER_XCVT		/* If we cannot define our own ecvt()/fcvt()/gcvt() */
X#undef HAVE_DYN_ARRAYS		/* If the compiler allows dynamic sized arrays */
X#undef HAVE_PRAGMA_WEAK		/* If the compiler allows #pragma weak */
X#undef HAVE_STRINGIZE		/* If the cpp supports ANSI C stringize */
X#undef inline
X
X/*
X * Strings that help to maintain OS/platform id's in C-programs
X */
X#undef HOST_ALIAS		/* Output from config.guess (orig)	*/
X#undef HOST_SUB			/* Output from config.sub (modified)	*/
X#undef HOST_CPU			/* CPU part from HOST_SUB		*/
X#undef HOST_VENDOR		/* VENDOR part from HOST_SUB		*/
X#undef HOST_OS			/* CPU part from HOST_SUB		*/
X
X
X/*
X * Begin restricted code for quality assurance.
X *
X * Warning: you are not allowed to include the #define below if you are not
X * using the Schily makefile system or if you modified the autoconfiguration
X * tests.
X *
X * If you only added other tests you are allowed to keep this #define.
X *
X * This restiction is introduced because this way, I hope that people
X * contribute to the project instead of creating branches.
X */
X#define	IS_SCHILY_XCONFIG
X/*
X * End restricted code for quality assurance.
X */
END-of-smake-1.2.1/autoconf/xconfig.h.in
echo x - smake-1.2.1/AN-1.2.1
sed 's/^X//' >smake-1.2.1/AN-1.2.1 << 'END-of-smake-1.2.1/AN-1.2.1'
XNEW features of smake-1.2.1:
X
X-	./.clean now removes symlinks
X
X-	x86_64-dragonfly-cc.rul & x86_64-dragonfly-gcc.rul new
X
X-	Addex experimental rules for using "pcc" on Solaris x86
X
X-	New autoconf test on whether Compiler supports "inline" keyword
X
X-	New autoconf test if struct stat contains st_atime_n (nanosecs)
X
X-	New autoconf test if struct stat contains st_flag
X
X-	C-dependencies on AIX are now extracted using cc -M -qsyntaxonly
X
X-	As the new Intel 64 bit strcpy() implementation does not work
X	correctly with overlapping strings, smake now includes a ovstrcpy()
X	function to avoid related problems.
X
X-	Smake now supports $(EMPTY): target names.
X
X-	A minor bug in the makefile parser was fixed. The bug caused targets
X	that appeared directly after an otherwise emty line that started
X	with a TAB char to be ignored.
X
XTODO:
X	Smake would need to implement an undocumented feature from 
X	historical UNIX make implementations that is used by Xorg
X	at one place:
X
X	target: *.o
X		do-something-with *.o
X
X	Which expands *.o from the filesystem. Meanwhile, use 
X	smake -N to compile Xorg.
X
XAfter pattern expansion has been implemented, smake-1.2 final
Xwill be released.
X
XP.P.S.: As Xorg changed it's build system, we may delay this
Xfeature to something past 1.2-final.
X	
X
X
XWARNING: Do not use 'winzip' to extract the tar file!
X	Winzip cannot extract symbolic links correctly.
X
XJoerg
END-of-smake-1.2.1/AN-1.2.1
echo x - smake-1.2.1/.links
sed 's/^X//' >smake-1.2.1/.links << 'END-of-smake-1.2.1/.links'
X./psmake/archconf.c
X./psmake/astoi.c
X./psmake/astoll.c
X./psmake/comerr.c
X./psmake/config.guess
X./psmake/config.sub
X./psmake/configure
X./psmake/cvmod.c
X./psmake/dat.c
X./psmake/error.c
X./psmake/fcons.c
X./psmake/fileopen.c
X./psmake/fileread.c
X./psmake/fileseek.c
X./psmake/filewrite.c
X./psmake/fillbytes.c
X./psmake/flag.c
X./psmake/format.c
X./psmake/getargs.c
X./psmake/geterrno.c
X./psmake/include/schily/align.h
X./psmake/include/schily/archdefs.h
X./psmake/include/schily/avoffset.h
X./psmake/include/schily/ccomdefs.h
X./psmake/include/schily/ctype.h
X./psmake/include/schily/dirent.h
X./psmake/include/schily/errno.h
X./psmake/include/schily/fcntl.h
X./psmake/include/schily/getargs.h
X./psmake/include/schily/getcwd.h
X./psmake/include/schily/hostname.h
X./psmake/include/schily/libport.h
X./psmake/include/schily/limits.h
X./psmake/include/schily/maxpath.h
X./psmake/include/schily/mconfig.h
X./psmake/include/schily/param.h
X./psmake/include/schily/prototyp.h
X./psmake/include/schily/schily.h
X./psmake/include/schily/sigblk.h
X./psmake/include/schily/signal.h
X./psmake/include/schily/standard.h
X./psmake/include/schily/stat.h
X./psmake/include/schily/stdio.h
X./psmake/include/schily/stdlib.h
X./psmake/include/schily/stkframe.h
X./psmake/include/schily/string.h
X./psmake/include/schily/systeminfo.h
X./psmake/include/schily/time.h
X./psmake/include/schily/types.h
X./psmake/include/schily/unistd.h
X./psmake/include/schily/utime.h
X./psmake/include/schily/utsname.h
X./psmake/include/schily/utypes.h
X./psmake/include/schily/varargs.h
X./psmake/include/schily/vfork.h
X./psmake/include/schily/wait.h
X./psmake/include/schily/xconfig.h
X./psmake/include/schily/xmconfig.h
X./psmake/install-sh
X./psmake/jsprintf.c
X./psmake/jssnprintf.c
X./psmake/make.c
X./psmake/make.h
X./psmake/memory.c
X./psmake/movebytes.c
X./psmake/niread.c
X./psmake/niwrite.c
X./psmake/parse.c
X./psmake/raisecond.c
X./psmake/readfile.c
X./psmake/rename.c
X./psmake/rules.c
X./psmake/rules.cnf.in
X./psmake/saveargs.c
X./psmake/schilyio.h
X./psmake/seterrno.c
X./psmake/strcatl.c
X./psmake/streql.c
X./psmake/strlcpy.c
X./psmake/strncpy.c
X./psmake/update.c
X./psmake/xconfig.h.in
X./RULES/9000-710-hp-ux-cc.rul
X./RULES/9000-710-hp-ux-gcc.rul
X./RULES/9000-712-hp-ux-cc.rul
X./RULES/9000-712-hp-ux-gcc.rul
X./RULES/9000-715-hp-ux-cc.rul
X./RULES/9000-715-hp-ux-gcc.rul
X./RULES/9000-735-hp-ux-cc.rul
X./RULES/9000-735-hp-ux-gcc.rul
X./RULES/9000-743-hp-ux-cc.rul
X./RULES/9000-743-hp-ux-gcc.rul
X./RULES/9000-755-hp-ux-cc.rul
X./RULES/9000-755-hp-ux-gcc.rul
X./RULES/9000-777-hp-ux-cc.rul
X./RULES/9000-777-hp-ux-gcc.rul
X./RULES/9000-778-hp-ux-cc.rul
X./RULES/9000-778-hp-ux-gcc.rul
X./RULES/9000-780-hp-ux-cc.rul
X./RULES/9000-780-hp-ux-gcc.rul
X./RULES/9000-782-hp-ux-cc.rul
X./RULES/9000-782-hp-ux-gcc.rul
X./RULES/9000-785-hp-ux-cc.rul
X./RULES/9000-785-hp-ux-gcc.rul
X./RULES/9000-800-hp-ux-cc.rul
X./RULES/9000-800-hp-ux-gcc.rul
X./RULES/9000-820-hp-ux-cc.rul
X./RULES/9000-820-hp-ux-gcc.rul
X./RULES/9000-831-hp-ux-cc.rul
X./RULES/9000-831-hp-ux-gcc.rul
X./RULES/9000-899-hp-ux-cc.rul
X./RULES/9000-899-hp-ux-gcc.rul
X./RULES/9000-710-hp-ux-cc64.rul
X./RULES/9000-712-hp-ux-cc64.rul
X./RULES/9000-715-hp-ux-cc64.rul
X./RULES/9000-735-hp-ux-cc64.rul
X./RULES/9000-743-hp-ux-cc64.rul
X./RULES/9000-755-hp-ux-cc64.rul
X./RULES/9000-777-hp-ux-cc64.rul
X./RULES/9000-778-hp-ux-cc64.rul
X./RULES/9000-780-hp-ux-cc64.rul
X./RULES/9000-782-hp-ux-cc64.rul
X./RULES/9000-785-hp-ux-cc64.rul
X./RULES/9000-800-hp-ux-cc64.rul
X./RULES/9000-820-hp-ux-cc64.rul
X./RULES/9000-831-hp-ux-cc64.rul
X./RULES/9000-899-hp-ux-cc64.rul
X./RULES/ia64-hp-ux-cc64.rul
X./RULES/alpha-linux-cc.rul
X./RULES/alpha-linux-gcc.rul
X./RULES/alpha-netbsd-cc.rul
X./RULES/alpha-netbsd-gcc.rul
X./RULES/alphaserver_ds20_500_mhz-openvms-cc.rul
X./RULES/amd64-netbsd-cc.rul
X./RULES/amd64-netbsd-gcc.rul
X./RULES/amiga-netbsd-cc.rul
X./RULES/amiga-netbsd-gcc.rul
X./RULES/aranym-freemint-gcc.rul
X./RULES/armv4l-linux-cc.rul
X./RULES/armv4l-linux-gcc.rul
X./RULES/armv5teb-linux-cc.rul
X./RULES/armv5teb-linux-gcc.rul
X./RULES/atariclone-freemint-gcc.rul
X./RULES/atariste-freemint-gcc.rul
X./RULES/ataritt-freemint-gcc.rul
X./RULES/bemac-beos-gcc.rul
X./RULES/bemac-haiku-cc.rul
X./RULES/bemac-haiku-gcc.rul
X./RULES/falcon-freemint-gcc.rul
X./RULES/hades-freemint-gcc.rul
X./RULES/i686-at386-gnu-cc.rul
X./RULES/i686-at386-gnu-gcc.rul
X./RULES/i386-cygwin32_nt-cc.rul
X./RULES/i386-cygwin32_nt-cl.rul
X./RULES/i386-cygwin32_nt-gcc.rul
X./RULES/i386-darwin-cc.rul
X./RULES/i386-darwin-cc64.rul
X./RULES/i386-darwin-gcc.rul
X./RULES/i386-darwin-gcc64.rul
X./RULES/i386-dragonfly-cc.rul
X./RULES/i386-dragonfly-gcc.rul
X./RULES/i386-linux-cc.rul
X./RULES/i386-linux-gcc.rul
X./RULES/i386-linux-suncc.rul
X./RULES/i386-nextstep-cc.rul
X./RULES/i386-nextstep-gcc.rul
X./RULES/i486-linux-cc.rul
X./RULES/i486-linux-gcc.rul
X./RULES/i486-linux-suncc.rul
X./RULES/i486-ms-dos-gcc.rul
X./RULES/i486-unixware-cc.rul
X./RULES/i486-unixware-gcc.rul
X./RULES/i586-cygwin32_nt-cc.rul
X./RULES/i586-cygwin32_nt-cl.rul
X./RULES/i586-cygwin32_nt-gcc.rul
X./RULES/i586-ms-dos-gcc.rul
X./RULES/i586-unixware-cc.rul
X./RULES/i586-unixware-gcc.rul
X./RULES/i686-cygwin32_nt-cc.rul
X./RULES/i686-cygwin32_nt-cl.rul
X./RULES/i686-cygwin32_nt-cl64.rul
X./RULES/i686-cygwin32_nt-gcc.rul
X./RULES/i686-cygwin32_wow64-cc.rul
X./RULES/i686-cygwin32_wow64-cc64.rul
X./RULES/i686-cygwin32_wow64-cl.rul
X./RULES/i686-cygwin32_wow64-gcc.rul
X./RULES/i686-cygwin32_wow64-gcc64.rul
X./RULES/i686-linux-cc.rul
X./RULES/i686-linux-gcc.rul
X./RULES/i686-linux-suncc.rul
X./RULES/i686-linux-suncc64.rul
X./RULES/i686-ms-dos-gcc.rul
X./RULES/i786-cygwin32_nt-cc.rul
X./RULES/i786-cygwin32_nt-cl.rul
X./RULES/i786-cygwin32_nt-cl64.rul
X./RULES/i786-cygwin32_nt-gcc.rul
X./RULES/i786-cygwin32_wow64-cc.rul
X./RULES/i786-cygwin32_wow64-cc64.rul
X./RULES/i786-cygwin32_wow64-cl.rul
X./RULES/i786-cygwin32_wow64-gcc.rul
X./RULES/i786-cygwin32_wow64-gcc64.rul
X./RULES/i786-ms-dos-gcc.rul
X./RULES/ia64-hp-ux-cc.rul
X./RULES/ia64-hp-ux-gcc.rul
X./RULES/ia64-linux-cc.rul
X./RULES/ia64-linux-gcc.rul
X./RULES/ip17-irix-cc.rul
X./RULES/ip17-irix-gcc.rul
X./RULES/ip20-irix-cc.rul
X./RULES/ip20-irix-gcc.rul
X./RULES/ip27-irix-cc.rul
X./RULES/ip27-irix-gcc.rul
X./RULES/ip28-irix-cc.rul
X./RULES/ip28-irix-gcc.rul
X./RULES/ip30-irix-cc.rul
X./RULES/ip30-irix-gcc.rul
X./RULES/ip32-irix-cc.rul
X./RULES/ip32-irix-gcc.rul
X./RULES/ip35-irix-cc.rul
X./RULES/ip35-irix-gcc.rul
X./RULES/ip17-irix-cc64.rul
X./RULES/ip17-irix-gcc64.rul
X./RULES/ip20-irix-cc64.rul
X./RULES/ip20-irix-gcc64.rul
X./RULES/ip27-irix-cc64.rul
X./RULES/ip27-irix-gcc64.rul
X./RULES/ip28-irix-cc64.rul
X./RULES/ip28-irix-gcc64.rul
X./RULES/ip30-irix-cc64.rul
X./RULES/ip30-irix-gcc64.rul
X./RULES/ip32-irix-cc64.rul
X./RULES/ip32-irix-gcc64.rul
X./RULES/ip35-irix-cc64.rul
X./RULES/ip35-irix-gcc64.rul
X./RULES/ldummy.lnk
X./RULES/m68k-linux-cc.rul
X./RULES/m68k-linux-gcc.rul
X./RULES/m68k-nextstep-cc.rul
X./RULES/m68k-nextstep-gcc.rul
X./RULES/mac68k-netbsd-cc.rul
X./RULES/mac68k-netbsd-gcc.rul
X./RULES/macppc-netbsd-cc.rul
X./RULES/macppc-netbsd-gcc.rul
X./RULES/milan-freemint-gcc.rul
X./RULES/mips-linux-cc.rul
X./RULES/mips-linux-gcc.rul
X./RULES/mips64-linux-cc.rul
X./RULES/mips64-linux-gcc.rul
X./RULES/mipsel-linux-cc.rul
X./RULES/mipsel-linux-gcc.rul
X./RULES/mk-build.id
X./RULES/mk-make.id
X./RULES/os-cygwin_98-4.0.id
X./RULES/os-irix64.id
X./RULES/os-openunix.id
X./RULES/parisc-linux-cc.rul
X./RULES/parisc-linux-gcc.rul
X./RULES/parisc64-linux-cc.rul
X./RULES/parisc64-linux-gcc.rul
X./RULES/pentium-4-unixware-cc.rul
X./RULES/pentium-4-unixware-gcc.rul
X./RULES/pentium-iii-unixware-cc.rul
X./RULES/pentium-iii-unixware-gcc.rul
X./RULES/pentium-pro-unixware-cc.rul
X./RULES/pentium-pro-unixware-gcc.rul
X./RULES/power-macintosh-mac-os10-cc.rul
X./RULES/power-macintosh-mac-os10-gcc.rul
X./RULES/ppc-linux-cc.rul
X./RULES/ppc-linux-gcc.rul
X./RULES/r-build.dep
X./RULES/r-build.obj
X./RULES/r-build.tag
X./RULES/r-gmake.obj
X./RULES/s390-linux-cc.rul
X./RULES/s390-linux-gcc.rul
X./RULES/sh3-linux-cc.rul
X./RULES/sh3-linux-gcc.rul
X./RULES/sh4-linux-cc.rul
X./RULES/sh4-linux-gcc.rul
X./RULES/sh4a-linux-cc.rul
X./RULES/sh4a-linux-gcc.rul
X./RULES/sparc-bsd-os-cc.rul
X./RULES/sparc-bsd-os-gcc.rul
X./RULES/sparc-bsd-os3-cc.rul
X./RULES/sparc-bsd-os3-gcc.rul
X./RULES/sparc-linux-cc.rul
X./RULES/sparc-linux-gcc.rul
X./RULES/sparc-netbsd-cc.rul
X./RULES/sparc-netbsd-gcc.rul
X./RULES/sparc-nextstep-cc.rul
X./RULES/sparc-nextstep-gcc.rul
X./RULES/sparc64-freebsd-cc.rul
X./RULES/sparc64-freebsd-gcc.rul
X./RULES/sparc64-linux-cc.rul
X./RULES/sparc64-linux-gcc.rul
X./RULES/sun4c-sunos4-cc.rul
X./RULES/sun4c-sunos4-gcc.rul
X./RULES/sun4c-sunos5-cc.rul
X./RULES/sun4c-sunos5-gcc.rul
X./RULES/sun4d-sunos5-cc.rul
X./RULES/sun4d-sunos5-gcc.rul
X./RULES/sun4e-sunos5-cc.rul
X./RULES/sun4e-sunos5-gcc.rul
X./RULES/sun4L-sunos5-cc.rul
X./RULES/sun4L-sunos5-gcc.rul
X./RULES/sun4m-sunos4-cc.rul
X./RULES/sun4m-sunos4-gcc.rul
X./RULES/sun4m-sunos5-cc.rul
X./RULES/sun4m-sunos5-gcc.rul
X./RULES/sun4u-sunos5-cc.rul
X./RULES/sun4u-sunos5-cc64.rul
X./RULES/sun4u-sunos5-gcc.rul
X./RULES/sun4u-sunos5-gcc64.rul
X./RULES/sun4us-sunos5-cc.rul
X./RULES/sun4us-sunos5-cc64.rul
X./RULES/sun4us-sunos5-gcc.rul
X./RULES/sun4us-sunos5-gcc64.rul
X./RULES/sun4v-sunos5-cc.rul
X./RULES/sun4v-sunos5-cc64.rul
X./RULES/sun4v-sunos5-gcc.rul
X./RULES/sun4v-sunos5-gcc64.rul
X./RULES/x86_64-dragonfly-cc.rul
X./RULES/x86_64-dragonfly-gcc.rul
X./RULES/x86_64-linux-cc.rul
X./RULES/x86_64-linux-gcc.rul
X./RULES/x86_64-linux-suncc.rul
X./RULES/x86_64-linux-suncc64.rul
END-of-smake-1.2.1/.links
exit

