From 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 Mon Sep 17 00:00:00 2001 From: wbx Date: Sun, 17 May 2009 14:41:34 +0200 Subject: Initial import --- BSDmakefile | 33 + BUGS | 7 + COPYING | 339 + Config.default | 1619 + Config.in | 17 + GNUmakefile | 29 + LICENCE | 38 + Makefile | 187 + README | 39 + TODO | 9 + config/Config.in | 8 + config/Kconfig-language.txt | 255 + config/Makefile | 123 + config/Makefile.in | 5 + config/checklist.c | 377 + config/colors.h | 161 + config/conf.c | 601 + config/confdata.c | 449 + config/dialog.h | 196 + config/expr.c | 1089 + config/expr.h | 194 + config/glob.c | 848 + config/glob.h | 100 + config/inputbox.c | 240 + config/lex.backup | 1 + config/lkc.h | 113 + config/lkc_proto.h | 39 + config/mconf.c | 717 + config/menu.c | 436 + config/menubox.c | 438 + config/msgbox.c | 85 + config/symbol.c | 782 + config/textbox.c | 556 + config/util.c | 375 + config/yesno.c | 118 + config/zconf.l | 387 + config/zconf.output | 2133 ++ config/zconf.y | 693 + mk/build.mk | 182 + mk/buildhlp.mk | 98 + mk/cpu.mk | 23 + mk/fetch.mk | 83 + mk/image.mk | 69 + mk/kernel-build.mk | 61 + mk/kernel.mk | 77 + mk/linux.mk | 11 + mk/mirrors.mk | 147 + mk/modules.mk | 1254 + mk/package.mk | 212 + mk/pkg-bottom.mk | 212 + mk/rootfs.mk | 21 + mk/split-cfg.mk | 10 + mk/toolchain.mk | 6 + mk/tools.mk | 6 + mk/vars.mk | 120 + package/6tunnel/Config.in | 13 + package/6tunnel/Makefile | 29 + package/6tunnel/ipkg/6tunnel.control | 4 + package/Config.in | 489 + package/Depends.mk | 391 + package/Makefile | 450 + package/aiccu/Config.in | 12 + package/aiccu/Makefile | 36 + package/aiccu/extra/common/dn_skipname.c | 51 + package/aiccu/files/aiccu.init | 27 + package/aiccu/ipkg/aiccu.conffiles | 1 + package/aiccu/ipkg/aiccu.control | 5 + package/aiccu/ipkg/aiccu.postinst | 3 + package/aiccu/patches/patch-common_resolver_c | 30 + package/aiccu/patches/patch-unix-console_Makefile | 27 + package/aircrack-ng/Config.in | 16 + package/aircrack-ng/Makefile | 35 + package/aircrack-ng/ipkg/aircrack-ng.control | 5 + package/aircrack-ng/patches/patch-src_airbase-ng_c | 189 + .../aircrack-ng/patches/patch-src_aircrack-ng_c | 41 + .../patches/patch-src_aircrack-ptw-lib_c | 21 + .../aircrack-ng/patches/patch-src_aireplay-ng_c | 42 + .../aircrack-ng/patches/patch-src_airodump-ng_c | 21 + package/aircrack-ng/patches/patch-src_airtun-ng_c | 21 + .../aircrack-ng/patches/patch-src_osdep_linux_c | 17 + package/aircrack-ng/patches/patch-src_version_h | 11 + package/alsa-lib/Config.in | 7 + package/alsa-lib/Makefile | 31 + package/alsa-lib/ipkg/alsa-lib.control | 4 + package/alsa-lib/ipkg/alsa-lib.postinst | 4 + package/alsa-utils/Config.in | 7 + package/alsa-utils/Makefile | 31 + package/alsa-utils/files/amixer.init | 30 + package/alsa-utils/ipkg/alsa-utils.control | 4 + package/alsa-utils/ipkg/alsa-utils.postinst | 4 + .../alsa-utils/patches/patch-alsactl_init_parse_c | 21 + package/apr-util/Config.in | 12 + package/apr-util/Makefile | 31 + package/apr-util/ipkg/apr-util.control | 5 + package/apr-util/patches/patch-uri_Makefile_in | 19 + package/apr-util/patches/uri_delim.patch | 21 + package/apr/Config.in | 16 + package/apr/Makefile | 54 + package/apr/ipkg/apr.control | 4 + package/arpd/Config.in | 11 + package/arpd/Makefile | 32 + package/arpd/ipkg/arpd.control | 5 + package/arpd/patches/patch-Makefile_in | 12 + package/arpd/patches/patch-arpd_c | 116 + package/arpd/patches/patch-configure | 28 + package/arpwatch/Config.in | 7 + package/arpwatch/Makefile | 32 + package/arpwatch/ipkg/arpwatch.conffiles | 1 + package/arpwatch/ipkg/arpwatch.control | 5 + package/asterisk/Config.in | 96 + package/asterisk/Makefile | 237 + package/asterisk/files/asterisk.init | 29 + package/asterisk/files/modules.conf | 138 + .../ipkg/asterisk-chan-bluetooth.conffiles | 1 + .../asterisk/ipkg/asterisk-chan-bluetooth.control | 5 + package/asterisk/ipkg/asterisk-chan-h323.conffiles | 1 + package/asterisk/ipkg/asterisk-chan-h323.control | 5 + package/asterisk/ipkg/asterisk-chan-iax2.conffiles | 2 + package/asterisk/ipkg/asterisk-chan-iax2.control | 5 + package/asterisk/ipkg/asterisk-chan-mgcp.conffiles | 1 + package/asterisk/ipkg/asterisk-chan-mgcp.control | 5 + package/asterisk/ipkg/asterisk-chan-misdn.control | 5 + .../asterisk/ipkg/asterisk-chan-skinny.conffiles | 1 + package/asterisk/ipkg/asterisk-chan-skinny.control | 5 + package/asterisk/ipkg/asterisk-codec-gsm.control | 5 + package/asterisk/ipkg/asterisk-codec-speex.control | 5 + package/asterisk/ipkg/asterisk-meetme.conffiles | 1 + package/asterisk/ipkg/asterisk-meetme.control | 5 + package/asterisk/ipkg/asterisk-pbx-dundi.conffiles | 1 + package/asterisk/ipkg/asterisk-pbx-dundi.control | 5 + package/asterisk/ipkg/asterisk-pgsql.conffiles | 1 + package/asterisk/ipkg/asterisk-pgsql.control | 5 + package/asterisk/ipkg/asterisk-res-agi.control | 5 + package/asterisk/ipkg/asterisk-sounds.control | 5 + package/asterisk/ipkg/asterisk-sqlite.control | 5 + package/asterisk/ipkg/asterisk-voicemail.conffiles | 1 + package/asterisk/ipkg/asterisk-voicemail.control | 5 + package/asterisk/ipkg/asterisk.conffiles | 21 + package/asterisk/ipkg/asterisk.control | 5 + package/asterisk/ipkg/asterisk.postinst | 3 + package/asterisk/patches/patch-apps__moduleinfo | 13 + package/asterisk/patches/patch-menuselect-tree | 13 + .../patch-menuselect_example_menuselect-tree | 12 + package/atftp/Config.in | 25 + package/atftp/Makefile | 32 + package/atftp/ipkg/atftp.control | 5 + package/atftp/ipkg/atftpd.control | 5 + package/atftp/ipkg/files/postinst | 8 + package/atftp/patches/patch-stats_c | 14 + package/atftp/patches/patch-test_Makefile | 152 + package/atftp/patches/patch-tftp_c | 83 + package/atftp/patches/patch-tftp_def_c | 11 + package/atftp/patches/patch-tftp_def_h | 13 + package/atftp/patches/patch-tftp_file_c | 64 + package/atftp/patches/patch-tftpd_c | 20 + package/autossh/Config.in | 9 + package/autossh/Makefile | 32 + package/autossh/ipkg/autossh.control | 5 + package/avahi/Config.in | 44 + package/avahi/Config.in.lib | 18 + package/avahi/Makefile | 83 + package/avahi/files/avahi-daemon.conf | 29 + package/avahi/files/avahi-daemon.init | 25 + package/avahi/files/service-http | 10 + package/avahi/files/service-ssh | 9 + package/avahi/ipkg/avahi-daemon.conffiles | 3 + package/avahi/ipkg/avahi-daemon.control | 5 + package/avahi/ipkg/avahi-daemon.postinst | 6 + package/avahi/ipkg/avahi-dnsconfd.control | 5 + package/avahi/ipkg/libavahi.control | 4 + package/axtls/Config.in | 17 + package/axtls/Config.in.lib | 11 + package/axtls/Makefile | 43 + package/axtls/files/axhttpd.init | 30 + package/axtls/files/config | 102 + package/axtls/ipkg/axhttpd.control | 5 + package/axtls/ipkg/axhttpd.postinst | 3 + package/axtls/ipkg/libaxtls.control | 5 + package/axtls/patches/001-opt_flags.patch | 33 + package/axtls/patches/patch-httpd_main_c | 21 + package/base-files/Config.in | 16 + package/base-files/Makefile | 72 + package/base-files/files/etc/banner | 3 + package/base-files/files/etc/functions.sh | 79 + package/base-files/files/etc/group | 3 + package/base-files/files/etc/hosts | 2 + package/base-files/files/etc/init.d/boot | 27 + package/base-files/files/etc/init.d/done | 4 + package/base-files/files/etc/init.d/rcK | 21 + package/base-files/files/etc/init.d/rcS | 10 + package/base-files/files/etc/inittab | 4 + package/base-files/files/etc/ipkg.conf | 3 + package/base-files/files/etc/mdev.conf | 11 + package/base-files/files/etc/modules | 1 + package/base-files/files/etc/network/interfaces | 2 + package/base-files/files/etc/passwd | 3 + package/base-files/files/etc/profile | 12 + package/base-files/files/etc/protocols | 45 + package/base-files/files/etc/rc.conf | 3 + package/base-files/files/etc/shadow | 3 + package/base-files/files/etc/sysctl.conf | 0 package/base-files/files/init | 18 + package/base-files/files/lib/mdev/init | 21 + .../files/usr/share/udhcpc/default.script | 38 + package/base-files/ipkg/base-files.conffiles | 13 + package/base-files/ipkg/base-files.control | 3 + package/bash/Config.in | 8 + package/bash/Makefile | 27 + package/bash/ipkg/bash.control | 4 + package/bc/Config.in | 22 + package/bc/Makefile | 31 + package/bc/ipkg/bc.control | 4 + package/bc/ipkg/dc.control | 4 + package/bigreqsproto/Config.in | 6 + package/bigreqsproto/Makefile | 20 + package/bigreqsproto/ipkg/bigreqsproto.control | 4 + package/bind/Config.in | 136 + package/bind/Makefile | 92 + package/bind/files/bind/db.0 | 12 + package/bind/files/bind/db.127 | 13 + package/bind/files/bind/db.255 | 12 + package/bind/files/bind/db.local | 13 + package/bind/files/bind/db.root | 45 + package/bind/files/bind/named.conf.example | 45 + package/bind/files/named.init | 27 + package/bind/ipkg/bind-check.control | 5 + package/bind/ipkg/bind-client.control | 5 + package/bind/ipkg/bind-dig.control | 5 + package/bind/ipkg/bind-dnssec.control | 5 + package/bind/ipkg/bind-host.control | 6 + package/bind/ipkg/bind-rndc.control | 5 + package/bind/ipkg/bind-server.conffiles | 6 + package/bind/ipkg/bind-server.control | 6 + package/bind/ipkg/bind-server.postinst | 3 + package/bind/ipkg/bind-tools.control | 5 + package/bind/ipkg/libbind.control | 4 + .../bind/patches/patch-lib_isc_unix_ifiter_ioctl_c | 14 + package/binutils/Config.in | 8 + package/binutils/Makefile | 36 + package/binutils/ipkg/binutils.control | 4 + package/bitlbee/Config.in | 15 + package/bitlbee/Makefile | 68 + package/bitlbee/files/bitlbee.init | 27 + package/bitlbee/ipkg/bitlbee.conffiles | 2 + package/bitlbee/ipkg/bitlbee.control | 5 + package/bitlbee/ipkg/bitlbee.postinst | 3 + package/bitlbee/patches/patch-configure | 40 + package/bluez-firmware/Config.in | 10 + package/bluez-firmware/Makefile | 28 + package/bluez-firmware/ipkg/bluez-firmware.control | 5 + package/bluez/Config.in | 10 + package/bluez/Makefile | 47 + package/bluez/files/bluez.init | 26 + package/bluez/ipkg/bluez.control | 5 + package/bluez/patches/patch-tools_hciattach_c | 19 + package/bogofilter/Config.in | 26 + package/bogofilter/Makefile | 47 + package/bogofilter/ipkg/bogofilter.control | 4 + package/bogofilter/patches/patch-config_in | 14 + package/bogofilter/patches/patch-configure | 281 + package/bridge-utils/Config.in | 10 + package/bridge-utils/Makefile | 27 + package/bridge-utils/ipkg/bridge-utils.control | 4 + .../patches/patch-libbridge_Makefile_in | 11 + package/busybox/Config.in | 15 + package/busybox/Makefile | 52 + package/busybox/config/Config.in | 605 + package/busybox/config/archival/Config.in | 300 + package/busybox/config/console-tools/Config.in | 138 + package/busybox/config/coreutils/Config.in | 827 + package/busybox/config/debianutils/Config.in | 84 + package/busybox/config/e2fsprogs/Config.in | 68 + .../config/e2fsprogs/old_e2fsprogs/Config.in | 67 + package/busybox/config/editors/Config.in | 196 + package/busybox/config/findutils/Config.in | 255 + package/busybox/config/init/Config.in | 102 + package/busybox/config/libbb/Config.in | 154 + package/busybox/config/loginutils/Config.in | 283 + package/busybox/config/mailutils/Config.in | 69 + package/busybox/config/miscutils/Config.in | 552 + package/busybox/config/modutils/Config.in | 230 + package/busybox/config/networking/Config.in | 921 + package/busybox/config/networking/udhcp/Config.in | 122 + package/busybox/config/printutils/Config.in | 26 + package/busybox/config/procps/Config.in | 200 + package/busybox/config/runit/Config.in | 83 + package/busybox/config/selinux/Config.in | 123 + package/busybox/config/shell/Config.in | 344 + package/busybox/config/sysklogd/Config.in | 118 + package/busybox/config/util-linux/Config.in | 845 + package/busybox/files/bridge.pre-up | 0 package/busybox/files/busybox.config | 665 + package/busybox/files/crond.init | 27 + package/busybox/files/inetd.init | 27 + package/busybox/files/ipv6 | 71 + package/busybox/files/ipv6.up | 0 package/busybox/files/network.init | 25 + package/busybox/files/syslog.init | 28 + package/busybox/files/vlan.pre-up | 0 package/busybox/ipkg/busybox.control | 4 + package/busybox/ipkg/busybox.postinst | 6 + package/busybox/patches/001-ipkg.patch | 13797 ++++++++ package/busybox/patches/002-find-empty.patch | 105 + package/busybox/patches/patch-Makefile | 12 + package/busybox/patches/patch-Makefile_flags | 21 + package/busybox/patches/patch-include_libbb_h | 80 + package/busybox/patches/patch-include_platform_h | 30 + .../busybox/patches/patch-networking_traceroute_c | 12 + .../busybox/patches/patch-networking_udhcp_dhcpd_c | 11 + package/busybox/patches/patch-runit_runit_lib_h | 16 + .../busybox/patches/patch-util-linux_fdisk_osf_c | 12 + package/bwm/Config.in | 8 + package/bwm/Makefile | 27 + package/bwm/ipkg/bwm.control | 4 + package/cbtt/Config.in | 18 + package/cbtt/Makefile | 36 + package/cbtt/ipkg/cbtt-mysql.control | 5 + package/cbtt/ipkg/cbtt.control | 5 + package/cbtt/patches/100-compile.patch | 57 + package/cbtt/patches/patch-bnbt_h | 11 + package/cfgfs/Config.in | 10 + package/cfgfs/Makefile | 39 + package/cfgfs/ipkg/cfgfs.control | 5 + package/cfgfs/src/BSDmakefile | 32 + package/cfgfs/src/LICENCE | 35 + package/cfgfs/src/Makefile | 40 + package/cfgfs/src/Makefile.inc | 45 + package/cfgfs/src/adler.h | 60 + package/cfgfs/src/bundled/README.LZO | 123 + package/cfgfs/src/bundled/lzoconf.h | 413 + package/cfgfs/src/bundled/lzodefs.h | 1545 + package/cfgfs/src/bundled/minilzo.c | 3826 ++ package/cfgfs/src/bundled/minilzo.h | 102 + package/cfgfs/src/c_lzo1x1.c | 126 + package/cfgfs/src/c_null.c | 78 + package/cfgfs/src/c_zlib.c | 84 + package/cfgfs/src/compress.c | 78 + package/cfgfs/src/compress.h | 52 + package/cfgfs/src/cpr_get.c | 63 + package/cfgfs/src/cpr_list.c | 46 + package/cfgfs/src/cpr_lsth.c | 41 + package/cfgfs/src/defs.h | 34 + package/cfgfs/src/ft_creat.c | 304 + package/cfgfs/src/ft_dump.c | 135 + package/cfgfs/src/ft_pack.c | 134 + package/cfgfs/src/ft_packm.c | 71 + package/cfgfs/src/fts.c | 1118 + package/cfgfs/src/fts_debg.c | 51 + package/cfgfs/src/fts_gnu.h | 137 + package/cfgfs/src/fts_subs.c | 163 + package/cfgfs/src/fts_subs.h | 37 + package/cfgfs/src/fwcf.helper/Makefile | 51 + package/cfgfs/src/fwcf.sh | 384 + package/cfgfs/src/fwcf.txt | 434 + package/cfgfs/src/header.c | 83 + package/cfgfs/src/lib/Makefile | 28 + package/cfgfs/src/minilzop.c | 178 + package/cfgfs/src/minilzop.h | 19 + package/cfgfs/src/mkfwcf/Makefile | 23 + package/cfgfs/src/mkfwcf/mkfwcf.c | 109 + package/cfgfs/src/mtd.c | 379 + package/cfgfs/src/pack.h | 95 + package/cfgfs/src/replace.c | 39 + package/cfgfs/src/replace.h | 6 + package/cfgfs/src/sys_bsd.c | 96 + package/cfgfs/src/sys_linux.c | 61 + package/cfgfs/src/sysdeps.h | 17 + package/cfgfs/src/tool.c | 302 + package/cfgfs/src/tool/Makefile | 59 + package/cfgfs/src/unfwcf/Makefile | 28 + package/cfgfs/src/unfwcf/unfwcf.c | 100 + package/cfgfs/src/unwraps.c | 95 + package/cfgfs/src/wraps.c | 103 + package/cgilib/Config.in | 10 + package/cgilib/Makefile | 26 + package/cgilib/extra/m4/libtool.m4 | 7370 ++++ package/cgilib/extra/m4/ltoptions.m4 | 368 + package/cgilib/extra/m4/ltsugar.m4 | 123 + package/cgilib/extra/m4/ltversion.m4 | 23 + package/cgilib/extra/m4/lt~obsolete.m4 | 92 + package/cgilib/ipkg/cgilib.control | 7 + package/cgilib/patches/patch-INSTALL | 277 + package/cgilib/patches/patch-Makefile_in | 491 + package/cgilib/patches/patch-cgi_c | 12 + package/cgilib/patches/patch-configure | 8132 +++++ package/cgilib/patches/patch-depcomp | 153 + package/cgilib/patches/patch-install-sh | 641 + package/cgilib/patches/patch-ltmain_sh | 131 + package/cgilib/patches/patch-missing | 185 + package/chillispot/Config.in | 15 + package/chillispot/Makefile | 31 + package/chillispot/files/chilli.conf | 292 + package/chillispot/files/chillispot.init | 25 + package/chillispot/ipkg/chillispot.conffiles | 1 + package/chillispot/ipkg/chillispot.control | 5 + package/chillispot/ipkg/chillispot.postinst | 3 + package/collectd/Config.in | 36 + package/collectd/Makefile | 94 + package/collectd/files/collectd.init | 27 + package/collectd/ipkg/collectd.control | 5 + package/collectd/ipkg/collectd.postinst | 3 + package/collectd/patches/patch-src_Makefile_in | 12 + .../patch-src_libcollectdclient_Makefile_in | 12 + package/comgt/Config.in | 11 + package/comgt/Makefile | 29 + package/comgt/files/dial.comgt | 26 + package/comgt/files/setmode.comgt | 26 + package/comgt/ipkg/comgt.control | 4 + package/comgt/patches/patch-comgt_0_32_Makefile | 33 + package/comgt/patches/patch-comgt_h | 14 + package/compositeproto/Config.in | 6 + package/compositeproto/Makefile | 20 + package/cryptsetup/Config.in | 16 + package/cryptsetup/Makefile | 32 + package/cryptsetup/ipkg/cryptsetup.control | 5 + .../cryptsetup/patches/patch-lib_libdevmapper_c | 14 + package/cryptsetup/patches/patch-lib_utils_c | 16 + package/ctorrent/Config.in | 29 + package/ctorrent/Makefile | 36 + package/ctorrent/ipkg/ctorrent.control | 4 + package/ctorrent/patches/patch-btcontent_cpp | 16 + package/ctorrent/patches/patch-btfiles_cpp | 16 + package/cups/Config.in | 10 + package/cups/Makefile | 77 + package/cups/files/cupsd.init | 28 + package/cups/files/etc/cups/classes.conf | 7 + package/cups/files/etc/cups/client.conf | 9 + package/cups/files/etc/cups/cupsd.conf | 34 + package/cups/files/etc/cups/printers.conf | 23 + package/cups/ipkg/cups.conffiles | 4 + package/cups/ipkg/cups.control | 5 + package/cups/ipkg/cups.postinst | 6 + package/cups/patches/patch-Makefile | 12 + package/cups/patches/patch-configure | 12 + package/curl/Config.in | 26 + package/curl/Makefile | 55 + package/curl/ipkg/curl.control | 5 + package/curl/ipkg/libcurl.control | 5 + package/curl/patches/patch-configure | 24 + package/cutter/Config.in | 10 + package/cutter/Makefile | 26 + package/cutter/ipkg/cutter.control | 5 + package/cutter/patches/patch-cutter_c | 21 + package/cxxtools/Config.in | 26 + package/cxxtools/Makefile | 44 + package/cxxtools/ipkg/cxxtools.control | 4 + package/cxxtools/patches/patch-demo_Makefile_in | 67 + package/cyrus-sasl/Config.in | 14 + package/cyrus-sasl/Makefile | 74 + package/cyrus-sasl/ipkg/libsasl2.control | 4 + package/damageproto/Config.in | 6 + package/damageproto/Makefile | 20 + package/davfs2/Config.in | 43 + package/davfs2/Makefile | 43 + package/davfs2/ipkg/davfs2.conffiles | 2 + package/davfs2/ipkg/davfs2.control | 4 + package/davfs2/ipkg/davfs2.postinst | 5 + package/davfs2/patches/patch-src_cache_c | 11 + package/davfs2/patches/patch-src_dav_coda2_c | 11 + package/davfs2/patches/patch-src_dav_coda3_c | 11 + package/davfs2/patches/patch-src_dav_fuse5_c | 11 + package/davfs2/patches/patch-src_dav_fuse7_c | 11 + .../davfs2/patches/patch-src_kernel_interface_c | 31 + package/davfs2/patches/patch-src_mount_davfs_c | 69 + package/davfs2/patches/patch-src_umount_davfs_c | 12 + package/davfs2/patches/patch-src_webdav_c | 55 + package/dbus/Config.in | 10 + package/dbus/Makefile | 47 + package/dbus/files/dbus.init | 27 + package/dbus/ipkg/dbus.control | 5 + package/dbus/ipkg/dbus.postinst | 6 + package/deco/Config.in | 10 + package/deco/Makefile | 30 + package/deco/ipkg/deco.control | 5 + package/deco/patches/100-tty.c.patch | 11 + package/device-mapper/Config.in | 6 + package/device-mapper/Makefile | 43 + package/device-mapper/ipkg/device-mapper.control | 4 + .../device-mapper/patches/patch-lib_Makefile_in | 21 + package/device-mapper/patches/patch-make_tmpl_in | 16 + package/dhcp-forwarder/Config.in | 8 + package/dhcp-forwarder/Makefile | 36 + package/dhcp-forwarder/files/dhcp-fwd.init | 26 + .../dhcp-forwarder/ipkg/dhcp-forwarder.conffiles | 1 + package/dhcp-forwarder/ipkg/dhcp-forwarder.control | 4 + .../dhcp-forwarder/ipkg/dhcp-forwarder.postinst | 3 + package/dhcp-forwarder/patches/00-big_endian.patch | 11 + .../patches/01-getpwnmam_getgrnam.patch | 35 + package/dhcp/Config.in | 30 + package/dhcp/Makefile | 37 + package/dhcp/files/dhcpd.init | 27 + package/dhcp/ipkg/dhcp-relay.control | 4 + package/dhcp/ipkg/dhcp-server.control | 4 + package/dhcp/ipkg/dhcp-server.postinst | 3 + package/dhcp6/Config.in | 12 + package/dhcp6/Makefile | 32 + package/dhcp6/ipkg/dhcp6.control | 5 + package/dhcp6/ipkg/files/conffiles | 4 + package/dhcp6/patches/patch-client_Makefile | 58 + package/dhcp6/patches/patch-client_clilib_c | 22 + package/dhcp6/patches/patch-client_macros_h | 10 + package/dhcp6/patches/patch-client_solicit_c | 12 + package/dhcp6/patches/patch-server_Makefile | 38 + package/dhcp6/patches/patch-server_macros_h | 10 + package/dhcp6/patches/patch-server_reply_c | 21 + package/digitemp/Config.in | 17 + package/digitemp/Makefile | 26 + package/digitemp/ipkg/digitemp.control | 5 + package/digitemp/patches/001-Makefile.patch | 29 + package/dnsmasq/Config.in | 11 + package/dnsmasq/Makefile | 31 + package/dnsmasq/files/dnsmasq.conf | 39 + package/dnsmasq/files/dnsmasq.init | 26 + package/dnsmasq/ipkg/dnsmasq.conffiles | 1 + package/dnsmasq/ipkg/dnsmasq.control | 4 + package/dnsmasq/ipkg/dnsmasq.postinst | 7 + package/dnsmasq/patches/patch-src_config_h | 23 + package/dosfstools/Config.in | 6 + package/dosfstools/Makefile | 30 + package/dosfstools/ipkg/dosfstools.control | 4 + package/dovecot/Config.in | 10 + package/dovecot/Makefile | 61 + package/dovecot/files/dovecot.conf | 1153 + package/dovecot/ipkg/dovecot.control | 4 + package/dovecot/patches/patch-configure | 41 + .../patches/patch-src_plugins_quota_Makefile_in | 13 + package/dropbear/Config.in | 14 + package/dropbear/Makefile | 72 + package/dropbear/files/dropbear.init | 43 + package/dropbear/ipkg/dropbear.control | 4 + package/dropbear/ipkg/dropbear.postinst | 3 + package/dropbear/ipkg/dropbearconvert.control | 4 + package/dropbear/patches/patch-cli-runopts_c | 22 + package/dropbear/patches/patch-options_h | 24 + package/dropbear/patches/patch-svr-authpubkey_c | 46 + package/dsniff/Config.in | 13 + package/dsniff/Makefile | 37 + package/dsniff/ipkg/dsniff.control | 5 + package/dsniff/patches/patch-Makefile_in | 32 + package/dsniff/patches/patch-arp_c | 30 + package/dsniff/patches/patch-arp_h | 11 + package/dsniff/patches/patch-arpspoof_c | 12 + package/dsniff/patches/patch-confdefs_h | 28 + package/dsniff/patches/patch-configure | 104 + package/dsniff/patches/patch-decode_c | 21 + package/dsniff/patches/patch-dns_c | 681 + package/dsniff/patches/patch-dsniff_services | 9 + package/dsniff/patches/patch-msgsnarf_c | 11 + package/dsniff/patches/patch-record_c | 151 + package/dsniff/patches/patch-ssh_c | 46 + package/dsniff/patches/patch-sshcrypto_c | 43 + package/dsniff/patches/patch-sshow_c | 38 + package/e2fsprogs/Config.in | 26 + package/e2fsprogs/Makefile | 57 + package/e2fsprogs/ipkg/e2fsprogs.control | 4 + package/e2fsprogs/ipkg/libcom-err.control | 4 + package/e2fsprogs/ipkg/libuuid.control | 4 + package/e2fsprogs/patches/patch-misc_Makefile_in | 12 + package/elinks/Config.in | 9 + package/elinks/Makefile | 49 + package/elinks/ipkg/elinks.control | 5 + package/em28xx/Config.in | 9 + package/em28xx/Makefile | 43 + package/em28xx/ipkg/kmod-em28xx.control | 4 + package/esound/Config.in | 10 + package/esound/Makefile | 30 + package/esound/files/esd.init | 24 + package/esound/ipkg/esound.control | 6 + package/esound/ipkg/esound.postinst | 3 + package/esound/patches/patch-esd_c | 23 + package/ether-wake/Config.in | 9 + package/ether-wake/Makefile | 24 + package/ether-wake/extra/ether-wake.c | 386 + package/ether-wake/ipkg/ether-wake.control | 5 + package/ethtool/Config.in | 8 + package/ethtool/Makefile | 26 + package/ethtool/ipkg/ethtool.control | 4 + package/evieext/Config.in | 6 + package/evieext/Makefile | 20 + package/exmap/Config.in | 41 + package/exmap/Makefile | 49 + package/exmap/ipkg/exmap.control | 4 + package/exmap/ipkg/exmapd.control | 4 + package/exmap/ipkg/exmapserver.control | 4 + package/exmap/ipkg/kmod-exmap.control | 4 + package/exmap/patches/patch-Makefile_in | 12 + package/exmap/patches/patch-kernel_exmap_c | 31 + package/exmap/patches/patch-src_exmapd_c | 20 + package/exmap/patches/patch-src_exmapserver_c | 22 + package/expat/Config.in | 14 + package/expat/Makefile | 27 + package/expat/ipkg/libexpat.control | 4 + package/expat/patches/001-destdir.patch | 44 + package/ez-ipupdate/Config.in | 8 + package/ez-ipupdate/Makefile | 32 + package/ez-ipupdate/files/ez-ipupdate.conf | 10 + package/ez-ipupdate/files/ez-ipupdate.init | 26 + package/ez-ipupdate/ipkg/ez-ipupdate.conffiles | 1 + package/ez-ipupdate/ipkg/ez-ipupdate.control | 4 + package/ez-ipupdate/ipkg/ez-ipupdate.postinst | 3 + package/ez-ipupdate/patches/patch-configure | 19 + package/ez-ipupdate/patches/patch-example-dhs_conf | 20 + .../ez-ipupdate/patches/patch-example-dyndns_conf | 27 + .../ez-ipupdate/patches/patch-example-dyns_conf | 20 + .../ez-ipupdate/patches/patch-example-easydns_conf | 20 + .../ez-ipupdate/patches/patch-example-gnudip_conf | 20 + .../patches/patch-example-heipv6tb_conf | 27 + .../patches/patch-example-justlinux_conf | 20 + package/ez-ipupdate/patches/patch-example-ods_conf | 20 + .../ez-ipupdate/patches/patch-example-pgpow_conf | 20 + package/ez-ipupdate/patches/patch-example-tzo_conf | 20 + package/ez-ipupdate/patches/patch-example_conf | 9 + package/ez-ipupdate/patches/patch-ez-ipupdate_c | 540 + package/faad2/Config.in | 16 + package/faad2/Makefile | 35 + package/faad2/ipkg/libfaad2.control | 4 + .../faad2/patches/patch-common_mp4ff_Makefile_am | 16 + package/faad2/patches/patch-common_mp4ff_mp4ff_h | 12 + package/faad2/patches/patch-configure_in | 11 + package/faad2/patches/patch-frontend_Makefile_am | 12 + package/fakeidentd/Config.in | 8 + package/fakeidentd/Makefile | 31 + package/fakeidentd/files/fakeidentd.init | 26 + package/fakeidentd/ipkg/fakeidentd.control | 4 + package/fakeidentd/ipkg/fakeidentd.postinst | 4 + package/fbset/Config.in | 6 + package/fbset/Makefile | 42 + package/fbset/files/fb.modes | 1003 + package/fbset/ipkg/fbset.control | 4 + package/fetchmail/Config.in | 17 + package/fetchmail/Makefile | 41 + package/fetchmail/ipkg/fetchmail.control | 4 + package/fetchmail/patches/patch-mxget_c | 127 + package/ffmpeg/Config.in | 6 + package/ffmpeg/Makefile | 56 + package/ffmpeg/ipkg/ffmpeg.control | 4 + package/file/Config.in | 14 + package/file/Makefile | 32 + package/file/ipkg/file.control | 4 + package/fixesproto/Config.in | 6 + package/fixesproto/Makefile | 20 + package/flac/Config.in | 14 + package/flac/Makefile | 30 + package/flac/ipkg/libflac.control | 4 + package/flac/patches/patch-configure | 12 + package/flac/patches/patch-src_libFLAC_Makefile_in | 12 + package/flac/patches/patch-src_libFLAC_lpc_c | 13 + package/fontcacheproto/Config.in | 6 + package/fontcacheproto/Makefile | 20 + package/fontsproto/Config.in | 6 + package/fontsproto/Makefile | 20 + package/fping/Config.in | 15 + package/fping/Makefile | 37 + package/fping/ipkg/fping.control | 4 + package/fprobe-ulog/Config.in | 10 + package/fprobe-ulog/Makefile | 31 + package/fprobe-ulog/ipkg/fprobe-ulog.control | 8 + package/fprobe/Config.in | 10 + package/fprobe/Makefile | 32 + package/fprobe/ipkg/fprobe.control | 7 + package/freeradius/Config.in | 153 + package/freeradius/Makefile | 195 + package/freeradius/files/clients.conf | 7 + package/freeradius/files/radiusd.conf | 73 + package/freeradius/files/radiusd.init | 27 + package/freeradius/files/users | 1 + .../freeradius/ipkg/freeradius-democerts.control | 5 + .../freeradius/ipkg/freeradius-mod-chap.control | 5 + .../freeradius/ipkg/freeradius-mod-detail.control | 5 + .../freeradius/ipkg/freeradius-mod-digest.control | 5 + .../freeradius/ipkg/freeradius-mod-eap-gtc.control | 5 + .../freeradius/ipkg/freeradius-mod-eap-md5.control | 5 + .../ipkg/freeradius-mod-eap-mschapv2.control | 5 + .../ipkg/freeradius-mod-eap-peap.control | 5 + .../freeradius/ipkg/freeradius-mod-eap-tls.control | 5 + .../ipkg/freeradius-mod-eap-ttls.control | 5 + .../freeradius/ipkg/freeradius-mod-eap.conffiles | 1 + package/freeradius/ipkg/freeradius-mod-eap.control | 5 + .../freeradius/ipkg/freeradius-mod-files.conffiles | 3 + .../freeradius/ipkg/freeradius-mod-files.control | 5 + .../freeradius/ipkg/freeradius-mod-ldap.conffiles | 1 + .../freeradius/ipkg/freeradius-mod-ldap.control | 5 + .../freeradius/ipkg/freeradius-mod-mschap.control | 5 + package/freeradius/ipkg/freeradius-mod-pap.control | 5 + .../ipkg/freeradius-mod-preprocess.conffiles | 2 + .../ipkg/freeradius-mod-preprocess.control | 5 + .../freeradius/ipkg/freeradius-mod-realm.conffiles | 1 + .../freeradius/ipkg/freeradius-mod-realm.control | 5 + .../ipkg/freeradius-mod-sql-mysql.control | 5 + .../ipkg/freeradius-mod-sql-pgsql.control | 5 + .../freeradius/ipkg/freeradius-mod-sql.conffiles | 1 + package/freeradius/ipkg/freeradius-mod-sql.control | 5 + package/freeradius/ipkg/freeradius-utils.control | 5 + package/freeradius/ipkg/freeradius.conffiles | 2 + package/freeradius/ipkg/freeradius.control | 5 + package/freeradius/ipkg/freeradius.postinst | 6 + package/freeradius/patches/patch-share_dictionary | 210 + package/freeradius/patches/patch-src_main_event_c | 14 + package/freetype/Config.in | 24 + package/freetype/Makefile | 28 + package/freetype/ipkg/libfreetype.control | 16 + package/frickin/Config.in | 10 + package/frickin/Makefile | 27 + package/frickin/files/frickin.init | 26 + package/frickin/ipkg/frickin.control | 4 + package/frickin/ipkg/frickin.postinst | 4 + package/fuse/Config.in | 27 + package/fuse/Makefile | 36 + package/fuse/ipkg/fuse-utils.control | 5 + package/fuse/ipkg/libfuse.control | 5 + package/gatling/Config.in | 10 + package/gatling/Makefile | 32 + package/gatling/ipkg/gatling.control | 5 + package/gatling/patches/patch-GNUmakefile | 15 + package/gatling/patches/patch-gatling_c | 73 + package/gcc/Config.in | 9 + package/gcc/Makefile | 30 + package/gcc/ipkg/gcc.control | 5 + package/gdb/Config.in | 10 + package/gdb/Makefile | 29 + package/gdb/ipkg/gdb.control | 5 + package/gdbserver/Config.in | 8 + package/gdbserver/Makefile | 22 + package/gdbserver/ipkg/gdbserver.control | 5 + package/gettext/Config.in | 6 + package/gettext/Makefile | 40 + package/gettext/ipkg/gettext.control | 5 + package/gkrellmd/Config.in | 9 + package/gkrellmd/Makefile | 33 + package/gkrellmd/files/gkrellmd.init | 26 + package/gkrellmd/ipkg/gkrellmd.control | 5 + package/gkrellmd/ipkg/gkrellmd.postinst | 3 + package/glib/Config.in | 17 + package/glib/Makefile | 55 + package/glib/ipkg/glib1.control | 5 + package/glib/patches/01-debian-9.patch | 18988 ++++++++++ package/glib/patches/02-cross-compile-fix.patch | 210 + .../glib/patches/03-use-glibconfig-sysdefs.patch | 31 + package/glib/patches/04-gcc3.4-fix.patch | 22 + package/glib2/Config.in | 7 + package/glib2/Makefile | 40 + package/glib2/ipkg/glib2.control | 5 + package/glibc/Config.in | 9 + package/glibc/Makefile | 34 + package/glibc/ipkg/glibc.control | 4 + package/gmediaserver/Config.in | 13 + package/gmediaserver/Makefile | 37 + package/gmediaserver/files/gmediaserver.init | 25 + package/gmediaserver/ipkg/gmediaserver.control | 5 + package/gmediaserver/ipkg/gmediaserver.postinst | 4 + package/gmediaserver/patches/patch-src_main_c | 158 + package/gmp/Config.in | 14 + package/gmp/Makefile | 27 + package/gmp/ipkg/libgmp.control | 4 + package/gnutls/Config.in | 97 + package/gnutls/Makefile | 44 + package/gnutls/ipkg/gnutls-utils.control | 5 + package/gnutls/ipkg/libgnutls-extra.control | 5 + package/gnutls/ipkg/libgnutls-openssl.control | 5 + package/gnutls/ipkg/libgnutls.control | 5 + package/gnutls/ipkg/libgnutlsxx.control | 5 + package/gpg/Config.in | 9 + package/gpg/Makefile | 43 + package/gpg/ipkg/gpg.control | 5 + package/gpm/Config.in | 6 + package/gpm/Makefile | 29 + package/gpm/ipkg/gpm.control | 4 + .../gpm/patches/patch-src_daemon_open_console_c | 12 + package/gpm/patches/patch-src_synaptics_c | 15 + package/gpsd/Config.in | 26 + package/gpsd/Makefile | 40 + package/gpsd/ipkg/gpsd-clients.control | 5 + package/gpsd/ipkg/gpsd.control | 5 + package/gpsd/patches/patch-gpsd_h | 24 + package/gpsd/patches/patch-sirfflash_c | 12 + package/gsm/Config.in | 30 + package/gsm/Makefile | 31 + package/gsm/ipkg/gsm-utils.control | 4 + package/gsm/ipkg/libgsm.control | 4 + package/gsm/patches/patch-Makefile | 244 + package/gsm/patches/patch-inc_config_h | 42 + package/gsm/patches/patch-inc_gsm_h | 25 + package/gsm/patches/patch-inc_toast_h | 29 + package/gsm/patches/patch-src_code_c | 14 + package/gsm/patches/patch-src_debug_c | 29 + package/gsm/patches/patch-src_toast_c | 69 + package/haserl/Config.in | 9 + package/haserl/Makefile | 27 + package/haserl/ipkg/haserl.control | 4 + package/haserl/patches/patch-src_haserl_c | 12 + package/hdparm/Config.in | 12 + package/hdparm/Makefile | 24 + package/hdparm/ipkg/hdparm.control | 4 + package/heimdal/Config.in | 63 + package/heimdal/Makefile | 126 + package/heimdal/files/heimdal.init | 30 + package/heimdal/files/kadmind.acl | 1 + package/heimdal/files/kdc.conf | 4 + package/heimdal/files/krb5.conf | 25 + package/heimdal/ipkg/heimdal-client-libs.control | 5 + package/heimdal/ipkg/heimdal-libs.control | 5 + package/heimdal/ipkg/heimdal-server.control | 4 + package/heimdal/ipkg/heimdal-server.postinst | 8 + package/heimdal/patches/patch-Makefile_am | 12 + package/heimdal/patches/patch-Makefile_in | 25 + package/heimdal/patches/patch-admin_Makefile_am | 12 + package/heimdal/patches/patch-admin_Makefile_in | 12 + package/heimdal/patches/patch-configure | 13 + package/heimdal/patches/patch-include_Makefile_am | 22 + package/heimdal/patches/patch-include_Makefile_in | 39 + package/heimdal/patches/patch-kadmin_Makefile_am | 12 + package/heimdal/patches/patch-kadmin_Makefile_in | 12 + package/heimdal/patches/patch-kadmin_kadm_conn_c | 14 + package/heimdal/patches/patch-kdc_kx509_c | 18 + package/heimdal/patches/patch-kdc_process_c | 26 + package/heimdal/patches/patch-kuser_Makefile_am | 12 + package/heimdal/patches/patch-kuser_Makefile_in | 12 + package/heimdal/patches/patch-lib_asn1_Makefile_am | 48 + package/heimdal/patches/patch-lib_asn1_Makefile_in | 48 + .../heimdal/patches/patch-lib_gssapi_Makefile_am | 25 + .../heimdal/patches/patch-lib_gssapi_Makefile_in | 25 + package/heimdal/patches/patch-lib_hdb_Makefile_am | 12 + package/heimdal/patches/patch-lib_hdb_Makefile_in | 12 + .../heimdal/patches/patch-lib_hx509_Makefile_am | 32 + .../heimdal/patches/patch-lib_hx509_Makefile_in | 38 + .../heimdal/patches/patch-lib_kadm5_Makefile_am | 12 + .../heimdal/patches/patch-lib_kadm5_Makefile_in | 12 + package/heimdal/patches/patch-lib_krb5_Makefile_am | 11 + package/heimdal/patches/patch-lib_krb5_Makefile_in | 21 + package/heimdal/patches/patch-lib_krb5_constants_c | 10 + .../heimdal/patches/patch-lib_roken_Makefile_am | 14 + .../heimdal/patches/patch-lib_roken_Makefile_in | 24 + package/heimdal/patches/patch-lib_vers_Makefile_am | 13 + package/heimdal/patches/patch-lib_vers_Makefile_in | 24 + package/heimdal/patches/patch-tools_krb5-config_in | 23 + package/heyu/Config.in | 8 + package/heyu/Makefile | 31 + package/heyu/files/x10.conf | 24 + package/heyu/ipkg/files/heyu.conffiles | 1 + package/heyu/ipkg/heyu.control | 6 + package/heyu/patches/patch-tty_c | 12 + package/hostapd/Config.in | 41 + package/hostapd/Makefile | 35 + package/hostapd/files/hostapd.conf | 23 + package/hostapd/files/hostapd.config | 77 + package/hostapd/ipkg/hostapd-utils.control | 5 + package/hostapd/ipkg/hostapd.conffiles | 1 + package/hostapd/ipkg/hostapd.control | 6 + package/hostapd/patches/patch-hostapd_Makefile | 12 + package/htpdate/Config.in | 8 + package/htpdate/Makefile | 28 + package/htpdate/files/htpdate.init | 26 + package/htpdate/ipkg/htpdate.control | 4 + package/htpdate/ipkg/htpdate.postinst | 4 + package/htpdate/patches/patch-Makefile | 14 + package/httping/Config.in | 21 + package/httping/Makefile | 34 + package/httping/ipkg/httping.control | 4 + package/httping/patches/patch-Makefile | 14 + package/httping/patches/patch-io_c | 12 + package/httptunnel/Config.in | 9 + package/httptunnel/Makefile | 27 + package/httptunnel/ipkg/httptunnel.control | 4 + package/icecast/Config.in | 17 + package/icecast/Makefile | 40 + package/icecast/ipkg/icecast.conffiles | 1 + package/icecast/ipkg/icecast.control | 5 + package/icecast/patches/patch-m4_xiph_curl_m4 | 12 + package/id3lib/Config.in | 28 + package/id3lib/Makefile | 42 + package/id3lib/ipkg/id3lib.control | 4 + package/id3lib/patches/patch-Makefile_in | 15 + package/id3lib/patches/patch-configure | 12 + .../patches/patch-include_id3_id3lib_strings_h | 20 + package/id3lib/patches/patch-include_id3_writers_h | 12 + package/iftop/Config.in | 14 + package/iftop/Makefile | 26 + package/iftop/ipkg/iftop.control | 5 + package/igmpproxy/Config.in | 9 + package/igmpproxy/Makefile | 29 + package/igmpproxy/ipkg/igmpproxy.control | 4 + package/inputproto/Config.in | 6 + package/inputproto/Makefile | 20 + package/ipcad/Config.in | 12 + package/ipcad/Makefile | 35 + package/ipcad/ipkg/ipcad.conffiles | 1 + package/ipcad/ipkg/ipcad.control | 6 + package/ipcad/patches/patch-configure | 99 + package/ipcad/patches/patch-loop-ipq_c | 11 + package/iperf/Config.in | 13 + package/iperf/Makefile | 33 + package/iperf/ipkg/iperf.control | 5 + package/iproute2/Config.in | 18 + package/iproute2/Makefile | 48 + package/iproute2/ipkg/ip.control | 4 + package/iproute2/ipkg/tc.control | 5 + package/iproute2/patches/patch-Makefile | 19 + package/iproute2/patches/patch-ip_Makefile | 10 + package/iproute2/patches/patch-ip_iptunnel_c | 17 + package/ipsec-tools/Config.in | 11 + package/ipsec-tools/Makefile | 40 + package/ipsec-tools/ipkg/ipsec-tools.conffiles | 1 + package/ipsec-tools/ipkg/ipsec-tools.control | 5 + package/ipsec-tools/patches/patch-configure | 12 + package/ipsec-tools/patches/patch-configure_ac | 12 + .../ipsec-tools/patches/patch-src_racoon_cftoken_l | 12 + .../patches/patch-src_racoon_crypto_openssl_c | 12 + .../ipsec-tools/patches/patch-src_setkey_token_l | 12 + package/ipset/Config.in | 9 + package/ipset/Makefile | 30 + package/ipset/ipkg/ipset.control | 5 + package/ipset/patches/patch-kernel_ip_set_c | 12 + package/iptables-snmp/Config.in | 10 + package/iptables-snmp/Makefile | 27 + package/iptables-snmp/ipkg/iptables-snmp.control | 5 + package/iptables/Config.in | 42 + package/iptables/Makefile | 65 + package/iptables/files/l7/aim.pat | 27 + package/iptables/files/l7/bittorrent.pat | 14 + package/iptables/files/l7/edonkey-dl.pat | 8 + package/iptables/files/l7/edonkey.pat | 29 + package/iptables/files/l7/fasttrack.pat | 25 + package/iptables/files/l7/ftp.pat | 34 + package/iptables/files/l7/gnutella.pat | 36 + package/iptables/files/l7/http.pat | 28 + package/iptables/files/l7/ident.pat | 14 + package/iptables/files/l7/irc.pat | 20 + package/iptables/files/l7/jabber.pat | 24 + package/iptables/files/l7/msnmessenger.pat | 15 + package/iptables/files/l7/ntp.pat | 17 + package/iptables/files/l7/pop3.pat | 50 + package/iptables/files/l7/smtp.pat | 39 + package/iptables/files/l7/ssl.pat | 15 + package/iptables/files/l7/vnc.pat | 23 + package/iptables/ipkg/ip6tables.control | 5 + package/iptables/ipkg/iptables-extra.control | 5 + .../iptables/ipkg/iptables-mod-conntrack.control | 5 + package/iptables/ipkg/iptables-mod-extra.control | 5 + package/iptables/ipkg/iptables-mod-filter.control | 5 + package/iptables/ipkg/iptables-mod-imq.control | 5 + package/iptables/ipkg/iptables-mod-ipopt.control | 5 + package/iptables/ipkg/iptables-mod-ipsec.control | 5 + package/iptables/ipkg/iptables-mod-nat.control | 5 + package/iptables/ipkg/iptables-mod-ulog.control | 5 + package/iptables/ipkg/iptables-utils.control | 5 + package/iptables/ipkg/iptables.control | 4 + package/iptables/ipkg/iptables.postinst | 7 + package/iptraf/Config.in | 13 + package/iptraf/Makefile | 35 + package/iptraf/ipkg/iptraf.control | 5 + package/iptraf/patches/patch-src_Makefile | 21 + package/iptraf/patches/patch-src_dirs_h | 11 + package/iptraf/patches/patch-src_fltmgr_c | 12 + package/iptraf/patches/patch-src_hostmon_c | 61 + package/iptraf/patches/patch-src_ifaces_c | 12 + package/iptraf/patches/patch-src_landesc_c | 21 + package/iptraf/patches/patch-src_links_h | 11 + package/iptraf/patches/patch-src_log_c | 12 + package/iptraf/patches/patch-src_options_c | 22 + package/iptraf/patches/patch-src_othptab_c | 33 + package/iptraf/patches/patch-src_packet_c | 50 + package/iptraf/patches/patch-src_promisc_c | 22 + package/iptraf/patches/patch-src_rvnamed_h | 16 + package/iptraf/patches/patch-src_tcptable_c | 12 + package/iptraf/patches/patch-src_tcptable_h | 11 + package/iptraf/patches/patch-support_Makefile | 24 + package/irssi/Config.in | 18 + package/irssi/Makefile | 42 + package/irssi/ipkg/irssi.control | 4 + package/iw/Config.in | 7 + package/iw/Makefile | 27 + package/iw/ipkg/iw.control | 4 + package/jamvm/Config.in | 16 + package/jamvm/Makefile | 36 + package/jamvm/ipkg/jamvm.control | 5 + package/jpeg/Config.in | 15 + package/jpeg/Makefile | 34 + package/jpeg/ipkg/libjpeg.control | 6 + package/jpeg/patches/jpeg-6b-config_guess.patch | 2854 ++ package/jpeg/patches/jpeg-6b-fix-makefile.patch | 12 + package/kbproto/Config.in | 6 + package/kbproto/Makefile | 20 + package/kismet/Config.in | 67 + package/kismet/Makefile | 57 + package/kismet/files/ap_manuf | 79 + package/kismet/files/client_manuf | 249 + package/kismet/files/kismet.conf | 281 + package/kismet/files/kismet_drone.conf | 121 + package/kismet/files/kismet_ui.conf | 61 + package/kismet/ipkg/kismet-client.conffiles | 4 + package/kismet/ipkg/kismet-client.control | 9 + package/kismet/ipkg/kismet-drone.conffiles | 1 + package/kismet/ipkg/kismet-drone.control | 9 + package/kismet/ipkg/kismet-server.conffiles | 3 + package/kismet/ipkg/kismet-server.control | 9 + package/kismet/ipkg/kismet.control | 9 + package/kismet/patches/patch-Makefile_in | 12 + package/knock/Config.in | 41 + package/knock/Makefile | 33 + package/knock/ipkg/knock.control | 5 + package/knock/ipkg/knockd.conffiles | 1 + package/knock/ipkg/knockd.control | 5 + package/krb5/Config.in | 45 + package/krb5/Makefile | 57 + package/krb5/files/kadmind.acl | 1 + package/krb5/files/kdc.conf | 13 + package/krb5/files/krb5.conf | 16 + package/krb5/files/krb5.init | 28 + package/krb5/ipkg/krb5-libs.control | 5 + package/krb5/ipkg/krb5-server.control | 4 + package/krb5/ipkg/krb5-server.postinst | 8 + package/krb5/patches/patch-src_Makefile_in | 11 + .../krb5/patches/patch-src_include_stock_osconf_h | 34 + .../krb5/patches/patch-src_lib_kadm5_Makefile_in | 12 + .../patches/patch-src_lib_kadm5_clnt_Makefile_in | 12 + .../patches/patch-src_lib_kadm5_srv_Makefile_in | 12 + package/krb5/patches/patch-src_lib_kdb_Makefile_in | 12 + .../krb5/patches/patch-src_lib_krb5_Makefile_in | 12 + package/krb5/patches/patch-src_lib_rpc_Makefile_in | 12 + package/l2tpns/Config.in | 12 + package/l2tpns/Makefile | 32 + package/l2tpns/ipkg/l2tpns.conffiles | 3 + package/l2tpns/ipkg/l2tpns.control | 4 + .../01-honor_includes_remove_backtrace.patch | 128 + package/lame/Config.in | 12 + package/lame/Config.in.lib | 7 + package/lame/Makefile | 29 + package/lame/ipkg/lame.control | 5 + package/lame/ipkg/liblame.control | 4 + package/less/Config.in | 10 + package/less/Makefile | 26 + package/less/ipkg/less.control | 5 + package/libICE/Config.in | 6 + package/libICE/Makefile | 26 + package/libICE/ipkg/libice.control | 4 + package/libSM/Config.in | 6 + package/libSM/Makefile | 26 + package/libSM/ipkg/libsm.control | 4 + package/libX11/Config.in | 7 + package/libX11/Makefile | 30 + package/libX11/ipkg/libx11.control | 4 + package/libX11/patches/patch-src_util_Makefile_in | 21 + .../libX11/patches/patch-src_util_Makefile_in.orig | 12 + package/libXau/Config.in | 6 + package/libXau/Makefile | 26 + package/libXau/ipkg/libxau.control | 4 + package/libXaw/Config.in | 6 + package/libXaw/Makefile | 26 + package/libXaw/ipkg/libxaw.control | 4 + package/libXdmcp/Config.in | 6 + package/libXdmcp/Makefile | 26 + package/libXdmcp/ipkg/libxdmcp.control | 4 + package/libXext/Config.in | 6 + package/libXext/Makefile | 27 + package/libXext/ipkg/libxext.control | 4 + package/libXfont/Config.in | 6 + package/libXfont/Makefile | 26 + package/libXfont/ipkg/libxfont.control | 4 + package/libXmu/Config.in | 6 + package/libXmu/Makefile | 27 + package/libXmu/ipkg/libxmu.control | 4 + package/libXpm/Config.in | 6 + package/libXpm/Makefile | 27 + package/libXpm/ipkg/libxpm.control | 4 + package/libXt/Config.in | 6 + package/libXt/Makefile | 28 + package/libXt/ipkg/libxt.control | 4 + package/libXt/patches/patch-util_Makefile_in | 24 + package/libXxf86dga/Config.in | 6 + package/libXxf86dga/Makefile | 27 + package/libXxf86dga/ipkg/libxxf86dga.control | 4 + package/libao/Config.in | 10 + package/libao/Makefile | 30 + package/libao/ipkg/libao.control | 4 + package/libart/Config.in | 12 + package/libart/Makefile | 28 + package/libart/ipkg/libart.control | 9 + package/libart/patches/100-cross_compile_fix.patch | 15 + package/libaudiofile/Config.in | 8 + package/libaudiofile/Makefile | 28 + package/libaudiofile/ipkg/libaudiofile.control | 4 + .../patches/001-audiofile-config-libdirs.patch | 13 + package/libcli/Config.in | 11 + package/libcli/Makefile | 26 + package/libcli/ipkg/libcli.control | 5 + package/libcli/patches/patch-Makefile | 23 + package/libdaemon/Config.in | 19 + package/libdaemon/Makefile | 28 + package/libdaemon/ipkg/libdaemon.control | 4 + package/libdb/Config.in | 15 + package/libdb/Makefile | 80 + package/libdb/ipkg/libdb.control | 4 + package/libdnet/Config.in | 9 + package/libdnet/Makefile | 30 + package/libdnet/ipkg/libdnet.control | 4 + .../libdnet/patches/libdnet-1.10-dnet_config.patch | 23 + package/libelf/Config.in | 10 + package/libelf/Makefile | 34 + package/libelf/ipkg/libelf.control | 4 + package/libevent/Config.in | 17 + package/libevent/Makefile | 27 + package/libevent/ipkg/libevent.control | 4 + package/libevent/patches/patch-Makefile_in | 45 + package/libevent/patches/patch-evdns_c | 11 + package/libevent/patches/patch-event_c | 18 + package/libffi/Config.in | 12 + package/libffi/Makefile | 26 + package/libffi/ipkg/libffi.control | 4 + package/libffi/patches/patch-Makefile_am | 11 + package/libffi/patches/patch-include_Makefile_am | 10 + package/libfontenc/Config.in | 8 + package/libfontenc/Makefile | 26 + package/libfontenc/ipkg/libfontenc.control | 4 + package/libgcrypt/Config.in | 15 + package/libgcrypt/Makefile | 28 + package/libgcrypt/ipkg/libgcrypt.control | 6 + package/libgd/Config.in | 11 + package/libgd/Makefile | 32 + package/libgd/ipkg/libgd.control | 5 + package/libgd/patches/patch-Makefile_in | 29 + package/libgdbm/Config.in | 9 + package/libgdbm/Makefile | 33 + package/libgdbm/ipkg/libgdbm.control | 4 + package/libgpg-error/Config.in | 12 + package/libgpg-error/Makefile | 30 + package/libgpg-error/ipkg/libgpg-error.control | 4 + package/libgssglue/Config.in | 6 + package/libgssglue/Makefile | 26 + package/libgssglue/ipkg/libgssglue.control | 4 + package/libiconv/Config.in | 13 + package/libiconv/Makefile | 33 + package/libiconv/ipkg/libiconv.control | 4 + package/libid3tag/Config.in | 13 + package/libid3tag/Makefile | 32 + package/libid3tag/files/id3tag.pc | 11 + package/libid3tag/ipkg/libid3tag.control | 5 + package/liblzo/Config.in | 9 + package/liblzo/Makefile | 29 + package/liblzo/ipkg/liblzo.control | 4 + package/libmad/Config.in | 12 + package/libmad/Makefile | 43 + package/libmad/files/mad.pc | 11 + package/libmad/ipkg/libmad.control | 4 + package/libnet/Config.in | 12 + package/libnet/Makefile | 36 + package/libnet/ipkg/libnet.control | 5 + package/libnet/patches/500-debian-subset.patch | 28584 +++++++++++++++ package/libnfsidmap/Config.in | 6 + package/libnfsidmap/Makefile | 29 + package/libnfsidmap/ipkg/libnfsidmap.control | 4 + package/libnids/Config.in | 11 + package/libnids/Makefile | 29 + package/libnids/ipkg/libnids.control | 5 + package/libnids/patches/configure.patch | 73 + package/libnids/patches/no_asm_for_i386.patch | 12 + package/libnl/Config.in | 6 + package/libnl/Makefile | 27 + package/libnl/ipkg/libnl.control | 4 + .../libnl/patches/patch-include_netlink-types_h | 19 + .../patches/patch-include_netlink_genl_mngt_h | 19 + package/libnl/patches/patch-src_nl-list-caches_c | 11 + package/libnl/patches/patch-src_utils_c | 11 + package/libnl/patches/patch-src_utils_h | 11 + package/libogg/Config.in | 9 + package/libogg/Makefile | 26 + package/libogg/ipkg/libogg.control | 4 + package/libol/Config.in | 8 + package/libol/Makefile | 26 + package/libol/ipkg/libol.control | 4 + package/libosip2/Config.in | 9 + package/libosip2/Makefile | 30 + package/libosip2/ipkg/libosip2.control | 5 + package/libowfat/Config.in | 4 + package/libowfat/Makefile | 28 + package/libowfat/patches/patch-GNUmakefile | 12 + package/libp11/Config.in | 8 + package/libp11/Makefile | 26 + package/libp11/ipkg/libp11.control | 5 + package/libpcap/Config.in | 9 + package/libpcap/Makefile | 35 + package/libpcap/ipkg/libpcap.control | 4 + package/libpciaccess/Config.in | 6 + package/libpciaccess/Makefile | 26 + package/libpciaccess/ipkg/libpciaccess.control | 4 + package/libpciaccess/patches/patch-configure_ac | 16 + package/libpng/Config.in | 10 + package/libpng/Makefile | 26 + package/libpng/ipkg/libpng.control | 5 + package/libpri/Config.in | 10 + package/libpri/Makefile | 26 + package/libpri/ipkg/libpri.control | 5 + package/libpri/patches/patch-Makefile | 12 + package/libpthread/Config.in | 7 + package/libpthread/Makefile | 25 + package/libpthread/ipkg/libpthread.control | 4 + package/librpcsecgss/Config.in | 6 + package/librpcsecgss/Makefile | 28 + .../librpcsecgss/files/librpcsecgss.pc.in.gssglue | 12 + .../librpcsecgss/files/librpcsecgss.pc.in.heimdal | 12 + package/librpcsecgss/ipkg/librpcsecgss.control | 4 + package/librpcsecgss/patches/patch-configure_in | 25 + package/libshout/Config.in | 16 + package/libshout/Makefile | 28 + package/libshout/ipkg/libshout.control | 5 + package/libsigc++/Config.in | 8 + package/libsigc++/Makefile | 27 + package/libsigc++/ipkg/libsigc++.control | 5 + package/libsigc++/patches/patch-Makefile_in | 12 + package/libstdcxx/Config.in | 7 + package/libstdcxx/Makefile | 20 + package/libstdcxx/ipkg/libstdcxx.control | 5 + package/libtasn1/Config.in | 9 + package/libtasn1/Makefile | 30 + package/libtasn1/ipkg/libtasn1.control | 4 + package/libtasn1/patches/patch-configure | 14 + package/libthread_db/Config.in | 7 + package/libthread_db/Makefile | 25 + package/libthread_db/ipkg/libthread-db.control | 4 + package/libtiff/Config.in | 8 + package/libtiff/Makefile | 29 + package/libtiff/ipkg/libtiff.control | 4 + package/libtirpc/Config.in | 9 + package/libtirpc/Makefile | 31 + package/libtirpc/files/netconfig | 7 + package/libtirpc/ipkg/libtirpc.control | 4 + package/libtirpc/patches/patch-Makefile_am | 10 + package/libtirpc/patches/patch-src_Makefile_am | 20 + package/libtirpc/patches/patch-src_rpc_soc_c | 41 + package/libtool/Config.in | 14 + package/libtool/Makefile | 26 + package/libtool/ipkg/libltdl.control | 4 + .../libtool/patches/01-force_dlopen_deplibs.patch | 14 + package/libtorrent/Config.in | 10 + package/libtorrent/Makefile | 27 + package/libtorrent/ipkg/libtorrent.control | 5 + package/libtorrent/patches/patch-rak_functional_h | 11 + package/libtorrent/patches/patch-src_data_chunk_cc | 11 + .../libtorrent/patches/patch-src_data_chunk_list_h | 11 + .../patches/patch-src_net_address_list_cc | 12 + .../patch-src_torrent_data_file_list_iterator_h | 11 + .../patches/patch-src_torrent_exceptions_cc | 11 + .../patches/patch-src_torrent_tracker_list_h | 11 + .../patches/patch-src_utils_diffie_hellman_cc | 11 + package/libupnp/Config.in | 13 + package/libupnp/Makefile | 31 + package/libupnp/ipkg/libupnp.control | 5 + package/libupnp/patches/patch-configure_ac | 11 + package/libusb/Config.in | 9 + package/libusb/Makefile | 27 + package/libusb/ipkg/libusb.control | 4 + package/libusb/patches/no-libusbpp.patch | 114 + package/libvorbis/Config.in | 20 + package/libvorbis/Makefile | 34 + package/libvorbis/ipkg/libvorbis.control | 4 + package/libvorbis/ipkg/libvorbisenc.control | 4 + package/libvorbis/patches/patch-Makefile_in | 12 + package/libvorbisidec/Config.in | 12 + package/libvorbisidec/Makefile | 32 + package/libvorbisidec/ipkg/libvorbisidec.control | 4 + package/libxkbfile/Config.in | 6 + package/libxkbfile/Makefile | 26 + package/libxkbfile/ipkg/libxkbfile.control | 4 + package/libxml2/Config.in | 11 + package/libxml2/Makefile | 55 + package/libxml2/ipkg/libxml2.control | 5 + package/libxslt/Config.in | 10 + package/libxslt/Makefile | 35 + package/libxslt/ipkg/libxslt.control | 5 + package/lighttpd/Config.in | 113 + package/lighttpd/Makefile | 104 + package/lighttpd/files/lighttpd.conf | 217 + package/lighttpd/files/lighttpd.init | 25 + .../lighttpd/ipkg/lighttpd-mod-accesslog.control | 5 + package/lighttpd/ipkg/lighttpd-mod-alias.control | 5 + package/lighttpd/ipkg/lighttpd-mod-auth.control | 5 + package/lighttpd/ipkg/lighttpd-mod-cgi.control | 5 + package/lighttpd/ipkg/lighttpd-mod-evasive.control | 5 + package/lighttpd/ipkg/lighttpd-mod-expire.control | 5 + package/lighttpd/ipkg/lighttpd-mod-fastcgi.control | 5 + package/lighttpd/ipkg/lighttpd-mod-proxy.control | 5 + .../lighttpd/ipkg/lighttpd-mod-redirect.control | 5 + package/lighttpd/ipkg/lighttpd-mod-rewrite.control | 5 + package/lighttpd/ipkg/lighttpd-mod-setenv.control | 5 + .../ipkg/lighttpd-mod-simple-vhost.control | 5 + package/lighttpd/ipkg/lighttpd-mod-ssi.control | 5 + package/lighttpd/ipkg/lighttpd-mod-status.control | 5 + .../lighttpd/ipkg/lighttpd-mod-usertrack.control | 5 + package/lighttpd/ipkg/lighttpd-mod-webdav.control | 5 + package/lighttpd/ipkg/lighttpd.conffiles | 1 + package/lighttpd/ipkg/lighttpd.control | 5 + package/lighttpd/ipkg/lighttpd.postinst | 4 + package/lighttpd/patches/500-configure_cross.patch | 24 + package/links/Config.in | 10 + package/links/Makefile | 33 + package/links/ipkg/links.control | 4 + package/linux-atm/Config.in | 20 + package/linux-atm/Makefile | 33 + package/linux-atm/files/br2684.hotplug | 19 + package/linux-atm/ipkg/br2684ctl.control | 4 + package/linux-atm/ipkg/linux-atm.control | 4 + package/linux-atm/patches/000-debian_16.patch | 35073 +++++++++++++++++++ .../linux-atm/patches/010-header_stupidity.patch | 13 + package/linux-atm/patches/100-br2684.patch | 488 + package/linux-atm/patches/200-no_libfl.patch | 193 + package/linux-atm/patches/300-no_autotools.patch | 22686 ++++++++++++ package/logrotate/Config.in | 10 + package/logrotate/Makefile | 29 + package/logrotate/files/logrotate.conf | 30 + package/logrotate/ipkg/logrotate.control | 6 + package/logrotate/patches/patch-Makefile | 21 + package/logrotate/patches/patch-config_c | 59 + package/logrotate/patches/patch-logrotate_8 | 28 + package/logrotate/patches/patch-logrotate_c | 429 + package/logrotate/patches/patch-logrotate_h | 19 + package/lrzsz/Config.in | 11 + package/lrzsz/Makefile | 35 + package/lrzsz/ipkg/lrzsz.control | 5 + package/ltp/Config.in | 16 + package/ltp/Makefile | 30 + package/ltp/ipkg/ltp.control | 4 + package/ltp/patches/patch-Makefile | 20 + package/ltp/patches/patch-runltp | 22 + .../patch-testcases_kernel_syscalls_Makefile | 13 + .../ltp/patches/patch-testcases_misc_math_Makefile | 10 + .../patch-testcases_misc_math_float_Makefile | 18 + package/lua/Config.in | 111 + package/lua/Makefile | 62 + package/lua/ipkg/liblua.control | 4 + package/lua/ipkg/lua-examples.control | 5 + package/lua/ipkg/lua.control | 5 + package/lua/ipkg/luac.control | 5 + package/lua/patches/lua-5.0.2-config.patch | 31 + package/lua/patches/lua-5.0.2-soname.patch | 14 + package/lvm/Config.in | 6 + package/lvm/Makefile | 34 + package/lvm/ipkg/lvm.control | 4 + package/lvm/patches/patch-tools_Makefile_in | 29 + package/lynx/Config.in | 11 + package/lynx/Makefile | 103 + package/lynx/ipkg/lynx.control | 5 + package/lynx/patches/patch-config_hin | 17 + package/lynx/patches/patch-lynx_cfg | 236 + package/lynx/patches/patch-makefile_in | 22 + package/lynx/patches/patch-samples_lynx_lss | 15 + package/lynx/patches/patch-src_LYUtils_c | 15 + package/lynx/patches/patch-userdefs_h | 65 + package/mac80211/Config.in | 28 + package/mac80211/Makefile | 108 + package/mac80211/ipkg/kmod-mac80211-ath5k.control | 4 + package/mac80211/ipkg/kmod-mac80211-rt61.control | 4 + package/mac80211/ipkg/kmod-mac80211.control | 4 + package/macchanger/Config.in | 8 + package/macchanger/Makefile | 25 + package/macchanger/ipkg/macchanger.control | 6 + package/madplay/Config.in | 12 + package/madplay/Makefile | 38 + package/madplay/ipkg/madplay.control | 6 + package/maradns/Config.in | 10 + package/maradns/Makefile | 42 + package/maradns/files/maradns.init | 29 + package/maradns/files/mararc | 15 + package/maradns/files/sample.ptr | 11 + package/maradns/files/sample.zone | 24 + package/maradns/ipkg/maradns.conffiles | 1 + package/maradns/ipkg/maradns.control | 8 + package/maradns/ipkg/maradns.postinst | 3 + package/maradns/patches/cross-compile-fix.patch | 12 + package/mc/Config.in | 9 + package/mc/Makefile | 50 + package/mc/ipkg/mc.control | 5 + package/mc/patches/patch-lib_mc_ext_in | 92 + package/mc/patches/patch-lib_mc_lib | 378 + package/mc/patches/patch-lib_mc_menu | 17 + package/mc/patches/patch-src_key_c | 13 + package/mc/patches/patch-src_main_c | 13 + package/mc/patches/patch-vfs_extfs_iso9660_in | 31 + package/mgetty/Config.in | 7 + package/mgetty/Makefile | 113 + package/mgetty/ipkg/mgetty.control | 4 + package/mgetty/patches/mgetty.patch | 98 + package/miau/Config.in | 12 + package/miau/Makefile | 35 + package/miau/files/miau.init | 28 + package/miau/files/miaurc | 587 + package/miau/ipkg/miau.conffiles | 1 + package/miau/ipkg/miau.control | 6 + package/miau/ipkg/miau.postinst | 4 + package/miax/Config.in | 12 + package/miax/Makefile | 30 + package/miax/ipkg/miax.control | 5 + package/miax/patches/01-cross.patch | 24 + package/microperl/Config.in | 7 + package/microperl/Makefile | 31 + package/microperl/ipkg/microperl.control | 4 + package/mini_httpd/Config.in | 66 + package/mini_httpd/Makefile | 63 + package/mini_httpd/files/mini_httpd-ssl.conf | 7 + package/mini_httpd/files/mini_httpd.conf | 5 + package/mini_httpd/files/mini_httpd.init | 25 + package/mini_httpd/files/mini_httpd.pem | 29 + .../mini_httpd/ipkg/mini-httpd-htpasswd.control | 4 + .../mini_httpd/ipkg/mini-httpd-matrixssl.conffiles | 2 + .../mini_httpd/ipkg/mini-httpd-matrixssl.control | 5 + .../mini_httpd/ipkg/mini-httpd-matrixssl.postinst | 3 + .../mini_httpd/ipkg/mini-httpd-openssl.conffiles | 2 + package/mini_httpd/ipkg/mini-httpd-openssl.control | 5 + .../mini_httpd/ipkg/mini-httpd-openssl.postinst | 3 + package/mini_httpd/ipkg/mini-httpd.conffiles | 1 + package/mini_httpd/ipkg/mini-httpd.control | 5 + package/mini_httpd/ipkg/mini-httpd.postinst | 3 + package/mini_httpd/patches/patch-Makefile | 78 + package/mini_httpd/patches/patch-mini_httpd_c | 96 + package/mini_sendmail/Config.in | 12 + package/mini_sendmail/Makefile | 29 + package/mini_sendmail/ipkg/mini-sendmail.control | 4 + package/mini_sendmail/patches/500-flags.patch | 15 + package/miredo/Config.in | 35 + package/miredo/Makefile | 55 + package/miredo/files/miredo-server.init | 25 + package/miredo/files/miredo.init | 25 + package/miredo/ipkg/miredo-server.control | 5 + package/miredo/ipkg/miredo-server.postinst | 3 + package/miredo/ipkg/miredo.conffiles | 1 + package/miredo/ipkg/miredo.control | 5 + package/miredo/ipkg/miredo.postinst | 3 + package/miredo/patches/patch-libteredo_maintain_c | 19 + package/mksh/Config.in | 31 + package/mksh/Makefile | 34 + package/mksh/ipkg/mksh.conffiles | 1 + package/mksh/ipkg/mksh.control | 4 + package/mksh/patches/patch-dot_mkshrc | 36 + package/moc/Config.in | 13 + package/moc/Makefile | 35 + package/moc/ipkg/moc.control | 5 + package/monit/Config.in | 17 + package/monit/Makefile | 40 + package/monit/files/monit.init | 20 + package/monit/ipkg/monit-nossl.conffiles | 1 + package/monit/ipkg/monit-nossl.control | 5 + package/monit/ipkg/monit.conffiles | 1 + package/monit/ipkg/monit.control | 4 + package/motion/Config.in | 10 + package/motion/Makefile | 30 + package/motion/ipkg/motion.control | 5 + package/motion/patches/01-ffmpeg.patch | 38 + package/motion/patches/02-honor_cppflags.patch | 20 + package/mpd/Config.in | 96 + package/mpd/Makefile | 94 + package/mpd/files/mpd.conf | 18 + package/mpd/files/mpd.init | 26 + package/mpd/ipkg/mpd.conffiles | 1 + package/mpd/ipkg/mpd.control | 5 + package/mpd/ipkg/mpd.postinst | 6 + package/mpfr/Config.in | 6 + package/mpfr/Makefile | 19 + package/mpfr/ipkg/mpfr.control | 4 + package/mplayer/Config.in | 16 + package/mplayer/Makefile | 86 + package/mplayer/ipkg/mplayer.control | 5 + package/mplayer/patches/patch-configure | 39 + package/mplayer/patches/patch-loader_win32_c | 11 + package/mrd6/Config.in | 15 + package/mrd6/Makefile | 31 + package/mrd6/files/mrd6.conf | 14 + package/mrd6/files/mrd6.init | 25 + package/mrd6/ipkg/mrd6.control | 6 + package/mrd6/ipkg/mrd6.postinst | 3 + package/mrd6/patches/patch-src_Makefile | 75 + package/mt-daapd/Config.in | 31 + package/mt-daapd/Makefile | 40 + package/mt-daapd/files/mt-daapd.init | 26 + package/mt-daapd/ipkg/mt-daapd.conffiles | 2 + package/mt-daapd/ipkg/mt-daapd.control | 5 + package/mt-daapd/ipkg/mt-daapd.postinst | 3 + package/mtr/Config.in | 18 + package/mtr/Makefile | 28 + package/mtr/ipkg/mtr.control | 15 + package/mtr/patches/501-dns.patch | 511 + package/mtr/patches/patch-Makefile | 763 + package/mtr/patches/patch-curses_c | 21 + package/mtr/patches/patch-report_c | 30 + package/mutt/Config.in | 11 + package/mutt/Makefile | 39 + package/mutt/ipkg/mutt.control | 5 + package/mutt/patches/patch-Makefile_in | 21 + package/mysql/Config.in | 19 + package/mysql/Makefile | 84 + package/mysql/ipkg/libmysqlclient.control | 5 + package/mysql/patches/patch-configure | 743 + package/mysql/patches/patch-include_my_global_h | 59 + package/nano/Config.in | 18 + package/nano/Makefile | 48 + package/nano/files/nanorc | 1 + package/nano/ipkg/nano.conffiles | 1 + package/nano/ipkg/nano.control | 5 + package/ncurses/Config.in | 16 + package/ncurses/Makefile | 70 + package/ncurses/ipkg/libncurses.control | 4 + package/ncurses/patches/patch-misc_run_tic_in | 12 + package/ndisc/Config.in | 45 + package/ndisc/Makefile | 35 + package/ndisc/extra/rdnssd/strverscmp.c | 131 + package/ndisc/ipkg/ndisc6.control | 4 + package/ndisc/ipkg/rdisc6.control | 4 + package/ndisc/ipkg/tcptraceroute6.control | 4 + package/ndisc/patches/patch-rdnssd_Makefile_am | 13 + package/ndisc/patches/patch-rdnssd_Makefile_in | 30 + package/ndisc/patches/patch-rdnssd_icmp_c | 20 + package/ndisc/patches/patch-rdnssd_rdnssd_c | 78 + package/ndisc/patches/patch-rdnssd_rdnssd_c.orig | 61 + package/ndisc/patches/patch-src_addrinfo_c | 21 + package/ndisc/patches/patch-src_ndisc_c | 35 + package/ndisc/patches/patch-src_ndisc_c.orig | 20 + package/ndisc/patches/patch-src_tcpspray_c | 48 + package/ndisc/patches/patch-src_tcpspray_c.orig | 31 + package/ndisc/patches/patch-src_tcptraceroute_c | 20 + package/ndisc/patches/patch-src_trace-tcp_c | 11 + package/ndisc/patches/patch-src_trace-udp_c | 11 + package/ndisc/patches/patch-src_traceroute_c | 128 + package/ndisc/patches/patch-src_traceroute_c.orig | 128 + package/ndisc/patches/patch-src_traceroute_h | 26 + package/ndisc/patches/patch-src_traceroute_h.orig | 26 + package/neon/Config.in | 31 + package/neon/Makefile | 29 + package/neon/ipkg/neon.control | 5 + package/net-snmp/Config.in | 52 + package/net-snmp/Makefile | 117 + package/net-snmp/files/snmpd.conf | 14 + package/net-snmp/files/snmpd.default | 1 + package/net-snmp/files/snmpd.init | 27 + package/net-snmp/ipkg/libnetsnmp.control | 4 + package/net-snmp/ipkg/snmp-utils.control | 5 + package/net-snmp/ipkg/snmpd.conffiles | 1 + package/net-snmp/ipkg/snmpd.control | 5 + package/net-snmp/ipkg/snmpd.postinst | 3 + package/netperf/Config.in | 6 + package/netperf/Makefile | 34 + package/netperf/files/netserver.init | 26 + package/netperf/ipkg/netperf.control | 4 + package/netperf/ipkg/netperf.postinst | 3 + .../patches/01-netperf-2.3pl1-openwrt.patch | 39 + package/netstat-nat/Config.in | 13 + package/netstat-nat/Makefile | 26 + package/netstat-nat/ipkg/netstat-nat.control | 7 + package/nfs-utils/Config.in | 43 + package/nfs-utils/Makefile | 77 + package/nfs-utils/files/idmapd.conf | 14 + package/nfs-utils/files/nfsd.exports | 10 + package/nfs-utils/files/nfsd.init | 48 + package/nfs-utils/files/rpc | 3 + package/nfs-utils/ipkg/nfs-utils.control | 4 + package/nfs-utils/ipkg/nfs-utils.postinst | 9 + .../nfs-utils/patches/patch-aclocal_kerberos5_m4 | 138 + .../patches/patch-support_nfs_nfs_mntent_c | 30 + package/nfs-utils/patches/patch-tools_Makefile_am | 11 + package/nfs-utils/patches/patch-tools_Makefile_in | 21 + .../nfs-utils/patches/patch-utils_mount_error_c | 12 + .../nfs-utils/patches/patch-utils_mountd_cache_c | 75 + .../nfs-utils/patches/patch-utils_mountd_fsloc_c | 12 + package/nmap/Config.in | 30 + package/nmap/Makefile | 50 + package/nmap/ipkg/nmap.control | 4 + package/nmap/patches/patch-configure | 99 + package/nmap/patches/patch-nmap_dns_h | 13 + package/nmap/patches/patch-output_cc | 12 + package/nmap/patches/patch-traceroute_cc | 16 + package/nocatsplash/Config.in | 12 + package/nocatsplash/Makefile | 30 + package/nocatsplash/ipkg/nocatsplash.conffiles | 1 + package/nocatsplash/ipkg/nocatsplash.control | 10 + package/nocatsplash/patches/openwrt-firewall.patch | 19 + package/ntfs-3g/Config.in | 6 + package/ntfs-3g/Makefile | 32 + package/ntfs-3g/ipkg/kmod-fs-ntfs-3g.control | 4 + package/ntpclient/Config.in | 10 + package/ntpclient/Makefile | 28 + package/ntpclient/ipkg/ntpclient.control | 4 + package/ntpclient/patches/patch-ntpclient_c | 21 + package/nut/Config.in | 239 + package/nut/Makefile | 117 + package/nut/files/ups.conf | 104 + package/nut/files/upsd.conf | 42 + package/nut/files/upsd.init | 30 + package/nut/ipkg/nut.conffiles | 2 + package/nut/ipkg/nut.control | 4 + package/nut/ipkg/nut.postinst | 4 + package/obexftp/Config.in | 8 + package/obexftp/Makefile | 33 + package/obexftp/ipkg/obexftp.control | 5 + package/olsrd/Config.in | 36 + package/olsrd/Makefile | 58 + package/olsrd/files/olsrd.init | 22 + package/olsrd/files/olsrd_secure_key | 1 + package/olsrd/ipkg/olsrd-mod-dot-draw.control | 5 + package/olsrd/ipkg/olsrd-mod-dyn-gw.control | 5 + package/olsrd/ipkg/olsrd-mod-httpinfo.control | 5 + package/olsrd/ipkg/olsrd-mod-nameservice.control | 5 + package/olsrd/ipkg/olsrd-mod-power.control | 5 + package/olsrd/ipkg/olsrd-mod-secure.conffiles | 1 + package/olsrd/ipkg/olsrd-mod-secure.control | 5 + package/olsrd/ipkg/olsrd-mod-tas.control | 5 + package/olsrd/ipkg/olsrd.conffiles | 1 + package/olsrd/ipkg/olsrd.control | 8 + package/olsrd/ipkg/olsrd.postinst | 3 + package/olsrd/patches/patch-make_Makefile_linux | 12 + package/opencdk/Config.in | 21 + package/opencdk/Makefile | 33 + package/opencdk/ipkg/libopencdk.control | 5 + package/opencdk/patches/patch-configure | 14 + package/openct/Config.in | 8 + package/openct/Makefile | 39 + package/openct/ipkg/openct.control | 5 + package/openldap/Config.in | 33 + package/openldap/Config.in.lib | 15 + package/openldap/Makefile | 82 + package/openldap/files/slapd.conf | 30 + package/openldap/files/slapd.init | 28 + package/openldap/ipkg/libopenldap.conffiles | 1 + package/openldap/ipkg/libopenldap.control | 5 + package/openldap/ipkg/openldap-slapd.control | 5 + package/openldap/ipkg/openldap-slapd.postinst | 5 + package/openldap/ipkg/openldap-utils.control | 5 + package/openntpd/Config.in | 9 + package/openntpd/Makefile | 35 + package/openntpd/extra/openbsd-compat/port-linux.c | 107 + package/openntpd/files/ntpd.conf | 8 + package/openntpd/files/ntpd.init | 27 + package/openntpd/ipkg/openntpd.conffiles | 1 + package/openntpd/ipkg/openntpd.control | 7 + package/openntpd/ipkg/openntpd.postinst | 7 + package/openntpd/patches/patch-client_c | 17 + package/openntpd/patches/patch-configure_ac | 18 + package/openntpd/patches/patch-defines_h | 17 + package/openntpd/patches/patch-ntpd_h | 47 + .../patches/patch-openbsd-compat_Makefile_in | 15 + .../patches/patch-openbsd-compat_openbsd-compat_h | 18 + package/openobex/Config.in | 9 + package/openobex/Makefile | 27 + package/openobex/ipkg/openobex.control | 4 + package/opensc/Config.in | 6 + package/opensc/Makefile | 33 + package/opensc/ipkg/opensc.control | 4 + package/opensc/patches/patch-src_Makefile_in | 14 + package/opensips/Config.in | 196 + package/opensips/Makefile | 111 + package/opensips/files/opensips.cfg | 174 + package/opensips/files/opensips.init | 26 + package/opensips/ipkg/opensips-mod-acc.control | 5 + package/opensips/ipkg/opensips-mod-auth-db.control | 5 + .../opensips/ipkg/opensips-mod-auth-radius.control | 5 + package/opensips/ipkg/opensips-mod-auth.control | 5 + .../opensips/ipkg/opensips-mod-avp-radius.control | 5 + .../opensips/ipkg/opensips-mod-avp_radius.control | 5 + package/opensips/ipkg/opensips-mod-avpops.control | 5 + .../opensips/ipkg/opensips-mod-dispatcher.control | 5 + .../opensips/ipkg/opensips-mod-diversion.control | 5 + .../opensips/ipkg/opensips-mod-flatstore.control | 5 + package/opensips/ipkg/opensips-mod-gflags.control | 5 + .../ipkg/opensips-mod-group-radius.control | 5 + package/opensips/ipkg/opensips-mod-group.control | 5 + .../ipkg/opensips-mod-group_radius.control | 5 + package/opensips/ipkg/opensips-mod-lcr.control | 5 + .../opensips/ipkg/opensips-mod-mediaproxy.control | 5 + package/opensips/ipkg/opensips-mod-msilo.control | 5 + package/opensips/ipkg/opensips-mod-mysql.control | 5 + .../opensips/ipkg/opensips-mod-nathelper.control | 5 + package/opensips/ipkg/opensips-mod-options.control | 5 + package/opensips/ipkg/opensips-mod-pdt.control | 5 + .../opensips/ipkg/opensips-mod-permissions.control | 5 + package/opensips/ipkg/opensips-mod-pike.control | 5 + package/opensips/ipkg/opensips-mod-sms.control | 5 + .../opensips/ipkg/opensips-mod-speeddial.control | 5 + .../ipkg/opensips-mod-uac-redirect.control | 5 + package/opensips/ipkg/opensips-mod-uac.control | 5 + .../ipkg/opensips-mod-uac_redirect.control | 5 + package/opensips/ipkg/opensips-mod-uri-db.control | 5 + .../opensips/ipkg/opensips-mod-uri-radius.control | 5 + package/opensips/ipkg/opensips-mod-uri.control | 5 + package/opensips/ipkg/opensips-mod-uri_db.control | 5 + .../opensips/ipkg/opensips-mod-uri_radius.control | 5 + package/opensips/ipkg/opensips-mod-xlog.control | 5 + package/opensips/ipkg/opensips.conffiles | 1 + package/opensips/ipkg/opensips.control | 4 + package/opensips/ipkg/opensips.postinst | 3 + package/openssh/Config.in | 140 + package/openssh/Makefile | 83 + package/openssh/files/sshd.init | 47 + package/openssh/files/sshd_config | 113 + package/openssh/ipkg/openssh-client-utils.control | 5 + package/openssh/ipkg/openssh-client.conffiles | 1 + package/openssh/ipkg/openssh-client.control | 5 + package/openssh/ipkg/openssh-server.conffiles | 1 + package/openssh/ipkg/openssh-server.control | 4 + package/openssh/ipkg/openssh-server.postinst | 5 + package/openssh/ipkg/openssh-sftp-client.control | 5 + package/openssh/ipkg/openssh-sftp-server.control | 5 + package/openssh/patches/patch-cipher_c | 35 + package/openssh/patches/patch-configure | 12 + package/openssh/patches/patch-mac_c | 14 + package/openssh/patches/patch-myproposal_h | 45 + .../patches/patch-openbsd-compat_port-tun_c | 12 + package/openssl-pkcs11/Config.in | 7 + package/openssl-pkcs11/Makefile | 31 + package/openssl-pkcs11/ipkg/openssl-pkcs11.control | 4 + package/openssl-pkcs11/patches/patch-configure | 60 + package/openssl/Config.in | 41 + package/openssl/Makefile | 70 + package/openssl/cert.pem | 4625 +++ package/openssl/ipkg/ca-certificates.conffiles | 1 + package/openssl/ipkg/ca-certificates.control | 4 + package/openssl/ipkg/libopenssl.control | 5 + package/openssl/ipkg/openssl-util.conffiles | 1 + package/openssl/ipkg/openssl-util.control | 5 + package/openssl/patches/ocf.patch | 1197 + package/openssl/patches/patch-Configure | 11 + package/openssl/patches/patch-Makefile_shared | 19 + package/openssl/patches/patch-apps_speed_c | 16 + package/openssl/patches/patch-util_shlib_wrap_sh | 17 + package/openswan/Config.in | 10 + package/openswan/Makefile | 59 + package/openswan/files/openswan.init | 27 + package/openswan/ipkg/openswan.conffiles | 1 + package/openswan/ipkg/openswan.control | 5 + package/openswan/ipkg/openswan.postinst | 3 + package/openswan/patches/patch-lib_libdns_Makefile | 10 + .../patches/patch-lib_libopenswan_alg_info_c | 12 + .../patches/patch-programs_ikeping_ikeping_c | 12 + package/openvpn/Config.in | 64 + package/openvpn/Makefile | 86 + package/openvpn/files/openvpn.conf | 11 + package/openvpn/files/openvpn.init | 29 + package/openvpn/files/serial | 1 + package/openvpn/ipkg/openvpn-easy-rsa.control | 5 + package/openvpn/ipkg/openvpn.control | 4 + package/openvpn/ipkg/openvpn.postinst | 3 + package/openvpn/patches/easy-rsa.patch | 218 + package/oprofile/Config.in | 9 + package/oprofile/Makefile | 28 + package/oprofile/ipkg/oprofile.control | 5 + package/osiris/Config.in | 18 + package/osiris/Makefile | 42 + package/osiris/files/osirisd.init | 27 + package/osiris/ipkg/osirisd.control | 5 + package/osiris/ipkg/osirisd.postinst | 3 + package/osiris/patches/patch-configure | 32 + .../osiris/patches/patch-src_libosiris_Makefile_in | 41 + .../patches/patch-src_libosiris_configuration_c | 27 + .../patches/patch-src_libosiris_configuration_h | 13 + .../osiris/patches/patch-src_libosiris_filter_c | 35 + .../osiris/patches/patch-src_libosiris_filter_h | 23 + .../patches/patch-src_libosiris_ssl_utilities_c | 30 + .../patches/patch-src_libosiris_ssl_utilities_h | 14 + .../osiris/patches/patch-src_libosiris_utilities_c | 13 + package/osiris/patches/patch-src_osirisd_scanner_c | 33 + .../osiris/patches/patch-src_osirismd_md_control_c | 16 + package/owfs/Config.in | 13 + package/owfs/Makefile | 38 + package/owfs/ipkg/owfs.control | 5 + package/p910nd/Config.in | 15 + package/p910nd/Makefile | 31 + package/p910nd/files/p910nd.init | 26 + package/p910nd/ipkg/p910nd.control | 4 + package/p910nd/ipkg/p910nd.postinst | 4 + package/p910nd/patches/100-Makefile.patch | 15 + package/p910nd/patches/200-p910nd-0.7.patch | 309 + package/palantir/Config.in | 12 + package/palantir/Makefile | 37 + package/palantir/ipkg/palantir.conffiles | 1 + package/palantir/ipkg/palantir.control | 5 + package/parprouted/Config.in | 13 + package/parprouted/Makefile | 30 + package/parprouted/files/parprouted.default | 1 + package/parprouted/files/parprouted.init | 26 + package/parprouted/ipkg/parprouted.control | 5 + package/parprouted/ipkg/parprouted.postinst | 4 + package/parprouted/patches/parprouted.patch | 33 + package/pciutils/Config.in | 8 + package/pciutils/Makefile | 31 + package/pciutils/ipkg/pciutils.control | 4 + package/pciutils/patches/patch-lib_configure | 11 + package/pcre/Config.in | 15 + package/pcre/Makefile | 37 + package/pcre/ipkg/libpcre.control | 4 + package/php/Config.in | 115 + package/php/Makefile | 167 + package/php/files/php.ini | 561 + package/php/files/php.init | 28 + package/php/ipkg/php-cgi.conffiles | 1 + package/php/ipkg/php-cgi.control | 6 + package/php/ipkg/php-cli.conffiles | 1 + package/php/ipkg/php-cli.control | 6 + package/php/ipkg/php-fastcgi.conffiles | 1 + package/php/ipkg/php-fastcgi.control | 6 + package/php/ipkg/php-fastcgi.postinst | 4 + package/php/ipkg/php-mod-curl.control | 5 + package/php/ipkg/php-mod-ftp.control | 5 + package/php/ipkg/php-mod-gd.control | 5 + package/php/ipkg/php-mod-gmp.control | 5 + package/php/ipkg/php-mod-ldap.control | 5 + package/php/ipkg/php-mod-mysql.control | 5 + package/php/ipkg/php-mod-openssl.control | 5 + package/php/ipkg/php-mod-pcre.control | 5 + package/php/ipkg/php-mod-pgsql.control | 5 + package/php/ipkg/php-mod-session.control | 5 + package/php/ipkg/php-mod-sockets.control | 5 + package/php/ipkg/php-mod-sqlite.control | 5 + package/php/ipkg/php-mod-xml.control | 5 + package/picocom/Config.in | 15 + package/picocom/Makefile | 25 + package/picocom/ipkg/picocom.control | 4 + package/pipacs/Config.in | 7 + package/pipacs/Makefile | 29 + package/pipacs/ipkg/pipacs.control | 5 + package/pipacs/src/Makefile | 15 + package/pipacs/src/parser.c | 907 + package/pipacs/src/parser.h | 60 + package/pipacs/src/pipacs.c | 589 + package/pixman/Config.in | 6 + package/pixman/Makefile | 26 + package/pixman/ipkg/pixman.control | 4 + package/pmacct/Config.in | 200 + package/pmacct/Makefile | 171 + package/pmacct/files/nfacctd.conf | 28 + package/pmacct/files/nfacctd.init | 25 + package/pmacct/files/pmacctd.conf | 26 + package/pmacct/files/pmacctd.init | 25 + package/pmacct/ipkg/nfacctd-custom.control | 6 + package/pmacct/ipkg/nfacctd-mysql.control | 6 + package/pmacct/ipkg/nfacctd-pgsql.control | 6 + package/pmacct/ipkg/nfacctd-sqlite.control | 6 + package/pmacct/ipkg/nfacctd.conffiles | 1 + package/pmacct/ipkg/nfacctd.control | 6 + package/pmacct/ipkg/nfacctd.postinst | 4 + package/pmacct/ipkg/pmacct-client.control | 5 + package/pmacct/ipkg/pmacctd-custom.control | 6 + package/pmacct/ipkg/pmacctd-mysql.control | 6 + package/pmacct/ipkg/pmacctd-pgsql.control | 6 + package/pmacct/ipkg/pmacctd-sqlite.control | 6 + package/pmacct/ipkg/pmacctd.conffiles | 1 + package/pmacct/ipkg/pmacctd.control | 6 + package/pmacct/ipkg/pmacctd.postinst | 4 + package/popt/Config.in | 14 + package/popt/Makefile | 26 + package/popt/ipkg/libpopt.control | 4 + package/portmap/Config.in | 14 + package/portmap/Makefile | 40 + package/portmap/files/portmap.init | 27 + package/portmap/ipkg/portmap.control | 4 + package/portmap/ipkg/portmap.postinst | 5 + package/portmap/patches/patch-pmap_check_c | 16 + package/portsentry/Config.in | 9 + package/portsentry/Makefile | 30 + package/portsentry/ipkg/portsentry.conffiles | 1 + package/portsentry/ipkg/portsentry.control | 4 + package/portsentry/patches/100-conf_location.patch | 11 + package/portsentry/patches/101-postsentry_c.patch | 12 + package/postgresql/Config.in | 31 + package/postgresql/Makefile | 62 + package/postgresql/ipkg/libpq.control | 4 + package/postgresql/ipkg/pgsql-cli.control | 5 + package/ppp/Config.in | 52 + package/ppp/Makefile | 106 + package/ppp/files/etc/ppp/chap-secrets | 1 + package/ppp/files/etc/ppp/filter | 23 + package/ppp/files/etc/ppp/ip-down | 9 + package/ppp/files/etc/ppp/ip-down.d/umts | 7 + package/ppp/files/etc/ppp/ip-up | 9 + package/ppp/files/etc/ppp/ip-up.d/if-rename | 17 + package/ppp/files/etc/ppp/ip-up.d/umts | 7 + package/ppp/files/etc/ppp/options | 1 + package/ppp/files/etc/ppp/peers/dsl | 12 + package/ppp/files/etc/ppp/templates/dsl | 9 + package/ppp/files/etc/ppp/templates/umts | 11 + package/ppp/files/poff | 14 + package/ppp/files/pon | 8 + package/ppp/files/ppp.pre-up | 0 package/ppp/ipkg/ppp-mod-chat.control | 5 + package/ppp/ipkg/ppp-mod-pppdump.control | 5 + package/ppp/ipkg/ppp-mod-pppoa.control | 5 + package/ppp/ipkg/ppp-mod-pppoe.control | 5 + package/ppp/ipkg/ppp-mod-pppstats.control | 5 + package/ppp/ipkg/ppp-mod-pppumts.control | 5 + package/ppp/ipkg/ppp-mod-radius.conffiles | 10 + package/ppp/ipkg/ppp-mod-radius.control | 5 + package/ppp/ipkg/ppp.conffiles | 2 + package/ppp/ipkg/ppp.control | 5 + .../patches/010-use_target_for_configuration.patch | 20 + package/ppp/patches/100-debian_close_dev_ppp.patch | 34 + package/ppp/patches/200-makefile.patch | 44 + package/ppp/patches/201-mppe_mppc_1.1.patch | 1587 + package/ppp/patches/203-no_strip.patch | 86 + package/ppp/patches/204-opt_flags.patch | 26 + package/ppp/patches/206-radius_config.patch | 39 + .../ppp/patches/208-no_exponential_timeout.patch | 28 + .../ppp/patches/209-compensate_time_change.patch | 82 + package/ppp/patches/320-use_target_ar.patch | 24 + package/ppp/utils/pfc.c | 51 + package/pptp/Config.in | 11 + package/pptp/Makefile | 30 + package/pptp/files/ifup.pptp | 45 + package/pptp/files/options.pptp | 6 + package/pptp/ipkg/pptp.conffiles | 1 + package/pptp/ipkg/pptp.control | 5 + package/pptpd/Config.in | 11 + package/pptpd/Makefile | 36 + package/pptpd/files/options.pptpd | 23 + package/pptpd/files/pptpd.conf | 5 + package/pptpd/files/pptpd.init | 28 + package/pptpd/ipkg/pptpd.conffiles | 2 + package/pptpd/ipkg/pptpd.control | 5 + package/pptpd/ipkg/pptpd.postinst | 3 + package/pptpd/patches/bad-pqueue-debug.patch | 20 + package/pptpd/patches/patch-ctrlpacket_c | 15 + .../pptpd/patches/pptpgre-use-debug-option.patch | 35 + package/privoxy/Config.in | 17 + package/privoxy/Makefile | 35 + package/privoxy/extra/config.h.in | 664 + package/privoxy/extra/configure | 11272 ++++++ package/privoxy/ipkg/privoxy.control | 5 + package/privoxy/patches/patch-GNUmakefile_in | 153 + package/privoxy/patches/patch-configure_in | 12 + package/procmail/Config.in | 11 + package/procmail/Makefile | 27 + package/procmail/extra/Makefile.new | 19 + package/procmail/ipkg/procmail.control | 4 + package/procmail/patches/patch-autoconf_h | 29 + package/procps/Config.in | 17 + package/procps/Makefile | 43 + package/procps/ipkg/procps.control | 4 + package/procps/killall | 25 + package/procps/patches/patch-Makefile | 63 + package/procps/patches/patch-proc_module_mk | 33 + package/procps/patches/patch-ps_module_mk | 16 + package/procps/patches/patch-sysctl_c | 21 + package/ptunnel/Config.in | 14 + package/ptunnel/Makefile | 29 + package/ptunnel/ipkg/ptunnel.control | 5 + package/quagga/Config.in | 69 + package/quagga/Makefile | 66 + package/quagga/files/quagga.init | 327 + package/quagga/ipkg/quagga-bgpd.control | 6 + package/quagga/ipkg/quagga-ospf6d.control | 6 + package/quagga/ipkg/quagga-ospfd.control | 6 + package/quagga/ipkg/quagga-ripd.control | 6 + package/quagga/ipkg/quagga-ripngd.control | 6 + package/quagga/ipkg/quagga-vtysh.control | 6 + package/quagga/ipkg/quagga.control | 6 + package/quagga/ipkg/quagga.postinst | 16 + package/raddump/Config.in | 11 + package/raddump/Makefile | 27 + package/raddump/ipkg/raddump.control | 6 + package/radiusclient-ng/Config.in | 27 + package/radiusclient-ng/Makefile | 33 + .../ipkg/libradiusclient-ng.control | 4 + .../radiusclient-ng/ipkg/radiusclient-ng.control | 5 + .../radiusclient-ng/patches/01-cross_compile.patch | 13 + package/radvd/Config.in | 11 + package/radvd/Makefile | 43 + package/radvd/files/radvd.conf | 22 + package/radvd/files/radvd.init | 29 + package/radvd/ipkg/radvd.conffiles | 1 + package/radvd/ipkg/radvd.control | 5 + package/radvd/ipkg/radvd.postinst | 3 + package/radvd/patches/no-libfl.patch | 12 + package/randrproto/Config.in | 6 + package/randrproto/Makefile | 20 + package/rarpd/Config.in | 14 + package/rarpd/Makefile | 36 + package/rarpd/files/rarpd.init | 25 + package/rarpd/ipkg/rarpd.control | 5 + package/rarpd/ipkg/rarpd.postinst | 4 + package/rdate/Config.in | 7 + package/rdate/Makefile | 32 + package/rdate/ipkg/rdate.control | 4 + package/rdate/ipkg/rdate.postinst | 4 + package/rdate/rdate.init | 21 + package/rdate/rdate.ip-up | 4 + package/readline/Config.in | 21 + package/readline/Makefile | 29 + package/readline/ipkg/libreadline.control | 5 + package/reaim/Config.in | 9 + package/reaim/Makefile | 28 + package/reaim/files/reaim.init | 33 + package/reaim/ipkg/reaim.control | 5 + package/reaim/ipkg/reaim.postinst | 4 + .../reaim/patches/501-cross_compile-install.patch | 16 + package/renderproto/Config.in | 6 + package/renderproto/Makefile | 20 + package/resourceproto/Config.in | 6 + package/resourceproto/Makefile | 20 + package/rp-pppoe/Config.in | 50 + package/rp-pppoe/Makefile | 60 + package/rp-pppoe/files/pppoe-client.init | 26 + package/rp-pppoe/files/pppoe-relay.init | 26 + package/rp-pppoe/files/pppoe-server.init | 26 + package/rp-pppoe/ipkg/pppoe-client.conffiles | 1 + package/rp-pppoe/ipkg/pppoe-client.control | 5 + package/rp-pppoe/ipkg/pppoe-client.postinst | 3 + package/rp-pppoe/ipkg/pppoe-relay.control | 4 + package/rp-pppoe/ipkg/pppoe-relay.postinst | 5 + package/rp-pppoe/ipkg/pppoe-server.conffiles | 1 + package/rp-pppoe/ipkg/pppoe-server.control | 5 + package/rp-pppoe/ipkg/pppoe-sniff.control | 4 + package/rp-pppoe/ipkg/rules | 169 + package/rp-pppoe/ipkg/version | 1 + package/rp-pppoe/patches/patch-src_configure | 12 + package/rrdcollect/Config.in | 33 + package/rrdcollect/Makefile | 49 + package/rrdcollect/files/rrd.conf | 381 + package/rrdcollect/files/rrd.sh | 288 + package/rrdcollect/files/rrdcollect.conf | 33 + package/rrdcollect/files/rrdcollect.init | 34 + .../rrdcollect/ipkg/rrdcollect-example.conffiles | 2 + package/rrdcollect/ipkg/rrdcollect-example.control | 10 + package/rrdcollect/ipkg/rrdcollect.control | 5 + package/rrdcollect/ipkg/rrdcollect.postinst | 3 + package/rrdcollect/patches/rrdcollect-scan.patch | 66 + package/rrdtool/Config.in | 66 + package/rrdtool/Makefile | 46 + package/rrdtool/ipkg/librrd.control | 14 + package/rrdtool/ipkg/rrdcgi.control | 15 + package/rrdtool/ipkg/rrdtool.control | 14 + package/rrdtool/patches/patch-configure | 21 + package/rrs/Config.in | 48 + package/rrs/Makefile | 67 + package/rrs/ipkg/rrs-nossl.control | 5 + package/rrs/ipkg/rrs.control | 5 + package/rrs/patches/rrs-1.70-shell.patch | 12 + package/rsync/Config.in | 10 + package/rsync/Makefile | 26 + package/rsync/ipkg/rsync.control | 5 + package/rtorrent/Config.in | 11 + package/rtorrent/Makefile | 27 + package/rtorrent/ipkg/rtorrent.control | 5 + package/rtorrent/patches/patch-configure_ac | 11 + package/rtorrent/patches/patch-rak_functional_h | 12 + package/rtorrent/patches/patch-src_command_ui_cc | 12 + .../patch-src_display_text_element_value_cc | 12 + package/rtorrent/patches/patch-src_rpc_parse_cc | 11 + package/ruby/Config.in | 7 + package/ruby/Makefile | 38 + package/ruby/ipkg/ruby.control | 4 + package/ruby/patches/100-makefile-in.patch | 11 + package/ruby/patches/patch-lib_fileutils_rb | 12 + package/samba/Config.in | 62 + package/samba/Makefile | 69 + package/samba/files/samba.init | 29 + package/samba/files/smb.conf | 17 + package/samba/ipkg/samba-client.control | 4 + package/samba/ipkg/samba-passwd.control | 4 + package/samba/ipkg/samba.conffiles | 1 + package/samba/ipkg/samba.control | 5 + package/samba/ipkg/samba.postinst | 3 + package/samba/ipkg/swat.control | 5 + package/samba/ipkg/swat.postinst | 6 + package/samba/patches/patch-source_client_mtab_c | 11 + package/samba/patches/patch-source_configure | 198 + .../patches/patch-source_registry_reg_perfcount_c | 21 + package/sane-backends/Config.in | 654 + package/sane-backends/Makefile | 170 + .../ipkg/sane-backend-abaton.conffiles | 1 + .../sane-backends/ipkg/sane-backend-abaton.control | 5 + .../ipkg/sane-backend-abaton.postinst | 2 + .../ipkg/sane-backend-agfafocus.conffiles | 1 + .../ipkg/sane-backend-agfafocus.control | 5 + .../ipkg/sane-backend-agfafocus.postinst | 2 + .../ipkg/sane-backend-apple.conffiles | 1 + .../sane-backends/ipkg/sane-backend-apple.control | 5 + .../sane-backends/ipkg/sane-backend-apple.postinst | 2 + .../ipkg/sane-backend-artec-eplus48u.conffiles | 1 + .../ipkg/sane-backend-artec-eplus48u.control | 5 + .../ipkg/sane-backend-artec-eplus48u.postinst | 2 + .../ipkg/sane-backend-artec.conffiles | 1 + .../sane-backends/ipkg/sane-backend-artec.control | 5 + .../sane-backends/ipkg/sane-backend-artec.postinst | 2 + .../sane-backends/ipkg/sane-backend-as6e.control | 5 + .../sane-backends/ipkg/sane-backend-as6e.postinst | 2 + .../ipkg/sane-backend-avision.conffiles | 1 + .../ipkg/sane-backend-avision.control | 5 + .../ipkg/sane-backend-avision.postinst | 2 + .../sane-backends/ipkg/sane-backend-bh.conffiles | 1 + package/sane-backends/ipkg/sane-backend-bh.control | 5 + .../sane-backends/ipkg/sane-backend-bh.postinst | 2 + .../ipkg/sane-backend-canon.conffiles | 1 + .../sane-backends/ipkg/sane-backend-canon.control | 5 + .../sane-backends/ipkg/sane-backend-canon.postinst | 2 + .../ipkg/sane-backend-canon630u.conffiles | 1 + .../ipkg/sane-backend-canon630u.control | 5 + .../ipkg/sane-backend-canon630u.postinst | 2 + .../ipkg/sane-backend-coolscan.conffiles | 1 + .../ipkg/sane-backend-coolscan.control | 5 + .../ipkg/sane-backend-coolscan.postinst | 2 + .../ipkg/sane-backend-coolscan2.conffiles | 1 + .../ipkg/sane-backend-coolscan2.control | 5 + .../ipkg/sane-backend-coolscan2.postinst | 2 + .../sane-backends/ipkg/sane-backend-dc25.conffiles | 1 + .../sane-backends/ipkg/sane-backend-dc25.control | 5 + .../sane-backends/ipkg/sane-backend-dc25.postinst | 2 + .../sane-backends/ipkg/sane-backend-dmc.conffiles | 1 + .../sane-backends/ipkg/sane-backend-dmc.control | 5 + .../sane-backends/ipkg/sane-backend-dmc.postinst | 2 + .../ipkg/sane-backend-epson.conffiles | 1 + .../sane-backends/ipkg/sane-backend-epson.control | 5 + .../sane-backends/ipkg/sane-backend-epson.postinst | 2 + .../ipkg/sane-backend-fujitsu.conffiles | 1 + .../ipkg/sane-backend-fujitsu.control | 5 + .../ipkg/sane-backend-fujitsu.postinst | 2 + .../ipkg/sane-backend-genesys.conffiles | 1 + .../ipkg/sane-backend-genesys.control | 5 + .../ipkg/sane-backend-genesys.postinst | 2 + .../ipkg/sane-backend-gt68xx.conffiles | 1 + .../sane-backends/ipkg/sane-backend-gt68xx.control | 5 + .../ipkg/sane-backend-gt68xx.postinst | 2 + .../sane-backends/ipkg/sane-backend-hp.conffiles | 1 + package/sane-backends/ipkg/sane-backend-hp.control | 5 + .../sane-backends/ipkg/sane-backend-hp.postinst | 2 + .../sane-backends/ipkg/sane-backend-hp3500.control | 5 + .../ipkg/sane-backend-hp3500.postinst | 2 + .../ipkg/sane-backend-hp4200.conffiles | 1 + .../sane-backends/ipkg/sane-backend-hp4200.control | 5 + .../ipkg/sane-backend-hp4200.postinst | 2 + .../ipkg/sane-backend-hp5400.conffiles | 1 + .../sane-backends/ipkg/sane-backend-hp5400.control | 5 + .../ipkg/sane-backend-hp5400.postinst | 2 + .../sane-backends/ipkg/sane-backend-ibm.conffiles | 1 + .../sane-backends/ipkg/sane-backend-ibm.control | 5 + .../sane-backends/ipkg/sane-backend-ibm.postinst | 2 + .../sane-backends/ipkg/sane-backend-leo.conffiles | 1 + .../sane-backends/ipkg/sane-backend-leo.control | 5 + .../sane-backends/ipkg/sane-backend-leo.postinst | 2 + .../ipkg/sane-backend-lexmark.conffiles | 1 + .../ipkg/sane-backend-lexmark.control | 5 + .../ipkg/sane-backend-lexmark.postinst | 2 + .../ipkg/sane-backend-ma1509.conffiles | 1 + .../sane-backends/ipkg/sane-backend-ma1509.control | 5 + .../ipkg/sane-backend-ma1509.postinst | 2 + .../ipkg/sane-backend-matsushita.conffiles | 1 + .../ipkg/sane-backend-matsushita.control | 5 + .../ipkg/sane-backend-matsushita.postinst | 2 + .../ipkg/sane-backend-microtek.conffiles | 1 + .../ipkg/sane-backend-microtek.control | 5 + .../ipkg/sane-backend-microtek.postinst | 2 + .../ipkg/sane-backend-microtek2.conffiles | 1 + .../ipkg/sane-backend-microtek2.control | 5 + .../ipkg/sane-backend-microtek2.postinst | 2 + .../ipkg/sane-backend-mustek-usb.conffiles | 1 + .../ipkg/sane-backend-mustek-usb.control | 5 + .../ipkg/sane-backend-mustek-usb.postinst | 2 + .../ipkg/sane-backend-mustek-usb2.control | 5 + .../ipkg/sane-backend-mustek-usb2.postinst | 2 + .../ipkg/sane-backend-mustek.conffiles | 1 + .../sane-backends/ipkg/sane-backend-mustek.control | 5 + .../ipkg/sane-backend-mustek.postinst | 2 + .../sane-backends/ipkg/sane-backend-nec.conffiles | 1 + .../sane-backends/ipkg/sane-backend-nec.control | 5 + .../sane-backends/ipkg/sane-backend-nec.postinst | 2 + .../sane-backends/ipkg/sane-backend-net.conffiles | 1 + .../sane-backends/ipkg/sane-backend-net.control | 5 + .../sane-backends/ipkg/sane-backend-net.postinst | 2 + .../sane-backends/ipkg/sane-backend-niash.control | 5 + .../sane-backends/ipkg/sane-backend-niash.postinst | 2 + .../sane-backends/ipkg/sane-backend-pie.conffiles | 1 + .../sane-backends/ipkg/sane-backend-pie.control | 5 + .../sane-backends/ipkg/sane-backend-pie.postinst | 2 + .../sane-backends/ipkg/sane-backend-pixma.control | 5 + .../sane-backends/ipkg/sane-backend-pixma.postinst | 2 + .../ipkg/sane-backend-plustek-pp.conffiles | 1 + .../ipkg/sane-backend-plustek-pp.control | 5 + .../ipkg/sane-backend-plustek-pp.postinst | 2 + .../ipkg/sane-backend-plustek.conffiles | 1 + .../ipkg/sane-backend-plustek.control | 5 + .../ipkg/sane-backend-plustek.postinst | 2 + .../sane-backends/ipkg/sane-backend-qcam.conffiles | 1 + .../sane-backends/ipkg/sane-backend-qcam.control | 5 + .../sane-backends/ipkg/sane-backend-qcam.postinst | 2 + .../ipkg/sane-backend-ricoh.conffiles | 1 + .../sane-backends/ipkg/sane-backend-ricoh.control | 5 + .../sane-backends/ipkg/sane-backend-ricoh.postinst | 2 + .../ipkg/sane-backend-s9036.conffiles | 1 + .../sane-backends/ipkg/sane-backend-s9036.control | 5 + .../sane-backends/ipkg/sane-backend-s9036.postinst | 2 + .../ipkg/sane-backend-sceptre.conffiles | 1 + .../ipkg/sane-backend-sceptre.control | 5 + .../ipkg/sane-backend-sceptre.postinst | 2 + .../ipkg/sane-backend-sharp.conffiles | 1 + .../sane-backends/ipkg/sane-backend-sharp.control | 5 + .../sane-backends/ipkg/sane-backend-sharp.postinst | 2 + .../sane-backends/ipkg/sane-backend-sm3600.control | 5 + .../ipkg/sane-backend-sm3600.postinst | 2 + .../ipkg/sane-backend-sm3840.conffiles | 1 + .../sane-backends/ipkg/sane-backend-sm3840.control | 5 + .../ipkg/sane-backend-sm3840.postinst | 2 + .../ipkg/sane-backend-snapscan.conffiles | 1 + .../ipkg/sane-backend-snapscan.control | 5 + .../ipkg/sane-backend-snapscan.postinst | 2 + .../ipkg/sane-backend-sp15c.conffiles | 1 + .../sane-backends/ipkg/sane-backend-sp15c.control | 5 + .../sane-backends/ipkg/sane-backend-sp15c.postinst | 2 + .../ipkg/sane-backend-st400.conffiles | 1 + .../sane-backends/ipkg/sane-backend-st400.control | 5 + .../sane-backends/ipkg/sane-backend-st400.postinst | 2 + .../ipkg/sane-backend-stv680.conffiles | 1 + .../sane-backends/ipkg/sane-backend-stv680.control | 5 + .../ipkg/sane-backend-stv680.postinst | 2 + .../ipkg/sane-backend-tamarack.conffiles | 1 + .../ipkg/sane-backend-tamarack.control | 5 + .../ipkg/sane-backend-tamarack.postinst | 2 + .../ipkg/sane-backend-teco1.conffiles | 1 + .../sane-backends/ipkg/sane-backend-teco1.control | 5 + .../sane-backends/ipkg/sane-backend-teco1.postinst | 2 + .../ipkg/sane-backend-teco2.conffiles | 1 + .../sane-backends/ipkg/sane-backend-teco2.control | 5 + .../sane-backends/ipkg/sane-backend-teco2.postinst | 2 + .../ipkg/sane-backend-teco3.conffiles | 1 + .../sane-backends/ipkg/sane-backend-teco3.control | 5 + .../sane-backends/ipkg/sane-backend-teco3.postinst | 2 + .../sane-backends/ipkg/sane-backend-test.conffiles | 1 + .../sane-backends/ipkg/sane-backend-test.control | 5 + .../sane-backends/ipkg/sane-backend-test.postinst | 2 + .../sane-backends/ipkg/sane-backend-u12.conffiles | 1 + .../sane-backends/ipkg/sane-backend-u12.control | 5 + .../sane-backends/ipkg/sane-backend-u12.postinst | 2 + .../ipkg/sane-backend-umax-pp.conffiles | 1 + .../ipkg/sane-backend-umax-pp.control | 5 + .../ipkg/sane-backend-umax-pp.postinst | 2 + .../sane-backends/ipkg/sane-backend-umax.conffiles | 1 + .../sane-backends/ipkg/sane-backend-umax.control | 5 + .../sane-backends/ipkg/sane-backend-umax.postinst | 2 + .../ipkg/sane-backend-umax1220u.conffiles | 1 + .../ipkg/sane-backend-umax1220u.control | 5 + .../ipkg/sane-backend-umax1220u.postinst | 2 + .../sane-backends/ipkg/sane-backend-v4l.conffiles | 1 + .../sane-backends/ipkg/sane-backend-v4l.control | 5 + .../sane-backends/ipkg/sane-backend-v4l.postinst | 2 + package/sane-backends/ipkg/sane-backends.conffiles | 2 + package/sane-backends/ipkg/sane-backends.control | 5 + package/sane-backends/patches/patch-Makefile_in | 12 + .../sane-backends/patches/patch-backend_microtek_c | 11 + .../patches/patch-backend_pixma_bjnp_c | 22 + .../patches/patch-backend_pixma_common_h | 13 + .../patches/patch-backend_pixma_imageclass_c | 12 + .../patches/patch-backend_sm3600-scanutil_c | 11 + .../patches/patch-backend_umax1220u-common_c | 12 + package/scanlogd/Config.in | 14 + package/scanlogd/Makefile | 39 + package/scanlogd/files/scanlogd.init | 26 + package/scanlogd/ipkg/scanlogd.control | 5 + package/scanlogd/ipkg/scanlogd.postinst | 36 + package/scdp/Config.in | 12 + package/scdp/Makefile | 27 + package/scdp/ipkg/scdp.control | 5 + package/screen/Config.in | 11 + package/screen/Makefile | 27 + package/screen/ipkg/screen.control | 5 + package/screen/patches/patch-Makefile | 336 + package/screen/patches/patch-ansi_c | 32 + package/screen/patches/patch-attacher_c | 15 + package/screen/patches/patch-configure | 490 + package/screen/patches/patch-fileio_c | 39 + package/screen/patches/patch-help_c | 15 + package/screen/patches/patch-process_c | 39 + package/screen/patches/patch-pty_c | 16 + package/screen/patches/patch-sched_h | 21 + package/screen/patches/patch-screen_c | 30 + package/screen/patches/patch-termcap_c | 12 + package/screen/patches/patch-tty_sh | 21 + package/screen/patches/patch-utmp_c | 12 + package/screen/patches/patch-window_c | 33 + package/scrnsaverproto/Config.in | 6 + package/scrnsaverproto/Makefile | 20 + package/scsi-spin/Config.in | 9 + package/scsi-spin/Makefile | 27 + package/scsi-spin/files/scsi-spin.c | 420 + package/scsi-spin/ipkg/scsi-spin.control | 4 + package/ser2net/Config.in | 10 + package/ser2net/Makefile | 28 + package/ser2net/ipkg/ser2net.conffiles | 1 + package/ser2net/ipkg/ser2net.control | 5 + package/serdisplib/Config.in | 10 + package/serdisplib/Makefile | 28 + package/serdisplib/ipkg/serdisplib.control | 4 + package/serdisplib/patches/patch-Makefile_in | 12 + package/serdisplib/patches/patch-configure | 22 + package/serdisplib/patches/patch-src_Makefile_in | 12 + package/setpwc/Config.in | 9 + package/setpwc/Makefile | 26 + package/setpwc/ipkg/setpwc.control | 4 + package/setserial/Config.in | 13 + package/setserial/Makefile | 25 + package/setserial/ipkg/setserial.control | 4 + package/shat/Config.in | 10 + package/shat/Makefile | 27 + package/shat/ipkg/shat.control | 4 + package/shorewall-common/Config.in | 40 + package/shorewall-common/Makefile | 58 + package/shorewall-common/files/downstrip | 7 + package/shorewall-common/files/shorewall.init | 33 + .../ipkg/shorewall-common.conffiles | 33 + .../shorewall-common/ipkg/shorewall-common.control | 5 + .../ipkg/shorewall-common.postinst | 6 + .../shorewall-common/ipkg/shorewall-common.prerm | 8 + package/shorewall-common/patches/patch-install_sh | 98 + .../shorewall-common/patches/patch-shorewall_conf | 12 + package/shorewall-shell/Config.in | 8 + package/shorewall-shell/Makefile | 35 + package/shorewall-shell/files/downstrip | 7 + .../shorewall-shell/ipkg/shorewall-shell.control | 5 + package/siproxd/Config.in | 12 + package/siproxd/Makefile | 31 + package/siproxd/files/siproxd.init | 25 + package/siproxd/ipkg/siproxd.conffiles | 2 + package/siproxd/ipkg/siproxd.control | 5 + package/siproxd/ipkg/siproxd.postinst | 3 + package/siproxd/patches/patch-configure | 18 + package/sipsak/Config.in | 12 + package/sipsak/Makefile | 29 + package/sipsak/ipkg/sipsak.control | 5 + package/sispmctl/Config.in | 9 + package/sispmctl/Makefile | 26 + package/sispmctl/ipkg/sispmctl.control | 5 + package/slurm/Config.in | 15 + package/slurm/Makefile | 30 + package/slurm/ipkg/slurm.control | 6 + package/slurm/patches/no_host_ncurses.patch | 67 + package/snort-wireless/Config.in | 17 + package/snort-wireless/Makefile | 49 + package/snort-wireless/files/snort-wireless.init | 27 + .../snort-wireless/ipkg/snort-wireless.conffiles | 2 + package/snort-wireless/ipkg/snort-wireless.control | 6 + .../snort-wireless/ipkg/snort-wireless.postinst | 4 + .../patches/500-no-config-search.patch | 35 + .../patches/750-lightweight-config.patch | 178 + package/snort/Config.in | 18 + package/snort/Makefile | 48 + package/snort/files/snort.init | 21 + package/snort/ipkg/snort.conffiles | 2 + package/snort/ipkg/snort.control | 6 + package/snort/ipkg/snort.postinst | 4 + package/socat/Config.in | 18 + package/socat/Makefile | 32 + package/socat/ipkg/socat.control | 11 + package/socat/patches/501-honor_ldflags.patch | 13 + package/speex/Config.in | 24 + package/speex/Makefile | 28 + package/speex/ipkg/libspeex.control | 4 + package/sqlite/Config.in | 75 + package/sqlite/Makefile | 37 + package/sqlite/ipkg/libsqlite.control | 4 + package/sqlite/ipkg/sqlite-cli.control | 5 + package/squid/Config.in | 93 + package/squid/Makefile | 173 + .../ipkg/squid-mod-basic-auth-getpwnam.control | 5 + .../squid/ipkg/squid-mod-basic-auth-ncsa.control | 5 + .../squid/ipkg/squid-mod-basic-auth-smb.control | 5 + .../ipkg/squid-mod-basic-auth-winbind.control | 5 + .../ipkg/squid-mod-digest-auth-password.control | 5 + .../ipkg/squid-mod-external-acl-ip-user.control | 5 + .../ipkg/squid-mod-external-acl-unix-group.control | 5 + .../squid-mod-external-acl-winbind-group.control | 5 + .../ipkg/squid-mod-ntlm-auth-fakeauth.control | 5 + .../ipkg/squid-mod-ntlm-auth-smb-auth.control | 5 + .../ipkg/squid-mod-ntlm-auth-winbind-auth.control | 5 + package/squid/ipkg/squid.conffiles | 2 + package/squid/ipkg/squid.control | 5 + package/squid/patches/patch-configure | 20 + package/squid/patches/patch-include_config_h | 48 + package/squid/patches/patch-lib_util_c | 22 + package/squid/patches/patch-src_Makefile_in | 19 + package/srelay/Config.in | 9 + package/srelay/Makefile | 30 + package/srelay/files/srelay.conf | 2 + package/srelay/files/srelay.init | 26 + package/srelay/ipkg/srelay.conffiles | 1 + package/srelay/ipkg/srelay.control | 4 + package/srelay/ipkg/srelay.postinst | 4 + package/srelay/patches/01-cross_compile.patch | 12 + package/ssltunnel/Config.in | 11 + package/ssltunnel/Makefile | 30 + package/ssltunnel/ipkg/ssltunnel.control | 5 + package/ssltunnel/patches/patch-client_ntlmauth_c | 11 + package/ssmtp/Config.in | 13 + package/ssmtp/Makefile | 30 + package/ssmtp/ipkg/ssmtp.conffiles | 2 + package/ssmtp/ipkg/ssmtp.control | 4 + .../ssmtp/patches/500-debian-subset-2.61-2.patch | 248 + .../ssmtp/patches/901-strftime_space_padding.patch | 12 + package/strace/Config.in | 11 + package/strace/Makefile | 26 + package/strace/ipkg/strace.control | 4 + package/strace/patches/patch-config_h_in | 15 + package/strace/patches/patch-configure | 26 + package/strace/patches/patch-configure_ac | 18 + package/strace/patches/patch-process_c | 109 + package/strace/patches/patch-signal_c | 42 + package/strace/patches/patch-syscall_c | 81 + package/strace/patches/patch-util_c | 53 + package/stress/Config.in | 12 + package/stress/Makefile | 26 + package/stress/ipkg/stress.control | 4 + package/strongswan/Config.in | 10 + package/strongswan/Makefile | 28 + package/strongswan/files/strongswan.init | 26 + package/strongswan/ipkg/strongswan.control | 5 + package/subversion/Config.in | 23 + package/subversion/Makefile | 61 + package/subversion/files/svnserve.init | 36 + package/subversion/ipkg/subversion.control | 4 + package/subversion/ipkg/subversion.postinst | 4 + package/swconfig/Config.in | 8 + package/swconfig/Makefile | 30 + package/swconfig/ipkg/swconfig.control | 4 + package/swconfig/src/Makefile | 12 + package/swconfig/src/cli.c | 255 + package/swconfig/src/swlib.c | 614 + package/swconfig/src/swlib.h | 213 + package/syslog-ng/Config.in | 32 + package/syslog-ng/Makefile | 34 + package/syslog-ng/files/syslog-ng.conf | 16 + package/syslog-ng/files/syslog-ng.init | 30 + package/syslog-ng/ipkg/syslog-ng.conffiles | 1 + package/syslog-ng/ipkg/syslog-ng.control | 5 + package/syslog-ng/ipkg/syslog-ng.postinst | 3 + package/syslog-ng/patches/patch-Makefile_in | 12 + package/syslog-ng/patches/patch-configure | 21 + package/syslog-ng/patches/patch-src_Makefile_in | 12 + package/syslog-ng/patches/patch-src_cfg-lex_c | 14 + package/sysstat/Config.in | 11 + package/sysstat/Makefile | 35 + package/sysstat/files/CONFIG | 45 + package/sysstat/ipkg/sysstat.control | 4 + package/sysstat/patches/patch-Makefile | 79 + package/tar/Config.in | 8 + package/tar/Makefile | 28 + package/tar/ipkg/tar.control | 4 + package/tcl/Config.in | 8 + package/tcl/Makefile | 38 + package/tcl/ipkg/tcl.control | 4 + package/tcp_wrappers/Config.in | 15 + package/tcp_wrappers/Makefile | 43 + package/tcp_wrappers/ipkg/libwrap.control | 4 + package/tcp_wrappers/patches/debian-subset.patch | 936 + package/tcp_wrappers/patches/opt_cflags.patch | 12 + package/tcpdump/Config.in | 10 + package/tcpdump/Makefile | 34 + package/tcpdump/ipkg/tcpdump.control | 5 + package/tcpdump/patches/patch-print-enc_c | 19 + package/tinc/Config.in | 13 + package/tinc/Makefile | 31 + package/tinc/ipkg/tinc.control | 5 + package/tinc/patches/patch-src_linux_device_c | 21 + package/tinc/patches/patch-src_net_setup_c | 20 + package/tinyproxy/Config.in | 30 + package/tinyproxy/Makefile | 44 + package/tinyproxy/files/tinyproxy.init | 26 + package/tinyproxy/ipkg/tinyproxy.control | 5 + package/tinyproxy/ipkg/tinyproxy.postinst | 3 + package/tmsnc/Config.in | 7 + package/tmsnc/Makefile | 31 + package/tmsnc/ipkg/tmsnc.control | 8 + package/tntnet/Config.in | 37 + package/tntnet/Makefile | 67 + package/tntnet/files/mime.conf | 22 + package/tntnet/files/tntnet.conf | 49 + package/tntnet/files/tntnet.properties | 31 + package/tntnet/ipkg/tntnet.conffiles | 3 + package/tntnet/ipkg/tntnet.control | 4 + package/tntnet/ipkg/tntnet.postinst | 6 + package/tor/Config.in | 18 + package/tor/Makefile | 41 + package/tor/files/tor.init | 27 + package/tor/files/torrc | 136 + package/tor/ipkg/tor.conffiles | 1 + package/tor/ipkg/tor.control | 5 + package/tor/ipkg/tor.postinst | 24 + package/tor/patches/patch-configure | 12 + package/tor/patches/patch-src_common_util_h | 12 + package/trafshow/Config.in | 9 + package/trafshow/Makefile | 30 + package/trafshow/ipkg/trafshow.control | 5 + package/trafshow/patches/patch-domain_resolver_c | 680 + package/ttcp/Config.in | 7 + package/ttcp/Makefile | 26 + package/ttcp/ipkg/ttcp.control | 4 + package/ttcp/ttcp.c | 2374 ++ package/uclibc++/Config.in | 8 + package/uclibc++/Makefile | 36 + package/uclibc++/files/config | 57 + package/uclibc++/files/config.mips | 57 + package/uclibc++/files/config.x86 | 57 + package/uclibc++/ipkg/uclibc++.control | 4 + package/uclibc++/patches/patch-bin_Makefile | 12 + package/uclibc++/patches/patch-fstream_eof | 15 + package/uclibc++/patches/patch-include_locale | 19 + package/uclibc++/patches/patch-include_string | 17 + package/uclibc++/patches/patch-src_string_cpp | 17 + package/uclibc/Config.in | 9 + package/uclibc/Makefile | 38 + package/uclibc/ipkg/uclibc.conffiles | 1 + package/uclibc/ipkg/uclibc.control | 4 + package/udev/Config.in | 11 + package/udev/Makefile | 48 + package/udev/ipkg/udev.conffiles | 1 + package/udev/ipkg/udev.control | 4 + package/udev/patches/01-no_debug.patch | 21 + package/udp-broadcast-relay/Config.in | 12 + package/udp-broadcast-relay/Makefile | 26 + .../ipkg/udp-broadcast-relay.control | 4 + package/udp-broadcast-relay/patches/patch-main_c | 32 + package/ulogd/Config.in | 48 + package/ulogd/Makefile | 92 + package/ulogd/files/ulogd.init | 22 + package/ulogd/ipkg/ulogd-mod-extra.control | 5 + package/ulogd/ipkg/ulogd-mod-mysql.control | 5 + package/ulogd/ipkg/ulogd-mod-pcap.control | 5 + package/ulogd/ipkg/ulogd-mod-pgsql.control | 5 + package/ulogd/ipkg/ulogd-mod-sqlite.control | 5 + package/ulogd/ipkg/ulogd.conffiles | 1 + package/ulogd/ipkg/ulogd.control | 4 + package/ulogd/ipkg/ulogd.postinst | 3 + package/ulogd/patches/patch-Rules_make_in | 12 + package/ulogd/patches/patch-libipulog_Makefile_in | 12 + package/ulogd/patches/patch-mysql_Makefile_in | 12 + package/updatedd/Config.in | 67 + package/updatedd/Makefile | 52 + .../updatedd/ipkg/updatedd-mod-changeip.control | 4 + package/updatedd/ipkg/updatedd-mod-dyndns.control | 4 + .../updatedd/ipkg/updatedd-mod-eurodyndns.control | 4 + package/updatedd/ipkg/updatedd-mod-hn.control | 4 + package/updatedd/ipkg/updatedd-mod-noip.control | 4 + package/updatedd/ipkg/updatedd-mod-ods.control | 4 + package/updatedd/ipkg/updatedd-mod-ovh.control | 4 + package/updatedd/ipkg/updatedd-mod-regfish.control | 4 + package/updatedd/ipkg/updatedd-mod-tzo.control | 4 + package/updatedd/ipkg/updatedd.control | 4 + package/usbutils/Config.in | 15 + package/usbutils/Makefile | 29 + package/usbutils/ipkg/lsusb.control | 5 + package/ussp-push/Config.in | 9 + package/ussp-push/Makefile | 29 + package/ussp-push/ipkg/ussp-push.control | 5 + package/ussp-push/patches/patch-src_obex_socket_c | 21 + package/ustl/Config.in | 13 + package/ustl/Makefile | 33 + package/ustl/files/Common.mk | 74 + package/ustl/files/config.h | 286 + package/ustl/ipkg/ustl.control | 4 + package/ustl/patches/01-install-DESTDIR.patch | 56 + package/ustl/patches/02-install_path.patch | 12 + package/util-linux/Config.in | 38 + package/util-linux/Makefile | 40 + package/util-linux/ipkg/fdisk.control | 5 + package/util-linux/ipkg/losetup.control | 5 + package/util-linux/ipkg/swap-utils.control | 5 + package/util-linux/patches/patch-MCONFIG | 69 + .../patches/patch-disk-utils_fsck_cramfs_c | 11 + package/util-linux/patches/patch-fdisk_cfdisk_c | 12 + .../util-linux/patches/patch-fdisk_fdiskbsdlabel_c | 54 + package/util-linux/patches/patch-fdisk_llseek_c | 11 + package/util-linux/patches/patch-fdisk_sfdisk_c | 68 + .../util-linux/patches/patch-fdisk_sfdisk_c.orig | 12 + .../util-linux/patches/patch-misc-utils_logger_c | 12 + .../util-linux/patches/patch-misc-utils_namei_c | 12 + .../util-linux/patches/patch-misc-utils_whereis_c | 20 + package/util-linux/patches/patch-mount_mntent_c | 30 + .../patches/patch-mount_mount_by_label_c | 12 + package/util-linux/patches/patch-mount_mount_c | 17 + package/util-linux/patches/patch-mount_sundries_c | 12 + package/util-linux/patches/patch-mount_umount_c | 12 + .../util-linux/patches/patch-text-utils_colcrt_c | 14 + .../util-linux/patches/patch-text-utils_display_c | 12 + .../util-linux/patches/patch-text-utils_parse_c | 34 + package/valgrind/Config.in | 6 + package/valgrind/Makefile | 33 + package/valgrind/ipkg/valgrind.control | 4 + package/vgp/Config.in | 12 + package/vgp/Makefile | 26 + package/vgp/ipkg/vgp.control | 5 + package/videoproto/Config.in | 6 + package/videoproto/Makefile | 20 + package/vilistextum/Config.in | 23 + package/vilistextum/Makefile | 29 + package/vilistextum/ipkg/vilistextum.control | 4 + .../vilistextum/patches/patch-tests_check_entities | 8 + package/vilistextum/patches/patch-tests_check_tags | 8 + package/vim/Config.in | 11 + package/vim/Makefile | 64 + package/vim/ipkg/vim.control | 5 + package/vnc-reflector/Config.in | 14 + package/vnc-reflector/Makefile | 30 + package/vnc-reflector/ipkg/vnc-reflector.control | 5 + package/vnstat/Config.in | 11 + package/vnstat/Makefile | 27 + package/vnstat/ipkg/vnstat.control | 4 + package/vpnc/Config.in | 9 + package/vpnc/Makefile | 36 + package/vpnc/files/vpnc-route | 30 + package/vpnc/files/vpnc-script | 118 + package/vpnc/files/vpnc.conf | 8 + package/vpnc/ipkg/vpnc.conffiles | 4 + package/vpnc/ipkg/vpnc.control | 6 + package/vpnc/patches/patch-Makefile | 51 + package/vpnc/patches/patch-config_c | 12 + package/vrrpd/Config.in | 13 + package/vrrpd/Makefile | 32 + package/vrrpd/files/vrrpd.init | 25 + package/vrrpd/ipkg/vrrpd.control | 4 + package/vrrpd/ipkg/vrrpd.postinst | 4 + package/vsftpd/Config.in | 9 + package/vsftpd/Makefile | 33 + package/vsftpd/files/vsftpd.conf | 17 + package/vsftpd/files/vsftpd.init | 26 + package/vsftpd/ipkg/vsftpd.conffiles | 1 + package/vsftpd/ipkg/vsftpd.control | 5 + package/vsftpd/ipkg/vsftpd.postinst | 3 + package/vsftpd/patches/patch-Makefile | 59 + package/vtun/Config.in | 12 + package/vtun/Makefile | 34 + package/vtun/ipkg/vtun.conffiles | 1 + package/vtun/ipkg/vtun.control | 5 + package/vtun/patches/patch-configure | 144 + package/watchdog/Config.in | 7 + package/watchdog/Makefile | 35 + package/watchdog/files/watchdog.init | 27 + package/watchdog/ipkg/watchdog.conffiles | 1 + package/watchdog/ipkg/watchdog.control | 4 + package/watchdog/ipkg/watchdog.postinst | 3 + .../watchdog/patches/01-fstab-sys_siglist.patch | 11 + package/watchdog/patches/patch-src_mntent_c | 21 + package/watchdog/patches/patch-src_umount_c | 12 + package/wccpd/Config.in | 11 + package/wccpd/Makefile | 30 + package/wccpd/ipkg/wccpd.control | 4 + package/wdfs/Config.in | 14 + package/wdfs/Makefile | 26 + package/wdfs/ipkg/wdfs.control | 5 + package/weechat/Config.in | 26 + package/weechat/Makefile | 49 + package/weechat/ipkg/weechat.control | 4 + .../patches/patch-src_gui_curses_Makefile_in | 12 + package/wifidog/Config.in | 13 + package/wifidog/Makefile | 37 + package/wifidog/files/wifidog.conf | 177 + package/wifidog/files/wifidog.init | 26 + package/wifidog/ipkg/wifidog.conffiles | 1 + package/wifidog/ipkg/wifidog.control | 8 + package/wifidog/ipkg/wifidog.postinst | 3 + package/wifidog/patches/patch-libhttpd_api_c | 211 + package/wifidog/patches/patch-libhttpd_ip_acl_c | 30 + package/wifidog/patches/patch-libhttpd_protocol_c | 48 + package/wireless-firmware/Config.in | 11 + package/wireless-firmware/Makefile | 27 + .../ipkg/wireless-firmware-rt61.control | 4 + package/wireless-tools/Config.in | 6 + package/wireless-tools/Makefile | 38 + package/wireless-tools/ipkg/wireless-tools.control | 4 + package/wireless-tools/patches/debian-2.patch | 35 + package/wol/Config.in | 10 + package/wol/Makefile | 32 + package/wol/ipkg/wol.control | 4 + package/wondershaper/Config.in | 10 + package/wondershaper/Makefile | 26 + package/wondershaper/files/wondershaper.init | 25 + package/wondershaper/ipkg/wondershaper.conffiles | 1 + package/wondershaper/ipkg/wondershaper.control | 5 + package/wondershaper/ipkg/wondershaper.postinst | 3 + .../wondershaper/patches/01-change-default.patch | 217 + package/wpa_supplicant/Config.in | 30 + package/wpa_supplicant/Makefile | 35 + package/wpa_supplicant/files/config | 16 + package/wpa_supplicant/ipkg/wpa-supplicant.control | 5 + package/wpa_supplicant/patches/patch-Makefile | 13 + package/wput/Config.in | 9 + package/wput/Makefile | 30 + package/wput/ipkg/wput.control | 4 + package/xcmiscproto/Config.in | 6 + package/xcmiscproto/Makefile | 20 + package/xcmiscproto/ipkg/xcmiscproto.control | 4 + package/xextproto/Config.in | 6 + package/xextproto/Makefile | 20 + package/xf86dga/Config.in | 6 + package/xf86dga/Makefile | 20 + package/xf86dgaproto/Config.in | 6 + package/xf86dgaproto/Makefile | 20 + package/xfsprogs/Config.in | 8 + package/xfsprogs/Makefile | 32 + package/xfsprogs/ipkg/xfsprogs.control | 5 + package/xfsprogs/patches/patch-configure_in | 20 + package/xfsprogs/patches/patch-copy_xfs_copy_c | 80 + .../xfsprogs/patches/patch-include_builddefs_in | 35 + package/xfsprogs/patches/patch-include_buildmacros | 12 + package/xfsprogs/patches/patch-libhandle_Makefile | 12 + package/xfsprogs/patches/patch-libxfs_linux_c | 38 + package/xinetd/Config.in | 9 + package/xinetd/Makefile | 35 + package/xinetd/files/xinetd.conf | 6 + package/xinetd/files/xinetd.init | 26 + package/xinetd/ipkg/xinetd.conffiles | 1 + package/xinetd/ipkg/xinetd.control | 4 + package/xinetd/ipkg/xinetd.postinst | 3 + package/xinetd/patches/ar.patch | 72 + package/xinetd/patches/destdir.patch | 28 + package/xinetd/patches/xinetd-2.3.13-gcc4-1.patch | 33 + package/xorg-server/Config.in | 8 + package/xorg-server/Makefile | 51 + package/xorg-server/ipkg/xorg-server.control | 4 + package/xproto/Config.in | 6 + package/xproto/Makefile | 20 + package/xtrans/Config.in | 6 + package/xtrans/Makefile | 20 + package/xtrans/ipkg/xtrans.control | 4 + package/zlib/Config.in | 9 + package/zlib/Makefile | 40 + package/zlib/ipkg/zlib.control | 4 + package/zlib/patches/patch-Makefile_in | 20 + package/zlib/patches/patch-configure | 38 + package/zsh/Config.in | 9 + package/zsh/Makefile | 26 + package/zsh/ipkg/zsh.control | 4 + rules.mk | 49 + scripts/config.guess | 1548 + scripts/config.sub | 1695 + scripts/create-busybox.sh | 25 + scripts/create-image.sh | 169 + scripts/install.sh | 208 + scripts/ipkg | 1198 + scripts/ipkg-build | 253 + scripts/ipkg-make-index.sh | 23 + scripts/make | 11 + scripts/make-ipkg-dir.sh | 20 + scripts/md5sum | 11 + scripts/patch.sh | 67 + scripts/rstrip.sh | 61 + scripts/scan-pkgs.sh | 100 + scripts/scan-tools.sh | 279 + scripts/sed | 11 + scripts/split-cfg.sh | 89 + scripts/strip-script.sh | 38 + scripts/tar | 11 + scripts/update-patches | 179 + target/Config.in | 325 + target/Makefile | 88 + target/alix1c/Makefile | 26 + target/alix1c/device.mk | 7 + target/alix1c/files/etc/fstab | 2 + target/alix1c/files/etc/inittab | 4 + target/alix1c/files/etc/mdev.conf | 17 + target/alix1c/kernel.config | 1119 + target/alix1c/uclibc.config | 241 + target/foxboard/Makefile | 38 + target/foxboard/device.mk | 7 + target/foxboard/files/etc/mdev.conf | 10 + target/foxboard/kernel.config | 815 + target/foxboard/patches/cris.patch | 5751 +++ target/foxboard/patches/mtd-root.patch | 62 + target/foxboard/tools/boot_linux | 512 + target/foxboard/tools/e100boot/Makefile | 26 + target/foxboard/tools/mkfimage/Makefile | 4 + target/foxboard/tools/mkfimage/mkfimage | Bin 0 -> 11901 bytes target/foxboard/tools/mkfimage/mkfimage.c | 72 + target/foxboard/tools/rules.mk | 9 + target/foxboard/tools/squashfs/Makefile | 27 + target/foxboard/uclibc.config | 241 + target/ibm-x40/Makefile | 19 + target/ibm-x40/device.mk | 7 + target/ibm-x40/files/etc/inittab | 4 + target/ibm-x40/files/etc/mdev.conf | 14 + target/ibm-x40/kernel.config | 946 + target/ibm-x40/uclibc.config | 241 + target/linux/Config.in | 16 + target/linux/config/Config.in.block | 246 + target/linux/config/Config.in.bluetooth | 120 + target/linux/config/Config.in.crypto | 536 + target/linux/config/Config.in.debug | 53 + target/linux/config/Config.in.fs | 201 + target/linux/config/Config.in.fsnet | 139 + target/linux/config/Config.in.input | 41 + target/linux/config/Config.in.ipvs | 118 + target/linux/config/Config.in.isdn | 44 + target/linux/config/Config.in.kernel | 82 + target/linux/config/Config.in.leds | 14 + target/linux/config/Config.in.lib | 42 + target/linux/config/Config.in.misc | 77 + target/linux/config/Config.in.multimedia | 113 + target/linux/config/Config.in.netdevice | 191 + target/linux/config/Config.in.netfilter | 456 + target/linux/config/Config.in.network | 232 + target/linux/config/Config.in.nls | 555 + target/linux/config/Config.in.pcmcia | 32 + target/linux/config/Config.in.sched | 337 + target/linux/config/Config.in.usb | 264 + target/linux/kernel.control | 5 + target/linux/patches/2.6.28/ocf.patch | 23661 +++++++++++++ .../2.6.28/sunrpc-kallsym-deactivated.patch | 13 + target/linux/patches/cygwin-compat.patch | 66 + target/linux/patches/freebsd-compat.patch | 11 + target/linux/patches/ocf.patch | 23653 +++++++++++++ target/linux/patches/swconfig.patch | 1075 + target/linux/patches/yaffs2.patch | 15068 ++++++++ target/qemu-cris/Makefile | 35 + target/qemu-cris/device.mk | 7 + target/qemu-cris/files/etc/mdev.conf | 13 + target/qemu-cris/kernel.config | 751 + target/qemu-cris/patches/cris.patch | 91 + target/qemu-cris/tools/mkfimage/Makefile | 4 + target/qemu-cris/tools/mkfimage/mkfimage.c | 72 + target/qemu-cris/tools/rules.mk | 9 + target/qemu-cris/uclibc.config | 241 + target/qemu-mips/Makefile | 30 + target/qemu-mips/device.mk | 7 + target/qemu-mips/files/etc/mdev.conf | 11 + target/qemu-mips/kernel.config | 902 + target/qemu-mips/patches/io_map_base.patch | 52 + target/qemu-mips/uclibc.config | 250 + target/qemu-x86/Makefile | 28 + target/qemu-x86/device.mk | 7 + target/qemu-x86/files/etc/inittab | 4 + target/qemu-x86/files/etc/mdev.conf | 17 + target/qemu-x86/kernel.config | 1091 + target/qemu-x86/uclibc.config | 241 + target/rb411/Makefile | 28 + target/rb411/device.mk | 7 + target/rb411/files/etc/mdev.conf | 10 + target/rb411/kernel.config | 1035 + target/rb411/patches/ar71xx.patch | 9913 ++++++ target/rb411/uclibc.config | 233 + target/rb433/Makefile | 28 + target/rb433/device.mk | 7 + target/rb433/files/etc/mdev.conf | 10 + target/rb433/kernel.config | 1031 + target/rb433/patches/ar71xx.patch | 9913 ++++++ target/rb433/patches/ip175-switch.patch | 1364 + target/rb433/uclibc.config | 233 + target/rb532/Makefile | 29 + target/rb532/device.mk | 7 + target/rb532/files/etc/mdev.conf | 11 + target/rb532/kernel.config | 1025 + target/rb532/uclibc.config | 250 + target/rescue-x86/Makefile | 19 + target/rescue-x86/device.mk | 7 + target/rescue-x86/files/etc/inittab | 4 + target/rescue-x86/files/etc/mdev.conf | 14 + target/rescue-x86/kernel.config | 1006 + target/rescue-x86/uclibc.config | 241 + target/rescue-x86_64/Makefile | 19 + target/rescue-x86_64/device.mk | 7 + target/rescue-x86_64/files/etc/inittab | 4 + target/rescue-x86_64/files/etc/mdev.conf | 14 + target/rescue-x86_64/kernel.config | 1121 + target/rescue-x86_64/uclibc.config | 240 + target/zaurus/Makefile | 19 + target/zaurus/device.mk | 8 + target/zaurus/files/etc/mdev.conf | 11 + target/zaurus/kernel.config | 1971 ++ target/zaurus/uclibc.config | 244 + toolchain/Makefile | 92 + toolchain/binutils/Makefile | 43 + toolchain/binutils/Makefile.inc | 11 + toolchain/gcc/Makefile | 100 + toolchain/gcc/Makefile.inc | 11 + toolchain/gcc/patches/arm-softfloat-libgcc.patch | 29 + toolchain/gdb/Config.in | 8 + toolchain/gdb/Makefile | 47 + toolchain/gdb/Makefile.inc | 11 + toolchain/glibc/Makefile | 99 + toolchain/glibc/Makefile.inc | 10 + toolchain/glibc/patches/binutils.patch | 12 + toolchain/glibc/patches/gcc43.patch | 18 + toolchain/glibc/patches/i586-chk.patch | 15 + toolchain/glibc/patches/install-extra.patch | 84 + toolchain/glibc/patches/make-install-lib.patch | 17 + toolchain/gmp/Makefile | 32 + toolchain/gmp/Makefile.inc | 12 + toolchain/kernel-headers/Makefile | 32 + toolchain/kernel-headers/files/cryptodev.h | 478 + toolchain/kernel-headers/patches/cleankernel.patch | 11 + .../kernel-headers/patches/etrax-header.patch | 68 + toolchain/mpfr/Makefile | 33 + toolchain/mpfr/Makefile.inc | 11 + toolchain/rules.mk | 7 + toolchain/uClibc/Makefile | 72 + toolchain/uClibc/Makefile.inc | 11 + 2881 files changed, 385468 insertions(+) create mode 100644 BSDmakefile create mode 100644 BUGS create mode 100644 COPYING create mode 100644 Config.default create mode 100644 Config.in create mode 100644 GNUmakefile create mode 100644 LICENCE create mode 100644 Makefile create mode 100644 README create mode 100644 TODO create mode 100644 config/Config.in create mode 100644 config/Kconfig-language.txt create mode 100644 config/Makefile create mode 100644 config/Makefile.in create mode 100644 config/checklist.c create mode 100644 config/colors.h create mode 100644 config/conf.c create mode 100644 config/confdata.c create mode 100644 config/dialog.h create mode 100644 config/expr.c create mode 100644 config/expr.h create mode 100644 config/glob.c create mode 100644 config/glob.h create mode 100644 config/inputbox.c create mode 100644 config/lex.backup create mode 100644 config/lkc.h create mode 100644 config/lkc_proto.h create mode 100644 config/mconf.c create mode 100644 config/menu.c create mode 100644 config/menubox.c create mode 100644 config/msgbox.c create mode 100644 config/symbol.c create mode 100644 config/textbox.c create mode 100644 config/util.c create mode 100644 config/yesno.c create mode 100644 config/zconf.l create mode 100644 config/zconf.output create mode 100644 config/zconf.y create mode 100644 mk/build.mk create mode 100644 mk/buildhlp.mk create mode 100644 mk/cpu.mk create mode 100644 mk/fetch.mk create mode 100644 mk/image.mk create mode 100644 mk/kernel-build.mk create mode 100644 mk/kernel.mk create mode 100644 mk/linux.mk create mode 100644 mk/mirrors.mk create mode 100644 mk/modules.mk create mode 100644 mk/package.mk create mode 100644 mk/pkg-bottom.mk create mode 100644 mk/rootfs.mk create mode 100644 mk/split-cfg.mk create mode 100644 mk/toolchain.mk create mode 100644 mk/tools.mk create mode 100644 mk/vars.mk create mode 100644 package/6tunnel/Config.in create mode 100644 package/6tunnel/Makefile create mode 100644 package/6tunnel/ipkg/6tunnel.control create mode 100644 package/Config.in create mode 100644 package/Depends.mk create mode 100644 package/Makefile create mode 100644 package/aiccu/Config.in create mode 100644 package/aiccu/Makefile create mode 100644 package/aiccu/extra/common/dn_skipname.c create mode 100644 package/aiccu/files/aiccu.init create mode 100644 package/aiccu/ipkg/aiccu.conffiles create mode 100644 package/aiccu/ipkg/aiccu.control create mode 100644 package/aiccu/ipkg/aiccu.postinst create mode 100644 package/aiccu/patches/patch-common_resolver_c create mode 100644 package/aiccu/patches/patch-unix-console_Makefile create mode 100644 package/aircrack-ng/Config.in create mode 100644 package/aircrack-ng/Makefile create mode 100644 package/aircrack-ng/ipkg/aircrack-ng.control create mode 100644 package/aircrack-ng/patches/patch-src_airbase-ng_c create mode 100644 package/aircrack-ng/patches/patch-src_aircrack-ng_c create mode 100644 package/aircrack-ng/patches/patch-src_aircrack-ptw-lib_c create mode 100644 package/aircrack-ng/patches/patch-src_aireplay-ng_c create mode 100644 package/aircrack-ng/patches/patch-src_airodump-ng_c create mode 100644 package/aircrack-ng/patches/patch-src_airtun-ng_c create mode 100644 package/aircrack-ng/patches/patch-src_osdep_linux_c create mode 100644 package/aircrack-ng/patches/patch-src_version_h create mode 100644 package/alsa-lib/Config.in create mode 100644 package/alsa-lib/Makefile create mode 100644 package/alsa-lib/ipkg/alsa-lib.control create mode 100644 package/alsa-lib/ipkg/alsa-lib.postinst create mode 100644 package/alsa-utils/Config.in create mode 100644 package/alsa-utils/Makefile create mode 100644 package/alsa-utils/files/amixer.init create mode 100644 package/alsa-utils/ipkg/alsa-utils.control create mode 100644 package/alsa-utils/ipkg/alsa-utils.postinst create mode 100644 package/alsa-utils/patches/patch-alsactl_init_parse_c create mode 100644 package/apr-util/Config.in create mode 100644 package/apr-util/Makefile create mode 100644 package/apr-util/ipkg/apr-util.control create mode 100644 package/apr-util/patches/patch-uri_Makefile_in create mode 100644 package/apr-util/patches/uri_delim.patch create mode 100644 package/apr/Config.in create mode 100644 package/apr/Makefile create mode 100644 package/apr/ipkg/apr.control create mode 100644 package/arpd/Config.in create mode 100644 package/arpd/Makefile create mode 100644 package/arpd/ipkg/arpd.control create mode 100644 package/arpd/patches/patch-Makefile_in create mode 100644 package/arpd/patches/patch-arpd_c create mode 100644 package/arpd/patches/patch-configure create mode 100644 package/arpwatch/Config.in create mode 100644 package/arpwatch/Makefile create mode 100644 package/arpwatch/ipkg/arpwatch.conffiles create mode 100644 package/arpwatch/ipkg/arpwatch.control create mode 100644 package/asterisk/Config.in create mode 100644 package/asterisk/Makefile create mode 100644 package/asterisk/files/asterisk.init create mode 100644 package/asterisk/files/modules.conf create mode 100644 package/asterisk/ipkg/asterisk-chan-bluetooth.conffiles create mode 100644 package/asterisk/ipkg/asterisk-chan-bluetooth.control create mode 100644 package/asterisk/ipkg/asterisk-chan-h323.conffiles create mode 100644 package/asterisk/ipkg/asterisk-chan-h323.control create mode 100644 package/asterisk/ipkg/asterisk-chan-iax2.conffiles create mode 100644 package/asterisk/ipkg/asterisk-chan-iax2.control create mode 100644 package/asterisk/ipkg/asterisk-chan-mgcp.conffiles create mode 100644 package/asterisk/ipkg/asterisk-chan-mgcp.control create mode 100644 package/asterisk/ipkg/asterisk-chan-misdn.control create mode 100644 package/asterisk/ipkg/asterisk-chan-skinny.conffiles create mode 100644 package/asterisk/ipkg/asterisk-chan-skinny.control create mode 100644 package/asterisk/ipkg/asterisk-codec-gsm.control create mode 100644 package/asterisk/ipkg/asterisk-codec-speex.control create mode 100644 package/asterisk/ipkg/asterisk-meetme.conffiles create mode 100644 package/asterisk/ipkg/asterisk-meetme.control create mode 100644 package/asterisk/ipkg/asterisk-pbx-dundi.conffiles create mode 100644 package/asterisk/ipkg/asterisk-pbx-dundi.control create mode 100644 package/asterisk/ipkg/asterisk-pgsql.conffiles create mode 100644 package/asterisk/ipkg/asterisk-pgsql.control create mode 100644 package/asterisk/ipkg/asterisk-res-agi.control create mode 100644 package/asterisk/ipkg/asterisk-sounds.control create mode 100644 package/asterisk/ipkg/asterisk-sqlite.control create mode 100644 package/asterisk/ipkg/asterisk-voicemail.conffiles create mode 100644 package/asterisk/ipkg/asterisk-voicemail.control create mode 100644 package/asterisk/ipkg/asterisk.conffiles create mode 100644 package/asterisk/ipkg/asterisk.control create mode 100644 package/asterisk/ipkg/asterisk.postinst create mode 100644 package/asterisk/patches/patch-apps__moduleinfo create mode 100644 package/asterisk/patches/patch-menuselect-tree create mode 100644 package/asterisk/patches/patch-menuselect_example_menuselect-tree create mode 100644 package/atftp/Config.in create mode 100644 package/atftp/Makefile create mode 100644 package/atftp/ipkg/atftp.control create mode 100644 package/atftp/ipkg/atftpd.control create mode 100755 package/atftp/ipkg/files/postinst create mode 100644 package/atftp/patches/patch-stats_c create mode 100644 package/atftp/patches/patch-test_Makefile create mode 100644 package/atftp/patches/patch-tftp_c create mode 100644 package/atftp/patches/patch-tftp_def_c create mode 100644 package/atftp/patches/patch-tftp_def_h create mode 100644 package/atftp/patches/patch-tftp_file_c create mode 100644 package/atftp/patches/patch-tftpd_c create mode 100644 package/autossh/Config.in create mode 100644 package/autossh/Makefile create mode 100644 package/autossh/ipkg/autossh.control create mode 100644 package/avahi/Config.in create mode 100644 package/avahi/Config.in.lib create mode 100644 package/avahi/Makefile create mode 100644 package/avahi/files/avahi-daemon.conf create mode 100644 package/avahi/files/avahi-daemon.init create mode 100644 package/avahi/files/service-http create mode 100644 package/avahi/files/service-ssh create mode 100644 package/avahi/ipkg/avahi-daemon.conffiles create mode 100644 package/avahi/ipkg/avahi-daemon.control create mode 100644 package/avahi/ipkg/avahi-daemon.postinst create mode 100644 package/avahi/ipkg/avahi-dnsconfd.control create mode 100644 package/avahi/ipkg/libavahi.control create mode 100644 package/axtls/Config.in create mode 100644 package/axtls/Config.in.lib create mode 100644 package/axtls/Makefile create mode 100644 package/axtls/files/axhttpd.init create mode 100644 package/axtls/files/config create mode 100644 package/axtls/ipkg/axhttpd.control create mode 100644 package/axtls/ipkg/axhttpd.postinst create mode 100644 package/axtls/ipkg/libaxtls.control create mode 100644 package/axtls/patches/001-opt_flags.patch create mode 100644 package/axtls/patches/patch-httpd_main_c create mode 100644 package/base-files/Config.in create mode 100644 package/base-files/Makefile create mode 100644 package/base-files/files/etc/banner create mode 100644 package/base-files/files/etc/functions.sh create mode 100644 package/base-files/files/etc/group create mode 100644 package/base-files/files/etc/hosts create mode 100644 package/base-files/files/etc/init.d/boot create mode 100644 package/base-files/files/etc/init.d/done create mode 100755 package/base-files/files/etc/init.d/rcK create mode 100755 package/base-files/files/etc/init.d/rcS create mode 100644 package/base-files/files/etc/inittab create mode 100644 package/base-files/files/etc/ipkg.conf create mode 100644 package/base-files/files/etc/mdev.conf create mode 100644 package/base-files/files/etc/modules create mode 100644 package/base-files/files/etc/network/interfaces create mode 100644 package/base-files/files/etc/passwd create mode 100644 package/base-files/files/etc/profile create mode 100644 package/base-files/files/etc/protocols create mode 100644 package/base-files/files/etc/rc.conf create mode 100644 package/base-files/files/etc/shadow create mode 100644 package/base-files/files/etc/sysctl.conf create mode 100755 package/base-files/files/init create mode 100644 package/base-files/files/lib/mdev/init create mode 100755 package/base-files/files/usr/share/udhcpc/default.script create mode 100644 package/base-files/ipkg/base-files.conffiles create mode 100644 package/base-files/ipkg/base-files.control create mode 100644 package/bash/Config.in create mode 100644 package/bash/Makefile create mode 100644 package/bash/ipkg/bash.control create mode 100644 package/bc/Config.in create mode 100644 package/bc/Makefile create mode 100644 package/bc/ipkg/bc.control create mode 100644 package/bc/ipkg/dc.control create mode 100644 package/bigreqsproto/Config.in create mode 100644 package/bigreqsproto/Makefile create mode 100644 package/bigreqsproto/ipkg/bigreqsproto.control create mode 100644 package/bind/Config.in create mode 100644 package/bind/Makefile create mode 100644 package/bind/files/bind/db.0 create mode 100644 package/bind/files/bind/db.127 create mode 100644 package/bind/files/bind/db.255 create mode 100644 package/bind/files/bind/db.local create mode 100644 package/bind/files/bind/db.root create mode 100644 package/bind/files/bind/named.conf.example create mode 100644 package/bind/files/named.init create mode 100644 package/bind/ipkg/bind-check.control create mode 100644 package/bind/ipkg/bind-client.control create mode 100644 package/bind/ipkg/bind-dig.control create mode 100644 package/bind/ipkg/bind-dnssec.control create mode 100644 package/bind/ipkg/bind-host.control create mode 100644 package/bind/ipkg/bind-rndc.control create mode 100644 package/bind/ipkg/bind-server.conffiles create mode 100644 package/bind/ipkg/bind-server.control create mode 100644 package/bind/ipkg/bind-server.postinst create mode 100644 package/bind/ipkg/bind-tools.control create mode 100644 package/bind/ipkg/libbind.control create mode 100644 package/bind/patches/patch-lib_isc_unix_ifiter_ioctl_c create mode 100644 package/binutils/Config.in create mode 100644 package/binutils/Makefile create mode 100644 package/binutils/ipkg/binutils.control create mode 100644 package/bitlbee/Config.in create mode 100644 package/bitlbee/Makefile create mode 100644 package/bitlbee/files/bitlbee.init create mode 100644 package/bitlbee/ipkg/bitlbee.conffiles create mode 100644 package/bitlbee/ipkg/bitlbee.control create mode 100644 package/bitlbee/ipkg/bitlbee.postinst create mode 100644 package/bitlbee/patches/patch-configure create mode 100644 package/bluez-firmware/Config.in create mode 100644 package/bluez-firmware/Makefile create mode 100644 package/bluez-firmware/ipkg/bluez-firmware.control create mode 100644 package/bluez/Config.in create mode 100644 package/bluez/Makefile create mode 100644 package/bluez/files/bluez.init create mode 100644 package/bluez/ipkg/bluez.control create mode 100644 package/bluez/patches/patch-tools_hciattach_c create mode 100644 package/bogofilter/Config.in create mode 100644 package/bogofilter/Makefile create mode 100644 package/bogofilter/ipkg/bogofilter.control create mode 100644 package/bogofilter/patches/patch-config_in create mode 100644 package/bogofilter/patches/patch-configure create mode 100644 package/bridge-utils/Config.in create mode 100644 package/bridge-utils/Makefile create mode 100644 package/bridge-utils/ipkg/bridge-utils.control create mode 100644 package/bridge-utils/patches/patch-libbridge_Makefile_in create mode 100644 package/busybox/Config.in create mode 100644 package/busybox/Makefile create mode 100644 package/busybox/config/Config.in create mode 100644 package/busybox/config/archival/Config.in create mode 100644 package/busybox/config/console-tools/Config.in create mode 100644 package/busybox/config/coreutils/Config.in create mode 100644 package/busybox/config/debianutils/Config.in create mode 100644 package/busybox/config/e2fsprogs/Config.in create mode 100644 package/busybox/config/e2fsprogs/old_e2fsprogs/Config.in create mode 100644 package/busybox/config/editors/Config.in create mode 100644 package/busybox/config/findutils/Config.in create mode 100644 package/busybox/config/init/Config.in create mode 100644 package/busybox/config/libbb/Config.in create mode 100644 package/busybox/config/loginutils/Config.in create mode 100644 package/busybox/config/mailutils/Config.in create mode 100644 package/busybox/config/miscutils/Config.in create mode 100644 package/busybox/config/modutils/Config.in create mode 100644 package/busybox/config/networking/Config.in create mode 100644 package/busybox/config/networking/udhcp/Config.in create mode 100644 package/busybox/config/printutils/Config.in create mode 100644 package/busybox/config/procps/Config.in create mode 100644 package/busybox/config/runit/Config.in create mode 100644 package/busybox/config/selinux/Config.in create mode 100644 package/busybox/config/shell/Config.in create mode 100644 package/busybox/config/sysklogd/Config.in create mode 100644 package/busybox/config/util-linux/Config.in create mode 100644 package/busybox/files/bridge.pre-up create mode 100644 package/busybox/files/busybox.config create mode 100644 package/busybox/files/crond.init create mode 100644 package/busybox/files/inetd.init create mode 100644 package/busybox/files/ipv6 create mode 100644 package/busybox/files/ipv6.up create mode 100644 package/busybox/files/network.init create mode 100644 package/busybox/files/syslog.init create mode 100644 package/busybox/files/vlan.pre-up create mode 100644 package/busybox/ipkg/busybox.control create mode 100644 package/busybox/ipkg/busybox.postinst create mode 100644 package/busybox/patches/001-ipkg.patch create mode 100644 package/busybox/patches/002-find-empty.patch create mode 100644 package/busybox/patches/patch-Makefile create mode 100644 package/busybox/patches/patch-Makefile_flags create mode 100644 package/busybox/patches/patch-include_libbb_h create mode 100644 package/busybox/patches/patch-include_platform_h create mode 100644 package/busybox/patches/patch-networking_traceroute_c create mode 100644 package/busybox/patches/patch-networking_udhcp_dhcpd_c create mode 100644 package/busybox/patches/patch-runit_runit_lib_h create mode 100644 package/busybox/patches/patch-util-linux_fdisk_osf_c create mode 100644 package/bwm/Config.in create mode 100644 package/bwm/Makefile create mode 100644 package/bwm/ipkg/bwm.control create mode 100644 package/cbtt/Config.in create mode 100644 package/cbtt/Makefile create mode 100644 package/cbtt/ipkg/cbtt-mysql.control create mode 100644 package/cbtt/ipkg/cbtt.control create mode 100644 package/cbtt/patches/100-compile.patch create mode 100644 package/cbtt/patches/patch-bnbt_h create mode 100644 package/cfgfs/Config.in create mode 100644 package/cfgfs/Makefile create mode 100644 package/cfgfs/ipkg/cfgfs.control create mode 100644 package/cfgfs/src/BSDmakefile create mode 100644 package/cfgfs/src/LICENCE create mode 100644 package/cfgfs/src/Makefile create mode 100644 package/cfgfs/src/Makefile.inc create mode 100644 package/cfgfs/src/adler.h create mode 100644 package/cfgfs/src/bundled/README.LZO create mode 100644 package/cfgfs/src/bundled/lzoconf.h create mode 100644 package/cfgfs/src/bundled/lzodefs.h create mode 100644 package/cfgfs/src/bundled/minilzo.c create mode 100644 package/cfgfs/src/bundled/minilzo.h create mode 100644 package/cfgfs/src/c_lzo1x1.c create mode 100644 package/cfgfs/src/c_null.c create mode 100644 package/cfgfs/src/c_zlib.c create mode 100644 package/cfgfs/src/compress.c create mode 100644 package/cfgfs/src/compress.h create mode 100644 package/cfgfs/src/cpr_get.c create mode 100644 package/cfgfs/src/cpr_list.c create mode 100644 package/cfgfs/src/cpr_lsth.c create mode 100644 package/cfgfs/src/defs.h create mode 100644 package/cfgfs/src/ft_creat.c create mode 100644 package/cfgfs/src/ft_dump.c create mode 100644 package/cfgfs/src/ft_pack.c create mode 100644 package/cfgfs/src/ft_packm.c create mode 100644 package/cfgfs/src/fts.c create mode 100644 package/cfgfs/src/fts_debg.c create mode 100644 package/cfgfs/src/fts_gnu.h create mode 100644 package/cfgfs/src/fts_subs.c create mode 100644 package/cfgfs/src/fts_subs.h create mode 100644 package/cfgfs/src/fwcf.helper/Makefile create mode 100644 package/cfgfs/src/fwcf.sh create mode 100644 package/cfgfs/src/fwcf.txt create mode 100644 package/cfgfs/src/header.c create mode 100644 package/cfgfs/src/lib/Makefile create mode 100644 package/cfgfs/src/minilzop.c create mode 100644 package/cfgfs/src/minilzop.h create mode 100644 package/cfgfs/src/mkfwcf/Makefile create mode 100644 package/cfgfs/src/mkfwcf/mkfwcf.c create mode 100644 package/cfgfs/src/mtd.c create mode 100644 package/cfgfs/src/pack.h create mode 100644 package/cfgfs/src/replace.c create mode 100644 package/cfgfs/src/replace.h create mode 100644 package/cfgfs/src/sys_bsd.c create mode 100644 package/cfgfs/src/sys_linux.c create mode 100644 package/cfgfs/src/sysdeps.h create mode 100644 package/cfgfs/src/tool.c create mode 100644 package/cfgfs/src/tool/Makefile create mode 100644 package/cfgfs/src/unfwcf/Makefile create mode 100644 package/cfgfs/src/unfwcf/unfwcf.c create mode 100644 package/cfgfs/src/unwraps.c create mode 100644 package/cfgfs/src/wraps.c create mode 100644 package/cgilib/Config.in create mode 100644 package/cgilib/Makefile create mode 100644 package/cgilib/extra/m4/libtool.m4 create mode 100644 package/cgilib/extra/m4/ltoptions.m4 create mode 100644 package/cgilib/extra/m4/ltsugar.m4 create mode 100644 package/cgilib/extra/m4/ltversion.m4 create mode 100644 package/cgilib/extra/m4/lt~obsolete.m4 create mode 100644 package/cgilib/ipkg/cgilib.control create mode 100644 package/cgilib/patches/patch-INSTALL create mode 100644 package/cgilib/patches/patch-Makefile_in create mode 100644 package/cgilib/patches/patch-cgi_c create mode 100644 package/cgilib/patches/patch-configure create mode 100644 package/cgilib/patches/patch-depcomp create mode 100644 package/cgilib/patches/patch-install-sh create mode 100644 package/cgilib/patches/patch-ltmain_sh create mode 100644 package/cgilib/patches/patch-missing create mode 100644 package/chillispot/Config.in create mode 100644 package/chillispot/Makefile create mode 100644 package/chillispot/files/chilli.conf create mode 100644 package/chillispot/files/chillispot.init create mode 100644 package/chillispot/ipkg/chillispot.conffiles create mode 100644 package/chillispot/ipkg/chillispot.control create mode 100644 package/chillispot/ipkg/chillispot.postinst create mode 100644 package/collectd/Config.in create mode 100644 package/collectd/Makefile create mode 100644 package/collectd/files/collectd.init create mode 100644 package/collectd/ipkg/collectd.control create mode 100644 package/collectd/ipkg/collectd.postinst create mode 100644 package/collectd/patches/patch-src_Makefile_in create mode 100644 package/collectd/patches/patch-src_libcollectdclient_Makefile_in create mode 100644 package/comgt/Config.in create mode 100644 package/comgt/Makefile create mode 100644 package/comgt/files/dial.comgt create mode 100644 package/comgt/files/setmode.comgt create mode 100644 package/comgt/ipkg/comgt.control create mode 100644 package/comgt/patches/patch-comgt_0_32_Makefile create mode 100644 package/comgt/patches/patch-comgt_h create mode 100644 package/compositeproto/Config.in create mode 100644 package/compositeproto/Makefile create mode 100644 package/cryptsetup/Config.in create mode 100644 package/cryptsetup/Makefile create mode 100644 package/cryptsetup/ipkg/cryptsetup.control create mode 100644 package/cryptsetup/patches/patch-lib_libdevmapper_c create mode 100644 package/cryptsetup/patches/patch-lib_utils_c create mode 100644 package/ctorrent/Config.in create mode 100755 package/ctorrent/Makefile create mode 100644 package/ctorrent/ipkg/ctorrent.control create mode 100644 package/ctorrent/patches/patch-btcontent_cpp create mode 100644 package/ctorrent/patches/patch-btfiles_cpp create mode 100644 package/cups/Config.in create mode 100644 package/cups/Makefile create mode 100644 package/cups/files/cupsd.init create mode 100644 package/cups/files/etc/cups/classes.conf create mode 100644 package/cups/files/etc/cups/client.conf create mode 100644 package/cups/files/etc/cups/cupsd.conf create mode 100644 package/cups/files/etc/cups/printers.conf create mode 100644 package/cups/ipkg/cups.conffiles create mode 100644 package/cups/ipkg/cups.control create mode 100644 package/cups/ipkg/cups.postinst create mode 100644 package/cups/patches/patch-Makefile create mode 100644 package/cups/patches/patch-configure create mode 100644 package/curl/Config.in create mode 100644 package/curl/Makefile create mode 100644 package/curl/ipkg/curl.control create mode 100644 package/curl/ipkg/libcurl.control create mode 100644 package/curl/patches/patch-configure create mode 100644 package/cutter/Config.in create mode 100755 package/cutter/Makefile create mode 100644 package/cutter/ipkg/cutter.control create mode 100644 package/cutter/patches/patch-cutter_c create mode 100644 package/cxxtools/Config.in create mode 100644 package/cxxtools/Makefile create mode 100644 package/cxxtools/ipkg/cxxtools.control create mode 100644 package/cxxtools/patches/patch-demo_Makefile_in create mode 100644 package/cyrus-sasl/Config.in create mode 100644 package/cyrus-sasl/Makefile create mode 100644 package/cyrus-sasl/ipkg/libsasl2.control create mode 100644 package/damageproto/Config.in create mode 100644 package/damageproto/Makefile create mode 100644 package/davfs2/Config.in create mode 100644 package/davfs2/Makefile create mode 100644 package/davfs2/ipkg/davfs2.conffiles create mode 100644 package/davfs2/ipkg/davfs2.control create mode 100644 package/davfs2/ipkg/davfs2.postinst create mode 100644 package/davfs2/patches/patch-src_cache_c create mode 100644 package/davfs2/patches/patch-src_dav_coda2_c create mode 100644 package/davfs2/patches/patch-src_dav_coda3_c create mode 100644 package/davfs2/patches/patch-src_dav_fuse5_c create mode 100644 package/davfs2/patches/patch-src_dav_fuse7_c create mode 100644 package/davfs2/patches/patch-src_kernel_interface_c create mode 100644 package/davfs2/patches/patch-src_mount_davfs_c create mode 100644 package/davfs2/patches/patch-src_umount_davfs_c create mode 100644 package/davfs2/patches/patch-src_webdav_c create mode 100644 package/dbus/Config.in create mode 100644 package/dbus/Makefile create mode 100644 package/dbus/files/dbus.init create mode 100644 package/dbus/ipkg/dbus.control create mode 100644 package/dbus/ipkg/dbus.postinst create mode 100644 package/deco/Config.in create mode 100644 package/deco/Makefile create mode 100644 package/deco/ipkg/deco.control create mode 100644 package/deco/patches/100-tty.c.patch create mode 100644 package/device-mapper/Config.in create mode 100644 package/device-mapper/Makefile create mode 100644 package/device-mapper/ipkg/device-mapper.control create mode 100644 package/device-mapper/patches/patch-lib_Makefile_in create mode 100644 package/device-mapper/patches/patch-make_tmpl_in create mode 100644 package/dhcp-forwarder/Config.in create mode 100644 package/dhcp-forwarder/Makefile create mode 100644 package/dhcp-forwarder/files/dhcp-fwd.init create mode 100644 package/dhcp-forwarder/ipkg/dhcp-forwarder.conffiles create mode 100644 package/dhcp-forwarder/ipkg/dhcp-forwarder.control create mode 100644 package/dhcp-forwarder/ipkg/dhcp-forwarder.postinst create mode 100644 package/dhcp-forwarder/patches/00-big_endian.patch create mode 100644 package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch create mode 100644 package/dhcp/Config.in create mode 100644 package/dhcp/Makefile create mode 100644 package/dhcp/files/dhcpd.init create mode 100644 package/dhcp/ipkg/dhcp-relay.control create mode 100644 package/dhcp/ipkg/dhcp-server.control create mode 100644 package/dhcp/ipkg/dhcp-server.postinst create mode 100644 package/dhcp6/Config.in create mode 100644 package/dhcp6/Makefile create mode 100755 package/dhcp6/ipkg/dhcp6.control create mode 100644 package/dhcp6/ipkg/files/conffiles create mode 100644 package/dhcp6/patches/patch-client_Makefile create mode 100644 package/dhcp6/patches/patch-client_clilib_c create mode 100644 package/dhcp6/patches/patch-client_macros_h create mode 100644 package/dhcp6/patches/patch-client_solicit_c create mode 100644 package/dhcp6/patches/patch-server_Makefile create mode 100644 package/dhcp6/patches/patch-server_macros_h create mode 100644 package/dhcp6/patches/patch-server_reply_c create mode 100644 package/digitemp/Config.in create mode 100644 package/digitemp/Makefile create mode 100644 package/digitemp/ipkg/digitemp.control create mode 100644 package/digitemp/patches/001-Makefile.patch create mode 100644 package/dnsmasq/Config.in create mode 100644 package/dnsmasq/Makefile create mode 100644 package/dnsmasq/files/dnsmasq.conf create mode 100644 package/dnsmasq/files/dnsmasq.init create mode 100644 package/dnsmasq/ipkg/dnsmasq.conffiles create mode 100644 package/dnsmasq/ipkg/dnsmasq.control create mode 100644 package/dnsmasq/ipkg/dnsmasq.postinst create mode 100644 package/dnsmasq/patches/patch-src_config_h create mode 100644 package/dosfstools/Config.in create mode 100644 package/dosfstools/Makefile create mode 100644 package/dosfstools/ipkg/dosfstools.control create mode 100644 package/dovecot/Config.in create mode 100644 package/dovecot/Makefile create mode 100644 package/dovecot/files/dovecot.conf create mode 100644 package/dovecot/ipkg/dovecot.control create mode 100644 package/dovecot/patches/patch-configure create mode 100644 package/dovecot/patches/patch-src_plugins_quota_Makefile_in create mode 100644 package/dropbear/Config.in create mode 100644 package/dropbear/Makefile create mode 100644 package/dropbear/files/dropbear.init create mode 100644 package/dropbear/ipkg/dropbear.control create mode 100644 package/dropbear/ipkg/dropbear.postinst create mode 100644 package/dropbear/ipkg/dropbearconvert.control create mode 100644 package/dropbear/patches/patch-cli-runopts_c create mode 100644 package/dropbear/patches/patch-options_h create mode 100644 package/dropbear/patches/patch-svr-authpubkey_c create mode 100644 package/dsniff/Config.in create mode 100644 package/dsniff/Makefile create mode 100644 package/dsniff/ipkg/dsniff.control create mode 100644 package/dsniff/patches/patch-Makefile_in create mode 100644 package/dsniff/patches/patch-arp_c create mode 100644 package/dsniff/patches/patch-arp_h create mode 100644 package/dsniff/patches/patch-arpspoof_c create mode 100644 package/dsniff/patches/patch-confdefs_h create mode 100644 package/dsniff/patches/patch-configure create mode 100644 package/dsniff/patches/patch-decode_c create mode 100644 package/dsniff/patches/patch-dns_c create mode 100644 package/dsniff/patches/patch-dsniff_services create mode 100644 package/dsniff/patches/patch-msgsnarf_c create mode 100644 package/dsniff/patches/patch-record_c create mode 100644 package/dsniff/patches/patch-ssh_c create mode 100644 package/dsniff/patches/patch-sshcrypto_c create mode 100644 package/dsniff/patches/patch-sshow_c create mode 100644 package/e2fsprogs/Config.in create mode 100644 package/e2fsprogs/Makefile create mode 100644 package/e2fsprogs/ipkg/e2fsprogs.control create mode 100644 package/e2fsprogs/ipkg/libcom-err.control create mode 100644 package/e2fsprogs/ipkg/libuuid.control create mode 100644 package/e2fsprogs/patches/patch-misc_Makefile_in create mode 100644 package/elinks/Config.in create mode 100644 package/elinks/Makefile create mode 100644 package/elinks/ipkg/elinks.control create mode 100644 package/em28xx/Config.in create mode 100644 package/em28xx/Makefile create mode 100644 package/em28xx/ipkg/kmod-em28xx.control create mode 100644 package/esound/Config.in create mode 100644 package/esound/Makefile create mode 100644 package/esound/files/esd.init create mode 100644 package/esound/ipkg/esound.control create mode 100644 package/esound/ipkg/esound.postinst create mode 100644 package/esound/patches/patch-esd_c create mode 100644 package/ether-wake/Config.in create mode 100644 package/ether-wake/Makefile create mode 100644 package/ether-wake/extra/ether-wake.c create mode 100644 package/ether-wake/ipkg/ether-wake.control create mode 100644 package/ethtool/Config.in create mode 100644 package/ethtool/Makefile create mode 100644 package/ethtool/ipkg/ethtool.control create mode 100644 package/evieext/Config.in create mode 100644 package/evieext/Makefile create mode 100644 package/exmap/Config.in create mode 100644 package/exmap/Makefile create mode 100644 package/exmap/ipkg/exmap.control create mode 100644 package/exmap/ipkg/exmapd.control create mode 100644 package/exmap/ipkg/exmapserver.control create mode 100644 package/exmap/ipkg/kmod-exmap.control create mode 100644 package/exmap/patches/patch-Makefile_in create mode 100644 package/exmap/patches/patch-kernel_exmap_c create mode 100644 package/exmap/patches/patch-src_exmapd_c create mode 100644 package/exmap/patches/patch-src_exmapserver_c create mode 100644 package/expat/Config.in create mode 100644 package/expat/Makefile create mode 100644 package/expat/ipkg/libexpat.control create mode 100644 package/expat/patches/001-destdir.patch create mode 100644 package/ez-ipupdate/Config.in create mode 100644 package/ez-ipupdate/Makefile create mode 100644 package/ez-ipupdate/files/ez-ipupdate.conf create mode 100644 package/ez-ipupdate/files/ez-ipupdate.init create mode 100644 package/ez-ipupdate/ipkg/ez-ipupdate.conffiles create mode 100644 package/ez-ipupdate/ipkg/ez-ipupdate.control create mode 100644 package/ez-ipupdate/ipkg/ez-ipupdate.postinst create mode 100644 package/ez-ipupdate/patches/patch-configure create mode 100644 package/ez-ipupdate/patches/patch-example-dhs_conf create mode 100644 package/ez-ipupdate/patches/patch-example-dyndns_conf create mode 100644 package/ez-ipupdate/patches/patch-example-dyns_conf create mode 100644 package/ez-ipupdate/patches/patch-example-easydns_conf create mode 100644 package/ez-ipupdate/patches/patch-example-gnudip_conf create mode 100644 package/ez-ipupdate/patches/patch-example-heipv6tb_conf create mode 100644 package/ez-ipupdate/patches/patch-example-justlinux_conf create mode 100644 package/ez-ipupdate/patches/patch-example-ods_conf create mode 100644 package/ez-ipupdate/patches/patch-example-pgpow_conf create mode 100644 package/ez-ipupdate/patches/patch-example-tzo_conf create mode 100644 package/ez-ipupdate/patches/patch-example_conf create mode 100644 package/ez-ipupdate/patches/patch-ez-ipupdate_c create mode 100644 package/faad2/Config.in create mode 100644 package/faad2/Makefile create mode 100644 package/faad2/ipkg/libfaad2.control create mode 100644 package/faad2/patches/patch-common_mp4ff_Makefile_am create mode 100644 package/faad2/patches/patch-common_mp4ff_mp4ff_h create mode 100644 package/faad2/patches/patch-configure_in create mode 100644 package/faad2/patches/patch-frontend_Makefile_am create mode 100644 package/fakeidentd/Config.in create mode 100644 package/fakeidentd/Makefile create mode 100644 package/fakeidentd/files/fakeidentd.init create mode 100644 package/fakeidentd/ipkg/fakeidentd.control create mode 100644 package/fakeidentd/ipkg/fakeidentd.postinst create mode 100644 package/fbset/Config.in create mode 100644 package/fbset/Makefile create mode 100644 package/fbset/files/fb.modes create mode 100644 package/fbset/ipkg/fbset.control create mode 100644 package/fetchmail/Config.in create mode 100644 package/fetchmail/Makefile create mode 100644 package/fetchmail/ipkg/fetchmail.control create mode 100644 package/fetchmail/patches/patch-mxget_c create mode 100644 package/ffmpeg/Config.in create mode 100644 package/ffmpeg/Makefile create mode 100644 package/ffmpeg/ipkg/ffmpeg.control create mode 100644 package/file/Config.in create mode 100644 package/file/Makefile create mode 100644 package/file/ipkg/file.control create mode 100644 package/fixesproto/Config.in create mode 100644 package/fixesproto/Makefile create mode 100644 package/flac/Config.in create mode 100644 package/flac/Makefile create mode 100644 package/flac/ipkg/libflac.control create mode 100644 package/flac/patches/patch-configure create mode 100644 package/flac/patches/patch-src_libFLAC_Makefile_in create mode 100644 package/flac/patches/patch-src_libFLAC_lpc_c create mode 100644 package/fontcacheproto/Config.in create mode 100644 package/fontcacheproto/Makefile create mode 100644 package/fontsproto/Config.in create mode 100644 package/fontsproto/Makefile create mode 100644 package/fping/Config.in create mode 100644 package/fping/Makefile create mode 100644 package/fping/ipkg/fping.control create mode 100644 package/fprobe-ulog/Config.in create mode 100644 package/fprobe-ulog/Makefile create mode 100644 package/fprobe-ulog/ipkg/fprobe-ulog.control create mode 100644 package/fprobe/Config.in create mode 100644 package/fprobe/Makefile create mode 100644 package/fprobe/ipkg/fprobe.control create mode 100644 package/freeradius/Config.in create mode 100644 package/freeradius/Makefile create mode 100644 package/freeradius/files/clients.conf create mode 100644 package/freeradius/files/radiusd.conf create mode 100644 package/freeradius/files/radiusd.init create mode 100644 package/freeradius/files/users create mode 100644 package/freeradius/ipkg/freeradius-democerts.control create mode 100644 package/freeradius/ipkg/freeradius-mod-chap.control create mode 100644 package/freeradius/ipkg/freeradius-mod-detail.control create mode 100644 package/freeradius/ipkg/freeradius-mod-digest.control create mode 100644 package/freeradius/ipkg/freeradius-mod-eap-gtc.control create mode 100644 package/freeradius/ipkg/freeradius-mod-eap-md5.control create mode 100644 package/freeradius/ipkg/freeradius-mod-eap-mschapv2.control create mode 100644 package/freeradius/ipkg/freeradius-mod-eap-peap.control create mode 100644 package/freeradius/ipkg/freeradius-mod-eap-tls.control create mode 100644 package/freeradius/ipkg/freeradius-mod-eap-ttls.control create mode 100644 package/freeradius/ipkg/freeradius-mod-eap.conffiles create mode 100644 package/freeradius/ipkg/freeradius-mod-eap.control create mode 100644 package/freeradius/ipkg/freeradius-mod-files.conffiles create mode 100644 package/freeradius/ipkg/freeradius-mod-files.control create mode 100644 package/freeradius/ipkg/freeradius-mod-ldap.conffiles create mode 100644 package/freeradius/ipkg/freeradius-mod-ldap.control create mode 100644 package/freeradius/ipkg/freeradius-mod-mschap.control create mode 100644 package/freeradius/ipkg/freeradius-mod-pap.control create mode 100644 package/freeradius/ipkg/freeradius-mod-preprocess.conffiles create mode 100644 package/freeradius/ipkg/freeradius-mod-preprocess.control create mode 100644 package/freeradius/ipkg/freeradius-mod-realm.conffiles create mode 100644 package/freeradius/ipkg/freeradius-mod-realm.control create mode 100644 package/freeradius/ipkg/freeradius-mod-sql-mysql.control create mode 100644 package/freeradius/ipkg/freeradius-mod-sql-pgsql.control create mode 100644 package/freeradius/ipkg/freeradius-mod-sql.conffiles create mode 100644 package/freeradius/ipkg/freeradius-mod-sql.control create mode 100644 package/freeradius/ipkg/freeradius-utils.control create mode 100644 package/freeradius/ipkg/freeradius.conffiles create mode 100644 package/freeradius/ipkg/freeradius.control create mode 100644 package/freeradius/ipkg/freeradius.postinst create mode 100644 package/freeradius/patches/patch-share_dictionary create mode 100644 package/freeradius/patches/patch-src_main_event_c create mode 100644 package/freetype/Config.in create mode 100644 package/freetype/Makefile create mode 100644 package/freetype/ipkg/libfreetype.control create mode 100644 package/frickin/Config.in create mode 100644 package/frickin/Makefile create mode 100644 package/frickin/files/frickin.init create mode 100644 package/frickin/ipkg/frickin.control create mode 100644 package/frickin/ipkg/frickin.postinst create mode 100644 package/fuse/Config.in create mode 100644 package/fuse/Makefile create mode 100644 package/fuse/ipkg/fuse-utils.control create mode 100644 package/fuse/ipkg/libfuse.control create mode 100644 package/gatling/Config.in create mode 100644 package/gatling/Makefile create mode 100644 package/gatling/ipkg/gatling.control create mode 100644 package/gatling/patches/patch-GNUmakefile create mode 100644 package/gatling/patches/patch-gatling_c create mode 100644 package/gcc/Config.in create mode 100644 package/gcc/Makefile create mode 100644 package/gcc/ipkg/gcc.control create mode 100644 package/gdb/Config.in create mode 100644 package/gdb/Makefile create mode 100644 package/gdb/ipkg/gdb.control create mode 100644 package/gdbserver/Config.in create mode 100644 package/gdbserver/Makefile create mode 100644 package/gdbserver/ipkg/gdbserver.control create mode 100644 package/gettext/Config.in create mode 100644 package/gettext/Makefile create mode 100644 package/gettext/ipkg/gettext.control create mode 100644 package/gkrellmd/Config.in create mode 100644 package/gkrellmd/Makefile create mode 100644 package/gkrellmd/files/gkrellmd.init create mode 100644 package/gkrellmd/ipkg/gkrellmd.control create mode 100644 package/gkrellmd/ipkg/gkrellmd.postinst create mode 100644 package/glib/Config.in create mode 100644 package/glib/Makefile create mode 100644 package/glib/ipkg/glib1.control create mode 100644 package/glib/patches/01-debian-9.patch create mode 100644 package/glib/patches/02-cross-compile-fix.patch create mode 100644 package/glib/patches/03-use-glibconfig-sysdefs.patch create mode 100644 package/glib/patches/04-gcc3.4-fix.patch create mode 100644 package/glib2/Config.in create mode 100644 package/glib2/Makefile create mode 100644 package/glib2/ipkg/glib2.control create mode 100644 package/glibc/Config.in create mode 100644 package/glibc/Makefile create mode 100644 package/glibc/ipkg/glibc.control create mode 100644 package/gmediaserver/Config.in create mode 100644 package/gmediaserver/Makefile create mode 100644 package/gmediaserver/files/gmediaserver.init create mode 100644 package/gmediaserver/ipkg/gmediaserver.control create mode 100644 package/gmediaserver/ipkg/gmediaserver.postinst create mode 100644 package/gmediaserver/patches/patch-src_main_c create mode 100644 package/gmp/Config.in create mode 100644 package/gmp/Makefile create mode 100644 package/gmp/ipkg/libgmp.control create mode 100644 package/gnutls/Config.in create mode 100644 package/gnutls/Makefile create mode 100644 package/gnutls/ipkg/gnutls-utils.control create mode 100644 package/gnutls/ipkg/libgnutls-extra.control create mode 100644 package/gnutls/ipkg/libgnutls-openssl.control create mode 100644 package/gnutls/ipkg/libgnutls.control create mode 100644 package/gnutls/ipkg/libgnutlsxx.control create mode 100644 package/gpg/Config.in create mode 100644 package/gpg/Makefile create mode 100644 package/gpg/ipkg/gpg.control create mode 100644 package/gpm/Config.in create mode 100644 package/gpm/Makefile create mode 100644 package/gpm/ipkg/gpm.control create mode 100644 package/gpm/patches/patch-src_daemon_open_console_c create mode 100644 package/gpm/patches/patch-src_synaptics_c create mode 100644 package/gpsd/Config.in create mode 100644 package/gpsd/Makefile create mode 100644 package/gpsd/ipkg/gpsd-clients.control create mode 100644 package/gpsd/ipkg/gpsd.control create mode 100644 package/gpsd/patches/patch-gpsd_h create mode 100644 package/gpsd/patches/patch-sirfflash_c create mode 100644 package/gsm/Config.in create mode 100644 package/gsm/Makefile create mode 100644 package/gsm/ipkg/gsm-utils.control create mode 100644 package/gsm/ipkg/libgsm.control create mode 100644 package/gsm/patches/patch-Makefile create mode 100644 package/gsm/patches/patch-inc_config_h create mode 100644 package/gsm/patches/patch-inc_gsm_h create mode 100644 package/gsm/patches/patch-inc_toast_h create mode 100644 package/gsm/patches/patch-src_code_c create mode 100644 package/gsm/patches/patch-src_debug_c create mode 100644 package/gsm/patches/patch-src_toast_c create mode 100644 package/haserl/Config.in create mode 100644 package/haserl/Makefile create mode 100644 package/haserl/ipkg/haserl.control create mode 100644 package/haserl/patches/patch-src_haserl_c create mode 100644 package/hdparm/Config.in create mode 100644 package/hdparm/Makefile create mode 100644 package/hdparm/ipkg/hdparm.control create mode 100644 package/heimdal/Config.in create mode 100644 package/heimdal/Makefile create mode 100644 package/heimdal/files/heimdal.init create mode 100644 package/heimdal/files/kadmind.acl create mode 100644 package/heimdal/files/kdc.conf create mode 100644 package/heimdal/files/krb5.conf create mode 100644 package/heimdal/ipkg/heimdal-client-libs.control create mode 100644 package/heimdal/ipkg/heimdal-libs.control create mode 100644 package/heimdal/ipkg/heimdal-server.control create mode 100644 package/heimdal/ipkg/heimdal-server.postinst create mode 100644 package/heimdal/patches/patch-Makefile_am create mode 100644 package/heimdal/patches/patch-Makefile_in create mode 100644 package/heimdal/patches/patch-admin_Makefile_am create mode 100644 package/heimdal/patches/patch-admin_Makefile_in create mode 100644 package/heimdal/patches/patch-configure create mode 100644 package/heimdal/patches/patch-include_Makefile_am create mode 100644 package/heimdal/patches/patch-include_Makefile_in create mode 100644 package/heimdal/patches/patch-kadmin_Makefile_am create mode 100644 package/heimdal/patches/patch-kadmin_Makefile_in create mode 100644 package/heimdal/patches/patch-kadmin_kadm_conn_c create mode 100644 package/heimdal/patches/patch-kdc_kx509_c create mode 100644 package/heimdal/patches/patch-kdc_process_c create mode 100644 package/heimdal/patches/patch-kuser_Makefile_am create mode 100644 package/heimdal/patches/patch-kuser_Makefile_in create mode 100644 package/heimdal/patches/patch-lib_asn1_Makefile_am create mode 100644 package/heimdal/patches/patch-lib_asn1_Makefile_in create mode 100644 package/heimdal/patches/patch-lib_gssapi_Makefile_am create mode 100644 package/heimdal/patches/patch-lib_gssapi_Makefile_in create mode 100644 package/heimdal/patches/patch-lib_hdb_Makefile_am create mode 100644 package/heimdal/patches/patch-lib_hdb_Makefile_in create mode 100644 package/heimdal/patches/patch-lib_hx509_Makefile_am create mode 100644 package/heimdal/patches/patch-lib_hx509_Makefile_in create mode 100644 package/heimdal/patches/patch-lib_kadm5_Makefile_am create mode 100644 package/heimdal/patches/patch-lib_kadm5_Makefile_in create mode 100644 package/heimdal/patches/patch-lib_krb5_Makefile_am create mode 100644 package/heimdal/patches/patch-lib_krb5_Makefile_in create mode 100644 package/heimdal/patches/patch-lib_krb5_constants_c create mode 100644 package/heimdal/patches/patch-lib_roken_Makefile_am create mode 100644 package/heimdal/patches/patch-lib_roken_Makefile_in create mode 100644 package/heimdal/patches/patch-lib_vers_Makefile_am create mode 100644 package/heimdal/patches/patch-lib_vers_Makefile_in create mode 100644 package/heimdal/patches/patch-tools_krb5-config_in create mode 100644 package/heyu/Config.in create mode 100644 package/heyu/Makefile create mode 100644 package/heyu/files/x10.conf create mode 100644 package/heyu/ipkg/files/heyu.conffiles create mode 100644 package/heyu/ipkg/heyu.control create mode 100644 package/heyu/patches/patch-tty_c create mode 100644 package/hostapd/Config.in create mode 100644 package/hostapd/Makefile create mode 100644 package/hostapd/files/hostapd.conf create mode 100644 package/hostapd/files/hostapd.config create mode 100644 package/hostapd/ipkg/hostapd-utils.control create mode 100644 package/hostapd/ipkg/hostapd.conffiles create mode 100644 package/hostapd/ipkg/hostapd.control create mode 100644 package/hostapd/patches/patch-hostapd_Makefile create mode 100644 package/htpdate/Config.in create mode 100644 package/htpdate/Makefile create mode 100644 package/htpdate/files/htpdate.init create mode 100644 package/htpdate/ipkg/htpdate.control create mode 100644 package/htpdate/ipkg/htpdate.postinst create mode 100644 package/htpdate/patches/patch-Makefile create mode 100644 package/httping/Config.in create mode 100644 package/httping/Makefile create mode 100644 package/httping/ipkg/httping.control create mode 100644 package/httping/patches/patch-Makefile create mode 100644 package/httping/patches/patch-io_c create mode 100644 package/httptunnel/Config.in create mode 100644 package/httptunnel/Makefile create mode 100644 package/httptunnel/ipkg/httptunnel.control create mode 100644 package/icecast/Config.in create mode 100644 package/icecast/Makefile create mode 100644 package/icecast/ipkg/icecast.conffiles create mode 100644 package/icecast/ipkg/icecast.control create mode 100644 package/icecast/patches/patch-m4_xiph_curl_m4 create mode 100644 package/id3lib/Config.in create mode 100644 package/id3lib/Makefile create mode 100644 package/id3lib/ipkg/id3lib.control create mode 100644 package/id3lib/patches/patch-Makefile_in create mode 100644 package/id3lib/patches/patch-configure create mode 100644 package/id3lib/patches/patch-include_id3_id3lib_strings_h create mode 100644 package/id3lib/patches/patch-include_id3_writers_h create mode 100644 package/iftop/Config.in create mode 100644 package/iftop/Makefile create mode 100644 package/iftop/ipkg/iftop.control create mode 100644 package/igmpproxy/Config.in create mode 100644 package/igmpproxy/Makefile create mode 100644 package/igmpproxy/ipkg/igmpproxy.control create mode 100644 package/inputproto/Config.in create mode 100644 package/inputproto/Makefile create mode 100644 package/ipcad/Config.in create mode 100644 package/ipcad/Makefile create mode 100644 package/ipcad/ipkg/ipcad.conffiles create mode 100644 package/ipcad/ipkg/ipcad.control create mode 100644 package/ipcad/patches/patch-configure create mode 100644 package/ipcad/patches/patch-loop-ipq_c create mode 100644 package/iperf/Config.in create mode 100644 package/iperf/Makefile create mode 100644 package/iperf/ipkg/iperf.control create mode 100644 package/iproute2/Config.in create mode 100644 package/iproute2/Makefile create mode 100644 package/iproute2/ipkg/ip.control create mode 100644 package/iproute2/ipkg/tc.control create mode 100644 package/iproute2/patches/patch-Makefile create mode 100644 package/iproute2/patches/patch-ip_Makefile create mode 100644 package/iproute2/patches/patch-ip_iptunnel_c create mode 100644 package/ipsec-tools/Config.in create mode 100644 package/ipsec-tools/Makefile create mode 100644 package/ipsec-tools/ipkg/ipsec-tools.conffiles create mode 100644 package/ipsec-tools/ipkg/ipsec-tools.control create mode 100644 package/ipsec-tools/patches/patch-configure create mode 100644 package/ipsec-tools/patches/patch-configure_ac create mode 100644 package/ipsec-tools/patches/patch-src_racoon_cftoken_l create mode 100644 package/ipsec-tools/patches/patch-src_racoon_crypto_openssl_c create mode 100644 package/ipsec-tools/patches/patch-src_setkey_token_l create mode 100644 package/ipset/Config.in create mode 100644 package/ipset/Makefile create mode 100644 package/ipset/ipkg/ipset.control create mode 100644 package/ipset/patches/patch-kernel_ip_set_c create mode 100644 package/iptables-snmp/Config.in create mode 100644 package/iptables-snmp/Makefile create mode 100644 package/iptables-snmp/ipkg/iptables-snmp.control create mode 100644 package/iptables/Config.in create mode 100644 package/iptables/Makefile create mode 100644 package/iptables/files/l7/aim.pat create mode 100644 package/iptables/files/l7/bittorrent.pat create mode 100644 package/iptables/files/l7/edonkey-dl.pat create mode 100644 package/iptables/files/l7/edonkey.pat create mode 100644 package/iptables/files/l7/fasttrack.pat create mode 100644 package/iptables/files/l7/ftp.pat create mode 100644 package/iptables/files/l7/gnutella.pat create mode 100644 package/iptables/files/l7/http.pat create mode 100644 package/iptables/files/l7/ident.pat create mode 100644 package/iptables/files/l7/irc.pat create mode 100644 package/iptables/files/l7/jabber.pat create mode 100644 package/iptables/files/l7/msnmessenger.pat create mode 100644 package/iptables/files/l7/ntp.pat create mode 100644 package/iptables/files/l7/pop3.pat create mode 100644 package/iptables/files/l7/smtp.pat create mode 100644 package/iptables/files/l7/ssl.pat create mode 100644 package/iptables/files/l7/vnc.pat create mode 100644 package/iptables/ipkg/ip6tables.control create mode 100644 package/iptables/ipkg/iptables-extra.control create mode 100644 package/iptables/ipkg/iptables-mod-conntrack.control create mode 100644 package/iptables/ipkg/iptables-mod-extra.control create mode 100644 package/iptables/ipkg/iptables-mod-filter.control create mode 100644 package/iptables/ipkg/iptables-mod-imq.control create mode 100644 package/iptables/ipkg/iptables-mod-ipopt.control create mode 100644 package/iptables/ipkg/iptables-mod-ipsec.control create mode 100644 package/iptables/ipkg/iptables-mod-nat.control create mode 100644 package/iptables/ipkg/iptables-mod-ulog.control create mode 100644 package/iptables/ipkg/iptables-utils.control create mode 100644 package/iptables/ipkg/iptables.control create mode 100644 package/iptables/ipkg/iptables.postinst create mode 100644 package/iptraf/Config.in create mode 100644 package/iptraf/Makefile create mode 100644 package/iptraf/ipkg/iptraf.control create mode 100644 package/iptraf/patches/patch-src_Makefile create mode 100644 package/iptraf/patches/patch-src_dirs_h create mode 100644 package/iptraf/patches/patch-src_fltmgr_c create mode 100644 package/iptraf/patches/patch-src_hostmon_c create mode 100644 package/iptraf/patches/patch-src_ifaces_c create mode 100644 package/iptraf/patches/patch-src_landesc_c create mode 100644 package/iptraf/patches/patch-src_links_h create mode 100644 package/iptraf/patches/patch-src_log_c create mode 100644 package/iptraf/patches/patch-src_options_c create mode 100644 package/iptraf/patches/patch-src_othptab_c create mode 100644 package/iptraf/patches/patch-src_packet_c create mode 100644 package/iptraf/patches/patch-src_promisc_c create mode 100644 package/iptraf/patches/patch-src_rvnamed_h create mode 100644 package/iptraf/patches/patch-src_tcptable_c create mode 100644 package/iptraf/patches/patch-src_tcptable_h create mode 100644 package/iptraf/patches/patch-support_Makefile create mode 100644 package/irssi/Config.in create mode 100644 package/irssi/Makefile create mode 100644 package/irssi/ipkg/irssi.control create mode 100644 package/iw/Config.in create mode 100644 package/iw/Makefile create mode 100644 package/iw/ipkg/iw.control create mode 100644 package/jamvm/Config.in create mode 100644 package/jamvm/Makefile create mode 100644 package/jamvm/ipkg/jamvm.control create mode 100644 package/jpeg/Config.in create mode 100644 package/jpeg/Makefile create mode 100644 package/jpeg/ipkg/libjpeg.control create mode 100644 package/jpeg/patches/jpeg-6b-config_guess.patch create mode 100644 package/jpeg/patches/jpeg-6b-fix-makefile.patch create mode 100644 package/kbproto/Config.in create mode 100644 package/kbproto/Makefile create mode 100644 package/kismet/Config.in create mode 100644 package/kismet/Makefile create mode 100644 package/kismet/files/ap_manuf create mode 100644 package/kismet/files/client_manuf create mode 100644 package/kismet/files/kismet.conf create mode 100644 package/kismet/files/kismet_drone.conf create mode 100644 package/kismet/files/kismet_ui.conf create mode 100644 package/kismet/ipkg/kismet-client.conffiles create mode 100644 package/kismet/ipkg/kismet-client.control create mode 100644 package/kismet/ipkg/kismet-drone.conffiles create mode 100644 package/kismet/ipkg/kismet-drone.control create mode 100644 package/kismet/ipkg/kismet-server.conffiles create mode 100644 package/kismet/ipkg/kismet-server.control create mode 100644 package/kismet/ipkg/kismet.control create mode 100644 package/kismet/patches/patch-Makefile_in create mode 100644 package/knock/Config.in create mode 100644 package/knock/Makefile create mode 100644 package/knock/ipkg/knock.control create mode 100644 package/knock/ipkg/knockd.conffiles create mode 100644 package/knock/ipkg/knockd.control create mode 100644 package/krb5/Config.in create mode 100644 package/krb5/Makefile create mode 100644 package/krb5/files/kadmind.acl create mode 100644 package/krb5/files/kdc.conf create mode 100644 package/krb5/files/krb5.conf create mode 100644 package/krb5/files/krb5.init create mode 100644 package/krb5/ipkg/krb5-libs.control create mode 100644 package/krb5/ipkg/krb5-server.control create mode 100644 package/krb5/ipkg/krb5-server.postinst create mode 100644 package/krb5/patches/patch-src_Makefile_in create mode 100644 package/krb5/patches/patch-src_include_stock_osconf_h create mode 100644 package/krb5/patches/patch-src_lib_kadm5_Makefile_in create mode 100644 package/krb5/patches/patch-src_lib_kadm5_clnt_Makefile_in create mode 100644 package/krb5/patches/patch-src_lib_kadm5_srv_Makefile_in create mode 100644 package/krb5/patches/patch-src_lib_kdb_Makefile_in create mode 100644 package/krb5/patches/patch-src_lib_krb5_Makefile_in create mode 100644 package/krb5/patches/patch-src_lib_rpc_Makefile_in create mode 100644 package/l2tpns/Config.in create mode 100644 package/l2tpns/Makefile create mode 100644 package/l2tpns/ipkg/l2tpns.conffiles create mode 100644 package/l2tpns/ipkg/l2tpns.control create mode 100644 package/l2tpns/patches/01-honor_includes_remove_backtrace.patch create mode 100644 package/lame/Config.in create mode 100644 package/lame/Config.in.lib create mode 100644 package/lame/Makefile create mode 100644 package/lame/ipkg/lame.control create mode 100644 package/lame/ipkg/liblame.control create mode 100644 package/less/Config.in create mode 100644 package/less/Makefile create mode 100644 package/less/ipkg/less.control create mode 100644 package/libICE/Config.in create mode 100644 package/libICE/Makefile create mode 100644 package/libICE/ipkg/libice.control create mode 100644 package/libSM/Config.in create mode 100644 package/libSM/Makefile create mode 100644 package/libSM/ipkg/libsm.control create mode 100644 package/libX11/Config.in create mode 100644 package/libX11/Makefile create mode 100644 package/libX11/ipkg/libx11.control create mode 100644 package/libX11/patches/patch-src_util_Makefile_in create mode 100644 package/libX11/patches/patch-src_util_Makefile_in.orig create mode 100644 package/libXau/Config.in create mode 100644 package/libXau/Makefile create mode 100644 package/libXau/ipkg/libxau.control create mode 100644 package/libXaw/Config.in create mode 100644 package/libXaw/Makefile create mode 100644 package/libXaw/ipkg/libxaw.control create mode 100644 package/libXdmcp/Config.in create mode 100644 package/libXdmcp/Makefile create mode 100644 package/libXdmcp/ipkg/libxdmcp.control create mode 100644 package/libXext/Config.in create mode 100644 package/libXext/Makefile create mode 100644 package/libXext/ipkg/libxext.control create mode 100644 package/libXfont/Config.in create mode 100644 package/libXfont/Makefile create mode 100644 package/libXfont/ipkg/libxfont.control create mode 100644 package/libXmu/Config.in create mode 100644 package/libXmu/Makefile create mode 100644 package/libXmu/ipkg/libxmu.control create mode 100644 package/libXpm/Config.in create mode 100644 package/libXpm/Makefile create mode 100644 package/libXpm/ipkg/libxpm.control create mode 100644 package/libXt/Config.in create mode 100644 package/libXt/Makefile create mode 100644 package/libXt/ipkg/libxt.control create mode 100644 package/libXt/patches/patch-util_Makefile_in create mode 100644 package/libXxf86dga/Config.in create mode 100644 package/libXxf86dga/Makefile create mode 100644 package/libXxf86dga/ipkg/libxxf86dga.control create mode 100644 package/libao/Config.in create mode 100644 package/libao/Makefile create mode 100644 package/libao/ipkg/libao.control create mode 100644 package/libart/Config.in create mode 100644 package/libart/Makefile create mode 100644 package/libart/ipkg/libart.control create mode 100644 package/libart/patches/100-cross_compile_fix.patch create mode 100644 package/libaudiofile/Config.in create mode 100644 package/libaudiofile/Makefile create mode 100644 package/libaudiofile/ipkg/libaudiofile.control create mode 100644 package/libaudiofile/patches/001-audiofile-config-libdirs.patch create mode 100644 package/libcli/Config.in create mode 100755 package/libcli/Makefile create mode 100755 package/libcli/ipkg/libcli.control create mode 100644 package/libcli/patches/patch-Makefile create mode 100644 package/libdaemon/Config.in create mode 100644 package/libdaemon/Makefile create mode 100644 package/libdaemon/ipkg/libdaemon.control create mode 100644 package/libdb/Config.in create mode 100644 package/libdb/Makefile create mode 100644 package/libdb/ipkg/libdb.control create mode 100644 package/libdnet/Config.in create mode 100644 package/libdnet/Makefile create mode 100644 package/libdnet/ipkg/libdnet.control create mode 100644 package/libdnet/patches/libdnet-1.10-dnet_config.patch create mode 100644 package/libelf/Config.in create mode 100644 package/libelf/Makefile create mode 100644 package/libelf/ipkg/libelf.control create mode 100644 package/libevent/Config.in create mode 100644 package/libevent/Makefile create mode 100644 package/libevent/ipkg/libevent.control create mode 100644 package/libevent/patches/patch-Makefile_in create mode 100644 package/libevent/patches/patch-evdns_c create mode 100644 package/libevent/patches/patch-event_c create mode 100644 package/libffi/Config.in create mode 100644 package/libffi/Makefile create mode 100644 package/libffi/ipkg/libffi.control create mode 100644 package/libffi/patches/patch-Makefile_am create mode 100644 package/libffi/patches/patch-include_Makefile_am create mode 100644 package/libfontenc/Config.in create mode 100644 package/libfontenc/Makefile create mode 100644 package/libfontenc/ipkg/libfontenc.control create mode 100644 package/libgcrypt/Config.in create mode 100644 package/libgcrypt/Makefile create mode 100644 package/libgcrypt/ipkg/libgcrypt.control create mode 100644 package/libgd/Config.in create mode 100644 package/libgd/Makefile create mode 100644 package/libgd/ipkg/libgd.control create mode 100644 package/libgd/patches/patch-Makefile_in create mode 100644 package/libgdbm/Config.in create mode 100644 package/libgdbm/Makefile create mode 100644 package/libgdbm/ipkg/libgdbm.control create mode 100644 package/libgpg-error/Config.in create mode 100644 package/libgpg-error/Makefile create mode 100644 package/libgpg-error/ipkg/libgpg-error.control create mode 100644 package/libgssglue/Config.in create mode 100644 package/libgssglue/Makefile create mode 100644 package/libgssglue/ipkg/libgssglue.control create mode 100644 package/libiconv/Config.in create mode 100644 package/libiconv/Makefile create mode 100644 package/libiconv/ipkg/libiconv.control create mode 100644 package/libid3tag/Config.in create mode 100644 package/libid3tag/Makefile create mode 100644 package/libid3tag/files/id3tag.pc create mode 100644 package/libid3tag/ipkg/libid3tag.control create mode 100644 package/liblzo/Config.in create mode 100644 package/liblzo/Makefile create mode 100644 package/liblzo/ipkg/liblzo.control create mode 100644 package/libmad/Config.in create mode 100644 package/libmad/Makefile create mode 100644 package/libmad/files/mad.pc create mode 100644 package/libmad/ipkg/libmad.control create mode 100644 package/libnet/Config.in create mode 100644 package/libnet/Makefile create mode 100644 package/libnet/ipkg/libnet.control create mode 100644 package/libnet/patches/500-debian-subset.patch create mode 100644 package/libnfsidmap/Config.in create mode 100644 package/libnfsidmap/Makefile create mode 100644 package/libnfsidmap/ipkg/libnfsidmap.control create mode 100644 package/libnids/Config.in create mode 100644 package/libnids/Makefile create mode 100644 package/libnids/ipkg/libnids.control create mode 100644 package/libnids/patches/configure.patch create mode 100644 package/libnids/patches/no_asm_for_i386.patch create mode 100644 package/libnl/Config.in create mode 100644 package/libnl/Makefile create mode 100644 package/libnl/ipkg/libnl.control create mode 100644 package/libnl/patches/patch-include_netlink-types_h create mode 100644 package/libnl/patches/patch-include_netlink_genl_mngt_h create mode 100644 package/libnl/patches/patch-src_nl-list-caches_c create mode 100644 package/libnl/patches/patch-src_utils_c create mode 100644 package/libnl/patches/patch-src_utils_h create mode 100644 package/libogg/Config.in create mode 100644 package/libogg/Makefile create mode 100644 package/libogg/ipkg/libogg.control create mode 100644 package/libol/Config.in create mode 100644 package/libol/Makefile create mode 100644 package/libol/ipkg/libol.control create mode 100644 package/libosip2/Config.in create mode 100644 package/libosip2/Makefile create mode 100644 package/libosip2/ipkg/libosip2.control create mode 100644 package/libowfat/Config.in create mode 100644 package/libowfat/Makefile create mode 100644 package/libowfat/patches/patch-GNUmakefile create mode 100644 package/libp11/Config.in create mode 100644 package/libp11/Makefile create mode 100644 package/libp11/ipkg/libp11.control create mode 100644 package/libpcap/Config.in create mode 100644 package/libpcap/Makefile create mode 100644 package/libpcap/ipkg/libpcap.control create mode 100644 package/libpciaccess/Config.in create mode 100644 package/libpciaccess/Makefile create mode 100644 package/libpciaccess/ipkg/libpciaccess.control create mode 100644 package/libpciaccess/patches/patch-configure_ac create mode 100644 package/libpng/Config.in create mode 100644 package/libpng/Makefile create mode 100644 package/libpng/ipkg/libpng.control create mode 100644 package/libpri/Config.in create mode 100644 package/libpri/Makefile create mode 100644 package/libpri/ipkg/libpri.control create mode 100644 package/libpri/patches/patch-Makefile create mode 100644 package/libpthread/Config.in create mode 100644 package/libpthread/Makefile create mode 100644 package/libpthread/ipkg/libpthread.control create mode 100644 package/librpcsecgss/Config.in create mode 100644 package/librpcsecgss/Makefile create mode 100644 package/librpcsecgss/files/librpcsecgss.pc.in.gssglue create mode 100644 package/librpcsecgss/files/librpcsecgss.pc.in.heimdal create mode 100644 package/librpcsecgss/ipkg/librpcsecgss.control create mode 100644 package/librpcsecgss/patches/patch-configure_in create mode 100644 package/libshout/Config.in create mode 100644 package/libshout/Makefile create mode 100644 package/libshout/ipkg/libshout.control create mode 100644 package/libsigc++/Config.in create mode 100644 package/libsigc++/Makefile create mode 100644 package/libsigc++/ipkg/libsigc++.control create mode 100644 package/libsigc++/patches/patch-Makefile_in create mode 100644 package/libstdcxx/Config.in create mode 100644 package/libstdcxx/Makefile create mode 100644 package/libstdcxx/ipkg/libstdcxx.control create mode 100644 package/libtasn1/Config.in create mode 100644 package/libtasn1/Makefile create mode 100644 package/libtasn1/ipkg/libtasn1.control create mode 100644 package/libtasn1/patches/patch-configure create mode 100644 package/libthread_db/Config.in create mode 100644 package/libthread_db/Makefile create mode 100644 package/libthread_db/ipkg/libthread-db.control create mode 100644 package/libtiff/Config.in create mode 100644 package/libtiff/Makefile create mode 100644 package/libtiff/ipkg/libtiff.control create mode 100644 package/libtirpc/Config.in create mode 100644 package/libtirpc/Makefile create mode 100644 package/libtirpc/files/netconfig create mode 100644 package/libtirpc/ipkg/libtirpc.control create mode 100644 package/libtirpc/patches/patch-Makefile_am create mode 100644 package/libtirpc/patches/patch-src_Makefile_am create mode 100644 package/libtirpc/patches/patch-src_rpc_soc_c create mode 100644 package/libtool/Config.in create mode 100644 package/libtool/Makefile create mode 100644 package/libtool/ipkg/libltdl.control create mode 100644 package/libtool/patches/01-force_dlopen_deplibs.patch create mode 100644 package/libtorrent/Config.in create mode 100644 package/libtorrent/Makefile create mode 100644 package/libtorrent/ipkg/libtorrent.control create mode 100644 package/libtorrent/patches/patch-rak_functional_h create mode 100644 package/libtorrent/patches/patch-src_data_chunk_cc create mode 100644 package/libtorrent/patches/patch-src_data_chunk_list_h create mode 100644 package/libtorrent/patches/patch-src_net_address_list_cc create mode 100644 package/libtorrent/patches/patch-src_torrent_data_file_list_iterator_h create mode 100644 package/libtorrent/patches/patch-src_torrent_exceptions_cc create mode 100644 package/libtorrent/patches/patch-src_torrent_tracker_list_h create mode 100644 package/libtorrent/patches/patch-src_utils_diffie_hellman_cc create mode 100644 package/libupnp/Config.in create mode 100644 package/libupnp/Makefile create mode 100644 package/libupnp/ipkg/libupnp.control create mode 100644 package/libupnp/patches/patch-configure_ac create mode 100644 package/libusb/Config.in create mode 100644 package/libusb/Makefile create mode 100644 package/libusb/ipkg/libusb.control create mode 100644 package/libusb/patches/no-libusbpp.patch create mode 100644 package/libvorbis/Config.in create mode 100644 package/libvorbis/Makefile create mode 100644 package/libvorbis/ipkg/libvorbis.control create mode 100644 package/libvorbis/ipkg/libvorbisenc.control create mode 100644 package/libvorbis/patches/patch-Makefile_in create mode 100644 package/libvorbisidec/Config.in create mode 100644 package/libvorbisidec/Makefile create mode 100644 package/libvorbisidec/ipkg/libvorbisidec.control create mode 100644 package/libxkbfile/Config.in create mode 100644 package/libxkbfile/Makefile create mode 100644 package/libxkbfile/ipkg/libxkbfile.control create mode 100644 package/libxml2/Config.in create mode 100644 package/libxml2/Makefile create mode 100644 package/libxml2/ipkg/libxml2.control create mode 100644 package/libxslt/Config.in create mode 100644 package/libxslt/Makefile create mode 100644 package/libxslt/ipkg/libxslt.control create mode 100644 package/lighttpd/Config.in create mode 100644 package/lighttpd/Makefile create mode 100644 package/lighttpd/files/lighttpd.conf create mode 100644 package/lighttpd/files/lighttpd.init create mode 100644 package/lighttpd/ipkg/lighttpd-mod-accesslog.control create mode 100644 package/lighttpd/ipkg/lighttpd-mod-alias.control create mode 100644 package/lighttpd/ipkg/lighttpd-mod-auth.control create mode 100644 package/lighttpd/ipkg/lighttpd-mod-cgi.control create mode 100644 package/lighttpd/ipkg/lighttpd-mod-evasive.control create mode 100644 package/lighttpd/ipkg/lighttpd-mod-expire.control create mode 100644 package/lighttpd/ipkg/lighttpd-mod-fastcgi.control create mode 100644 package/lighttpd/ipkg/lighttpd-mod-proxy.control create mode 100644 package/lighttpd/ipkg/lighttpd-mod-redirect.control create mode 100644 package/lighttpd/ipkg/lighttpd-mod-rewrite.control create mode 100644 package/lighttpd/ipkg/lighttpd-mod-setenv.control create mode 100644 package/lighttpd/ipkg/lighttpd-mod-simple-vhost.control create mode 100644 package/lighttpd/ipkg/lighttpd-mod-ssi.control create mode 100644 package/lighttpd/ipkg/lighttpd-mod-status.control create mode 100644 package/lighttpd/ipkg/lighttpd-mod-usertrack.control create mode 100644 package/lighttpd/ipkg/lighttpd-mod-webdav.control create mode 100644 package/lighttpd/ipkg/lighttpd.conffiles create mode 100644 package/lighttpd/ipkg/lighttpd.control create mode 100644 package/lighttpd/ipkg/lighttpd.postinst create mode 100644 package/lighttpd/patches/500-configure_cross.patch create mode 100644 package/links/Config.in create mode 100644 package/links/Makefile create mode 100644 package/links/ipkg/links.control create mode 100644 package/linux-atm/Config.in create mode 100644 package/linux-atm/Makefile create mode 100644 package/linux-atm/files/br2684.hotplug create mode 100644 package/linux-atm/ipkg/br2684ctl.control create mode 100644 package/linux-atm/ipkg/linux-atm.control create mode 100644 package/linux-atm/patches/000-debian_16.patch create mode 100644 package/linux-atm/patches/010-header_stupidity.patch create mode 100644 package/linux-atm/patches/100-br2684.patch create mode 100644 package/linux-atm/patches/200-no_libfl.patch create mode 100644 package/linux-atm/patches/300-no_autotools.patch create mode 100644 package/logrotate/Config.in create mode 100644 package/logrotate/Makefile create mode 100644 package/logrotate/files/logrotate.conf create mode 100644 package/logrotate/ipkg/logrotate.control create mode 100644 package/logrotate/patches/patch-Makefile create mode 100644 package/logrotate/patches/patch-config_c create mode 100644 package/logrotate/patches/patch-logrotate_8 create mode 100644 package/logrotate/patches/patch-logrotate_c create mode 100644 package/logrotate/patches/patch-logrotate_h create mode 100644 package/lrzsz/Config.in create mode 100644 package/lrzsz/Makefile create mode 100644 package/lrzsz/ipkg/lrzsz.control create mode 100644 package/ltp/Config.in create mode 100644 package/ltp/Makefile create mode 100644 package/ltp/ipkg/ltp.control create mode 100644 package/ltp/patches/patch-Makefile create mode 100644 package/ltp/patches/patch-runltp create mode 100644 package/ltp/patches/patch-testcases_kernel_syscalls_Makefile create mode 100644 package/ltp/patches/patch-testcases_misc_math_Makefile create mode 100644 package/ltp/patches/patch-testcases_misc_math_float_Makefile create mode 100644 package/lua/Config.in create mode 100644 package/lua/Makefile create mode 100644 package/lua/ipkg/liblua.control create mode 100644 package/lua/ipkg/lua-examples.control create mode 100644 package/lua/ipkg/lua.control create mode 100644 package/lua/ipkg/luac.control create mode 100644 package/lua/patches/lua-5.0.2-config.patch create mode 100644 package/lua/patches/lua-5.0.2-soname.patch create mode 100644 package/lvm/Config.in create mode 100644 package/lvm/Makefile create mode 100644 package/lvm/ipkg/lvm.control create mode 100644 package/lvm/patches/patch-tools_Makefile_in create mode 100644 package/lynx/Config.in create mode 100644 package/lynx/Makefile create mode 100644 package/lynx/ipkg/lynx.control create mode 100644 package/lynx/patches/patch-config_hin create mode 100644 package/lynx/patches/patch-lynx_cfg create mode 100644 package/lynx/patches/patch-makefile_in create mode 100644 package/lynx/patches/patch-samples_lynx_lss create mode 100644 package/lynx/patches/patch-src_LYUtils_c create mode 100644 package/lynx/patches/patch-userdefs_h create mode 100644 package/mac80211/Config.in create mode 100644 package/mac80211/Makefile create mode 100644 package/mac80211/ipkg/kmod-mac80211-ath5k.control create mode 100644 package/mac80211/ipkg/kmod-mac80211-rt61.control create mode 100644 package/mac80211/ipkg/kmod-mac80211.control create mode 100644 package/macchanger/Config.in create mode 100755 package/macchanger/Makefile create mode 100755 package/macchanger/ipkg/macchanger.control create mode 100644 package/madplay/Config.in create mode 100644 package/madplay/Makefile create mode 100644 package/madplay/ipkg/madplay.control create mode 100644 package/maradns/Config.in create mode 100644 package/maradns/Makefile create mode 100644 package/maradns/files/maradns.init create mode 100644 package/maradns/files/mararc create mode 100644 package/maradns/files/sample.ptr create mode 100644 package/maradns/files/sample.zone create mode 100644 package/maradns/ipkg/maradns.conffiles create mode 100644 package/maradns/ipkg/maradns.control create mode 100644 package/maradns/ipkg/maradns.postinst create mode 100644 package/maradns/patches/cross-compile-fix.patch create mode 100644 package/mc/Config.in create mode 100644 package/mc/Makefile create mode 100644 package/mc/ipkg/mc.control create mode 100644 package/mc/patches/patch-lib_mc_ext_in create mode 100644 package/mc/patches/patch-lib_mc_lib create mode 100644 package/mc/patches/patch-lib_mc_menu create mode 100644 package/mc/patches/patch-src_key_c create mode 100644 package/mc/patches/patch-src_main_c create mode 100644 package/mc/patches/patch-vfs_extfs_iso9660_in create mode 100644 package/mgetty/Config.in create mode 100644 package/mgetty/Makefile create mode 100644 package/mgetty/ipkg/mgetty.control create mode 100644 package/mgetty/patches/mgetty.patch create mode 100644 package/miau/Config.in create mode 100644 package/miau/Makefile create mode 100755 package/miau/files/miau.init create mode 100644 package/miau/files/miaurc create mode 100644 package/miau/ipkg/miau.conffiles create mode 100644 package/miau/ipkg/miau.control create mode 100644 package/miau/ipkg/miau.postinst create mode 100644 package/miax/Config.in create mode 100644 package/miax/Makefile create mode 100644 package/miax/ipkg/miax.control create mode 100644 package/miax/patches/01-cross.patch create mode 100644 package/microperl/Config.in create mode 100644 package/microperl/Makefile create mode 100644 package/microperl/ipkg/microperl.control create mode 100644 package/mini_httpd/Config.in create mode 100644 package/mini_httpd/Makefile create mode 100644 package/mini_httpd/files/mini_httpd-ssl.conf create mode 100644 package/mini_httpd/files/mini_httpd.conf create mode 100644 package/mini_httpd/files/mini_httpd.init create mode 100644 package/mini_httpd/files/mini_httpd.pem create mode 100644 package/mini_httpd/ipkg/mini-httpd-htpasswd.control create mode 100644 package/mini_httpd/ipkg/mini-httpd-matrixssl.conffiles create mode 100644 package/mini_httpd/ipkg/mini-httpd-matrixssl.control create mode 100644 package/mini_httpd/ipkg/mini-httpd-matrixssl.postinst create mode 100644 package/mini_httpd/ipkg/mini-httpd-openssl.conffiles create mode 100644 package/mini_httpd/ipkg/mini-httpd-openssl.control create mode 100644 package/mini_httpd/ipkg/mini-httpd-openssl.postinst create mode 100644 package/mini_httpd/ipkg/mini-httpd.conffiles create mode 100644 package/mini_httpd/ipkg/mini-httpd.control create mode 100644 package/mini_httpd/ipkg/mini-httpd.postinst create mode 100644 package/mini_httpd/patches/patch-Makefile create mode 100644 package/mini_httpd/patches/patch-mini_httpd_c create mode 100644 package/mini_sendmail/Config.in create mode 100644 package/mini_sendmail/Makefile create mode 100644 package/mini_sendmail/ipkg/mini-sendmail.control create mode 100644 package/mini_sendmail/patches/500-flags.patch create mode 100644 package/miredo/Config.in create mode 100644 package/miredo/Makefile create mode 100644 package/miredo/files/miredo-server.init create mode 100644 package/miredo/files/miredo.init create mode 100644 package/miredo/ipkg/miredo-server.control create mode 100644 package/miredo/ipkg/miredo-server.postinst create mode 100644 package/miredo/ipkg/miredo.conffiles create mode 100644 package/miredo/ipkg/miredo.control create mode 100644 package/miredo/ipkg/miredo.postinst create mode 100644 package/miredo/patches/patch-libteredo_maintain_c create mode 100644 package/mksh/Config.in create mode 100644 package/mksh/Makefile create mode 100644 package/mksh/ipkg/mksh.conffiles create mode 100644 package/mksh/ipkg/mksh.control create mode 100644 package/mksh/patches/patch-dot_mkshrc create mode 100644 package/moc/Config.in create mode 100644 package/moc/Makefile create mode 100644 package/moc/ipkg/moc.control create mode 100644 package/monit/Config.in create mode 100644 package/monit/Makefile create mode 100644 package/monit/files/monit.init create mode 100644 package/monit/ipkg/monit-nossl.conffiles create mode 100644 package/monit/ipkg/monit-nossl.control create mode 100644 package/monit/ipkg/monit.conffiles create mode 100644 package/monit/ipkg/monit.control create mode 100644 package/motion/Config.in create mode 100644 package/motion/Makefile create mode 100644 package/motion/ipkg/motion.control create mode 100644 package/motion/patches/01-ffmpeg.patch create mode 100644 package/motion/patches/02-honor_cppflags.patch create mode 100644 package/mpd/Config.in create mode 100644 package/mpd/Makefile create mode 100644 package/mpd/files/mpd.conf create mode 100644 package/mpd/files/mpd.init create mode 100644 package/mpd/ipkg/mpd.conffiles create mode 100644 package/mpd/ipkg/mpd.control create mode 100644 package/mpd/ipkg/mpd.postinst create mode 100644 package/mpfr/Config.in create mode 100644 package/mpfr/Makefile create mode 100644 package/mpfr/ipkg/mpfr.control create mode 100644 package/mplayer/Config.in create mode 100644 package/mplayer/Makefile create mode 100644 package/mplayer/ipkg/mplayer.control create mode 100644 package/mplayer/patches/patch-configure create mode 100644 package/mplayer/patches/patch-loader_win32_c create mode 100644 package/mrd6/Config.in create mode 100644 package/mrd6/Makefile create mode 100644 package/mrd6/files/mrd6.conf create mode 100644 package/mrd6/files/mrd6.init create mode 100644 package/mrd6/ipkg/mrd6.control create mode 100644 package/mrd6/ipkg/mrd6.postinst create mode 100644 package/mrd6/patches/patch-src_Makefile create mode 100644 package/mt-daapd/Config.in create mode 100644 package/mt-daapd/Makefile create mode 100644 package/mt-daapd/files/mt-daapd.init create mode 100644 package/mt-daapd/ipkg/mt-daapd.conffiles create mode 100644 package/mt-daapd/ipkg/mt-daapd.control create mode 100644 package/mt-daapd/ipkg/mt-daapd.postinst create mode 100644 package/mtr/Config.in create mode 100644 package/mtr/Makefile create mode 100644 package/mtr/ipkg/mtr.control create mode 100644 package/mtr/patches/501-dns.patch create mode 100644 package/mtr/patches/patch-Makefile create mode 100644 package/mtr/patches/patch-curses_c create mode 100644 package/mtr/patches/patch-report_c create mode 100644 package/mutt/Config.in create mode 100644 package/mutt/Makefile create mode 100644 package/mutt/ipkg/mutt.control create mode 100644 package/mutt/patches/patch-Makefile_in create mode 100644 package/mysql/Config.in create mode 100644 package/mysql/Makefile create mode 100644 package/mysql/ipkg/libmysqlclient.control create mode 100644 package/mysql/patches/patch-configure create mode 100644 package/mysql/patches/patch-include_my_global_h create mode 100644 package/nano/Config.in create mode 100644 package/nano/Makefile create mode 100644 package/nano/files/nanorc create mode 100644 package/nano/ipkg/nano.conffiles create mode 100644 package/nano/ipkg/nano.control create mode 100644 package/ncurses/Config.in create mode 100644 package/ncurses/Makefile create mode 100644 package/ncurses/ipkg/libncurses.control create mode 100644 package/ncurses/patches/patch-misc_run_tic_in create mode 100644 package/ndisc/Config.in create mode 100644 package/ndisc/Makefile create mode 100644 package/ndisc/extra/rdnssd/strverscmp.c create mode 100644 package/ndisc/ipkg/ndisc6.control create mode 100644 package/ndisc/ipkg/rdisc6.control create mode 100644 package/ndisc/ipkg/tcptraceroute6.control create mode 100644 package/ndisc/patches/patch-rdnssd_Makefile_am create mode 100644 package/ndisc/patches/patch-rdnssd_Makefile_in create mode 100644 package/ndisc/patches/patch-rdnssd_icmp_c create mode 100644 package/ndisc/patches/patch-rdnssd_rdnssd_c create mode 100644 package/ndisc/patches/patch-rdnssd_rdnssd_c.orig create mode 100644 package/ndisc/patches/patch-src_addrinfo_c create mode 100644 package/ndisc/patches/patch-src_ndisc_c create mode 100644 package/ndisc/patches/patch-src_ndisc_c.orig create mode 100644 package/ndisc/patches/patch-src_tcpspray_c create mode 100644 package/ndisc/patches/patch-src_tcpspray_c.orig create mode 100644 package/ndisc/patches/patch-src_tcptraceroute_c create mode 100644 package/ndisc/patches/patch-src_trace-tcp_c create mode 100644 package/ndisc/patches/patch-src_trace-udp_c create mode 100644 package/ndisc/patches/patch-src_traceroute_c create mode 100644 package/ndisc/patches/patch-src_traceroute_c.orig create mode 100644 package/ndisc/patches/patch-src_traceroute_h create mode 100644 package/ndisc/patches/patch-src_traceroute_h.orig create mode 100644 package/neon/Config.in create mode 100644 package/neon/Makefile create mode 100644 package/neon/ipkg/neon.control create mode 100644 package/net-snmp/Config.in create mode 100644 package/net-snmp/Makefile create mode 100644 package/net-snmp/files/snmpd.conf create mode 100644 package/net-snmp/files/snmpd.default create mode 100644 package/net-snmp/files/snmpd.init create mode 100644 package/net-snmp/ipkg/libnetsnmp.control create mode 100644 package/net-snmp/ipkg/snmp-utils.control create mode 100644 package/net-snmp/ipkg/snmpd.conffiles create mode 100644 package/net-snmp/ipkg/snmpd.control create mode 100644 package/net-snmp/ipkg/snmpd.postinst create mode 100644 package/netperf/Config.in create mode 100644 package/netperf/Makefile create mode 100644 package/netperf/files/netserver.init create mode 100644 package/netperf/ipkg/netperf.control create mode 100644 package/netperf/ipkg/netperf.postinst create mode 100644 package/netperf/patches/01-netperf-2.3pl1-openwrt.patch create mode 100644 package/netstat-nat/Config.in create mode 100644 package/netstat-nat/Makefile create mode 100644 package/netstat-nat/ipkg/netstat-nat.control create mode 100644 package/nfs-utils/Config.in create mode 100644 package/nfs-utils/Makefile create mode 100644 package/nfs-utils/files/idmapd.conf create mode 100644 package/nfs-utils/files/nfsd.exports create mode 100644 package/nfs-utils/files/nfsd.init create mode 100644 package/nfs-utils/files/rpc create mode 100644 package/nfs-utils/ipkg/nfs-utils.control create mode 100644 package/nfs-utils/ipkg/nfs-utils.postinst create mode 100644 package/nfs-utils/patches/patch-aclocal_kerberos5_m4 create mode 100644 package/nfs-utils/patches/patch-support_nfs_nfs_mntent_c create mode 100644 package/nfs-utils/patches/patch-tools_Makefile_am create mode 100644 package/nfs-utils/patches/patch-tools_Makefile_in create mode 100644 package/nfs-utils/patches/patch-utils_mount_error_c create mode 100644 package/nfs-utils/patches/patch-utils_mountd_cache_c create mode 100644 package/nfs-utils/patches/patch-utils_mountd_fsloc_c create mode 100644 package/nmap/Config.in create mode 100644 package/nmap/Makefile create mode 100644 package/nmap/ipkg/nmap.control create mode 100644 package/nmap/patches/patch-configure create mode 100644 package/nmap/patches/patch-nmap_dns_h create mode 100644 package/nmap/patches/patch-output_cc create mode 100644 package/nmap/patches/patch-traceroute_cc create mode 100644 package/nocatsplash/Config.in create mode 100644 package/nocatsplash/Makefile create mode 100644 package/nocatsplash/ipkg/nocatsplash.conffiles create mode 100644 package/nocatsplash/ipkg/nocatsplash.control create mode 100644 package/nocatsplash/patches/openwrt-firewall.patch create mode 100644 package/ntfs-3g/Config.in create mode 100644 package/ntfs-3g/Makefile create mode 100644 package/ntfs-3g/ipkg/kmod-fs-ntfs-3g.control create mode 100644 package/ntpclient/Config.in create mode 100644 package/ntpclient/Makefile create mode 100644 package/ntpclient/ipkg/ntpclient.control create mode 100644 package/ntpclient/patches/patch-ntpclient_c create mode 100644 package/nut/Config.in create mode 100644 package/nut/Makefile create mode 100644 package/nut/files/ups.conf create mode 100644 package/nut/files/upsd.conf create mode 100644 package/nut/files/upsd.init create mode 100644 package/nut/ipkg/nut.conffiles create mode 100644 package/nut/ipkg/nut.control create mode 100644 package/nut/ipkg/nut.postinst create mode 100644 package/obexftp/Config.in create mode 100644 package/obexftp/Makefile create mode 100644 package/obexftp/ipkg/obexftp.control create mode 100644 package/olsrd/Config.in create mode 100644 package/olsrd/Makefile create mode 100644 package/olsrd/files/olsrd.init create mode 100644 package/olsrd/files/olsrd_secure_key create mode 100644 package/olsrd/ipkg/olsrd-mod-dot-draw.control create mode 100644 package/olsrd/ipkg/olsrd-mod-dyn-gw.control create mode 100644 package/olsrd/ipkg/olsrd-mod-httpinfo.control create mode 100644 package/olsrd/ipkg/olsrd-mod-nameservice.control create mode 100644 package/olsrd/ipkg/olsrd-mod-power.control create mode 100644 package/olsrd/ipkg/olsrd-mod-secure.conffiles create mode 100644 package/olsrd/ipkg/olsrd-mod-secure.control create mode 100644 package/olsrd/ipkg/olsrd-mod-tas.control create mode 100644 package/olsrd/ipkg/olsrd.conffiles create mode 100644 package/olsrd/ipkg/olsrd.control create mode 100644 package/olsrd/ipkg/olsrd.postinst create mode 100644 package/olsrd/patches/patch-make_Makefile_linux create mode 100644 package/opencdk/Config.in create mode 100644 package/opencdk/Makefile create mode 100644 package/opencdk/ipkg/libopencdk.control create mode 100644 package/opencdk/patches/patch-configure create mode 100644 package/openct/Config.in create mode 100644 package/openct/Makefile create mode 100644 package/openct/ipkg/openct.control create mode 100644 package/openldap/Config.in create mode 100644 package/openldap/Config.in.lib create mode 100644 package/openldap/Makefile create mode 100644 package/openldap/files/slapd.conf create mode 100644 package/openldap/files/slapd.init create mode 100644 package/openldap/ipkg/libopenldap.conffiles create mode 100644 package/openldap/ipkg/libopenldap.control create mode 100644 package/openldap/ipkg/openldap-slapd.control create mode 100644 package/openldap/ipkg/openldap-slapd.postinst create mode 100644 package/openldap/ipkg/openldap-utils.control create mode 100644 package/openntpd/Config.in create mode 100644 package/openntpd/Makefile create mode 100644 package/openntpd/extra/openbsd-compat/port-linux.c create mode 100644 package/openntpd/files/ntpd.conf create mode 100644 package/openntpd/files/ntpd.init create mode 100644 package/openntpd/ipkg/openntpd.conffiles create mode 100644 package/openntpd/ipkg/openntpd.control create mode 100644 package/openntpd/ipkg/openntpd.postinst create mode 100644 package/openntpd/patches/patch-client_c create mode 100644 package/openntpd/patches/patch-configure_ac create mode 100644 package/openntpd/patches/patch-defines_h create mode 100644 package/openntpd/patches/patch-ntpd_h create mode 100644 package/openntpd/patches/patch-openbsd-compat_Makefile_in create mode 100644 package/openntpd/patches/patch-openbsd-compat_openbsd-compat_h create mode 100644 package/openobex/Config.in create mode 100644 package/openobex/Makefile create mode 100644 package/openobex/ipkg/openobex.control create mode 100644 package/opensc/Config.in create mode 100644 package/opensc/Makefile create mode 100644 package/opensc/ipkg/opensc.control create mode 100644 package/opensc/patches/patch-src_Makefile_in create mode 100644 package/opensips/Config.in create mode 100644 package/opensips/Makefile create mode 100644 package/opensips/files/opensips.cfg create mode 100644 package/opensips/files/opensips.init create mode 100644 package/opensips/ipkg/opensips-mod-acc.control create mode 100644 package/opensips/ipkg/opensips-mod-auth-db.control create mode 100644 package/opensips/ipkg/opensips-mod-auth-radius.control create mode 100644 package/opensips/ipkg/opensips-mod-auth.control create mode 100644 package/opensips/ipkg/opensips-mod-avp-radius.control create mode 100644 package/opensips/ipkg/opensips-mod-avp_radius.control create mode 100644 package/opensips/ipkg/opensips-mod-avpops.control create mode 100644 package/opensips/ipkg/opensips-mod-dispatcher.control create mode 100644 package/opensips/ipkg/opensips-mod-diversion.control create mode 100644 package/opensips/ipkg/opensips-mod-flatstore.control create mode 100644 package/opensips/ipkg/opensips-mod-gflags.control create mode 100644 package/opensips/ipkg/opensips-mod-group-radius.control create mode 100644 package/opensips/ipkg/opensips-mod-group.control create mode 100644 package/opensips/ipkg/opensips-mod-group_radius.control create mode 100644 package/opensips/ipkg/opensips-mod-lcr.control create mode 100644 package/opensips/ipkg/opensips-mod-mediaproxy.control create mode 100644 package/opensips/ipkg/opensips-mod-msilo.control create mode 100644 package/opensips/ipkg/opensips-mod-mysql.control create mode 100644 package/opensips/ipkg/opensips-mod-nathelper.control create mode 100644 package/opensips/ipkg/opensips-mod-options.control create mode 100644 package/opensips/ipkg/opensips-mod-pdt.control create mode 100644 package/opensips/ipkg/opensips-mod-permissions.control create mode 100644 package/opensips/ipkg/opensips-mod-pike.control create mode 100644 package/opensips/ipkg/opensips-mod-sms.control create mode 100644 package/opensips/ipkg/opensips-mod-speeddial.control create mode 100644 package/opensips/ipkg/opensips-mod-uac-redirect.control create mode 100644 package/opensips/ipkg/opensips-mod-uac.control create mode 100644 package/opensips/ipkg/opensips-mod-uac_redirect.control create mode 100644 package/opensips/ipkg/opensips-mod-uri-db.control create mode 100644 package/opensips/ipkg/opensips-mod-uri-radius.control create mode 100644 package/opensips/ipkg/opensips-mod-uri.control create mode 100644 package/opensips/ipkg/opensips-mod-uri_db.control create mode 100644 package/opensips/ipkg/opensips-mod-uri_radius.control create mode 100644 package/opensips/ipkg/opensips-mod-xlog.control create mode 100644 package/opensips/ipkg/opensips.conffiles create mode 100644 package/opensips/ipkg/opensips.control create mode 100644 package/opensips/ipkg/opensips.postinst create mode 100644 package/openssh/Config.in create mode 100644 package/openssh/Makefile create mode 100644 package/openssh/files/sshd.init create mode 100644 package/openssh/files/sshd_config create mode 100644 package/openssh/ipkg/openssh-client-utils.control create mode 100644 package/openssh/ipkg/openssh-client.conffiles create mode 100644 package/openssh/ipkg/openssh-client.control create mode 100644 package/openssh/ipkg/openssh-server.conffiles create mode 100644 package/openssh/ipkg/openssh-server.control create mode 100644 package/openssh/ipkg/openssh-server.postinst create mode 100644 package/openssh/ipkg/openssh-sftp-client.control create mode 100644 package/openssh/ipkg/openssh-sftp-server.control create mode 100644 package/openssh/patches/patch-cipher_c create mode 100644 package/openssh/patches/patch-configure create mode 100644 package/openssh/patches/patch-mac_c create mode 100644 package/openssh/patches/patch-myproposal_h create mode 100644 package/openssh/patches/patch-openbsd-compat_port-tun_c create mode 100644 package/openssl-pkcs11/Config.in create mode 100644 package/openssl-pkcs11/Makefile create mode 100644 package/openssl-pkcs11/ipkg/openssl-pkcs11.control create mode 100644 package/openssl-pkcs11/patches/patch-configure create mode 100644 package/openssl/Config.in create mode 100644 package/openssl/Makefile create mode 100644 package/openssl/cert.pem create mode 100644 package/openssl/ipkg/ca-certificates.conffiles create mode 100644 package/openssl/ipkg/ca-certificates.control create mode 100644 package/openssl/ipkg/libopenssl.control create mode 100644 package/openssl/ipkg/openssl-util.conffiles create mode 100644 package/openssl/ipkg/openssl-util.control create mode 100644 package/openssl/patches/ocf.patch create mode 100644 package/openssl/patches/patch-Configure create mode 100644 package/openssl/patches/patch-Makefile_shared create mode 100644 package/openssl/patches/patch-apps_speed_c create mode 100644 package/openssl/patches/patch-util_shlib_wrap_sh create mode 100644 package/openswan/Config.in create mode 100644 package/openswan/Makefile create mode 100644 package/openswan/files/openswan.init create mode 100644 package/openswan/ipkg/openswan.conffiles create mode 100644 package/openswan/ipkg/openswan.control create mode 100644 package/openswan/ipkg/openswan.postinst create mode 100644 package/openswan/patches/patch-lib_libdns_Makefile create mode 100644 package/openswan/patches/patch-lib_libopenswan_alg_info_c create mode 100644 package/openswan/patches/patch-programs_ikeping_ikeping_c create mode 100644 package/openvpn/Config.in create mode 100644 package/openvpn/Makefile create mode 100644 package/openvpn/files/openvpn.conf create mode 100644 package/openvpn/files/openvpn.init create mode 100644 package/openvpn/files/serial create mode 100644 package/openvpn/ipkg/openvpn-easy-rsa.control create mode 100644 package/openvpn/ipkg/openvpn.control create mode 100644 package/openvpn/ipkg/openvpn.postinst create mode 100644 package/openvpn/patches/easy-rsa.patch create mode 100644 package/oprofile/Config.in create mode 100644 package/oprofile/Makefile create mode 100644 package/oprofile/ipkg/oprofile.control create mode 100644 package/osiris/Config.in create mode 100644 package/osiris/Makefile create mode 100644 package/osiris/files/osirisd.init create mode 100644 package/osiris/ipkg/osirisd.control create mode 100644 package/osiris/ipkg/osirisd.postinst create mode 100644 package/osiris/patches/patch-configure create mode 100644 package/osiris/patches/patch-src_libosiris_Makefile_in create mode 100644 package/osiris/patches/patch-src_libosiris_configuration_c create mode 100644 package/osiris/patches/patch-src_libosiris_configuration_h create mode 100644 package/osiris/patches/patch-src_libosiris_filter_c create mode 100644 package/osiris/patches/patch-src_libosiris_filter_h create mode 100644 package/osiris/patches/patch-src_libosiris_ssl_utilities_c create mode 100644 package/osiris/patches/patch-src_libosiris_ssl_utilities_h create mode 100644 package/osiris/patches/patch-src_libosiris_utilities_c create mode 100644 package/osiris/patches/patch-src_osirisd_scanner_c create mode 100644 package/osiris/patches/patch-src_osirismd_md_control_c create mode 100644 package/owfs/Config.in create mode 100644 package/owfs/Makefile create mode 100644 package/owfs/ipkg/owfs.control create mode 100644 package/p910nd/Config.in create mode 100644 package/p910nd/Makefile create mode 100644 package/p910nd/files/p910nd.init create mode 100644 package/p910nd/ipkg/p910nd.control create mode 100644 package/p910nd/ipkg/p910nd.postinst create mode 100644 package/p910nd/patches/100-Makefile.patch create mode 100644 package/p910nd/patches/200-p910nd-0.7.patch create mode 100644 package/palantir/Config.in create mode 100644 package/palantir/Makefile create mode 100644 package/palantir/ipkg/palantir.conffiles create mode 100644 package/palantir/ipkg/palantir.control create mode 100644 package/parprouted/Config.in create mode 100644 package/parprouted/Makefile create mode 100755 package/parprouted/files/parprouted.default create mode 100644 package/parprouted/files/parprouted.init create mode 100644 package/parprouted/ipkg/parprouted.control create mode 100644 package/parprouted/ipkg/parprouted.postinst create mode 100644 package/parprouted/patches/parprouted.patch create mode 100644 package/pciutils/Config.in create mode 100644 package/pciutils/Makefile create mode 100644 package/pciutils/ipkg/pciutils.control create mode 100644 package/pciutils/patches/patch-lib_configure create mode 100644 package/pcre/Config.in create mode 100644 package/pcre/Makefile create mode 100644 package/pcre/ipkg/libpcre.control create mode 100644 package/php/Config.in create mode 100644 package/php/Makefile create mode 100644 package/php/files/php.ini create mode 100644 package/php/files/php.init create mode 100644 package/php/ipkg/php-cgi.conffiles create mode 100644 package/php/ipkg/php-cgi.control create mode 100644 package/php/ipkg/php-cli.conffiles create mode 100644 package/php/ipkg/php-cli.control create mode 100644 package/php/ipkg/php-fastcgi.conffiles create mode 100644 package/php/ipkg/php-fastcgi.control create mode 100644 package/php/ipkg/php-fastcgi.postinst create mode 100644 package/php/ipkg/php-mod-curl.control create mode 100644 package/php/ipkg/php-mod-ftp.control create mode 100644 package/php/ipkg/php-mod-gd.control create mode 100644 package/php/ipkg/php-mod-gmp.control create mode 100644 package/php/ipkg/php-mod-ldap.control create mode 100644 package/php/ipkg/php-mod-mysql.control create mode 100644 package/php/ipkg/php-mod-openssl.control create mode 100644 package/php/ipkg/php-mod-pcre.control create mode 100644 package/php/ipkg/php-mod-pgsql.control create mode 100644 package/php/ipkg/php-mod-session.control create mode 100644 package/php/ipkg/php-mod-sockets.control create mode 100644 package/php/ipkg/php-mod-sqlite.control create mode 100644 package/php/ipkg/php-mod-xml.control create mode 100644 package/picocom/Config.in create mode 100644 package/picocom/Makefile create mode 100644 package/picocom/ipkg/picocom.control create mode 100644 package/pipacs/Config.in create mode 100644 package/pipacs/Makefile create mode 100644 package/pipacs/ipkg/pipacs.control create mode 100644 package/pipacs/src/Makefile create mode 100644 package/pipacs/src/parser.c create mode 100644 package/pipacs/src/parser.h create mode 100644 package/pipacs/src/pipacs.c create mode 100644 package/pixman/Config.in create mode 100644 package/pixman/Makefile create mode 100644 package/pixman/ipkg/pixman.control create mode 100644 package/pmacct/Config.in create mode 100644 package/pmacct/Makefile create mode 100644 package/pmacct/files/nfacctd.conf create mode 100644 package/pmacct/files/nfacctd.init create mode 100644 package/pmacct/files/pmacctd.conf create mode 100644 package/pmacct/files/pmacctd.init create mode 100644 package/pmacct/ipkg/nfacctd-custom.control create mode 100644 package/pmacct/ipkg/nfacctd-mysql.control create mode 100644 package/pmacct/ipkg/nfacctd-pgsql.control create mode 100644 package/pmacct/ipkg/nfacctd-sqlite.control create mode 100644 package/pmacct/ipkg/nfacctd.conffiles create mode 100644 package/pmacct/ipkg/nfacctd.control create mode 100644 package/pmacct/ipkg/nfacctd.postinst create mode 100644 package/pmacct/ipkg/pmacct-client.control create mode 100644 package/pmacct/ipkg/pmacctd-custom.control create mode 100644 package/pmacct/ipkg/pmacctd-mysql.control create mode 100644 package/pmacct/ipkg/pmacctd-pgsql.control create mode 100644 package/pmacct/ipkg/pmacctd-sqlite.control create mode 100644 package/pmacct/ipkg/pmacctd.conffiles create mode 100644 package/pmacct/ipkg/pmacctd.control create mode 100644 package/pmacct/ipkg/pmacctd.postinst create mode 100644 package/popt/Config.in create mode 100644 package/popt/Makefile create mode 100644 package/popt/ipkg/libpopt.control create mode 100644 package/portmap/Config.in create mode 100644 package/portmap/Makefile create mode 100644 package/portmap/files/portmap.init create mode 100644 package/portmap/ipkg/portmap.control create mode 100644 package/portmap/ipkg/portmap.postinst create mode 100644 package/portmap/patches/patch-pmap_check_c create mode 100644 package/portsentry/Config.in create mode 100644 package/portsentry/Makefile create mode 100644 package/portsentry/ipkg/portsentry.conffiles create mode 100644 package/portsentry/ipkg/portsentry.control create mode 100644 package/portsentry/patches/100-conf_location.patch create mode 100644 package/portsentry/patches/101-postsentry_c.patch create mode 100644 package/postgresql/Config.in create mode 100644 package/postgresql/Makefile create mode 100644 package/postgresql/ipkg/libpq.control create mode 100644 package/postgresql/ipkg/pgsql-cli.control create mode 100644 package/ppp/Config.in create mode 100644 package/ppp/Makefile create mode 100644 package/ppp/files/etc/ppp/chap-secrets create mode 100644 package/ppp/files/etc/ppp/filter create mode 100755 package/ppp/files/etc/ppp/ip-down create mode 100755 package/ppp/files/etc/ppp/ip-down.d/umts create mode 100755 package/ppp/files/etc/ppp/ip-up create mode 100755 package/ppp/files/etc/ppp/ip-up.d/if-rename create mode 100755 package/ppp/files/etc/ppp/ip-up.d/umts create mode 100644 package/ppp/files/etc/ppp/options create mode 100644 package/ppp/files/etc/ppp/peers/dsl create mode 100644 package/ppp/files/etc/ppp/templates/dsl create mode 100644 package/ppp/files/etc/ppp/templates/umts create mode 100755 package/ppp/files/poff create mode 100755 package/ppp/files/pon create mode 100755 package/ppp/files/ppp.pre-up create mode 100644 package/ppp/ipkg/ppp-mod-chat.control create mode 100644 package/ppp/ipkg/ppp-mod-pppdump.control create mode 100644 package/ppp/ipkg/ppp-mod-pppoa.control create mode 100644 package/ppp/ipkg/ppp-mod-pppoe.control create mode 100644 package/ppp/ipkg/ppp-mod-pppstats.control create mode 100644 package/ppp/ipkg/ppp-mod-pppumts.control create mode 100644 package/ppp/ipkg/ppp-mod-radius.conffiles create mode 100644 package/ppp/ipkg/ppp-mod-radius.control create mode 100644 package/ppp/ipkg/ppp.conffiles create mode 100644 package/ppp/ipkg/ppp.control create mode 100644 package/ppp/patches/010-use_target_for_configuration.patch create mode 100644 package/ppp/patches/100-debian_close_dev_ppp.patch create mode 100644 package/ppp/patches/200-makefile.patch create mode 100644 package/ppp/patches/201-mppe_mppc_1.1.patch create mode 100644 package/ppp/patches/203-no_strip.patch create mode 100644 package/ppp/patches/204-opt_flags.patch create mode 100644 package/ppp/patches/206-radius_config.patch create mode 100644 package/ppp/patches/208-no_exponential_timeout.patch create mode 100644 package/ppp/patches/209-compensate_time_change.patch create mode 100644 package/ppp/patches/320-use_target_ar.patch create mode 100644 package/ppp/utils/pfc.c create mode 100644 package/pptp/Config.in create mode 100644 package/pptp/Makefile create mode 100644 package/pptp/files/ifup.pptp create mode 100644 package/pptp/files/options.pptp create mode 100644 package/pptp/ipkg/pptp.conffiles create mode 100644 package/pptp/ipkg/pptp.control create mode 100644 package/pptpd/Config.in create mode 100644 package/pptpd/Makefile create mode 100644 package/pptpd/files/options.pptpd create mode 100644 package/pptpd/files/pptpd.conf create mode 100644 package/pptpd/files/pptpd.init create mode 100644 package/pptpd/ipkg/pptpd.conffiles create mode 100644 package/pptpd/ipkg/pptpd.control create mode 100644 package/pptpd/ipkg/pptpd.postinst create mode 100644 package/pptpd/patches/bad-pqueue-debug.patch create mode 100644 package/pptpd/patches/patch-ctrlpacket_c create mode 100644 package/pptpd/patches/pptpgre-use-debug-option.patch create mode 100644 package/privoxy/Config.in create mode 100644 package/privoxy/Makefile create mode 100644 package/privoxy/extra/config.h.in create mode 100644 package/privoxy/extra/configure create mode 100644 package/privoxy/ipkg/privoxy.control create mode 100644 package/privoxy/patches/patch-GNUmakefile_in create mode 100644 package/privoxy/patches/patch-configure_in create mode 100644 package/procmail/Config.in create mode 100644 package/procmail/Makefile create mode 100644 package/procmail/extra/Makefile.new create mode 100644 package/procmail/ipkg/procmail.control create mode 100644 package/procmail/patches/patch-autoconf_h create mode 100644 package/procps/Config.in create mode 100644 package/procps/Makefile create mode 100644 package/procps/ipkg/procps.control create mode 100644 package/procps/killall create mode 100644 package/procps/patches/patch-Makefile create mode 100644 package/procps/patches/patch-proc_module_mk create mode 100644 package/procps/patches/patch-ps_module_mk create mode 100644 package/procps/patches/patch-sysctl_c create mode 100644 package/ptunnel/Config.in create mode 100644 package/ptunnel/Makefile create mode 100644 package/ptunnel/ipkg/ptunnel.control create mode 100644 package/quagga/Config.in create mode 100644 package/quagga/Makefile create mode 100644 package/quagga/files/quagga.init create mode 100644 package/quagga/ipkg/quagga-bgpd.control create mode 100644 package/quagga/ipkg/quagga-ospf6d.control create mode 100644 package/quagga/ipkg/quagga-ospfd.control create mode 100644 package/quagga/ipkg/quagga-ripd.control create mode 100644 package/quagga/ipkg/quagga-ripngd.control create mode 100644 package/quagga/ipkg/quagga-vtysh.control create mode 100644 package/quagga/ipkg/quagga.control create mode 100644 package/quagga/ipkg/quagga.postinst create mode 100644 package/raddump/Config.in create mode 100755 package/raddump/Makefile create mode 100755 package/raddump/ipkg/raddump.control create mode 100644 package/radiusclient-ng/Config.in create mode 100644 package/radiusclient-ng/Makefile create mode 100644 package/radiusclient-ng/ipkg/libradiusclient-ng.control create mode 100644 package/radiusclient-ng/ipkg/radiusclient-ng.control create mode 100644 package/radiusclient-ng/patches/01-cross_compile.patch create mode 100644 package/radvd/Config.in create mode 100644 package/radvd/Makefile create mode 100644 package/radvd/files/radvd.conf create mode 100644 package/radvd/files/radvd.init create mode 100644 package/radvd/ipkg/radvd.conffiles create mode 100644 package/radvd/ipkg/radvd.control create mode 100644 package/radvd/ipkg/radvd.postinst create mode 100644 package/radvd/patches/no-libfl.patch create mode 100644 package/randrproto/Config.in create mode 100644 package/randrproto/Makefile create mode 100644 package/rarpd/Config.in create mode 100644 package/rarpd/Makefile create mode 100644 package/rarpd/files/rarpd.init create mode 100644 package/rarpd/ipkg/rarpd.control create mode 100644 package/rarpd/ipkg/rarpd.postinst create mode 100644 package/rdate/Config.in create mode 100644 package/rdate/Makefile create mode 100644 package/rdate/ipkg/rdate.control create mode 100644 package/rdate/ipkg/rdate.postinst create mode 100644 package/rdate/rdate.init create mode 100644 package/rdate/rdate.ip-up create mode 100644 package/readline/Config.in create mode 100644 package/readline/Makefile create mode 100644 package/readline/ipkg/libreadline.control create mode 100644 package/reaim/Config.in create mode 100644 package/reaim/Makefile create mode 100644 package/reaim/files/reaim.init create mode 100644 package/reaim/ipkg/reaim.control create mode 100644 package/reaim/ipkg/reaim.postinst create mode 100644 package/reaim/patches/501-cross_compile-install.patch create mode 100644 package/renderproto/Config.in create mode 100644 package/renderproto/Makefile create mode 100644 package/resourceproto/Config.in create mode 100644 package/resourceproto/Makefile create mode 100644 package/rp-pppoe/Config.in create mode 100644 package/rp-pppoe/Makefile create mode 100644 package/rp-pppoe/files/pppoe-client.init create mode 100644 package/rp-pppoe/files/pppoe-relay.init create mode 100644 package/rp-pppoe/files/pppoe-server.init create mode 100644 package/rp-pppoe/ipkg/pppoe-client.conffiles create mode 100644 package/rp-pppoe/ipkg/pppoe-client.control create mode 100644 package/rp-pppoe/ipkg/pppoe-client.postinst create mode 100644 package/rp-pppoe/ipkg/pppoe-relay.control create mode 100644 package/rp-pppoe/ipkg/pppoe-relay.postinst create mode 100644 package/rp-pppoe/ipkg/pppoe-server.conffiles create mode 100644 package/rp-pppoe/ipkg/pppoe-server.control create mode 100644 package/rp-pppoe/ipkg/pppoe-sniff.control create mode 100644 package/rp-pppoe/ipkg/rules create mode 100644 package/rp-pppoe/ipkg/version create mode 100644 package/rp-pppoe/patches/patch-src_configure create mode 100644 package/rrdcollect/Config.in create mode 100644 package/rrdcollect/Makefile create mode 100644 package/rrdcollect/files/rrd.conf create mode 100644 package/rrdcollect/files/rrd.sh create mode 100644 package/rrdcollect/files/rrdcollect.conf create mode 100644 package/rrdcollect/files/rrdcollect.init create mode 100644 package/rrdcollect/ipkg/rrdcollect-example.conffiles create mode 100644 package/rrdcollect/ipkg/rrdcollect-example.control create mode 100644 package/rrdcollect/ipkg/rrdcollect.control create mode 100644 package/rrdcollect/ipkg/rrdcollect.postinst create mode 100644 package/rrdcollect/patches/rrdcollect-scan.patch create mode 100644 package/rrdtool/Config.in create mode 100644 package/rrdtool/Makefile create mode 100644 package/rrdtool/ipkg/librrd.control create mode 100644 package/rrdtool/ipkg/rrdcgi.control create mode 100644 package/rrdtool/ipkg/rrdtool.control create mode 100644 package/rrdtool/patches/patch-configure create mode 100644 package/rrs/Config.in create mode 100644 package/rrs/Makefile create mode 100644 package/rrs/ipkg/rrs-nossl.control create mode 100644 package/rrs/ipkg/rrs.control create mode 100644 package/rrs/patches/rrs-1.70-shell.patch create mode 100644 package/rsync/Config.in create mode 100644 package/rsync/Makefile create mode 100644 package/rsync/ipkg/rsync.control create mode 100644 package/rtorrent/Config.in create mode 100644 package/rtorrent/Makefile create mode 100644 package/rtorrent/ipkg/rtorrent.control create mode 100644 package/rtorrent/patches/patch-configure_ac create mode 100644 package/rtorrent/patches/patch-rak_functional_h create mode 100644 package/rtorrent/patches/patch-src_command_ui_cc create mode 100644 package/rtorrent/patches/patch-src_display_text_element_value_cc create mode 100644 package/rtorrent/patches/patch-src_rpc_parse_cc create mode 100644 package/ruby/Config.in create mode 100644 package/ruby/Makefile create mode 100644 package/ruby/ipkg/ruby.control create mode 100644 package/ruby/patches/100-makefile-in.patch create mode 100644 package/ruby/patches/patch-lib_fileutils_rb create mode 100644 package/samba/Config.in create mode 100644 package/samba/Makefile create mode 100644 package/samba/files/samba.init create mode 100644 package/samba/files/smb.conf create mode 100644 package/samba/ipkg/samba-client.control create mode 100644 package/samba/ipkg/samba-passwd.control create mode 100644 package/samba/ipkg/samba.conffiles create mode 100644 package/samba/ipkg/samba.control create mode 100644 package/samba/ipkg/samba.postinst create mode 100644 package/samba/ipkg/swat.control create mode 100644 package/samba/ipkg/swat.postinst create mode 100644 package/samba/patches/patch-source_client_mtab_c create mode 100644 package/samba/patches/patch-source_configure create mode 100644 package/samba/patches/patch-source_registry_reg_perfcount_c create mode 100644 package/sane-backends/Config.in create mode 100644 package/sane-backends/Makefile create mode 100644 package/sane-backends/ipkg/sane-backend-abaton.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-abaton.control create mode 100644 package/sane-backends/ipkg/sane-backend-abaton.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-agfafocus.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-agfafocus.control create mode 100644 package/sane-backends/ipkg/sane-backend-agfafocus.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-apple.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-apple.control create mode 100644 package/sane-backends/ipkg/sane-backend-apple.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-artec-eplus48u.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-artec-eplus48u.control create mode 100644 package/sane-backends/ipkg/sane-backend-artec-eplus48u.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-artec.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-artec.control create mode 100644 package/sane-backends/ipkg/sane-backend-artec.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-as6e.control create mode 100644 package/sane-backends/ipkg/sane-backend-as6e.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-avision.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-avision.control create mode 100644 package/sane-backends/ipkg/sane-backend-avision.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-bh.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-bh.control create mode 100644 package/sane-backends/ipkg/sane-backend-bh.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-canon.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-canon.control create mode 100644 package/sane-backends/ipkg/sane-backend-canon.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-canon630u.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-canon630u.control create mode 100644 package/sane-backends/ipkg/sane-backend-canon630u.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-coolscan.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-coolscan.control create mode 100644 package/sane-backends/ipkg/sane-backend-coolscan.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-coolscan2.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-coolscan2.control create mode 100644 package/sane-backends/ipkg/sane-backend-coolscan2.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-dc25.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-dc25.control create mode 100644 package/sane-backends/ipkg/sane-backend-dc25.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-dmc.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-dmc.control create mode 100644 package/sane-backends/ipkg/sane-backend-dmc.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-epson.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-epson.control create mode 100644 package/sane-backends/ipkg/sane-backend-epson.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-fujitsu.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-fujitsu.control create mode 100644 package/sane-backends/ipkg/sane-backend-fujitsu.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-genesys.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-genesys.control create mode 100644 package/sane-backends/ipkg/sane-backend-genesys.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-gt68xx.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-gt68xx.control create mode 100644 package/sane-backends/ipkg/sane-backend-gt68xx.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-hp.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-hp.control create mode 100644 package/sane-backends/ipkg/sane-backend-hp.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-hp3500.control create mode 100644 package/sane-backends/ipkg/sane-backend-hp3500.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-hp4200.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-hp4200.control create mode 100644 package/sane-backends/ipkg/sane-backend-hp4200.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-hp5400.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-hp5400.control create mode 100644 package/sane-backends/ipkg/sane-backend-hp5400.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-ibm.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-ibm.control create mode 100644 package/sane-backends/ipkg/sane-backend-ibm.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-leo.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-leo.control create mode 100644 package/sane-backends/ipkg/sane-backend-leo.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-lexmark.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-lexmark.control create mode 100644 package/sane-backends/ipkg/sane-backend-lexmark.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-ma1509.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-ma1509.control create mode 100644 package/sane-backends/ipkg/sane-backend-ma1509.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-matsushita.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-matsushita.control create mode 100644 package/sane-backends/ipkg/sane-backend-matsushita.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-microtek.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-microtek.control create mode 100644 package/sane-backends/ipkg/sane-backend-microtek.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-microtek2.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-microtek2.control create mode 100644 package/sane-backends/ipkg/sane-backend-microtek2.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-mustek-usb.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-mustek-usb.control create mode 100644 package/sane-backends/ipkg/sane-backend-mustek-usb.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-mustek-usb2.control create mode 100644 package/sane-backends/ipkg/sane-backend-mustek-usb2.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-mustek.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-mustek.control create mode 100644 package/sane-backends/ipkg/sane-backend-mustek.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-nec.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-nec.control create mode 100644 package/sane-backends/ipkg/sane-backend-nec.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-net.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-net.control create mode 100644 package/sane-backends/ipkg/sane-backend-net.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-niash.control create mode 100644 package/sane-backends/ipkg/sane-backend-niash.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-pie.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-pie.control create mode 100644 package/sane-backends/ipkg/sane-backend-pie.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-pixma.control create mode 100644 package/sane-backends/ipkg/sane-backend-pixma.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-plustek-pp.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-plustek-pp.control create mode 100644 package/sane-backends/ipkg/sane-backend-plustek-pp.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-plustek.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-plustek.control create mode 100644 package/sane-backends/ipkg/sane-backend-plustek.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-qcam.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-qcam.control create mode 100644 package/sane-backends/ipkg/sane-backend-qcam.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-ricoh.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-ricoh.control create mode 100644 package/sane-backends/ipkg/sane-backend-ricoh.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-s9036.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-s9036.control create mode 100644 package/sane-backends/ipkg/sane-backend-s9036.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-sceptre.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-sceptre.control create mode 100644 package/sane-backends/ipkg/sane-backend-sceptre.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-sharp.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-sharp.control create mode 100644 package/sane-backends/ipkg/sane-backend-sharp.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-sm3600.control create mode 100644 package/sane-backends/ipkg/sane-backend-sm3600.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-sm3840.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-sm3840.control create mode 100644 package/sane-backends/ipkg/sane-backend-sm3840.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-snapscan.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-snapscan.control create mode 100644 package/sane-backends/ipkg/sane-backend-snapscan.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-sp15c.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-sp15c.control create mode 100644 package/sane-backends/ipkg/sane-backend-sp15c.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-st400.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-st400.control create mode 100644 package/sane-backends/ipkg/sane-backend-st400.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-stv680.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-stv680.control create mode 100644 package/sane-backends/ipkg/sane-backend-stv680.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-tamarack.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-tamarack.control create mode 100644 package/sane-backends/ipkg/sane-backend-tamarack.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-teco1.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-teco1.control create mode 100644 package/sane-backends/ipkg/sane-backend-teco1.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-teco2.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-teco2.control create mode 100644 package/sane-backends/ipkg/sane-backend-teco2.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-teco3.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-teco3.control create mode 100644 package/sane-backends/ipkg/sane-backend-teco3.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-test.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-test.control create mode 100644 package/sane-backends/ipkg/sane-backend-test.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-u12.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-u12.control create mode 100644 package/sane-backends/ipkg/sane-backend-u12.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-umax-pp.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-umax-pp.control create mode 100644 package/sane-backends/ipkg/sane-backend-umax-pp.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-umax.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-umax.control create mode 100644 package/sane-backends/ipkg/sane-backend-umax.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-umax1220u.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-umax1220u.control create mode 100644 package/sane-backends/ipkg/sane-backend-umax1220u.postinst create mode 100644 package/sane-backends/ipkg/sane-backend-v4l.conffiles create mode 100644 package/sane-backends/ipkg/sane-backend-v4l.control create mode 100644 package/sane-backends/ipkg/sane-backend-v4l.postinst create mode 100644 package/sane-backends/ipkg/sane-backends.conffiles create mode 100644 package/sane-backends/ipkg/sane-backends.control create mode 100644 package/sane-backends/patches/patch-Makefile_in create mode 100644 package/sane-backends/patches/patch-backend_microtek_c create mode 100644 package/sane-backends/patches/patch-backend_pixma_bjnp_c create mode 100644 package/sane-backends/patches/patch-backend_pixma_common_h create mode 100644 package/sane-backends/patches/patch-backend_pixma_imageclass_c create mode 100644 package/sane-backends/patches/patch-backend_sm3600-scanutil_c create mode 100644 package/sane-backends/patches/patch-backend_umax1220u-common_c create mode 100644 package/scanlogd/Config.in create mode 100644 package/scanlogd/Makefile create mode 100644 package/scanlogd/files/scanlogd.init create mode 100644 package/scanlogd/ipkg/scanlogd.control create mode 100644 package/scanlogd/ipkg/scanlogd.postinst create mode 100644 package/scdp/Config.in create mode 100644 package/scdp/Makefile create mode 100644 package/scdp/ipkg/scdp.control create mode 100644 package/screen/Config.in create mode 100644 package/screen/Makefile create mode 100644 package/screen/ipkg/screen.control create mode 100644 package/screen/patches/patch-Makefile create mode 100644 package/screen/patches/patch-ansi_c create mode 100644 package/screen/patches/patch-attacher_c create mode 100644 package/screen/patches/patch-configure create mode 100644 package/screen/patches/patch-fileio_c create mode 100644 package/screen/patches/patch-help_c create mode 100644 package/screen/patches/patch-process_c create mode 100644 package/screen/patches/patch-pty_c create mode 100644 package/screen/patches/patch-sched_h create mode 100644 package/screen/patches/patch-screen_c create mode 100644 package/screen/patches/patch-termcap_c create mode 100644 package/screen/patches/patch-tty_sh create mode 100644 package/screen/patches/patch-utmp_c create mode 100644 package/screen/patches/patch-window_c create mode 100644 package/scrnsaverproto/Config.in create mode 100644 package/scrnsaverproto/Makefile create mode 100644 package/scsi-spin/Config.in create mode 100644 package/scsi-spin/Makefile create mode 100644 package/scsi-spin/files/scsi-spin.c create mode 100644 package/scsi-spin/ipkg/scsi-spin.control create mode 100644 package/ser2net/Config.in create mode 100644 package/ser2net/Makefile create mode 100644 package/ser2net/ipkg/ser2net.conffiles create mode 100644 package/ser2net/ipkg/ser2net.control create mode 100644 package/serdisplib/Config.in create mode 100644 package/serdisplib/Makefile create mode 100644 package/serdisplib/ipkg/serdisplib.control create mode 100644 package/serdisplib/patches/patch-Makefile_in create mode 100644 package/serdisplib/patches/patch-configure create mode 100644 package/serdisplib/patches/patch-src_Makefile_in create mode 100644 package/setpwc/Config.in create mode 100644 package/setpwc/Makefile create mode 100644 package/setpwc/ipkg/setpwc.control create mode 100644 package/setserial/Config.in create mode 100644 package/setserial/Makefile create mode 100644 package/setserial/ipkg/setserial.control create mode 100644 package/shat/Config.in create mode 100644 package/shat/Makefile create mode 100644 package/shat/ipkg/shat.control create mode 100644 package/shorewall-common/Config.in create mode 100644 package/shorewall-common/Makefile create mode 100644 package/shorewall-common/files/downstrip create mode 100644 package/shorewall-common/files/shorewall.init create mode 100644 package/shorewall-common/ipkg/shorewall-common.conffiles create mode 100644 package/shorewall-common/ipkg/shorewall-common.control create mode 100644 package/shorewall-common/ipkg/shorewall-common.postinst create mode 100644 package/shorewall-common/ipkg/shorewall-common.prerm create mode 100644 package/shorewall-common/patches/patch-install_sh create mode 100644 package/shorewall-common/patches/patch-shorewall_conf create mode 100644 package/shorewall-shell/Config.in create mode 100644 package/shorewall-shell/Makefile create mode 100644 package/shorewall-shell/files/downstrip create mode 100644 package/shorewall-shell/ipkg/shorewall-shell.control create mode 100644 package/siproxd/Config.in create mode 100644 package/siproxd/Makefile create mode 100644 package/siproxd/files/siproxd.init create mode 100644 package/siproxd/ipkg/siproxd.conffiles create mode 100644 package/siproxd/ipkg/siproxd.control create mode 100644 package/siproxd/ipkg/siproxd.postinst create mode 100644 package/siproxd/patches/patch-configure create mode 100644 package/sipsak/Config.in create mode 100644 package/sipsak/Makefile create mode 100644 package/sipsak/ipkg/sipsak.control create mode 100644 package/sispmctl/Config.in create mode 100644 package/sispmctl/Makefile create mode 100644 package/sispmctl/ipkg/sispmctl.control create mode 100644 package/slurm/Config.in create mode 100644 package/slurm/Makefile create mode 100644 package/slurm/ipkg/slurm.control create mode 100644 package/slurm/patches/no_host_ncurses.patch create mode 100644 package/snort-wireless/Config.in create mode 100644 package/snort-wireless/Makefile create mode 100644 package/snort-wireless/files/snort-wireless.init create mode 100644 package/snort-wireless/ipkg/snort-wireless.conffiles create mode 100644 package/snort-wireless/ipkg/snort-wireless.control create mode 100644 package/snort-wireless/ipkg/snort-wireless.postinst create mode 100644 package/snort-wireless/patches/500-no-config-search.patch create mode 100644 package/snort-wireless/patches/750-lightweight-config.patch create mode 100644 package/snort/Config.in create mode 100644 package/snort/Makefile create mode 100644 package/snort/files/snort.init create mode 100644 package/snort/ipkg/snort.conffiles create mode 100644 package/snort/ipkg/snort.control create mode 100644 package/snort/ipkg/snort.postinst create mode 100644 package/socat/Config.in create mode 100644 package/socat/Makefile create mode 100644 package/socat/ipkg/socat.control create mode 100644 package/socat/patches/501-honor_ldflags.patch create mode 100644 package/speex/Config.in create mode 100644 package/speex/Makefile create mode 100644 package/speex/ipkg/libspeex.control create mode 100644 package/sqlite/Config.in create mode 100644 package/sqlite/Makefile create mode 100644 package/sqlite/ipkg/libsqlite.control create mode 100644 package/sqlite/ipkg/sqlite-cli.control create mode 100644 package/squid/Config.in create mode 100644 package/squid/Makefile create mode 100644 package/squid/ipkg/squid-mod-basic-auth-getpwnam.control create mode 100644 package/squid/ipkg/squid-mod-basic-auth-ncsa.control create mode 100644 package/squid/ipkg/squid-mod-basic-auth-smb.control create mode 100644 package/squid/ipkg/squid-mod-basic-auth-winbind.control create mode 100644 package/squid/ipkg/squid-mod-digest-auth-password.control create mode 100644 package/squid/ipkg/squid-mod-external-acl-ip-user.control create mode 100644 package/squid/ipkg/squid-mod-external-acl-unix-group.control create mode 100644 package/squid/ipkg/squid-mod-external-acl-winbind-group.control create mode 100644 package/squid/ipkg/squid-mod-ntlm-auth-fakeauth.control create mode 100644 package/squid/ipkg/squid-mod-ntlm-auth-smb-auth.control create mode 100644 package/squid/ipkg/squid-mod-ntlm-auth-winbind-auth.control create mode 100644 package/squid/ipkg/squid.conffiles create mode 100644 package/squid/ipkg/squid.control create mode 100644 package/squid/patches/patch-configure create mode 100644 package/squid/patches/patch-include_config_h create mode 100644 package/squid/patches/patch-lib_util_c create mode 100644 package/squid/patches/patch-src_Makefile_in create mode 100644 package/srelay/Config.in create mode 100644 package/srelay/Makefile create mode 100644 package/srelay/files/srelay.conf create mode 100644 package/srelay/files/srelay.init create mode 100644 package/srelay/ipkg/srelay.conffiles create mode 100644 package/srelay/ipkg/srelay.control create mode 100644 package/srelay/ipkg/srelay.postinst create mode 100644 package/srelay/patches/01-cross_compile.patch create mode 100644 package/ssltunnel/Config.in create mode 100644 package/ssltunnel/Makefile create mode 100644 package/ssltunnel/ipkg/ssltunnel.control create mode 100644 package/ssltunnel/patches/patch-client_ntlmauth_c create mode 100644 package/ssmtp/Config.in create mode 100644 package/ssmtp/Makefile create mode 100644 package/ssmtp/ipkg/ssmtp.conffiles create mode 100644 package/ssmtp/ipkg/ssmtp.control create mode 100644 package/ssmtp/patches/500-debian-subset-2.61-2.patch create mode 100644 package/ssmtp/patches/901-strftime_space_padding.patch create mode 100644 package/strace/Config.in create mode 100644 package/strace/Makefile create mode 100644 package/strace/ipkg/strace.control create mode 100644 package/strace/patches/patch-config_h_in create mode 100644 package/strace/patches/patch-configure create mode 100644 package/strace/patches/patch-configure_ac create mode 100644 package/strace/patches/patch-process_c create mode 100644 package/strace/patches/patch-signal_c create mode 100644 package/strace/patches/patch-syscall_c create mode 100644 package/strace/patches/patch-util_c create mode 100644 package/stress/Config.in create mode 100644 package/stress/Makefile create mode 100644 package/stress/ipkg/stress.control create mode 100644 package/strongswan/Config.in create mode 100644 package/strongswan/Makefile create mode 100644 package/strongswan/files/strongswan.init create mode 100644 package/strongswan/ipkg/strongswan.control create mode 100644 package/subversion/Config.in create mode 100644 package/subversion/Makefile create mode 100644 package/subversion/files/svnserve.init create mode 100644 package/subversion/ipkg/subversion.control create mode 100644 package/subversion/ipkg/subversion.postinst create mode 100644 package/swconfig/Config.in create mode 100644 package/swconfig/Makefile create mode 100644 package/swconfig/ipkg/swconfig.control create mode 100644 package/swconfig/src/Makefile create mode 100644 package/swconfig/src/cli.c create mode 100644 package/swconfig/src/swlib.c create mode 100644 package/swconfig/src/swlib.h create mode 100644 package/syslog-ng/Config.in create mode 100644 package/syslog-ng/Makefile create mode 100644 package/syslog-ng/files/syslog-ng.conf create mode 100644 package/syslog-ng/files/syslog-ng.init create mode 100644 package/syslog-ng/ipkg/syslog-ng.conffiles create mode 100644 package/syslog-ng/ipkg/syslog-ng.control create mode 100644 package/syslog-ng/ipkg/syslog-ng.postinst create mode 100644 package/syslog-ng/patches/patch-Makefile_in create mode 100644 package/syslog-ng/patches/patch-configure create mode 100644 package/syslog-ng/patches/patch-src_Makefile_in create mode 100644 package/syslog-ng/patches/patch-src_cfg-lex_c create mode 100644 package/sysstat/Config.in create mode 100644 package/sysstat/Makefile create mode 100644 package/sysstat/files/CONFIG create mode 100644 package/sysstat/ipkg/sysstat.control create mode 100644 package/sysstat/patches/patch-Makefile create mode 100644 package/tar/Config.in create mode 100644 package/tar/Makefile create mode 100644 package/tar/ipkg/tar.control create mode 100644 package/tcl/Config.in create mode 100644 package/tcl/Makefile create mode 100644 package/tcl/ipkg/tcl.control create mode 100644 package/tcp_wrappers/Config.in create mode 100644 package/tcp_wrappers/Makefile create mode 100644 package/tcp_wrappers/ipkg/libwrap.control create mode 100644 package/tcp_wrappers/patches/debian-subset.patch create mode 100644 package/tcp_wrappers/patches/opt_cflags.patch create mode 100644 package/tcpdump/Config.in create mode 100644 package/tcpdump/Makefile create mode 100644 package/tcpdump/ipkg/tcpdump.control create mode 100644 package/tcpdump/patches/patch-print-enc_c create mode 100644 package/tinc/Config.in create mode 100644 package/tinc/Makefile create mode 100644 package/tinc/ipkg/tinc.control create mode 100644 package/tinc/patches/patch-src_linux_device_c create mode 100644 package/tinc/patches/patch-src_net_setup_c create mode 100644 package/tinyproxy/Config.in create mode 100644 package/tinyproxy/Makefile create mode 100644 package/tinyproxy/files/tinyproxy.init create mode 100644 package/tinyproxy/ipkg/tinyproxy.control create mode 100644 package/tinyproxy/ipkg/tinyproxy.postinst create mode 100644 package/tmsnc/Config.in create mode 100644 package/tmsnc/Makefile create mode 100644 package/tmsnc/ipkg/tmsnc.control create mode 100644 package/tntnet/Config.in create mode 100644 package/tntnet/Makefile create mode 100644 package/tntnet/files/mime.conf create mode 100644 package/tntnet/files/tntnet.conf create mode 100644 package/tntnet/files/tntnet.properties create mode 100644 package/tntnet/ipkg/tntnet.conffiles create mode 100644 package/tntnet/ipkg/tntnet.control create mode 100644 package/tntnet/ipkg/tntnet.postinst create mode 100644 package/tor/Config.in create mode 100644 package/tor/Makefile create mode 100644 package/tor/files/tor.init create mode 100644 package/tor/files/torrc create mode 100644 package/tor/ipkg/tor.conffiles create mode 100644 package/tor/ipkg/tor.control create mode 100644 package/tor/ipkg/tor.postinst create mode 100644 package/tor/patches/patch-configure create mode 100644 package/tor/patches/patch-src_common_util_h create mode 100644 package/trafshow/Config.in create mode 100644 package/trafshow/Makefile create mode 100644 package/trafshow/ipkg/trafshow.control create mode 100644 package/trafshow/patches/patch-domain_resolver_c create mode 100644 package/ttcp/Config.in create mode 100644 package/ttcp/Makefile create mode 100644 package/ttcp/ipkg/ttcp.control create mode 100644 package/ttcp/ttcp.c create mode 100644 package/uclibc++/Config.in create mode 100644 package/uclibc++/Makefile create mode 100644 package/uclibc++/files/config create mode 100644 package/uclibc++/files/config.mips create mode 100644 package/uclibc++/files/config.x86 create mode 100644 package/uclibc++/ipkg/uclibc++.control create mode 100644 package/uclibc++/patches/patch-bin_Makefile create mode 100644 package/uclibc++/patches/patch-fstream_eof create mode 100644 package/uclibc++/patches/patch-include_locale create mode 100644 package/uclibc++/patches/patch-include_string create mode 100644 package/uclibc++/patches/patch-src_string_cpp create mode 100644 package/uclibc/Config.in create mode 100644 package/uclibc/Makefile create mode 100644 package/uclibc/ipkg/uclibc.conffiles create mode 100644 package/uclibc/ipkg/uclibc.control create mode 100644 package/udev/Config.in create mode 100644 package/udev/Makefile create mode 100644 package/udev/ipkg/udev.conffiles create mode 100644 package/udev/ipkg/udev.control create mode 100644 package/udev/patches/01-no_debug.patch create mode 100644 package/udp-broadcast-relay/Config.in create mode 100644 package/udp-broadcast-relay/Makefile create mode 100644 package/udp-broadcast-relay/ipkg/udp-broadcast-relay.control create mode 100644 package/udp-broadcast-relay/patches/patch-main_c create mode 100644 package/ulogd/Config.in create mode 100644 package/ulogd/Makefile create mode 100644 package/ulogd/files/ulogd.init create mode 100644 package/ulogd/ipkg/ulogd-mod-extra.control create mode 100644 package/ulogd/ipkg/ulogd-mod-mysql.control create mode 100644 package/ulogd/ipkg/ulogd-mod-pcap.control create mode 100644 package/ulogd/ipkg/ulogd-mod-pgsql.control create mode 100644 package/ulogd/ipkg/ulogd-mod-sqlite.control create mode 100644 package/ulogd/ipkg/ulogd.conffiles create mode 100644 package/ulogd/ipkg/ulogd.control create mode 100644 package/ulogd/ipkg/ulogd.postinst create mode 100644 package/ulogd/patches/patch-Rules_make_in create mode 100644 package/ulogd/patches/patch-libipulog_Makefile_in create mode 100644 package/ulogd/patches/patch-mysql_Makefile_in create mode 100644 package/updatedd/Config.in create mode 100644 package/updatedd/Makefile create mode 100644 package/updatedd/ipkg/updatedd-mod-changeip.control create mode 100644 package/updatedd/ipkg/updatedd-mod-dyndns.control create mode 100644 package/updatedd/ipkg/updatedd-mod-eurodyndns.control create mode 100644 package/updatedd/ipkg/updatedd-mod-hn.control create mode 100644 package/updatedd/ipkg/updatedd-mod-noip.control create mode 100644 package/updatedd/ipkg/updatedd-mod-ods.control create mode 100644 package/updatedd/ipkg/updatedd-mod-ovh.control create mode 100644 package/updatedd/ipkg/updatedd-mod-regfish.control create mode 100644 package/updatedd/ipkg/updatedd-mod-tzo.control create mode 100644 package/updatedd/ipkg/updatedd.control create mode 100644 package/usbutils/Config.in create mode 100644 package/usbutils/Makefile create mode 100644 package/usbutils/ipkg/lsusb.control create mode 100644 package/ussp-push/Config.in create mode 100644 package/ussp-push/Makefile create mode 100644 package/ussp-push/ipkg/ussp-push.control create mode 100644 package/ussp-push/patches/patch-src_obex_socket_c create mode 100644 package/ustl/Config.in create mode 100644 package/ustl/Makefile create mode 100644 package/ustl/files/Common.mk create mode 100644 package/ustl/files/config.h create mode 100644 package/ustl/ipkg/ustl.control create mode 100644 package/ustl/patches/01-install-DESTDIR.patch create mode 100644 package/ustl/patches/02-install_path.patch create mode 100644 package/util-linux/Config.in create mode 100644 package/util-linux/Makefile create mode 100644 package/util-linux/ipkg/fdisk.control create mode 100644 package/util-linux/ipkg/losetup.control create mode 100644 package/util-linux/ipkg/swap-utils.control create mode 100644 package/util-linux/patches/patch-MCONFIG create mode 100644 package/util-linux/patches/patch-disk-utils_fsck_cramfs_c create mode 100644 package/util-linux/patches/patch-fdisk_cfdisk_c create mode 100644 package/util-linux/patches/patch-fdisk_fdiskbsdlabel_c create mode 100644 package/util-linux/patches/patch-fdisk_llseek_c create mode 100644 package/util-linux/patches/patch-fdisk_sfdisk_c create mode 100644 package/util-linux/patches/patch-fdisk_sfdisk_c.orig create mode 100644 package/util-linux/patches/patch-misc-utils_logger_c create mode 100644 package/util-linux/patches/patch-misc-utils_namei_c create mode 100644 package/util-linux/patches/patch-misc-utils_whereis_c create mode 100644 package/util-linux/patches/patch-mount_mntent_c create mode 100644 package/util-linux/patches/patch-mount_mount_by_label_c create mode 100644 package/util-linux/patches/patch-mount_mount_c create mode 100644 package/util-linux/patches/patch-mount_sundries_c create mode 100644 package/util-linux/patches/patch-mount_umount_c create mode 100644 package/util-linux/patches/patch-text-utils_colcrt_c create mode 100644 package/util-linux/patches/patch-text-utils_display_c create mode 100644 package/util-linux/patches/patch-text-utils_parse_c create mode 100644 package/valgrind/Config.in create mode 100644 package/valgrind/Makefile create mode 100644 package/valgrind/ipkg/valgrind.control create mode 100644 package/vgp/Config.in create mode 100755 package/vgp/Makefile create mode 100755 package/vgp/ipkg/vgp.control create mode 100644 package/videoproto/Config.in create mode 100644 package/videoproto/Makefile create mode 100644 package/vilistextum/Config.in create mode 100644 package/vilistextum/Makefile create mode 100644 package/vilistextum/ipkg/vilistextum.control create mode 100644 package/vilistextum/patches/patch-tests_check_entities create mode 100644 package/vilistextum/patches/patch-tests_check_tags create mode 100644 package/vim/Config.in create mode 100644 package/vim/Makefile create mode 100644 package/vim/ipkg/vim.control create mode 100644 package/vnc-reflector/Config.in create mode 100644 package/vnc-reflector/Makefile create mode 100755 package/vnc-reflector/ipkg/vnc-reflector.control create mode 100644 package/vnstat/Config.in create mode 100644 package/vnstat/Makefile create mode 100644 package/vnstat/ipkg/vnstat.control create mode 100644 package/vpnc/Config.in create mode 100644 package/vpnc/Makefile create mode 100755 package/vpnc/files/vpnc-route create mode 100755 package/vpnc/files/vpnc-script create mode 100644 package/vpnc/files/vpnc.conf create mode 100644 package/vpnc/ipkg/vpnc.conffiles create mode 100755 package/vpnc/ipkg/vpnc.control create mode 100644 package/vpnc/patches/patch-Makefile create mode 100644 package/vpnc/patches/patch-config_c create mode 100644 package/vrrpd/Config.in create mode 100644 package/vrrpd/Makefile create mode 100644 package/vrrpd/files/vrrpd.init create mode 100644 package/vrrpd/ipkg/vrrpd.control create mode 100644 package/vrrpd/ipkg/vrrpd.postinst create mode 100644 package/vsftpd/Config.in create mode 100644 package/vsftpd/Makefile create mode 100644 package/vsftpd/files/vsftpd.conf create mode 100644 package/vsftpd/files/vsftpd.init create mode 100644 package/vsftpd/ipkg/vsftpd.conffiles create mode 100644 package/vsftpd/ipkg/vsftpd.control create mode 100644 package/vsftpd/ipkg/vsftpd.postinst create mode 100644 package/vsftpd/patches/patch-Makefile create mode 100644 package/vtun/Config.in create mode 100644 package/vtun/Makefile create mode 100644 package/vtun/ipkg/vtun.conffiles create mode 100644 package/vtun/ipkg/vtun.control create mode 100644 package/vtun/patches/patch-configure create mode 100644 package/watchdog/Config.in create mode 100644 package/watchdog/Makefile create mode 100644 package/watchdog/files/watchdog.init create mode 100644 package/watchdog/ipkg/watchdog.conffiles create mode 100644 package/watchdog/ipkg/watchdog.control create mode 100644 package/watchdog/ipkg/watchdog.postinst create mode 100644 package/watchdog/patches/01-fstab-sys_siglist.patch create mode 100644 package/watchdog/patches/patch-src_mntent_c create mode 100644 package/watchdog/patches/patch-src_umount_c create mode 100644 package/wccpd/Config.in create mode 100644 package/wccpd/Makefile create mode 100644 package/wccpd/ipkg/wccpd.control create mode 100644 package/wdfs/Config.in create mode 100644 package/wdfs/Makefile create mode 100644 package/wdfs/ipkg/wdfs.control create mode 100644 package/weechat/Config.in create mode 100644 package/weechat/Makefile create mode 100644 package/weechat/ipkg/weechat.control create mode 100644 package/weechat/patches/patch-src_gui_curses_Makefile_in create mode 100644 package/wifidog/Config.in create mode 100644 package/wifidog/Makefile create mode 100644 package/wifidog/files/wifidog.conf create mode 100644 package/wifidog/files/wifidog.init create mode 100644 package/wifidog/ipkg/wifidog.conffiles create mode 100644 package/wifidog/ipkg/wifidog.control create mode 100644 package/wifidog/ipkg/wifidog.postinst create mode 100644 package/wifidog/patches/patch-libhttpd_api_c create mode 100644 package/wifidog/patches/patch-libhttpd_ip_acl_c create mode 100644 package/wifidog/patches/patch-libhttpd_protocol_c create mode 100644 package/wireless-firmware/Config.in create mode 100644 package/wireless-firmware/Makefile create mode 100644 package/wireless-firmware/ipkg/wireless-firmware-rt61.control create mode 100644 package/wireless-tools/Config.in create mode 100644 package/wireless-tools/Makefile create mode 100644 package/wireless-tools/ipkg/wireless-tools.control create mode 100644 package/wireless-tools/patches/debian-2.patch create mode 100644 package/wol/Config.in create mode 100644 package/wol/Makefile create mode 100644 package/wol/ipkg/wol.control create mode 100644 package/wondershaper/Config.in create mode 100644 package/wondershaper/Makefile create mode 100644 package/wondershaper/files/wondershaper.init create mode 100644 package/wondershaper/ipkg/wondershaper.conffiles create mode 100644 package/wondershaper/ipkg/wondershaper.control create mode 100644 package/wondershaper/ipkg/wondershaper.postinst create mode 100644 package/wondershaper/patches/01-change-default.patch create mode 100644 package/wpa_supplicant/Config.in create mode 100644 package/wpa_supplicant/Makefile create mode 100644 package/wpa_supplicant/files/config create mode 100644 package/wpa_supplicant/ipkg/wpa-supplicant.control create mode 100644 package/wpa_supplicant/patches/patch-Makefile create mode 100644 package/wput/Config.in create mode 100644 package/wput/Makefile create mode 100644 package/wput/ipkg/wput.control create mode 100644 package/xcmiscproto/Config.in create mode 100644 package/xcmiscproto/Makefile create mode 100644 package/xcmiscproto/ipkg/xcmiscproto.control create mode 100644 package/xextproto/Config.in create mode 100644 package/xextproto/Makefile create mode 100644 package/xf86dga/Config.in create mode 100644 package/xf86dga/Makefile create mode 100644 package/xf86dgaproto/Config.in create mode 100644 package/xf86dgaproto/Makefile create mode 100644 package/xfsprogs/Config.in create mode 100644 package/xfsprogs/Makefile create mode 100644 package/xfsprogs/ipkg/xfsprogs.control create mode 100644 package/xfsprogs/patches/patch-configure_in create mode 100644 package/xfsprogs/patches/patch-copy_xfs_copy_c create mode 100644 package/xfsprogs/patches/patch-include_builddefs_in create mode 100644 package/xfsprogs/patches/patch-include_buildmacros create mode 100644 package/xfsprogs/patches/patch-libhandle_Makefile create mode 100644 package/xfsprogs/patches/patch-libxfs_linux_c create mode 100644 package/xinetd/Config.in create mode 100644 package/xinetd/Makefile create mode 100644 package/xinetd/files/xinetd.conf create mode 100644 package/xinetd/files/xinetd.init create mode 100644 package/xinetd/ipkg/xinetd.conffiles create mode 100644 package/xinetd/ipkg/xinetd.control create mode 100644 package/xinetd/ipkg/xinetd.postinst create mode 100644 package/xinetd/patches/ar.patch create mode 100644 package/xinetd/patches/destdir.patch create mode 100644 package/xinetd/patches/xinetd-2.3.13-gcc4-1.patch create mode 100644 package/xorg-server/Config.in create mode 100644 package/xorg-server/Makefile create mode 100644 package/xorg-server/ipkg/xorg-server.control create mode 100644 package/xproto/Config.in create mode 100644 package/xproto/Makefile create mode 100644 package/xtrans/Config.in create mode 100644 package/xtrans/Makefile create mode 100644 package/xtrans/ipkg/xtrans.control create mode 100644 package/zlib/Config.in create mode 100644 package/zlib/Makefile create mode 100644 package/zlib/ipkg/zlib.control create mode 100644 package/zlib/patches/patch-Makefile_in create mode 100644 package/zlib/patches/patch-configure create mode 100644 package/zsh/Config.in create mode 100644 package/zsh/Makefile create mode 100644 package/zsh/ipkg/zsh.control create mode 100644 rules.mk create mode 100755 scripts/config.guess create mode 100755 scripts/config.sub create mode 100644 scripts/create-busybox.sh create mode 100755 scripts/create-image.sh create mode 100755 scripts/install.sh create mode 100644 scripts/ipkg create mode 100644 scripts/ipkg-build create mode 100644 scripts/ipkg-make-index.sh create mode 100755 scripts/make create mode 100644 scripts/make-ipkg-dir.sh create mode 100644 scripts/md5sum create mode 100644 scripts/patch.sh create mode 100644 scripts/rstrip.sh create mode 100644 scripts/scan-pkgs.sh create mode 100644 scripts/scan-tools.sh create mode 100755 scripts/sed create mode 100644 scripts/split-cfg.sh create mode 100644 scripts/strip-script.sh create mode 100755 scripts/tar create mode 100644 scripts/update-patches create mode 100644 target/Config.in create mode 100644 target/Makefile create mode 100644 target/alix1c/Makefile create mode 100644 target/alix1c/device.mk create mode 100644 target/alix1c/files/etc/fstab create mode 100644 target/alix1c/files/etc/inittab create mode 100644 target/alix1c/files/etc/mdev.conf create mode 100644 target/alix1c/kernel.config create mode 100644 target/alix1c/uclibc.config create mode 100644 target/foxboard/Makefile create mode 100644 target/foxboard/device.mk create mode 100644 target/foxboard/files/etc/mdev.conf create mode 100644 target/foxboard/kernel.config create mode 100644 target/foxboard/patches/cris.patch create mode 100644 target/foxboard/patches/mtd-root.patch create mode 100755 target/foxboard/tools/boot_linux create mode 100644 target/foxboard/tools/e100boot/Makefile create mode 100644 target/foxboard/tools/mkfimage/Makefile create mode 100755 target/foxboard/tools/mkfimage/mkfimage create mode 100644 target/foxboard/tools/mkfimage/mkfimage.c create mode 100644 target/foxboard/tools/rules.mk create mode 100644 target/foxboard/tools/squashfs/Makefile create mode 100644 target/foxboard/uclibc.config create mode 100644 target/ibm-x40/Makefile create mode 100644 target/ibm-x40/device.mk create mode 100644 target/ibm-x40/files/etc/inittab create mode 100644 target/ibm-x40/files/etc/mdev.conf create mode 100644 target/ibm-x40/kernel.config create mode 100644 target/ibm-x40/uclibc.config create mode 100644 target/linux/Config.in create mode 100644 target/linux/config/Config.in.block create mode 100644 target/linux/config/Config.in.bluetooth create mode 100644 target/linux/config/Config.in.crypto create mode 100644 target/linux/config/Config.in.debug create mode 100644 target/linux/config/Config.in.fs create mode 100644 target/linux/config/Config.in.fsnet create mode 100644 target/linux/config/Config.in.input create mode 100644 target/linux/config/Config.in.ipvs create mode 100644 target/linux/config/Config.in.isdn create mode 100644 target/linux/config/Config.in.kernel create mode 100644 target/linux/config/Config.in.leds create mode 100644 target/linux/config/Config.in.lib create mode 100644 target/linux/config/Config.in.misc create mode 100644 target/linux/config/Config.in.multimedia create mode 100644 target/linux/config/Config.in.netdevice create mode 100644 target/linux/config/Config.in.netfilter create mode 100644 target/linux/config/Config.in.network create mode 100644 target/linux/config/Config.in.nls create mode 100644 target/linux/config/Config.in.pcmcia create mode 100644 target/linux/config/Config.in.sched create mode 100644 target/linux/config/Config.in.usb create mode 100644 target/linux/kernel.control create mode 100644 target/linux/patches/2.6.28/ocf.patch create mode 100644 target/linux/patches/2.6.28/sunrpc-kallsym-deactivated.patch create mode 100644 target/linux/patches/cygwin-compat.patch create mode 100644 target/linux/patches/freebsd-compat.patch create mode 100644 target/linux/patches/ocf.patch create mode 100644 target/linux/patches/swconfig.patch create mode 100644 target/linux/patches/yaffs2.patch create mode 100644 target/qemu-cris/Makefile create mode 100644 target/qemu-cris/device.mk create mode 100644 target/qemu-cris/files/etc/mdev.conf create mode 100644 target/qemu-cris/kernel.config create mode 100644 target/qemu-cris/patches/cris.patch create mode 100644 target/qemu-cris/tools/mkfimage/Makefile create mode 100644 target/qemu-cris/tools/mkfimage/mkfimage.c create mode 100644 target/qemu-cris/tools/rules.mk create mode 100644 target/qemu-cris/uclibc.config create mode 100644 target/qemu-mips/Makefile create mode 100644 target/qemu-mips/device.mk create mode 100644 target/qemu-mips/files/etc/mdev.conf create mode 100644 target/qemu-mips/kernel.config create mode 100644 target/qemu-mips/patches/io_map_base.patch create mode 100644 target/qemu-mips/uclibc.config create mode 100644 target/qemu-x86/Makefile create mode 100644 target/qemu-x86/device.mk create mode 100644 target/qemu-x86/files/etc/inittab create mode 100644 target/qemu-x86/files/etc/mdev.conf create mode 100644 target/qemu-x86/kernel.config create mode 100644 target/qemu-x86/uclibc.config create mode 100644 target/rb411/Makefile create mode 100644 target/rb411/device.mk create mode 100644 target/rb411/files/etc/mdev.conf create mode 100644 target/rb411/kernel.config create mode 100644 target/rb411/patches/ar71xx.patch create mode 100644 target/rb411/uclibc.config create mode 100644 target/rb433/Makefile create mode 100644 target/rb433/device.mk create mode 100644 target/rb433/files/etc/mdev.conf create mode 100644 target/rb433/kernel.config create mode 100644 target/rb433/patches/ar71xx.patch create mode 100644 target/rb433/patches/ip175-switch.patch create mode 100644 target/rb433/uclibc.config create mode 100644 target/rb532/Makefile create mode 100644 target/rb532/device.mk create mode 100644 target/rb532/files/etc/mdev.conf create mode 100644 target/rb532/kernel.config create mode 100644 target/rb532/uclibc.config create mode 100644 target/rescue-x86/Makefile create mode 100644 target/rescue-x86/device.mk create mode 100644 target/rescue-x86/files/etc/inittab create mode 100644 target/rescue-x86/files/etc/mdev.conf create mode 100644 target/rescue-x86/kernel.config create mode 100644 target/rescue-x86/uclibc.config create mode 100644 target/rescue-x86_64/Makefile create mode 100644 target/rescue-x86_64/device.mk create mode 100644 target/rescue-x86_64/files/etc/inittab create mode 100644 target/rescue-x86_64/files/etc/mdev.conf create mode 100644 target/rescue-x86_64/kernel.config create mode 100644 target/rescue-x86_64/uclibc.config create mode 100644 target/zaurus/Makefile create mode 100644 target/zaurus/device.mk create mode 100644 target/zaurus/files/etc/mdev.conf create mode 100644 target/zaurus/kernel.config create mode 100644 target/zaurus/uclibc.config create mode 100644 toolchain/Makefile create mode 100644 toolchain/binutils/Makefile create mode 100644 toolchain/binutils/Makefile.inc create mode 100644 toolchain/gcc/Makefile create mode 100644 toolchain/gcc/Makefile.inc create mode 100644 toolchain/gcc/patches/arm-softfloat-libgcc.patch create mode 100644 toolchain/gdb/Config.in create mode 100644 toolchain/gdb/Makefile create mode 100644 toolchain/gdb/Makefile.inc create mode 100644 toolchain/glibc/Makefile create mode 100644 toolchain/glibc/Makefile.inc create mode 100644 toolchain/glibc/patches/binutils.patch create mode 100644 toolchain/glibc/patches/gcc43.patch create mode 100644 toolchain/glibc/patches/i586-chk.patch create mode 100644 toolchain/glibc/patches/install-extra.patch create mode 100644 toolchain/glibc/patches/make-install-lib.patch create mode 100644 toolchain/gmp/Makefile create mode 100644 toolchain/gmp/Makefile.inc create mode 100644 toolchain/kernel-headers/Makefile create mode 100644 toolchain/kernel-headers/files/cryptodev.h create mode 100644 toolchain/kernel-headers/patches/cleankernel.patch create mode 100644 toolchain/kernel-headers/patches/etrax-header.patch create mode 100644 toolchain/mpfr/Makefile create mode 100644 toolchain/mpfr/Makefile.inc create mode 100644 toolchain/rules.mk create mode 100644 toolchain/uClibc/Makefile create mode 100644 toolchain/uClibc/Makefile.inc diff --git a/BSDmakefile b/BSDmakefile new file mode 100644 index 000000000..7e64bb03b --- /dev/null +++ b/BSDmakefile @@ -0,0 +1,33 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +TOPDIR= ${.CURDIR} +PWD= ${.CURDIR} + +.if defined(package) && !empty(package) +subdir:= package/${package} +. if !make(clean) +_subdir_dep:= ${TOPDIR}/.cfg/ADK_HAVE_DOT_CONFIG +. endif +.endif + +.if defined(subdir) && !empty(subdir) +_subdir:= ${.TARGETS} +${.TARGETS}: _subdir + +_subdir: ${_subdir_dep} + @if test x"$$(umask 2>/dev/null | sed 's/00*22/OK/')" != x"OK"; then \ + echo >&2 Error: you must build with “umask 022â€, sorry.; \ + exit 1; \ + fi + cd ${.CURDIR}/${subdir} && TOPDIR=${.CURDIR} DEVELOPER=1 \ + gmake VERBOSE=1 ${.MFLAGS} ${_subdir} + +. include "${.CURDIR}/prereq.mk" +. include "${.CURDIR}/mk/split-cfg.mk" +.else +. include "${.CURDIR}/prereq.mk" +. include "${.CURDIR}/Makefile" +.endif diff --git a/BUGS b/BUGS new file mode 100644 index 000000000..4ed83a61c --- /dev/null +++ b/BUGS @@ -0,0 +1,7 @@ +- lvm package and device-mapper combine and shared +- use kmod-template for external kernel modules +- optimize iptables package (libdirs depending on choosen kernel features) +- checksum for toolchain packages +- network scripts for wireless client / ap +- x11 support completion +- disable platforms zaurus / qemu etrax diff --git a/COPYING b/COPYING new file mode 100644 index 000000000..d511905c1 --- /dev/null +++ b/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/Config.default b/Config.default new file mode 100644 index 000000000..1672c50c2 --- /dev/null +++ b/Config.default @@ -0,0 +1,1619 @@ +# +# Automatically generated make config: don't edit +# +MODULES=y +ADK_HAVE_DOT_CONFIG=y +ADK_alix1c=y +ADK_DEVICE="alix1c" + +# +# Target system +# +ADK_LINUX_X86_ALIX1C=y +# ADK_LINUX_CRIS_FOXBOARD is not set +# ADK_LINUX_MIPS_RB411 is not set +# ADK_LINUX_MIPS_RB433 is not set +# ADK_LINUX_MIPS_RB532 is not set +# ADK_LINUX_XSCALE_ZAURUS is not set +# ADK_LINUX_X86_IBM_X40 is not set +# ADK_LINUX_QEMU is not set +ADK_KERNEL_NETWORK_FILESYSTEMS=y +# ADK_KERNEL_IP_PNP is not set +# ADK_KERNEL_IP_PNP_DHCP is not set +# ADK_KERNEL_NFS_FS is not set +# ADK_KERNEL_NFS_V3 is not set +# ADK_KERNEL_ROOT_NFS is not set +# ADK_KERNEL_LOCKD is not set +# ADK_KERNEL_NFS_COMMON is not set +# ADK_KERNEL_SUNRPC is not set +ADK_KERNEL_EXT2_FS=y +ADK_TARGET_LIB_UCLIBC=y +# ADK_TARGET_LIB_GLIBC is not set +# ADK_TARGET_ROOTFS_INITRAMFS is not set +# ADK_TARGET_ROOTFS_SQUASHFS is not set +# ADK_TARGET_ROOTFS_YAFFS is not set +# ADK_TARGET_ROOTFS_NFSROOT is not set +ADK_TARGET_ROOTFS_EXT2_CF=y +# ADK_TARGET_ROOTFS_EXT2 is not set +# ADK_SSP is not set +# ADK_CXX is not set +# ADK_IPV6 is not set +# ADK_XORG is not set + +# +# Package selection +# + +# +# Package categories +# + +# +# Applications +# + +# +# Basesystem +# +ADK_PACKAGE_BASE_FILES=y +ADK_PACKAGE_CONFIG_IN_ETC=y +ADK_PACKAGE_BUSYBOX=y + +# +# Busybox Configuration +# +BUSYBOX_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +# BUSYBOX_DESKTOP is not set +# BUSYBOX_EXTRA_COMPAT is not set +# BUSYBOX_FEATURE_ASSUME_UNICODE is not set +BUSYBOX_FEATURE_BUFFERS_USE_MALLOC=y +# BUSYBOX_FEATURE_BUFFERS_GO_ON_STACK is not set +# BUSYBOX_FEATURE_BUFFERS_GO_IN_BSS is not set +BUSYBOX_SHOW_USAGE=y +BUSYBOX_FEATURE_VERBOSE_USAGE=y +BUSYBOX_FEATURE_COMPRESS_USAGE=y +# BUSYBOX_FEATURE_INSTALLER is not set +# BUSYBOX_LOCALE_SUPPORT is not set +BUSYBOX_GETOPT_LONG=y +BUSYBOX_FEATURE_DEVPTS=y +# BUSYBOX_FEATURE_CLEAN_UP is not set +# BUSYBOX_FEATURE_PIDFILE is not set +BUSYBOX_FEATURE_SUID=y +# BUSYBOX_FEATURE_SUID_CONFIG is not set +# BUSYBOX_FEATURE_PREFER_APPLETS is not set +BUSYBOX_BUSYBOX_EXEC_PATH="/proc/self/exe" +BUSYBOX_FEATURE_SYSLOG=y +# BUSYBOX_FEATURE_HAVE_RPC is not set + +# +# Build Options +# +BUSYBOX_LFS=y +BUSYBOX_CROSS_COMPILER_PREFIX="" + +# +# Debugging Options +# +# BUSYBOX_DEBUG is not set +# BUSYBOX_WERROR is not set +BUSYBOX_NO_DEBUG_LIB=y +# BUSYBOX_DMALLOC is not set +# BUSYBOX_EFENCE is not set +BUSYBOX_INCLUDE_SUSv2=y + +# +# Installation Options +# +# BUSYBOX_INSTALL_NO_USR is not set +BUSYBOX_INSTALL_APPLET_SYMLINKS=y +# BUSYBOX_INSTALL_APPLET_HARDLINKS is not set +# BUSYBOX_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# BUSYBOX_INSTALL_APPLET_DONT is not set +BUSYBOX_PREFIX="@IDIR@" + +# +# Busybox Library Tuning +# +BUSYBOX_PASSWORD_MINLEN=6 +BUSYBOX_MD5_SIZE_VS_SPEED=2 +# BUSYBOX_FEATURE_FAST_TOP is not set +# BUSYBOX_FEATURE_ETC_NETWORKS is not set +BUSYBOX_FEATURE_EDITING=y +BUSYBOX_FEATURE_EDITING_MAX_LEN=1024 +# BUSYBOX_FEATURE_EDITING_VI is not set +BUSYBOX_FEATURE_EDITING_HISTORY=15 +# BUSYBOX_FEATURE_EDITING_SAVEHISTORY is not set +BUSYBOX_FEATURE_TAB_COMPLETION=y +# BUSYBOX_FEATURE_USERNAME_COMPLETION is not set +# BUSYBOX_FEATURE_EDITING_FANCY_PROMPT is not set +# BUSYBOX_FEATURE_VERBOSE_CP_MESSAGE is not set +BUSYBOX_FEATURE_COPYBUF_KB=4 +BUSYBOX_MONOTONIC_SYSCALL=y +BUSYBOX_IOCTL_HEX2STR_ERROR=y +# BUSYBOX_FEATURE_HWIB is not set + +# +# Applets +# + +# +# Archival Utilities +# +# BUSYBOX_FEATURE_SEAMLESS_LZMA is not set +# BUSYBOX_FEATURE_SEAMLESS_BZ2 is not set +# BUSYBOX_FEATURE_SEAMLESS_GZ is not set +# BUSYBOX_FEATURE_SEAMLESS_Z is not set +# BUSYBOX_AR is not set +BUSYBOX_BUNZIP2=y +# BUSYBOX_BZIP2 is not set +BUSYBOX_CPIO=y +# BUSYBOX_FEATURE_CPIO_O is not set +# BUSYBOX_DPKG is not set +# BUSYBOX_DPKG_DEB is not set +BUSYBOX_GUNZIP=y +BUSYBOX_GZIP=y +BUSYBOX_IPKG=y +# BUSYBOX_RPM2CPIO is not set +# BUSYBOX_RPM is not set +BUSYBOX_TAR=y +# BUSYBOX_UNCOMPRESS is not set +# BUSYBOX_UNLZMA is not set +BUSYBOX_UNZIP=y + +# +# Coreutils +# +BUSYBOX_BASENAME=y +# BUSYBOX_CAL is not set +BUSYBOX_CAT=y +# BUSYBOX_CATV is not set +BUSYBOX_CHGRP=y +BUSYBOX_CHMOD=y +BUSYBOX_CHOWN=y +BUSYBOX_CHROOT=y +BUSYBOX_CKSUM=y +BUSYBOX_COMM=y +BUSYBOX_CP=y +BUSYBOX_CUT=y +BUSYBOX_DATE=y +BUSYBOX_FEATURE_DATE_ISOFMT=y +BUSYBOX_DD=y +BUSYBOX_FEATURE_DD_SIGNAL_HANDLING=y +BUSYBOX_FEATURE_DD_IBS_OBS=y +BUSYBOX_DF=y +BUSYBOX_FEATURE_DF_FANCY=y +BUSYBOX_DIRNAME=y +BUSYBOX_DOS2UNIX=y +BUSYBOX_UNIX2DOS=y +BUSYBOX_DU=y +BUSYBOX_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +BUSYBOX_ECHO=y +BUSYBOX_FEATURE_FANCY_ECHO=y +BUSYBOX_ENV=y +# BUSYBOX_FEATURE_ENV_LONG_OPTIONS is not set +# BUSYBOX_EXPAND is not set +BUSYBOX_EXPR=y +# BUSYBOX_EXPR_MATH_SUPPORT_64 is not set +BUSYBOX_FALSE=y +# BUSYBOX_FOLD is not set +BUSYBOX_HEAD=y +BUSYBOX_FEATURE_FANCY_HEAD=y +# BUSYBOX_HOSTID is not set +BUSYBOX_ID=y +# BUSYBOX_INSTALL is not set +# BUSYBOX_LENGTH is not set +BUSYBOX_LN=y +# BUSYBOX_LOGNAME is not set +BUSYBOX_LS=y +BUSYBOX_FEATURE_LS_FILETYPES=y +BUSYBOX_FEATURE_LS_FOLLOWLINKS=y +BUSYBOX_FEATURE_LS_RECURSIVE=y +BUSYBOX_FEATURE_LS_SORTFILES=y +BUSYBOX_FEATURE_LS_TIMESTAMPS=y +BUSYBOX_FEATURE_LS_USERNAME=y +# BUSYBOX_FEATURE_LS_COLOR is not set +BUSYBOX_MD5SUM=y +BUSYBOX_MKDIR=y +# BUSYBOX_FEATURE_MKDIR_LONG_OPTIONS is not set +BUSYBOX_MKFIFO=y +BUSYBOX_MKNOD=y +BUSYBOX_MV=y +# BUSYBOX_FEATURE_MV_LONG_OPTIONS is not set +BUSYBOX_NICE=y +BUSYBOX_NOHUP=y +# BUSYBOX_OD is not set +# BUSYBOX_PRINTENV is not set +BUSYBOX_PRINTF=y +BUSYBOX_PWD=y +BUSYBOX_READLINK=y +BUSYBOX_FEATURE_READLINK_FOLLOW=y +# BUSYBOX_REALPATH is not set +BUSYBOX_RM=y +# BUSYBOX_RMDIR is not set +BUSYBOX_SEQ=y +BUSYBOX_SHA1SUM=y +BUSYBOX_SLEEP=y +# BUSYBOX_FEATURE_FANCY_SLEEP is not set +BUSYBOX_SORT=y +BUSYBOX_FEATURE_SORT_BIG=y +# BUSYBOX_SPLIT is not set +# BUSYBOX_STAT is not set +BUSYBOX_STTY=y +# BUSYBOX_SUM is not set +BUSYBOX_SYNC=y +# BUSYBOX_TAC is not set +BUSYBOX_TAIL=y +# BUSYBOX_FEATURE_FANCY_TAIL is not set +BUSYBOX_TEE=y +# BUSYBOX_FEATURE_TEE_USE_BLOCK_IO is not set +BUSYBOX_TEST=y +# BUSYBOX_FEATURE_TEST_64 is not set +BUSYBOX_TOUCH=y +BUSYBOX_TR=y +BUSYBOX_FEATURE_TR_CLASSES=y +# BUSYBOX_FEATURE_TR_EQUIV is not set +BUSYBOX_TRUE=y +# BUSYBOX_TTY is not set +BUSYBOX_UNAME=y +# BUSYBOX_UNEXPAND is not set +BUSYBOX_UNIQ=y +# BUSYBOX_USLEEP is not set +# BUSYBOX_UUDECODE is not set +# BUSYBOX_UUENCODE is not set +BUSYBOX_WC=y +# BUSYBOX_FEATURE_WC_LARGE is not set +BUSYBOX_WHO=y +# BUSYBOX_WHOAMI is not set +BUSYBOX_YES=y + +# +# Common options for cp and mv +# +BUSYBOX_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls, more and telnet +# +BUSYBOX_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +BUSYBOX_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +BUSYBOX_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +# BUSYBOX_CHVT is not set +BUSYBOX_CLEAR=y +# BUSYBOX_DEALLOCVT is not set +# BUSYBOX_DUMPKMAP is not set +# BUSYBOX_KBD_MODE is not set +# BUSYBOX_LOADFONT is not set +# BUSYBOX_LOADKMAP is not set +# BUSYBOX_OPENVT is not set +BUSYBOX_RESET=y +# BUSYBOX_RESIZE is not set +# BUSYBOX_SETCONSOLE is not set +# BUSYBOX_SETFONT is not set +# BUSYBOX_SETKEYCODES is not set +# BUSYBOX_SETLOGCONS is not set +# BUSYBOX_SHOWKEY is not set + +# +# Debian Utilities +# +BUSYBOX_MKTEMP=y +# BUSYBOX_PIPE_PROGRESS is not set +BUSYBOX_RUN_PARTS=y +# BUSYBOX_FEATURE_RUN_PARTS_LONG_OPTIONS is not set +# BUSYBOX_FEATURE_RUN_PARTS_FANCY is not set +# BUSYBOX_START_STOP_DAEMON is not set +BUSYBOX_WHICH=y + +# +# Editors +# +BUSYBOX_AWK=y +BUSYBOX_FEATURE_AWK_LIBM=y +# BUSYBOX_CMP is not set +BUSYBOX_DIFF=y +BUSYBOX_FEATURE_DIFF_BINARY=y +BUSYBOX_FEATURE_DIFF_DIR=y +# BUSYBOX_FEATURE_DIFF_MINIMAL is not set +# BUSYBOX_ED is not set +# BUSYBOX_PATCH is not set +BUSYBOX_SED=y +BUSYBOX_VI=y +BUSYBOX_FEATURE_VI_MAX_LEN=4096 +BUSYBOX_FEATURE_VI_8BIT=y +BUSYBOX_FEATURE_VI_COLON=y +BUSYBOX_FEATURE_VI_YANKMARK=y +BUSYBOX_FEATURE_VI_SEARCH=y +BUSYBOX_FEATURE_VI_USE_SIGNALS=y +BUSYBOX_FEATURE_VI_DOT_CMD=y +BUSYBOX_FEATURE_VI_READONLY=y +BUSYBOX_FEATURE_VI_SETOPTS=y +BUSYBOX_FEATURE_VI_SET=y +BUSYBOX_FEATURE_VI_WIN_RESIZE=y +BUSYBOX_FEATURE_VI_OPTIMIZE_CURSOR=y +BUSYBOX_FEATURE_ALLOW_EXEC=y + +# +# Finding Utilities +# +BUSYBOX_FIND=y +BUSYBOX_FEATURE_FIND_PRINT0=y +BUSYBOX_FEATURE_FIND_MTIME=y +BUSYBOX_FEATURE_FIND_MMIN=y +BUSYBOX_FEATURE_FIND_PERM=y +BUSYBOX_FEATURE_FIND_TYPE=y +BUSYBOX_FEATURE_FIND_XDEV=y +BUSYBOX_FEATURE_FIND_MAXDEPTH=y +BUSYBOX_FEATURE_FIND_NEWER=y +BUSYBOX_FEATURE_FIND_INUM=y +BUSYBOX_FEATURE_FIND_EXEC=y +BUSYBOX_FEATURE_FIND_USER=y +BUSYBOX_FEATURE_FIND_GROUP=y +BUSYBOX_FEATURE_FIND_NOT=y +BUSYBOX_FEATURE_FIND_DEPTH=y +BUSYBOX_FEATURE_FIND_PAREN=y +BUSYBOX_FEATURE_FIND_SIZE=y +BUSYBOX_FEATURE_FIND_PRUNE=y +BUSYBOX_FEATURE_FIND_EMPTY=y +BUSYBOX_FEATURE_FIND_DELETE=y +BUSYBOX_FEATURE_FIND_PATH=y +BUSYBOX_FEATURE_FIND_REGEX=y +BUSYBOX_GREP=y +BUSYBOX_FEATURE_GREP_EGREP_ALIAS=y +BUSYBOX_FEATURE_GREP_FGREP_ALIAS=y +BUSYBOX_FEATURE_GREP_CONTEXT=y +BUSYBOX_XARGS=y +# BUSYBOX_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +# BUSYBOX_FEATURE_XARGS_SUPPORT_QUOTES is not set +# BUSYBOX_FEATURE_XARGS_SUPPORT_TERMOPT is not set +# BUSYBOX_FEATURE_XARGS_SUPPORT_ZERO_TERM is not set + +# +# Init Utilities +# +BUSYBOX_INIT=y +BUSYBOX_FEATURE_USE_INITTAB=y +BUSYBOX_FEATURE_KILL_REMOVED=y +BUSYBOX_FEATURE_KILL_DELAY=0 +# BUSYBOX_FEATURE_INIT_SCTTY is not set +BUSYBOX_FEATURE_INIT_SYSLOG=y +# BUSYBOX_FEATURE_EXTRA_QUIET is not set +# BUSYBOX_FEATURE_INIT_COREDUMPS is not set +# BUSYBOX_FEATURE_INITRD is not set +BUSYBOX_HALT=y +# BUSYBOX_MESG is not set + +# +# Login/Password Management Utilities +# +BUSYBOX_FEATURE_SHADOWPASSWDS=y +BUSYBOX_USE_BB_PWD_GRP=y +BUSYBOX_USE_BB_SHADOW=y +BUSYBOX_USE_BB_CRYPT=y +BUSYBOX_ADDGROUP=y +# BUSYBOX_FEATURE_ADDUSER_TO_GROUP is not set +BUSYBOX_DELGROUP=y +# BUSYBOX_FEATURE_DEL_USER_FROM_GROUP is not set +# BUSYBOX_FEATURE_CHECK_NAMES is not set +BUSYBOX_ADDUSER=y +# BUSYBOX_FEATURE_ADDUSER_LONG_OPTIONS is not set +BUSYBOX_DELUSER=y +BUSYBOX_GETTY=y +BUSYBOX_FEATURE_UTMP=y +BUSYBOX_FEATURE_WTMP=y +BUSYBOX_LOGIN=y +# BUSYBOX_LOGIN_SCRIPTS is not set +BUSYBOX_FEATURE_NOLOGIN=y +BUSYBOX_FEATURE_SECURETTY=y +BUSYBOX_PASSWD=y +BUSYBOX_FEATURE_PASSWD_WEAK_CHECK=y +# BUSYBOX_CRYPTPW is not set +# BUSYBOX_CHPASSWD is not set +BUSYBOX_SU=y +BUSYBOX_FEATURE_SU_SYSLOG=y +BUSYBOX_FEATURE_SU_CHECKS_SHELLS=y +# BUSYBOX_SULOGIN is not set +# BUSYBOX_VLOCK is not set + +# +# Linux Ext2 FS Progs +# +# BUSYBOX_CHATTR is not set +# BUSYBOX_FSCK is not set +# BUSYBOX_LSATTR is not set + +# +# Linux Module Utilities +# +BUSYBOX_DEFAULT_MODULES_DIR="/lib/modules" +BUSYBOX_DEFAULT_DEPMOD_FILE="modules.dep" +# BUSYBOX_MODPROBE_SMALL is not set +BUSYBOX_INSMOD=y +BUSYBOX_RMMOD=y +BUSYBOX_LSMOD=y +# BUSYBOX_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set +# BUSYBOX_MODPROBE is not set +# BUSYBOX_DEPMOD is not set + +# +# Options common to multiple modutils +# +# BUSYBOX_FEATURE_2_4_MODULES is not set +BUSYBOX_FEATURE_CHECK_TAINTED_MODULE=y + +# +# Linux System Utilities +# +BUSYBOX_BLKID=y +BUSYBOX_DMESG=y +BUSYBOX_FEATURE_DMESG_PRETTY=y +# BUSYBOX_FBSET is not set +# BUSYBOX_FDFLUSH is not set +# BUSYBOX_FDFORMAT is not set +BUSYBOX_FDISK=y +BUSYBOX_FDISK_SUPPORT_LARGE_DISKS=y +BUSYBOX_FEATURE_FDISK_WRITABLE=y +# BUSYBOX_FEATURE_AIX_LABEL is not set +# BUSYBOX_FEATURE_SGI_LABEL is not set +# BUSYBOX_FEATURE_SUN_LABEL is not set +# BUSYBOX_FEATURE_OSF_LABEL is not set +# BUSYBOX_FEATURE_FDISK_ADVANCED is not set +# BUSYBOX_FINDFS is not set +# BUSYBOX_FREERAMDISK is not set +# BUSYBOX_FSCK_MINIX is not set +# BUSYBOX_MKFS_MINIX is not set +# BUSYBOX_GETOPT is not set +BUSYBOX_HEXDUMP=y +# BUSYBOX_FEATURE_HEXDUMP_REVERSE is not set +# BUSYBOX_HD is not set +BUSYBOX_HWCLOCK=y +# BUSYBOX_FEATURE_HWCLOCK_LONG_OPTIONS is not set +BUSYBOX_FEATURE_HWCLOCK_ADJTIME_FHS=y +BUSYBOX_IPCRM=y +BUSYBOX_IPCS=y +BUSYBOX_LOSETUP=y +BUSYBOX_MDEV=y +BUSYBOX_FEATURE_MDEV_CONF=y +BUSYBOX_FEATURE_MDEV_RENAME=y +BUSYBOX_FEATURE_MDEV_RENAME_REGEXP=y +BUSYBOX_FEATURE_MDEV_EXEC=y +BUSYBOX_FEATURE_MDEV_LOAD_FIRMWARE=y +# BUSYBOX_MKSWAP is not set +BUSYBOX_MORE=y +BUSYBOX_FEATURE_USE_TERMIOS=y +BUSYBOX_VOLUMEID=y +# BUSYBOX_FEATURE_VOLUMEID_EXT is not set +# BUSYBOX_FEATURE_VOLUMEID_REISERFS is not set +# BUSYBOX_FEATURE_VOLUMEID_FAT is not set +# BUSYBOX_FEATURE_VOLUMEID_HFS is not set +# BUSYBOX_FEATURE_VOLUMEID_JFS is not set +BUSYBOX_FEATURE_VOLUMEID_XFS=y +# BUSYBOX_FEATURE_VOLUMEID_NTFS is not set +# BUSYBOX_FEATURE_VOLUMEID_ISO9660 is not set +# BUSYBOX_FEATURE_VOLUMEID_UDF is not set +# BUSYBOX_FEATURE_VOLUMEID_LUKS is not set +# BUSYBOX_FEATURE_VOLUMEID_LINUXSWAP is not set +# BUSYBOX_FEATURE_VOLUMEID_CRAMFS is not set +# BUSYBOX_FEATURE_VOLUMEID_ROMFS is not set +# BUSYBOX_FEATURE_VOLUMEID_SYSV is not set +# BUSYBOX_FEATURE_VOLUMEID_OCFS2 is not set +# BUSYBOX_FEATURE_VOLUMEID_LINUXRAID is not set +BUSYBOX_MOUNT=y +# BUSYBOX_FEATURE_MOUNT_FAKE is not set +# BUSYBOX_FEATURE_MOUNT_VERBOSE is not set +BUSYBOX_FEATURE_MOUNT_HELPERS=y +BUSYBOX_FEATURE_MOUNT_LABEL=y +# BUSYBOX_FEATURE_MOUNT_NFS is not set +# BUSYBOX_FEATURE_MOUNT_CIFS is not set +BUSYBOX_FEATURE_MOUNT_FLAGS=y +BUSYBOX_FEATURE_MOUNT_FSTAB=y +# BUSYBOX_PIVOT_ROOT is not set +BUSYBOX_RDATE=y +# BUSYBOX_RDEV is not set +# BUSYBOX_READPROFILE is not set +# BUSYBOX_RTCWAKE is not set +# BUSYBOX_SCRIPT is not set +# BUSYBOX_SETARCH is not set +# BUSYBOX_SWAPONOFF is not set +# BUSYBOX_SWITCH_ROOT is not set +BUSYBOX_UMOUNT=y +# BUSYBOX_FEATURE_UMOUNT_ALL is not set + +# +# Common options for mount/umount +# +BUSYBOX_FEATURE_MOUNT_LOOP=y +# BUSYBOX_FEATURE_MTAB_SUPPORT is not set + +# +# Miscellaneous Utilities +# +# BUSYBOX_ADJTIMEX is not set +# BUSYBOX_BBCONFIG is not set +# BUSYBOX_CHAT is not set +# BUSYBOX_CHRT is not set +BUSYBOX_CROND=y +# BUSYBOX_FEATURE_CROND_D is not set +# BUSYBOX_FEATURE_CROND_CALL_SENDMAIL is not set +BUSYBOX_CRONTAB=y +# BUSYBOX_DC is not set +# BUSYBOX_DEVFSD is not set +# BUSYBOX_FEATURE_DEVFS is not set +# BUSYBOX_DEVMEM is not set +# BUSYBOX_EJECT is not set +# BUSYBOX_FBSPLASH is not set +# BUSYBOX_INOTIFYD is not set +# BUSYBOX_LAST is not set +BUSYBOX_LESS=y +BUSYBOX_FEATURE_LESS_MAXLINES=9999999 +# BUSYBOX_FEATURE_LESS_BRACKETS is not set +# BUSYBOX_FEATURE_LESS_FLAGS is not set +# BUSYBOX_FEATURE_LESS_DASHCMD is not set +# BUSYBOX_FEATURE_LESS_MARKS is not set +# BUSYBOX_FEATURE_LESS_REGEXP is not set +BUSYBOX_FEATURE_LESS_WINCH=y +# BUSYBOX_HDPARM is not set +# BUSYBOX_MAKEDEVS is not set +# BUSYBOX_MAN is not set +# BUSYBOX_MICROCOM is not set +# BUSYBOX_MOUNTPOINT is not set +# BUSYBOX_MT is not set +# BUSYBOX_RAIDAUTORUN is not set +# BUSYBOX_READAHEAD is not set +# BUSYBOX_RUNLEVEL is not set +# BUSYBOX_RX is not set +# BUSYBOX_SETSID is not set +# BUSYBOX_STRINGS is not set +# BUSYBOX_TASKSET is not set +# BUSYBOX_TIME is not set +# BUSYBOX_TTYSIZE is not set +# BUSYBOX_WATCHDOG is not set + +# +# Networking Utilities +# +# BUSYBOX_FEATURE_IPV6 is not set +# BUSYBOX_VERBOSE_RESOLUTION_ERRORS is not set +BUSYBOX_ARP=y +BUSYBOX_ARPING=y +# BUSYBOX_BRCTL is not set +# BUSYBOX_DNSD is not set +# BUSYBOX_ETHER_WAKE is not set +# BUSYBOX_FAKEIDENTD is not set +# BUSYBOX_FTPGET is not set +# BUSYBOX_FTPPUT is not set +BUSYBOX_HOSTNAME=y +# BUSYBOX_HTTPD is not set +BUSYBOX_IFCONFIG=y +BUSYBOX_FEATURE_IFCONFIG_STATUS=y +# BUSYBOX_FEATURE_IFCONFIG_SLIP is not set +# BUSYBOX_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +BUSYBOX_FEATURE_IFCONFIG_HW=y +BUSYBOX_FEATURE_IFCONFIG_BROADCAST_PLUS=y +# BUSYBOX_IFENSLAVE is not set +BUSYBOX_IFUPDOWN=y +BUSYBOX_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" +BUSYBOX_FEATURE_IFUPDOWN_IP=y +BUSYBOX_FEATURE_IFUPDOWN_IP_BUILTIN=y +BUSYBOX_FEATURE_IFUPDOWN_IPV4=y +# BUSYBOX_FEATURE_IFUPDOWN_MAPPING is not set +# BUSYBOX_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set +# BUSYBOX_INETD is not set +BUSYBOX_IP=y +BUSYBOX_FEATURE_IP_ADDRESS=y +BUSYBOX_FEATURE_IP_LINK=y +BUSYBOX_FEATURE_IP_ROUTE=y +# BUSYBOX_FEATURE_IP_TUNNEL is not set +# BUSYBOX_FEATURE_IP_RULE is not set +# BUSYBOX_FEATURE_IP_SHORT_FORMS is not set +# BUSYBOX_FEATURE_IP_RARE_PROTOCOLS is not set +# BUSYBOX_IPCALC is not set +# BUSYBOX_NAMEIF is not set +BUSYBOX_NC=y +BUSYBOX_NC_SERVER=y +# BUSYBOX_NC_EXTRA is not set +BUSYBOX_NETSTAT=y +# BUSYBOX_FEATURE_NETSTAT_WIDE is not set +BUSYBOX_FEATURE_NETSTAT_PRG=y +BUSYBOX_NSLOOKUP=y +BUSYBOX_PING=y +BUSYBOX_FEATURE_FANCY_PING=y +# BUSYBOX_PSCAN is not set +BUSYBOX_ROUTE=y +# BUSYBOX_SLATTACH is not set +BUSYBOX_TELNET=y +BUSYBOX_FEATURE_TELNET_TTYPE=y +BUSYBOX_FEATURE_TELNET_AUTOLOGIN=y +# BUSYBOX_TELNETD is not set +# BUSYBOX_TFTP is not set +# BUSYBOX_TFTPD is not set +BUSYBOX_TRACEROUTE=y +BUSYBOX_FEATURE_TRACEROUTE_VERBOSE=y +# BUSYBOX_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +BUSYBOX_FEATURE_TRACEROUTE_USE_ICMP=y +# BUSYBOX_APP_UDHCPD is not set +BUSYBOX_APP_UDHCPC=y +BUSYBOX_FEATURE_UDHCPC_ARPING=y +# BUSYBOX_FEATURE_UDHCP_PORT is not set +# BUSYBOX_UDHCP_DEBUG is not set +# BUSYBOX_FEATURE_UDHCP_RFC3397 is not set +BUSYBOX_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" +BUSYBOX_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 +# BUSYBOX_VCONFIG is not set +BUSYBOX_WGET=y +# BUSYBOX_FEATURE_WGET_STATUSBAR is not set +BUSYBOX_FEATURE_WGET_AUTHENTICATION=y +# BUSYBOX_FEATURE_WGET_LONG_OPTIONS is not set +# BUSYBOX_ZCIP is not set +# BUSYBOX_TCPSVD is not set +# BUSYBOX_UDPSVD is not set + +# +# Print Utilities +# +# BUSYBOX_LPD is not set +# BUSYBOX_LPR is not set +# BUSYBOX_LPQ is not set + +# +# Mail Utilities +# +# BUSYBOX_MAKEMIME is not set +# BUSYBOX_POPMAILDIR is not set +# BUSYBOX_REFORMIME is not set +# BUSYBOX_SENDMAIL is not set + +# +# Process Utilities +# +BUSYBOX_FREE=y +BUSYBOX_FUSER=y +BUSYBOX_KILL=y +BUSYBOX_KILLALL=y +# BUSYBOX_KILLALL5 is not set +# BUSYBOX_NMETER is not set +# BUSYBOX_PGREP is not set +BUSYBOX_PIDOF=y +# BUSYBOX_FEATURE_PIDOF_SINGLE is not set +BUSYBOX_FEATURE_PIDOF_OMIT=y +BUSYBOX_PKILL=y +BUSYBOX_PS=y +# BUSYBOX_FEATURE_PS_WIDE is not set +# BUSYBOX_RENICE is not set +BUSYBOX_BB_SYSCTL=y +BUSYBOX_TOP=y +BUSYBOX_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +BUSYBOX_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y +# BUSYBOX_FEATURE_TOP_SMP_CPU is not set +# BUSYBOX_FEATURE_TOP_DECIMALS is not set +# BUSYBOX_FEATURE_TOP_SMP_PROCESS is not set +# BUSYBOX_FEATURE_TOPMEM is not set +BUSYBOX_UPTIME=y +BUSYBOX_WATCH=y + +# +# Runit Utilities +# +# BUSYBOX_RUNSV is not set +# BUSYBOX_RUNSVDIR is not set +# BUSYBOX_SV is not set +# BUSYBOX_SVLOGD is not set +# BUSYBOX_CHPST is not set +# BUSYBOX_SETUIDGID is not set +# BUSYBOX_ENVUIDGID is not set +# BUSYBOX_ENVDIR is not set +# BUSYBOX_SOFTLIMIT is not set + +# +# Shells +# +BUSYBOX_FEATURE_SH_IS_ASH=y +# BUSYBOX_FEATURE_SH_IS_HUSH is not set +# BUSYBOX_FEATURE_SH_IS_MSH is not set +# BUSYBOX_FEATURE_SH_IS_NONE is not set +BUSYBOX_ASH=y + +# +# Ash Shell Options +# +BUSYBOX_ASH_BASH_COMPAT=y +BUSYBOX_ASH_JOB_CONTROL=y +# BUSYBOX_ASH_READ_NCHARS is not set +# BUSYBOX_ASH_READ_TIMEOUT is not set +BUSYBOX_ASH_ALIAS=y +BUSYBOX_ASH_MATH_SUPPORT=y +# BUSYBOX_ASH_MATH_SUPPORT_64 is not set +BUSYBOX_ASH_GETOPTS=y +BUSYBOX_ASH_BUILTIN_ECHO=y +BUSYBOX_ASH_BUILTIN_PRINTF=y +BUSYBOX_ASH_BUILTIN_TEST=y +# BUSYBOX_ASH_CMDCMD is not set +# BUSYBOX_ASH_MAIL is not set +BUSYBOX_ASH_OPTIMIZE_FOR_SIZE=y +# BUSYBOX_ASH_RANDOM_SUPPORT is not set +# BUSYBOX_ASH_EXPAND_PRMT is not set +# BUSYBOX_HUSH is not set +# BUSYBOX_LASH is not set +# BUSYBOX_MSH is not set + +# +# Bourne Shell Options +# +# BUSYBOX_FEATURE_SH_EXTRA_QUIET is not set +# BUSYBOX_CTTYHACK is not set + +# +# System Logging Utilities +# +BUSYBOX_SYSLOGD=y +# BUSYBOX_FEATURE_ROTATE_LOGFILE is not set +# BUSYBOX_FEATURE_REMOTE_LOG is not set +# BUSYBOX_FEATURE_SYSLOGD_DUP is not set +BUSYBOX_FEATURE_IPC_SYSLOG=y +BUSYBOX_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +BUSYBOX_LOGREAD=y +BUSYBOX_FEATURE_LOGREAD_REDUCED_LOCKING=y +BUSYBOX_KLOGD=y +BUSYBOX_LOGGER=y +ADK_PACKAGE_UCLIBC=y +ADK_PACKAGE_CFGFS=y + +# +# Bluetooth +# +# ADK_PACKAGE_BLUEZ_FIRMWARE is not set +# ADK_PACKAGE_BLUEZ is not set +# ADK_PACKAGE_MIAX is not set +# ADK_PACKAGE_OBEXFTP is not set +# ADK_PACKAGE_OPENOBEX is not set +# ADK_PACKAGE_USSP_PUSH is not set + +# +# Browser +# +# ADK_PACKAGE_LINKS is not set +# ADK_PACKAGE_ELINKS is not set +# ADK_PACKAGE_LYNX is not set + +# +# Debugging / Analyzing +# +# ADK_COMPILE_EXMAP is not set +# ADK_PACKAGE_EXMAP is not set +# ADK_PACKAGE_EXMAPD is not set +# ADK_PACKAGE_EXMAPSERVER is not set +# ADK_PACKAGE_KMOD_EXMAP is not set +# ADK_PACKAGE_GDB is not set +# ADK_PACKAGE_GDBSERVER is not set +# ADK_PACKAGE_STRACE is not set +# ADK_PACKAGE_VALGRIND is not set + +# +# Editors / Pager +# +# ADK_PACKAGE_LESS is not set +# ADK_PACKAGE_NANO is not set +# ADK_PACKAGE_VIM is not set + +# +# Filesystem utilities +# +# ADK_PACKAGE_DEVICE_MAPPER is not set +# ADK_PACKAGE_DOSFSTOOLS is not set +# ADK_PACKAGE_E2FSPROGS is not set +# ADK_COMPILE_FUSE is not set +# ADK_PACKAGE_FUSE_UTILS is not set +# ADK_PACKAGE_FDISK is not set +# ADK_PACKAGE_LOSETUP is not set +# ADK_PACKAGE_SWAP_UTILS is not set +# ADK_PACKAGE_WDFS is not set +# ADK_PACKAGE_XFSPROGS is not set + +# +# Mail +# +# ADK_PACKAGE_DOVECOT is not set +# ADK_PACKAGE_FETCHMAIL is not set +# ADK_PACKAGE_MINI_SENDMAIL is not set +# ADK_PACKAGE_MUTT is not set +# ADK_PACKAGE_PROCMAIL is not set +# ADK_PACKAGE_SSMTP is not set +# ADK_PACKAGE_VILISTEXTUM is not set + +# +# Misc +# +# ADK_PACKAGE_COLLECTD is not set +# ADK_PACKAGE_DECO is not set +# ADK_PACKAGE_DIGITEMP is not set +# ADK_PACKAGE_GPM is not set +# ADK_PACKAGE_LOGROTATE is not set +# ADK_PACKAGE_MC is not set +# ADK_PACKAGE_MGETTY is not set +# ADK_PACKAGE_MONIT is not set +# ADK_PACKAGE_MOTION is not set +# ADK_PACKAGE_OSIRISD is not set +# ADK_COMPILE_RRDTOOL is not set +# ADK_PACKAGE_LIBRRD is not set +# ADK_PACKAGE_RRDCGI is not set +# ADK_PACKAGE_RRDTOOL is not set +# ADK_PACKAGE_SANE_BACKENDS is not set +# ADK_PACKAGE_SCREEN is not set +# ADK_PACKAGE_SCSI_SPIN is not set +# ADK_PACKAGE_SER2NET is not set +# ADK_PACKAGE_SYSLOG_NG is not set +# ADK_PACKAGE_TAR is not set + +# +# Multimedia +# +# ADK_PACKAGE_ALSA_UTILS is not set +# ADK_PACKAGE_ESOUND is not set +# ADK_PACKAGE_ICECAST is not set +# ADK_COMPILE_LAME is not set +# ADK_PACKAGE_LAME is not set +# ADK_PACKAGE_MADPLAY is not set +# ADK_PACKAGE_MPD is not set +# ADK_PACKAGE_MPLAYER is not set +# ADK_PACKAGE_MT_DAAPD is not set +# ADK_PACKAGE_PALANTIR is not set +# ADK_PACKAGE_SETPWC is not set + +# +# Shells +# +# ADK_PACKAGE_BASH is not set +# ADK_PACKAGE_MKSH is not set +# ADK_PACKAGE_ZSH is not set + +# +# Security +# +# ADK_PACKAGE_CRYPTSETUP is not set +# ADK_PACKAGE_GPG is not set +# ADK_COMPILE_HEIMDAL is not set +# ADK_COMPILE_KRB5 is not set +# ADK_PACKAGE_OPENCT is not set +# ADK_PACKAGE_OPENSC is not set +ADK_COMPILE_OPENSSL=y +ADK_PACKAGE_LIBOPENSSL=y +# ADK_PACKAGE_OPENSSL_UTIL is not set +# ADK_PACKAGE_CA_CERTS is not set +# ADK_PACKAGE_OPENSSL_PKCS11 is not set + +# +# Serial communications & terminal emulation +# +# ADK_PACKAGE_HEYU is not set +# ADK_PACKAGE_LRZSZ is not set +# ADK_PACKAGE_PICOCOM is not set +# ADK_PACKAGE_SERDISPLIB is not set +# ADK_PACKAGE_SETSERIAL is not set + +# +# Telephony +# +# ADK_PACKAGE_ASTERISK is not set +# ADK_PACKAGE_OPENSIPS is not set + +# +# Utilities +# +# ADK_PACKAGE_BC is not set +# ADK_PACKAGE_DC is not set +# ADK_PACKAGE_COMGT is not set +# ADK_PACKAGE_FBSET is not set +# ADK_PACKAGE_FILE is not set +# ADK_PACKAGE_HDPARM is not set +# ADK_PACKAGE_LSUSB is not set +# ADK_PACKAGE_PCIUTILS is not set +# ADK_PACKAGE_PROCPS_META is not set +# ADK_PACKAGE_PROCPS is not set +# ADK_PACKAGE_SISPMCTL is not set +# ADK_PACKAGE_STRESS is not set +# ADK_PACKAGE_SYSSTAT is not set +# ADK_PACKAGE_UDEV is not set +# ADK_PACKAGE_WATCHDOG is not set + +# +# Networking +# + +# +# Analyze / Debugging / Monitoring +# +# ADK_PACKAGE_BWM is not set +# ADK_PACKAGE_DSNIFF is not set +# ADK_PACKAGE_ETHTOOL is not set +# ADK_PACKAGE_FPING is not set +# ADK_PACKAGE_FPROBE is not set +# ADK_PACKAGE_FPROBE_ULOG is not set +# ADK_PACKAGE_HTTPING is not set +# ADK_PACKAGE_IFTOP is not set +# ADK_PACKAGE_IPCAD is not set +# ADK_PACKAGE_IPTRAF is not set +# ADK_PACKAGE_MTR is not set +# ADK_PACKAGE_NETPERF is not set +# ADK_PACKAGE_SIPSAK is not set +# ADK_PACKAGE_SLURM is not set +# ADK_PACKAGE_TCPDUMP is not set +# ADK_PACKAGE_TTCP is not set + +# +# DNS / DHCP +# +# ADK_PACKAGE_ATFTP is not set +# ADK_PACKAGE_ATFTPD is not set +# ADK_PACKAGE_AVAHI_DAEMON is not set +# ADK_COMPILE_BIND is not set +# ADK_DUMMY_BIND is not set +# ADK_PACKAGE_DHCP_RELAY is not set +# ADK_PACKAGE_DHCP_SERVER is not set +# ADK_PACKAGE_DHCP_FORWARDER is not set +# ADK_PACKAGE_DNSMASQ is not set +# ADK_PACKAGE_EZIPUPDATE is not set +# ADK_PACKAGE_MARADNS is not set +# ADK_PACKAGE_UPDATEDD is not set + +# +# HTTP / FTP +# +# ADK_PACKAGE_GATLING is not set +# ADK_PACKAGE_LIGHTTPD is not set +# ADK_PACKAGE_MINI_HTTPD is not set +# ADK_PACKAGE_MINI_HTTPD_HTPASSWD is not set +# ADK_PACKAGE_MINI_HTTPD_OPENSSL is not set +# ADK_PACKAGE_VSFTPD is not set +# ADK_PACKAGE_WPUT is not set + +# +# IRC / ICQ / JABBER +# +# ADK_PACKAGE_BITLBEE is not set +# ADK_PACKAGE_IRSSI is not set +# ADK_PACKAGE_MIAU is not set +# ADK_PACKAGE_REAIM is not set +# ADK_PACKAGE_TMSNC is not set + +# +# Firewall / Routing / Bridging +# +# ADK_PACKAGE_ARPD is not set +# ADK_PACKAGE_BRIDGE_UTILS is not set +# ADK_PACKAGE_CUTTER is not set +# ADK_PACKAGE_ETHER_WAKE is not set +# ADK_COMPILE_IPROUTE2 is not set +# ADK_PACKAGE_IP is not set +# ADK_PACKAGE_TC is not set +# ADK_PACKAGE_IPSET is not set +# ADK_PACKAGE_IPTABLES is not set +# ADK_PACKAGE_IP6TABLES is not set +# ADK_PACKAGE_IPTABLES_SNMP is not set +# ADK_PACKAGE_KNOCK is not set +# ADK_PACKAGE_KNOCKD is not set +# ADK_PACKAGE_LINUX_ATM is not set +# ADK_PACKAGE_MACCHANGER is not set +# ADK_PACKAGE_NETSTAT_NAT is not set +# ADK_PACKAGE_ULOGD is not set +# ADK_PACKAGE_SHOREWALL is not set +# ADK_PACKAGE_WOL is not set +# ADK_PACKAGE_WONDERSHAPER is not set +# ADK_PACKAGE_VRRPD is not set + +# +# Misc +# +# ADK_PACKAGE_CUPS is not set +# ADK_PACKAGE_FAKEIDENTD is not set +# ADK_PACKAGE_GKRELLMD is not set +# ADK_COMPILE_NET_SNMP is not set +# ADK_PACKAGE_LIBNETSNMP is not set +# ADK_PACKAGE_SNMP_UTILS is not set +# ADK_PACKAGE_SNMPD is not set +# ADK_PACKAGE_NUT is not set +# ADK_COMPILE_OPENLDAP is not set +# ADK_PACKAGE_P910ND is not set +# ADK_PACKAGE_PIPACS is not set +# ADK_PACKAGE_PORTMAP is not set +# ADK_PACKAGE_RARPD is not set +# ADK_PACKAGE_RSYNC is not set +# ADK_PACKAGE_SCDP is not set +# ADK_PACKAGE_SHAT is not set +# ADK_PACKAGE_SOCAT is not set +# ADK_PACKAGE_SUBVERSION is not set +# ADK_PACKAGE_UDP_BROADCAST_RELAY is not set +# ADK_PACKAGE_VGP is not set +# ADK_PACKAGE_VNSTAT is not set +# ADK_PACKAGE_VTUN is not set +# ADK_PACKAGE_WCCPD is not set +# ADK_PACKAGE_XINETD is not set + +# +# Network Filesystems +# +# ADK_PACKAGE_DAVFS2 is not set +# ADK_PACKAGE_NFS_UTILS is not set +# ADK_PACKAGE_SAMBA is not set +# ADK_PACKAGE_SAMBA_CLIENT is not set +# ADK_PACKAGE_SAMBA_PASSWD is not set + +# +# NTP +# +# ADK_PACKAGE_HTPDATE is not set +# ADK_PACKAGE_NTPCLIENT is not set +# ADK_PACKAGE_OPENNTPD is not set +# ADK_PACKAGE_RDATE is not set + +# +# P2P +# + +# +# PPP / PPTP / RADIUS +# +# ADK_PACKAGE_FREERADIUS is not set +# ADK_PACKAGE_PPP is not set +# ADK_PACKAGE_PPTP is not set +# ADK_PACKAGE_PPTPD is not set +# ADK_PACKAGE_PPPOE_CLIENT is not set +# ADK_PACKAGE_PPPOE_RELAY is not set +# ADK_PACKAGE_PPPOE_SERVER is not set +# ADK_PACKAGE_PPPOE_SNIFF is not set +# ADK_PACKAGE_RADDUMP is not set + +# +# Proxy +# +# ADK_PACKAGE_IGMPPROXY is not set +# ADK_PACKAGE_FRICKIN is not set +# ADK_PACKAGE_PARPROUTED is not set +# ADK_PACKAGE_PRIVOXY is not set +# ADK_PACKAGE_SIPROXD is not set +# ADK_PACKAGE_SQUID is not set +# ADK_PACKAGE_SRELAY is not set +# ADK_PACKAGE_TINYPROXY is not set +# ADK_PACKAGE_TOR is not set +# ADK_PACKAGE_VNC_REFLECTOR is not set + +# +# Security +# +# ADK_PACKAGE_ARPWATCH is not set +# ADK_PACKAGE_AUTOSSH is not set +# ADK_PACKAGE_AXHTTPD is not set +ADK_PACKAGE_DROPBEAR=y +# ADK_PACKAGE_DBCONVERT is not set +# ADK_PACKAGE_HTTPTUNNEL is not set +# ADK_PACKAGE_L2TPNS is not set +# ADK_COMPILE_OPENSSH is not set +# ADK_PACKAGE_OPENSWAN is not set +# ADK_PACKAGE_OPENVPN is not set +# ADK_PACKAGE_PORTSENTRY is not set +# ADK_PACKAGE_PTUNNEL is not set +# ADK_PACKAGE_SCANLOGD is not set +# ADK_PACKAGE_SNORT is not set +# ADK_PACKAGE_SSLTUNNEL is not set +# ADK_PACKAGE_TINC is not set +# ADK_PACKAGE_VPNC is not set + +# +# Wireless +# +# ADK_PACKAGE_AIRCRACK_NG is not set +# ADK_PACKAGE_CHILLISPOT is not set +# ADK_PACKAGE_HOSTAPD is not set +# ADK_PACKAGE_IW is not set +# ADK_PACKAGE_NOCATSPLASH is not set +# ADK_PACKAGE_OLSRD is not set +# ADK_PACKAGE_SNORT_WIRELESS is not set +# ADK_PACKAGE_WIFIDOG is not set +# ADK_DOWNLOAD_WIRELESS_FIRMWARE is not set +# ADK_PACKAGE_WIRELESS_FIRMWARE_RT61 is not set +# ADK_PACKAGE_WIRELESS_TOOLS is not set +# ADK_PACKAGE_WPA_SUPPLICANT is not set + +# +# Programming +# +# ADK_PACKAGE_BINUTILS is not set +# ADK_PACKAGE_HASERL is not set +# ADK_PACKAGE_JAMVM is not set +# ADK_PACKAGE_LIBLUA is not set +# ADK_PACKAGE_LUA is not set +# ADK_PACKAGE_LUAC is not set +# ADK_PACKAGE_LUA_EXAMPLES is not set +# ADK_PACKAGE_MICROPERL is not set + +# +# php.............................. PHP Hypertext preprocessor +# +# ADK_COMPILE_PHP is not set +# ADK_PACKAGE_PHP_CLI is not set +ADK_PACKAGE_PHP_FASTCGI=y +# ADK_PACKAGE_RUBY is not set +# ADK_PACKAGE_LIBFFI is not set +# ADK_PACKAGE_TCL is not set + +# +# Libraries +# +# ADK_PACKAGE_ALSA_LIB is not set +# ADK_PACKAGE_APR is not set +# ADK_PACKAGE_APR_UTIL is not set +# ADK_PACKAGE_LIBAVAHI is not set +# ADK_PACKAGE_LIBAXTLS is not set +# ADK_PACKAGE_CGILIB is not set +# ADK_PACKAGE_DBUS is not set +# ADK_PACKAGE_GETTEXT is not set +# ADK_PACKAGE_GLIB1 is not set +# ADK_PACKAGE_GLIB2 is not set +# ADK_PACKAGE_LIBAO is not set +# ADK_PACKAGE_LIBAUDIOFILE is not set +# ADK_PACKAGE_LIBART is not set +# ADK_PACKAGE_LIBCLI is not set +# ADK_PACKAGE_LIBCURL is not set +# ADK_PACKAGE_LIBDAEMON is not set +# ADK_PACKAGE_LIBDB is not set +# ADK_PACKAGE_LIBDNET is not set +# ADK_PACKAGE_LIBELF is not set +# ADK_PACKAGE_LIBEVENT is not set +# ADK_PACKAGE_LIBEXPAT is not set +# ADK_PACKAGE_LIBFAAD2 is not set +# ADK_PACKAGE_LIBFLAC is not set +# ADK_PACKAGE_LIBFREETYPE is not set +# ADK_PACKAGE_LIBGCRYPT is not set +# ADK_PACKAGE_LIBGD is not set +# ADK_PACKAGE_LIBGDBM is not set +# ADK_PACKAGE_LIBGSSGLUE is not set +# ADK_PACKAGE_LIBGMP is not set +# ADK_PACKAGE_LIBGNUTLS is not set +# ADK_PACKAGE_LIBGPG_ERROR is not set +# ADK_PACKAGE_LIBGSM is not set +# ADK_PACKAGE_LIBICONV is not set +# ADK_PACKAGE_LIBID3TAG is not set +# ADK_PACKAGE_LIBJPEG is not set +# ADK_PACKAGE_LIBLAME is not set +# ADK_PACKAGE_MPFR is not set +# ADK_PACKAGE_LIBLTDL is not set +# ADK_PACKAGE_LIBLZO is not set +# ADK_PACKAGE_LIBMAD is not set +# ADK_PACKAGE_LIBNCURSES is not set +# ADK_PACKAGE_NEON is not set +# ADK_PACKAGE_LIBNET is not set +# ADK_PACKAGE_LIBNFSIDMAP is not set +# ADK_PACKAGE_LIBNIDS is not set +# ADK_PACKAGE_LIBNL is not set +# ADK_PACKAGE_LIBOGG is not set +# ADK_PACKAGE_LIBOL is not set +# ADK_PACKAGE_LIBOPENCDK is not set +# ADK_PACKAGE_LIBOSIP2 is not set +# ADK_COMPILE_LIBOWFAT is not set +# ADK_PACKAGE_LIBP11 is not set +# ADK_PACKAGE_LIBPCAP is not set +# ADK_PACKAGE_LIBPRI is not set +# ADK_PACKAGE_LIBPCRE is not set +# ADK_PACKAGE_LIBPNG is not set +# ADK_PACKAGE_LIBPOPT is not set +# ADK_PACKAGE_LIBPQ is not set +# ADK_PACKAGE_LIBPTHREAD is not set +# ADK_PACKAGE_LIBTHREAD_DB is not set +# ADK_PACKAGE_RADIUSCLIENT_NG is not set +# ADK_PACKAGE_LIBRADIUSCLIENT_NG is not set +# ADK_PACKAGE_LIBREADLINE is not set +# ADK_PACKAGE_LIBSASL2 is not set +# ADK_PACKAGE_LIBSPEEX is not set +# ADK_PACKAGE_LIBSQLITE is not set +# ADK_PACKAGE_LIBRPCSECGSS is not set +# ADK_PACKAGE_LIBSHOUT is not set +# ADK_PACKAGE_LIBTASN1 is not set +# ADK_PACKAGE_LIBTIFF is not set +# ADK_PACKAGE_LIBTIRPC is not set +# ADK_PACKAGE_LIBUPNP is not set +# ADK_PACKAGE_LIBUSB is not set +# ADK_PACKAGE_LIBVORBIS is not set +# ADK_PACKAGE_LIBVORBISENC is not set +# ADK_PACKAGE_LIBVORBISIDEC is not set +# ADK_PACKAGE_LIBWRAP is not set +# ADK_PACKAGE_LIBXML2 is not set +# ADK_PACKAGE_LIBXSLT is not set +ADK_PACKAGE_ZLIB=y + +# +# Kernel configuration +# + +# +# Block devices support +# +# ADK_KERNEL_MD is not set +# ADK_KERNEL_SWAP is not set +# ADK_KERNEL_LBD is not set +# ADK_KERNEL_BLK_DEV_IO_TRACE is not set +# ADK_KERNEL_LSF is not set +# ADK_KERNEL_IOSCHED_AS is not set +# ADK_KERNEL_IOSCHED_DEADLINE is not set +# ADK_KERNEL_IOSCHED_CFQ is not set +ADK_KERNEL_SCSI=y +# ADK_KPACKAGE_KMOD_BLK_DEV_LOOP is not set +# ADK_KPACKAGE_KMOD_BLK_DEV_NBD is not set +# ADK_KPACKAGE_KMOD_BLK_DEV_MD is not set +# ADK_KPACKAGE_KMOD_BLK_DEV_DM is not set + +# +# Filesystems support +# +# ADK_KERNEL_EXT3_FS_XATTR is not set +ADK_KERNEL_FAT_DEFAULT_CODEPAGE=850 +ADK_KERNEL_FAT_DEFAULT_IOCHARSET="iso8859-1" +# ADK_KPACKAGE_KMOD_EXT3_FS is not set +# ADK_KPACKAGE_KMOD_HFSPLUS_FS is not set +# ADK_PACKAGE_KMOD_FS_NTFS_3G is not set +# ADK_KPACKAGE_KMOD_NTFS_FS is not set +# ADK_KERNEL_FAT_FS is not set +# ADK_KPACKAGE_KMOD_VFAT_FS is not set +# ADK_KPACKAGE_KMOD_XFS_FS is not set +# ADK_KPACKAGE_KMOD_FUSE_FS is not set +# ADK_KERNEL_JOLIET is not set +# ADK_KPACKAGE_KMOD_ISO9660_FS is not set +# ADK_KPACKAGE_KMOD_UDF_FS is not set +# ADK_KPACKAGE_KMOD_CIFS is not set +# ADK_KPACKAGE_KMOD_CODA_FS is not set +# ADK_KERNEL_NFS_V4 is not set +# ADK_KERNEL_RPCSEC_GSS_KRB5 is not set +# ADK_KPACKAGE_KMOD_NFS_FS is not set +# ADK_KERNEL_NFSD_V3 is not set +# ADK_KPACKAGE_KMOD_SUNRPC is not set +# ADK_KPACKAGE_KMOD_SUNRPC_GSS is not set +# ADK_KPACKAGE_KMOD_RPCSEC_GSS_KRB5 is not set + +# +# Native Language support +# +ADK_KERNEL_NLS_DEFAULT="iso8859-1" +# ADK_KPACKAGE_KMOD_NLS is not set + +# +# Network devices support +# +ADK_KERNEL_NET_ETHERNET=y +ADK_KERNEL_MII=y +ADK_KERNEL_NET_PCI=y +# ADK_KERNEL_NETDEV_1000 is not set + +# +# Ethernet card support +# +# ADK_KPACKAGE_KMOD_NE2K_PCI is not set +# ADK_KPACKAGE_KMOD_E100 is not set +# ADK_KPACKAGE_KMOD_E1000 is not set +# ADK_KERNEL_WIRELESS is not set +# ADK_KERNEL_WIRELESS_EXT is not set +# ADK_KERNEL_MAC80211_LEDS is not set +# ADK_KERNEL_WLAN_80211 is not set +# ADK_KERNEL_RT2X00 is not set +# ADK_MOD_KERNEL_CFG80211 is not set +# ADK_MOD_KERNEL_MAC80211 is not set + +# +# Wireless card support +# +# ADK_KPACKAGE_KMOD_MAC80211 is not set +# ADK_KPACKAGE_KMOD_RT2X00 is not set +# ADK_PACKAGE_KMOD_MAC80211 is not set + +# +# USB support +# +ADK_KERNEL_USB_DEVICEFS=y +# ADK_KERNEL_USB_LIBUSUAL is not set +# ADK_KERNEL_USB_SERIAL is not set +ADK_KPACKAGE_KMOD_USB=y +# ADK_KPACKAGE_KMOD_USB_UHCI_HCD is not set +ADK_KPACKAGE_KMOD_USB_OHCI_HCD=y +# ADK_KPACKAGE_KMOD_USB_ISP116X_HCD is not set +# ADK_KPACKAGE_KMOD_USB_SL811_HCD is not set +ADK_KPACKAGE_KMOD_USB_EHCI_HCD=y +ADK_PACKAGE_KMOD_USB_CONTROLLER=y +# ADK_KPACKAGE_KMOD_USB_ACM is not set +# ADK_KPACKAGE_KMOD_USB_PEGASUS is not set +# ADK_KPACKAGE_KMOD_USB_PRINTER is not set +# ADK_KPACKAGE_KMOD_USB_SERIAL is not set +# ADK_KPACKAGE_KMOD_USB_STORAGE is not set +# ADK_KPACKAGE_KMOD_USB_ATM is not set +# ADK_KPACKAGE_KMOD_USB_USBNET is not set +# ADK_KPACKAGE_KMOD_USB_SISUSBVGA is not set + +# +# Input devices +# +# ADK_KERNEL_INPUT is not set +# ADK_KERNEL_INPUT_KEYBOARD is not set +# ADK_KERNEL_HID_SUPPORT is not set +# ADK_KERNEL_HID is not set +# ADK_KPACKAGE_KMOD_USB_HID is not set +# ADK_KPACKAGE_KMOD_KEYBOARD_ATKBD is not set +# ADK_KPACKAGE_KMOD_INPUT_MOUSEDEV is not set + +# +# PCMCIA/CardBus support +# +# ADK_KERNEL_CARDBUS is not set +# ADK_KPACKAGE_KMOD_PCCARD is not set + +# +# Network support +# +ADK_KERNEL_INET=y +ADK_KERNEL_IP_FIB_HASH=y +ADK_KERNEL_SYN_COOKIES=y +# ADK_KERNEL_IP_PNP_BOOTP is not set +# ADK_KERNEL_IP_PNP_RARP is not set +# ADK_KERNEL_NET_IPGRE_BROADCAST is not set +# ADK_KERNEL_PPP_ASYNC is not set +# ADK_KERNEL_SLHC is not set +# ADK_KERNEL_IMQ is not set +# ADK_KERNEL_LLC is not set +# ADK_KPACKAGE_KMOD_BRIDGE is not set +# ADK_KPACKAGE_KMOD_NET_IPIP is not set +# ADK_KPACKAGE_KMOD_NET_IPGRE is not set +# ADK_KPACKAGE_KMOD_PPP is not set +# ADK_KPACKAGE_KMOD_TUN is not set +# ADK_KPACKAGE_KMOD_BONDING is not set + +# +# QoS and/or fair queueing +# +# ADK_KERNEL_NET_SCH_CSZ is not set +# ADK_KERNEL_NET_SCH_NETEM is not set +# ADK_KERNEL_NET_QOS is not set +# ADK_KERNEL_NET_ESTIMATOR is not set +# ADK_KERNEL_NET_SCHED is not set + +# +# Queueing/Scheduling +# +# ADK_KPACKAGE_KMOD_NET_SCH_CBQ is not set +# ADK_KPACKAGE_KMOD_NET_SCH_HTB is not set +# ADK_KPACKAGE_KMOD_NET_SCH_HFSC is not set +# ADK_KPACKAGE_KMOD_NET_SCH_PRIO is not set +# ADK_KPACKAGE_KMOD_NET_SCH_RED is not set +# ADK_KPACKAGE_KMOD_NET_SCH_SFQ is not set +# ADK_KPACKAGE_KMOD_NET_SCH_TBF is not set +# ADK_KPACKAGE_KMOD_NET_SCH_GRED is not set +# ADK_KPACKAGE_KMOD_NET_SCH_DSMARK is not set +# ADK_KPACKAGE_KMOD_NET_SCH_INGRESS is not set + +# +# Classification +# +# ADK_KERNEL_NET_CLS is not set +# ADK_KPACKAGE_KMOD_NET_CLS_TCINDEX is not set +# ADK_KPACKAGE_KMOD_NET_CLS_ROUTE4 is not set +# ADK_KPACKAGE_KMOD_NET_CLS_FW is not set +# ADK_KPACKAGE_KMOD_NET_CLS_U32 is not set + +# +# Actions +# +# ADK_KERNEL_NET_CLS_ACT is not set + +# +# Netfilter (Firewall/Filtering) +# +# ADK_KERNEL_NETFILTER is not set +# ADK_KERNEL_NETFILTER_ADVANCED is not set +# ADK_KERNEL_NETFILTER_XTABLES is not set +# ADK_KERNEL_NETFILTER_DEBUG is not set +# ADK_KERNEL_IP_NF_MATCH_LAYER7_DEBUG is not set +# ADK_KERNEL_IP_NF_TARGET_MIRROR is not set +# ADK_KERNEL_IP_NF_NAT_SNMP_BASIC is not set +# ADK_KERNEL_IP_NF_TARGET_DSCP is not set +# ADK_KERNEL_IP_NF_TARGET_MARK is not set +# ADK_KERNEL_IP_NF_TARGET_CLASSIFY is not set +# ADK_KERNEL_IP_NF_TARGET_IMQ is not set +# ADK_KERNEL_IP_NF_TARGET_CONNMARK is not set +# ADK_KERNEL_IP_NF_ARPTABLES is not set +# ADK_KERNEL_IP_NF_COMPAT_IPCHAINS is not set +# ADK_KERNEL_IP_NF_COMPAT_IPFWADM is not set +# ADK_KERNEL_IP6_NF_QUEUE is not set +# ADK_KERNEL_IP6_NF_IPTABLES is not set +# ADK_KERNEL_IP_ROUTE_FWMARK is not set +# ADK_KERNEL_IP_NF_QUEUE is not set +# ADK_KERNEL_IP_NF_MATCH_TIME is not set +# ADK_KERNEL_IP_NF_MATCH_CONDITION is not set +# ADK_KERNEL_IP_NF_MATCH_DSCP is not set +# ADK_KERNEL_IP_NF_MATCH_AH_ESP is not set +# ADK_KERNEL_IP_NF_MATCH_LENGTH is not set +# ADK_KERNEL_IP_NF_MATCH_HELPER is not set +# ADK_KPACKAGE_KMOD_IP_NF_MATCH_STATE is not set +# ADK_KPACKAGE_KMOD_NETFILTER_XT_MATCH_STATE is not set +# ADK_KPACKAGE_KMOD_IP_NF_MATCH_CONNTRACK is not set +# ADK_KERNEL_IP_NF_MATCH_CONNMARK is not set +# ADK_KERNEL_IP_NF_MATCH_UNCLEAN is not set +# ADK_KERNEL_IP_NF_MATCH_STRING is not set + +# +# Core Netfilter Configuration +# +# ADK_KPACKAGE_KMOD_NF_CONNTRACK is not set +# ADK_KPACKAGE_KMOD_NETFILTER_XT_TARGET_CLASSIFY is not set +# ADK_KPACKAGE_KMOD_NETFILTER_XT_TARGET_CONNMARK is not set +# ADK_KPACKAGE_KMOD_NETFILTER_XT_TARGET_MARK is not set +# ADK_KPACKAGE_KMOD_NETFILTER_XT_TARGET_NFQUEUE is not set + +# +# IP: Netfilter Configuration +# +# ADK_KPACKAGE_KMOD_NF_CONNTRACK_IPV4 is not set +# ADK_KPACKAGE_KMOD_IP_NF_IPTABLES is not set + +# +# IPVS support +# +# ADK_KPACKAGE_KMOD_IP_VS is not set + +# +# Multimedia devices support +# +# ADK_KERNEL_SND_TIMER is not set +# ADK_KERNEL_SND_PCM is not set +# ADK_KERNEL_SND_HWDEP is not set +# ADK_KERNEL_SND_MIXER_OSS is not set +# ADK_KERNEL_SND_PCM_OSS is not set +# ADK_KPACKAGE_KMOD_SOUND is not set +# ADK_KPACKAGE_KMOD_SND is not set +# ADK_KPACKAGE_KMOD_VIDEO_DEV is not set +# ADK_KPACKAGE_KMOD_USB_PWC is not set + +# +# Crypto kernel modules +# +# ADK_KERNEL_CRYPTO is not set +# ADK_KERNEL_CRYPTO_HW is not set +# ADK_KERNEL_OCF_FIPS is not set +# ADK_KERNEL_OCF_CRYPTODEV is not set +# ADK_KERNEL_OCF_OCF is not set + +# +# Hardware cryptography +# + +# +# Hardware crypto devices +# +# ADK_KPACKAGE_KMOD_CRYPTO_DEV_GEODE is not set +# ADK_KPACKAGE_KMOD_CRYPTO_DEV_HIFN_795X is not set + +# +# OpenBSD Cryptographic framework +# +# ADK_KPACKAGE_KMOD_OCF_HIFN is not set +# ADK_KPACKAGE_KMOD_OCF_SAFE is not set + +# +# Software cryptography +# + +# +# Crypto core / Block and Hash modes +# +# ADK_KPACKAGE_KMOD_CRYPTO_ALGAPI is not set +# ADK_KPACKAGE_KMOD_CRYPTO_AEAD is not set +# ADK_KPACKAGE_KMOD_CRYPTO_MANAGER is not set +# ADK_KPACKAGE_KMOD_CRYPTO_HASH is not set +# ADK_KPACKAGE_KMOD_CRYPTO_BLKCIPHER is not set +# ADK_KPACKAGE_KMOD_CRYPTO_CBC is not set +# ADK_KPACKAGE_KMOD_CRYPTO_ECB is not set +# ADK_KPACKAGE_KMOD_CRYPTO_HMAC is not set + +# +# Digest algorithms +# +# ADK_KPACKAGE_KMOD_CRYPTO_MD4 is not set +# ADK_KPACKAGE_KMOD_CRYPTO_MD5 is not set +# ADK_KPACKAGE_KMOD_CRYPTO_SHA1 is not set +# ADK_KPACKAGE_KMOD_CRYPTO_SHA256 is not set +# ADK_KPACKAGE_KMOD_CRYPTO_SHA512 is not set +# ADK_KPACKAGE_KMOD_CRYPTO_WP512 is not set +# ADK_KPACKAGE_KMOD_CRYPTO_TGR192 is not set + +# +# Cipher algoritms +# +# ADK_KPACKAGE_KMOD_CRYPTO_AES is not set +# ADK_KPACKAGE_KMOD_CRYPTO_ANUBIS is not set +# ADK_KPACKAGE_KMOD_CRYPTO_ARC4 is not set +# ADK_KPACKAGE_KMOD_CRYPTO_BLOWFISH is not set +# ADK_KPACKAGE_KMOD_CRYPTO_CAMELLIA is not set +# ADK_KPACKAGE_KMOD_CRYPTO_CAST5 is not set +# ADK_KPACKAGE_KMOD_CRYPTO_CAST6 is not set +# ADK_KPACKAGE_KMOD_CRYPTO_DES is not set +# ADK_KPACKAGE_KMOD_CRYPTO_FCRYPT is not set +# ADK_KPACKAGE_KMOD_CRYPTO_KHAZAD is not set +# ADK_KPACKAGE_KMOD_CRYPTO_SERPENT is not set +# ADK_KPACKAGE_KMOD_CRYPTO_TEA is not set +# ADK_KPACKAGE_KMOD_CRYPTO_TWOFISH is not set +# ADK_KPACKAGE_KMOD_CRYPTO_NULL is not set + +# +# Compression +# +# ADK_KPACKAGE_KMOD_CRYPTO_DEFLATE is not set +# ADK_KPACKAGE_KMOD_CRYPTO_LZO is not set +# ADK_KPACKAGE_KMOD_CRYPTO_MICHAEL_MIC is not set +# ADK_KPACKAGE_KMOD_CRYPTO_CRC32C is not set + +# +# Bluetooth +# +# ADK_KPACKAGE_KMOD_BT is not set + +# +# ISDN +# +# ADK_KERNEL_ISDN is not set +# ADK_KERNEL_ISDN_I4L is not set +# ADK_KERNEL_ISDN_DRV_AVMB1_VERBOSE_REASON is not set +# ADK_KERNEL_CAPI_AVM is not set +# ADK_KERNEL_CAPI_EICON is not set +# ADK_KERNEL_HFCMULTI_PCIMEM is not set +# ADK_KERNEL_ISDN_CAPI_MIDDLEWARE is not set +# ADK_KERNEL_ISDN_CAPI_CAPI20 is not set +# ADK_KPACKAGE_KMOD_ISDN_CAPI is not set + +# +# Miscellaneous devices support +# + +# +# LEDS driver support +# +# ADK_KERNEL_NEW_LEDS is not set +# ADK_KPACKAGE_KMOD_LEDS_CLASS is not set +# ADK_KERNEL_WATCHDOG is not set +# ADK_KPACKAGE_KMOD_SOFT_WATCHDOG is not set +# ADK_KPACKAGE_KMOD_WD1100 is not set +# ADK_KPACKAGE_KMOD_PARPORT is not set +# ADK_KPACKAGE_KMOD_FW_LOADER is not set +# ADK_KPACKAGE_KMOD_EEPROM_93CX6 is not set + +# +# Library Routines +# +# ADK_KERNEL_CRC32 is not set +# ADK_KPACKAGE_KMOD_CRC_ITU_T is not set +# ADK_KPACKAGE_KMOD_CRC32 is not set +# ADK_KPACKAGE_KMOD_LIBCRC32C is not set +# ADK_KPACKAGE_KMOD_CRC_CCITT is not set + +# +# Kernel debugging +# +# ADK_KERNEL_DEBUG_KERNEL is not set +# ADK_KERNEL_DEBUG_INFO is not set +# ADK_KERNEL_KGDB is not set +# ADK_KERNEL_KGDB_SERIAL_CONSOLE is not set +# ADK_KERNEL_FRAME_POINTER is not set +ADK_KERNEL_MAGIC_SYSRQ=y +# ADK_KERNEL_DEBUG_FS is not set +# ADK_KERNEL_DEBUG_WITH_KGDB is not set diff --git a/Config.in b/Config.in new file mode 100644 index 000000000..9128520e8 --- /dev/null +++ b/Config.in @@ -0,0 +1,17 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +mainmenu "OpenADK Configuration" + +config MODULES + bool + default y + +config ADK_HAVE_DOT_CONFIG + bool + default y + +source "target/Config.in" +source "package/Config.in" diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 000000000..182ac083e --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,29 @@ +# $Id: GNUmakefile 255 2008-12-11 16:20:28Z wbx $ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +TOPDIR:= $(shell pwd) +PWD:= ${TOPDIR} + +ifneq (${package},) +subdir:= package/${package} +_subdir_dep:= ${TOPDIR}/.cfg/ADK_HAVE_DOT_CONFIG +endif + +ifneq (${subdir},) +${MAKECMDGOALS}: _subdir + +_subdir: ${_subdir_dep} + @if test x"$$(umask 2>/dev/null | sed 's/00*22/OK/')" != x"OK"; then \ + echo >&2 Error: you must build with “umask 022â€, sorry.; \ + exit 1; \ + fi + cd ${subdir} && TOPDIR=${TOPDIR} DEVELOPER=1 \ + make VERBOSE=1 ${MAKEFLAGS} ${MAKECMDGOALS} + +include prereq.mk +include mk/split-cfg.mk +else +include Makefile +endif diff --git a/LICENCE b/LICENCE new file mode 100644 index 000000000..869eaaf63 --- /dev/null +++ b/LICENCE @@ -0,0 +1,38 @@ +$Id$ + +OpenADK is Copyright © 2008 Waldemar Brodkorb +All rights reserved. + +This licence file covers all of the OpenADK meta distribution +source code (including Makefiles and documentation). + +Binary firmware images are composed of the meta distribution +OpenADK and downloaded distfiles from third party sources, +which may be covered by various differing licence terms, but +since the firmware image only aggregates differently licenced +packages on the same medium we believe it is redistributable +as long as the licences of the different packages are honoured. + + +OpenADK itself is developed by Waldemar Brodkorb and covered +by the GNU General Public License, Version 2 or later, as shown +in the file COPYING in this directory. Individual files may be +covered by the LGPL or BSD-style licences instead. OpenADK also +contains tools that are possibly covered by non-GPL-compatible, +but OSD/DFSG-compliant, licences. Specifically, some of these +components may require acknowledgements to be displayed in the +advertising materials; these are listed here: +‣ This product includes material provided by Thorsten Glaser. + +OpenADK is based upon several other projects which are listed +below, in no particular order. If you think you should be li- +sted here but we have forgotten you, please forgive and drop +us an email. + + +• The FreeWRT Project +• The OpenWrt Project +• uClibc Buildroot +• The MirOS Project and contributors + +──────────────────────────────────────────────────────────────────────── diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..4d0f2f153 --- /dev/null +++ b/Makefile @@ -0,0 +1,187 @@ +# $Id: Makefile 420 2009-05-08 19:31:15Z wbx $ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +GMAKE?= $(PWD)/scripts/make +GMAKE_FMK= ${GMAKE} -f $(PWD)/mk/build.mk +GMAKE_INV= ${GMAKE_FMK} --no-print-directory + +all: .prereq_done + @${GMAKE_INV} all + +v: .prereq_done + @(echo; echo "Build started on $$(LC_ALL=C LANGUAGE=C date)"; \ + set -x; ${GMAKE_FMK} VERBOSE=1 all) 2>&1 | tee -a make.log + +help: + @echo ' switch DEV=device - Backup current config and copy old saved device config' + @echo 'Cleaning targets:' + @echo ' clean - Remove bin and build_dir directories' + @echo ' cleandevice - Same as "clean", but also remove toolchain for device' + @echo ' cleandir - Same as "clean", but also remove all built toolchains' + @echo ' cleankernel - Remove kernel dir' + @echo ' distclean - Same as "cleandir", but also remove downloaded' + @echo ' distfiles and .config' + @echo '' + @echo 'Configuration targets:' + @echo ' config - Update current config utilising a line-oriented program' + @echo ' menuconfig - Update current config utilising a menu based program' + @echo ' (default when .config does not exist)' + @echo ' oldconfig - Update current config utilising a provided .configs base' + @echo ' wconfig - Same as "oldconfig", but also writes out hidden symbols' + @echo ' allmodconfig - New config selecting all packages as modules when possible' + @echo ' allconfig - New config selecting all packages when possible' + @echo ' allnoconfig - New config where all options are answered with no' + @echo '' + @echo 'Help targets:' + @echo ' help - Print this help text' + @echo ' pkg-help - Print help about selectively compiling single packages' + @echo ' dev-help - Print help for developers / package maintainers' + @echo '' + @echo 'Other generic targets:' + @echo ' all - Build everything as specified in .config' + @echo ' (default if .config exists)' + @echo ' v - Same as "all" but with logging to make.log enabled' + +pkg-help: + @echo 'Package specific targets (use with "package=" parameter):' + @echo ' fetch - Download the necessary distfile' + @echo ' extract - Same as "fetch", but also extract the distfile' + @echo ' patch - Same as "extract", but also patch the source' + @echo ' build - Same as "patch", but also build the binaries' + @echo ' fake - Same as "build", but also install the binaries' + @echo ' package - Same as "fake", but also create the ipkg package' + @echo ' clean - Deinstall and remove the build area' + @echo ' distclean - Same as "clean", but also remove the distfiles' + @echo '' + @echo 'Short package rebuilding guide:' + @echo ' run "make package= clean" to remove all generated binaries' + @echo ' run "make package= package" to build everything and create the ipkg' + @echo '' + @echo 'This does not automatically resolve package dependencies!' + +dev-help: + @echo 'Fast way of updating package patches:' + @echo ' run "make package= clean" to start with a good base' + @echo ' run "make package= patch" to fetch, unpack and patch the source' + @echo ' edit the package sources at build_dir/w--*/-' + @echo ' run "make package= update-patches to regenerate patch files' + @echo '' + @echo 'All changed patches will be opened with your $$EDITOR,' + @echo 'so you can add a description and verify the modifications.' + +clean: .prereq_done + -@rm -f nohup.out + @${GMAKE_INV} clean + +config: .prereq_done + @${GMAKE_INV} _config W= + +oldconfig: .prereq_done + @${GMAKE_INV} _config W=-o + +wconfig: .prereq_done + @${GMAKE_INV} _config W=-A + +download: .prereq_done + @${GMAKE_INV} toolchain/download + @${GMAKE_INV} package/download + +cleankernel: .prereq_done + -@${GMAKE_INV} cleankernel + +cleandir: .prereq_done + -@${GMAKE_INV} clean cleandir + @-rm -f make.log .prereq_done + +cleandevice: .prereq_done + -@${GMAKE_INV} clean cleandevice + @-rm -f make.log + +distclean: .prereq_done + -@${GMAKE_INV} clean cleandir distclean + @-rm -f make.log .prereq_done + +image: .prereq_done + @${GMAKE_INV} image + +switch: .prereq_done + @${GMAKE_INV} switch + +image_clean: .prereq_done + @${GMAKE_INV} image_clean + +menuconfig: .prereq_done + @${GMAKE_INV} menuconfig + +allnoconfig: .prereq_done + @${GMAKE_INV} _config W=-n + +allconfig: .prereq_done + @${GMAKE_INV} _mconfig W=-y RCONFIG=Config.in + +allmodconfig: .prereq_done + @${GMAKE_INV} _mconfig W=-o RCONFIG=Config.in + +package_index: .prereq_done + @${GMAKE_INV} package_index + +world: .prereq_done + @${GMAKE_INV} world + +prereq: + @rm -f .prereq_done + @${MAKE} .prereq_done --no-print-directory + +prereq-noerror: + @rm -f .prereq_done + @${MAKE} .prereq_done NO_ERROR=1 + +NO_ERROR=0 +.prereq_done: + @-rm -rf .prereq_done + @if ! bash --version 2>&1 | fgrep 'GNU bash' >/dev/null 2>&1; then \ + echo "GNU bash needs to be installed."; \ + exit 1; \ + fi + @if test x"$$(umask 2>/dev/null | sed 's/00*22/OK/')" != x"OK"; then \ + echo >&2 Error: you must build with umask 022, sorry.; \ + exit 1; \ + fi + @echo "TOPDIR:=$$(readlink -nf . 2>/dev/null || pwd -P)" >prereq.mk + @echo "BASH:=$$(which bash)" >>prereq.mk + @if [ -z "$$(which gmake)" ]; then \ + echo "GMAKE:=$$(which make)" >>prereq.mk ;\ + else \ + echo "GMAKE:=$$(which gmake)" >>prereq.mk ;\ + fi + @echo "GNU_HOST_NAME:=$$(${CC} -dumpmachine)" >>prereq.mk + @echo "HOST_ARCH:=$$(${CC} -dumpmachine | sed -e s'/-.*//' \ + -e 's/sparc.*/sparc/' \ + -e 's/arm.*/arm/g' \ + -e 's/m68k.*/m68k/' \ + -e 's/ppc/powerpc/g' \ + -e 's/v850.*/v850/g' \ + -e 's/sh[234]/sh/' \ + -e 's/mips-.*/mips/' \ + -e 's/mipsel-.*/mipsel/' \ + -e 's/cris.*/cris/' \ + -e 's/i[3-9]86/i386/' \ + )" >>prereq.mk + @echo 'HOSTCC:=${CC}' >>prereq.mk + @echo 'HOSTCFLAGS:=-O2 -fwrapv' >>prereq.mk + @echo 'LANGUAGE:=C' >>prereq.mk + @echo 'LC_ALL:=C' >>prereq.mk + @echo 'MAKE:=$${GMAKE}' >>prereq.mk + @echo "OStype:=$$(env uname)" >>prereq.mk + @echo "_PATH:=$$PATH" >>prereq.mk + @echo "PATH:=\$${TOPDIR}/scripts:$$PATH" >>prereq.mk + @echo "SHELL:=$$(which bash)" >>prereq.mk + @env NO_ERROR=${NO_ERROR} BASH="$$(which bash)" \ + CC='${CC}' CPPFLAGS='${CPPFLAGS}' \ + bash scripts/scan-tools.sh + @echo '===> Prerequisites checked successfully.' + @touch $@ + +.PHONY: prereq prereq-noerror diff --git a/README b/README new file mode 100644 index 000000000..894427b91 --- /dev/null +++ b/README @@ -0,0 +1,39 @@ +OpenADK - A GNU/Linux construction kit +====================================== + +This is a menu based buildsystem for your home made embedded Linux system. + +Before you can start you need to install some tools: +- bash +- gcc +- binutils +- GNU make +- GNU tar +- GNU awk +- GNU sed +- patch +- gzip +- bzip2 +- cpio +- wget +- flex +- bison +- file +- unzip +- autoconf +- automake +- zlib-dev / libz-dev +- libncurses5-dev +- libc-dev + +There is a check for the required versions of these tools in advance, though +(to re-issue the checks, use "make prereq"). + +Please use "make menuconfig" to choose your embedded system and configure like you +want to. + +Simply running 'make' will build the firmware for your embedded system. The +buildsystem will download all sources, build the toolchain, the kernel and all +applications. + +Sunshine! diff --git a/TODO b/TODO new file mode 100644 index 000000000..8be6be32a --- /dev/null +++ b/TODO @@ -0,0 +1,9 @@ +- eglibc support +- glibc 2.10 support +- rescue initramfs image (more archs, generic kernel config ) + - replace ibm x40 + - usb boot via stick +- kernel 2.6.29.3 +- bind isc 9.6.1 +- asterisk 1.6 +- gcc 4.4.0 diff --git a/config/Config.in b/config/Config.in new file mode 100644 index 000000000..9a7778310 --- /dev/null +++ b/config/Config.in @@ -0,0 +1,8 @@ +# + +config ADK_PACKAGE_CONFIG + bool"config" + default n + help + Add help text here. + diff --git a/config/Kconfig-language.txt b/config/Kconfig-language.txt new file mode 100644 index 000000000..493749b32 --- /dev/null +++ b/config/Kconfig-language.txt @@ -0,0 +1,255 @@ +Introduction +------------ + +The configuration database is collection of configuration options +organized in a tree structure: + + +- Code maturity level options + | +- Prompt for development and/or incomplete code/drivers + +- General setup + | +- Networking support + | +- System V IPC + | +- BSD Process Accounting + | +- Sysctl support + +- Loadable module support + | +- Enable loadable module support + | +- Set version information on all module symbols + | +- Kernel module loader + +- ... + +Every entry has its own dependencies. These dependencies are used +to determine the visible of an entry. Any child entry is only +visible if its parent entry is also visible. + +Menu entries +------------ + +Most entries define a config option, all other entries help to organize +them. A single configuration option is defined like this: + +config MODVERSIONS + bool "Set version information on all module symbols" + depends MODULES + help + Usually, modules have to be recompiled whenever you switch to a new + kernel. ... + +Every line starts with a key word and can be followed by multiple +arguments. "config" starts a new config entry. The following lines +define attributes for this config option. Attributes can be the type of +the config option, input prompt, dependencies, help text and default +values. A config option can be defined multiple times with the same +name, but every definition can have only a single input prompt and the +type must not conflict. + +Menu attributes +--------------- + +A menu entry can have a number of attributes. Not all of them are +applicable everywhere (see syntax). + +- type definition: "bool"/"tristate"/"string"/"hex"/"integer" + Every config option must have a type. There are only two basic types: + tristate and string, the other types base on these two. The type + definition optionally accepts an input prompt, so these two examples + are equivalent: + + bool "Networking support" + and + bool + prompt "Networking support" + +- input prompt: "prompt" ["if" ] + Every menu entry can have at most one prompt, which is used to display + to the user. Optionally dependencies only for this prompt can be added + with "if". + +- default value: "default" ["if" ] + A config option can have any number of default values. If multiple + default values are visible, only the first defined one is active. + Default values are not limited to the menu entry, where they are + defined, this means the default can be defined somewhere else or be + overriden by an earlier definition. + The default value is only assigned to the config symbol if no other + value was set by the user (via the input prompt above). If an input + prompt is visible the default value is presented to the user and can + be overridden by him. + Optionally dependencies only for this default value can be added with + "if". + +- dependencies: "depends on"/"requires" + This defines a dependency for this menu entry. If multiple + dependencies are defined they are connected with '&&'. Dependencies + are applied to all other options within this menu entry (which also + accept "if" expression), so these two examples are equivalent: + + bool "foo" if BAR + default y if BAR + and + depends on BAR + bool "foo" + default y + +- help text: "help" + This defines a help text. The end of the help text is determined by + the level indentation, this means it ends at the first line which has + a smaller indentation than the first line of the help text. + + +Menu dependencies +----------------- + +Dependencies define the visibility of a menu entry and can also reduce +the input range of tristate symbols. The tristate logic used in the +expressions uses one more state than normal boolean logic to express the +module state. Dependency expressions have the following syntax: + + ::= (1) + '=' (2) + '!=' (3) + '(' ')' (4) + '!' (5) + '||' (6) + '&&' (7) + +Expressions are listed in decreasing order of precedence. + +(1) Convert the symbol into an expression. Boolean and tristate symbols + are simply converted into the respective expression values. All + other symbol types result in 'n'. +(2) If the values of both symbols are equal, it returns 'y', + otherwise 'n'. +(3) If the values of both symbols are equal, it returns 'n', + otherwise 'y'. +(4) Returns the value of the expression. Used to override precedence. +(5) Returns the result of (2-/expr/). +(6) Returns the result of min(/expr/, /expr/). +(7) Returns the result of max(/expr/, /expr/). + +An expression can have a value of 'n', 'm' or 'y' (or 0, 1, 2 +respectively for calculations). A menu entry becomes visible when it's +expression evaluates to 'm' or 'y'. + +There are two type of symbols: constant and nonconstant symbols. +Nonconstant symbols are the most common ones and are defined with the +'config' statement. Nonconstant symbols consist entirely of alphanumeric +characters or underscores. +Constant symbols are only part of expressions. Constant symbols are +always surrounded by single or double quotes. Within the quote any +other character is allowed and the quotes can be escaped using '\'. + +Menu structure +-------------- + +The position of a menu entry in the tree is determined in two ways. First +it can be specified explicitely: + +menu "Network device support" + depends NET + +config NETDEVICES + ... + +endmenu + +All entries within the "menu" ... "endmenu" block become a submenu of +"Network device support". All subentries inherit the dependencies from +the menu entry, e.g. this means the dependency "NET" is added to the +dependency list of the config option NETDEVICES. + +The other way to generate the menu structure is done by analyzing the +dependencies. If a menu entry somehow depends on the previous entry, it +can be made a submenu of it. First the the previous (parent) symbol must +be part of the dependency list and then one of these two condititions +must be true: +- the child entry must become invisible, if the parent is set to 'n' +- the child entry must only be visible, if the parent is visible + +config MODULES + bool "Enable loadable module support" + +config MODVERSIONS + bool "Set version information on all module symbols" + depends MODULES + +comment "module support disabled" + depends !MODULES + +MODVERSIONS directly depends on MODULES, this means it's only visible if +MODULES is different from 'n'. The comment on the other hand is always +visible when MODULES it's visible (the (empty) dependency of MODULES is +also part of the comment dependencies). + + +Kconfig syntax +-------------- + +The configuration file describes a series of menu entries, where every +line starts with a keyword (except help texts). The following keywords +end a menu entry: +- config +- choice/endchoice +- comment +- menu/endmenu +- if/endif +- source +The first four also start the definition of a menu entry. + +config: + + "config" + + +This defines a config symbol and accepts any of above +attributes as options. + +choices: + + "choice" + + + "endchoice" + +This defines a choice group and accepts any of above attributes as +options. A choice can only be of type bool or tristate, while a boolean +choice only allows a single config entry to be selected, a tristate +choice also allows any number of config entries to be set to 'm'. This +can be used if multiple drivers for a single hardware exists and only a +single driver can be compiled/loaded into the kernel, but all drivers +can be compiled as modules. +A choice accepts another option "optional", which allows to set the +choice to 'n' and no entry needs to be selected. + +comment: + + "comment" + + +This defines a comment which is displayed to the user during the +configuration process and is also echoed to the output files. The only +possible options are dependencies. + +menu: + + "menu" + + + "endmenu" + +This defines a menu block, see "Menu structure" above for more +information. The only possible options are dependencies. + +if: + + "if" + + "endif" + +This defines an if block. The dependency expression is appended +to all enclosed menu entries. + +source: + + "source" + +This reads the specified configuration file. This file is always parsed. diff --git a/config/Makefile b/config/Makefile new file mode 100644 index 000000000..278f98849 --- /dev/null +++ b/config/Makefile @@ -0,0 +1,123 @@ +# $Id: Makefile 185 2008-10-28 12:24:05Z wbx $ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +CP=cp -fpR + +all: ncurses conf mconf + +LIBS= -lncurses +ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) +HOSTNCURSES+= -I/usr/include/ncurses -DCURSES_LOC="" +else +ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) +HOSTNCURSES+= -I/usr/include/ncurses -DCURSES_LOC="" +else +ifeq (/usr/local/include/ncurses/ncurses.h, $(wildcard /usr/local/include/ncurses/ncurses.h)) +HOSTCFLAGS+= -I/usr/local/include/ncurses -DCURSES_LOC="" +else +ifeq (/usr/local/include/ncurses/curses.h, $(wildcard /usr/local/include/ncurses/curses.h)) +HOSTCFLAGS+= -I/usr/local/include/ncurses -DCURSES_LOC="" +else +ifeq (/usr/pkg/include/ncurses.h, $(wildcard /usr/pkg/include/ncurses.h)) +HOSTCFLAGS+= -I/usr/pkg/include -DCURSES_LOC="" +LIBS+= -L/usr/pkg/lib -Wl,-rpath -Wl,/usr/pkg/lib +else +ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) +HOSTNCURSES+= -DCURSES_LOC="" +else +HOSTNCURSES+= -DCURSES_LOC="" +endif +endif +endif +endif +endif +endif + +CONF_SRC =conf.c +MCONF_SRC =mconf.c checklist.c menubox.c textbox.c yesno.c inputbox.c util.c msgbox.c +SHARED_SRC=zconf.tab.c glob.c +SHARED_DEPS:=lkc.h lkc_proto.h lkc_defs.h expr.h zconf.tab.h glob.h +CONF_OBJS =$(patsubst %.c,%.o, $(CONF_SRC)) +MCONF_OBJS=$(patsubst %.c,%.o, $(MCONF_SRC)) +SHARED_OBJS=$(patsubst %.c,%.o, $(SHARED_SRC)) + +conf: $(CONF_OBJS) $(SHARED_OBJS) + $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ + +mconf: $(MCONF_OBJS) $(SHARED_OBJS) + $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS) + +$(CONF_OBJS): %.o : %.c $(SHARED_DEPS) + $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ + +$(MCONF_OBJS): %.o : %.c $(SHARED_DEPS) + $(HOSTCC) $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@ + +glob.o: glob.c $(SHARED_DEPS) + $(HOSTCC) $(HOSTCFLAGS) -I. -c glob.c -o $@ + +lkc_defs.h: lkc_proto.h + @sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' + +### +# The following requires flex/bison +# By default we use the _shipped versions, uncomment the +# following line if you are modifying the flex/bison src. +LKC_GENPARSER:= 1 + +ifdef LKC_GENPARSER + +%.tab.c %.tab.h: %.y + bison -t -d -v -b $* -p $(notdir $*) $< + +lex.%.c: %.l + flex -P$(notdir $*) -o$@ $< + +lex.zconf.o: lex.zconf.c $(SHARED_DEPS) + $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ + +zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(SHARED_DEPS) + $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ + +else + +lex.zconf.o: lex.zconf.c $(SHARED_DEPS) + $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ + +lex.zconf.c: lex.zconf.c_shipped + $(CP) lex.zconf.c_shipped lex.zconf.c + +zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(SHARED_DEPS) + $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ + +zconf.tab.c: zconf.tab.c_shipped + $(CP) zconf.tab.c_shipped zconf.tab.c + +zconf.tab.h: zconf.tab.h_shipped + $(CP) zconf.tab.h_shipped zconf.tab.h +endif + +.PHONY: ncurses + +ncurses: + @echo "int main(void) { return -1; }" > lxtemp.c + @if $(HOSTCC) $(HOSTCFLAGS) lxtemp.c $(LIBS) ; then \ + rm -f lxtemp.c a.out; \ + else \ + rm -f lxtemp.c; \ + printf '\007'; \ + echo ">> Unable to find the Ncurses libraries." ;\ + echo ">>" ;\ + echo ">> You must have Ncurses installed in order" ;\ + echo ">> to use 'make menuconfig'" ;\ + echo ;\ + exit 1 ;\ + fi + +clean: + rm -f *.o *~ core $(TARGETS) $(MCONF_OBJS) $(CONF_OBJS) \ + conf mconf zconf.tab.c zconf.tab.h lex.zconf.c lkc_defs.h diff --git a/config/Makefile.in b/config/Makefile.in new file mode 100644 index 000000000..0b3ac40a9 --- /dev/null +++ b/config/Makefile.in @@ -0,0 +1,5 @@ +ifeq ($(strip $(ADK_PACKAGE_CONFIG)),y) +TARGETS+=config +endif + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/config/checklist.c b/config/checklist.c new file mode 100644 index 000000000..ec5a9ad68 --- /dev/null +++ b/config/checklist.c @@ -0,0 +1,377 @@ +/* + * checklist.c -- implements the checklist box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * Stuart Herbert - S.Herbert@sheffield.ac.uk: radiolist extension + * Alessandro Rubini - rubini@ipvvis.unipv.it: merged the two + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +static int list_width, check_x, item_x, checkflag; + +/* + * Print list item + */ +static void +print_item (WINDOW * win, const char *item, int status, + int choice, int selected) +{ + int i; + + /* Clear 'residue' of last item */ + wattrset (win, menubox_attr); + wmove (win, choice, 0); + for (i = 0; i < list_width; i++) + waddch (win, ' '); + + wmove (win, choice, check_x); + wattrset (win, selected ? check_selected_attr : check_attr); + if (checkflag == FLAG_CHECK) + wprintw (win, "[%c]", status ? 'X' : ' '); + else + wprintw (win, "(%c)", status ? 'X' : ' '); + +#if 0 + wattrset (win, selected ? tag_selected_attr : tag_attr); + mvwaddch(win, choice, item_x, item[0]); + wattrset (win, selected ? item_selected_attr : item_attr); + waddstr (win, (char *)item+1); +#else + wattrset (win, selected ? item_selected_attr : item_attr); + waddstr (win, item); +#endif + if (selected) { + wmove (win, choice, check_x+1); + wrefresh (win); + } +} + +/* + * Print the scroll indicators. + */ +static void +print_arrows (WINDOW * win, int choice, int item_no, int scroll, + int y, int x, int height) +{ + wmove(win, y, x); + + if (scroll > 0) { + wattrset (win, uarrow_attr); + waddch (win, ACS_UARROW); + waddstr (win, "(-)"); + } + else { + wattrset (win, menubox_attr); + waddch (win, ACS_HLINE); + waddch (win, ACS_HLINE); + waddch (win, ACS_HLINE); + waddch (win, ACS_HLINE); + } + + y = y + height + 1; + wmove(win, y, x); + + if ((height < item_no) && (scroll + choice < item_no - 1)) { + wattrset (win, darrow_attr); + waddch (win, ACS_DARROW); + waddstr (win, "(+)"); + } + else { + wattrset (win, menubox_border_attr); + waddch (win, ACS_HLINE); + waddch (win, ACS_HLINE); + waddch (win, ACS_HLINE); + waddch (win, ACS_HLINE); + } +} + +/* + * Display the termination buttons + */ +static void +print_buttons( WINDOW *dialog, int height, int width, int selected) +{ + int x = width / 2 - 11; + int y = height - 2; + + print_button (dialog, "Select", y, x, selected == 0); + print_button (dialog, " Help ", y, x + 14, selected == 1); + + wmove(dialog, y, x+1 + 14*selected); + wrefresh (dialog); +} + +/* + * Display a dialog box with a list of options that can be turned on or off + * The `flag' parameter is used to select between radiolist and checklist. + */ +int +dialog_checklist (const char *title, const char *prompt, int height, int width, + int list_height, int item_no, struct dialog_list_item ** items, + int flag) + +{ + int i, x, y, box_x, box_y; + int key = 0, button = 0, choice = 0, scroll = 0, max_choice, *status; + WINDOW *dialog, *list; + + checkflag = flag; + + /* Allocate space for storing item on/off status */ + if ((status = malloc (sizeof (int) * item_no)) == NULL) { + endwin (); + fprintf (stderr, + "\nCan't allocate memory in dialog_checklist().\n"); + exit (-1); + } + + /* Initializes status */ + for (i = 0; i < item_no; i++) { + status[i] = (items[i]->selected == 1); /* ON */ + if ((!choice && status[i]) || items[i]->selected == 2) /* SELECTED */ + choice = i + 1; + } + if (choice) + choice--; + + max_choice = MIN (list_height, item_no); + + /* center dialog box on screen */ + x = (COLS - width) / 2; + y = (LINES - height) / 2; + + draw_shadow (stdscr, y, x, height, width); + + dialog = newwin (height, width, y, x); + keypad (dialog, TRUE); + + draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr); + wattrset (dialog, border_attr); + mvwaddch (dialog, height-3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch (dialog, ACS_HLINE); + wattrset (dialog, dialog_attr); + waddch (dialog, ACS_RTEE); + + if (title != NULL && strlen(title) >= width-2 ) { + /* truncate long title -- mec */ + char * title2 = malloc(width-2+1); + memcpy( title2, title, width-2 ); + title2[width-2] = '\0'; + title = title2; + } + + if (title != NULL) { + wattrset (dialog, title_attr); + mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); + waddstr (dialog, (char *)title); + waddch (dialog, ' '); + } + + wattrset (dialog, dialog_attr); + print_autowrap (dialog, prompt, width - 2, 1, 3); + + list_width = width - 6; + box_y = height - list_height - 5; + box_x = (width - list_width) / 2 - 1; + + /* create new window for the list */ + list = subwin (dialog, list_height, list_width, y+box_y+1, x+box_x+1); + + keypad (list, TRUE); + + /* draw a box around the list items */ + draw_box (dialog, box_y, box_x, list_height + 2, list_width + 2, + menubox_border_attr, menubox_attr); + + /* Find length of longest item in order to center checklist */ + check_x = 0; + for (i = 0; i < item_no; i++) + check_x = MAX (check_x, + strlen (items[i]->name) + 4); + + check_x = (list_width - check_x) / 2; + item_x = check_x + 4; + + if (choice >= list_height) { + scroll = choice - list_height + 1; + choice -= scroll; + } + + /* Print the list */ + for (i = 0; i < max_choice; i++) { + print_item (list, items[scroll + i]->name, + status[i+scroll], i, i == choice); + } + + print_arrows(dialog, choice, item_no, scroll, + box_y, box_x + check_x + 5, list_height); + + print_buttons(dialog, height, width, 0); + + wnoutrefresh (list); + wnoutrefresh (dialog); + doupdate (); + + while (key != ESC) { + key = wgetch (dialog); + + for (i = 0; i < max_choice; i++) + if (toupper(key) == toupper(items[scroll + i]->name[0])) + break; + + + if ( i < max_choice || key == KEY_UP || key == KEY_DOWN || + key == '+' || key == '-' ) { + if (key == KEY_UP || key == '-') { + if (!choice) { + if (!scroll) + continue; + /* Scroll list down */ + if (list_height > 1) { + /* De-highlight current first item */ + print_item (list, items[scroll]->name, + status[scroll], 0, FALSE); + scrollok (list, TRUE); + wscrl (list, -1); + scrollok (list, FALSE); + } + scroll--; + print_item (list, items[scroll]->name, + status[scroll], 0, TRUE); + wnoutrefresh (list); + + print_arrows(dialog, choice, item_no, scroll, + box_y, box_x + check_x + 5, list_height); + + wrefresh (dialog); + + continue; /* wait for another key press */ + } else + i = choice - 1; + } else if (key == KEY_DOWN || key == '+') { + if (choice == max_choice - 1) { + if (scroll + choice >= item_no - 1) + continue; + /* Scroll list up */ + if (list_height > 1) { + /* De-highlight current last item before scrolling up */ + print_item (list, items[scroll + max_choice - 1]->name, + status[scroll + max_choice - 1], + max_choice - 1, FALSE); + scrollok (list, TRUE); + scroll (list); + scrollok (list, FALSE); + } + scroll++; + print_item (list, items[scroll + max_choice - 1]->name, + status[scroll + max_choice - 1], + max_choice - 1, TRUE); + wnoutrefresh (list); + + print_arrows(dialog, choice, item_no, scroll, + box_y, box_x + check_x + 5, list_height); + + wrefresh (dialog); + + continue; /* wait for another key press */ + } else + i = choice + 1; + } + if (i != choice) { + /* De-highlight current item */ + print_item (list, items[scroll + choice]->name, + status[scroll + choice], choice, FALSE); + /* Highlight new item */ + choice = i; + print_item (list, items[scroll + choice]->name, + status[scroll + choice], choice, TRUE); + wnoutrefresh (list); + wrefresh (dialog); + } + continue; /* wait for another key press */ + } + switch (key) { + case 'H': + case 'h': + case '?': + for (i = 0; i < item_no; i++) + items[i]->selected = 0; + items[scroll + choice]->selected = 1; + delwin (dialog); + free (status); + return 1; + case TAB: + case KEY_LEFT: + case KEY_RIGHT: + button = ((key == KEY_LEFT ? --button : ++button) < 0) + ? 1 : (button > 1 ? 0 : button); + + print_buttons(dialog, height, width, button); + wrefresh (dialog); + break; + case 'S': + case 's': + case ' ': + case '\n': + if (!button) { + if (flag == FLAG_CHECK) { + status[scroll + choice] = !status[scroll + choice]; + wmove (list, choice, check_x); + wattrset (list, check_selected_attr); + wprintw (list, "[%c]", status[scroll + choice] ? 'X' : ' '); + } else { + if (!status[scroll + choice]) { + for (i = 0; i < item_no; i++) + status[i] = 0; + status[scroll + choice] = 1; + for (i = 0; i < max_choice; i++) + print_item (list, items[scroll + i]->name, + status[scroll + i], i, i == choice); + } + } + wnoutrefresh (list); + wrefresh (dialog); + + for (i = 0; i < item_no; i++) { + items[i]->selected = status[i]; + } + } else { + for (i = 0; i < item_no; i++) + items[i]->selected = 0; + items[scroll + choice]->selected = 1; + } + delwin (dialog); + free (status); + return button; + case 'X': + case 'x': + key = ESC; + case ESC: + break; + } + + /* Now, update everything... */ + doupdate (); + } + + + delwin (dialog); + free (status); + return -1; /* ESC pressed */ +} diff --git a/config/colors.h b/config/colors.h new file mode 100644 index 000000000..d34dd37c6 --- /dev/null +++ b/config/colors.h @@ -0,0 +1,161 @@ +/* + * colors.h -- color attribute definitions + * + * AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + +/* + * Default color definitions + * + * *_FG = foreground + * *_BG = background + * *_HL = highlight? + */ +#define SCREEN_FG COLOR_CYAN +#define SCREEN_BG COLOR_BLUE +#define SCREEN_HL TRUE + +#define SHADOW_FG COLOR_BLACK +#define SHADOW_BG COLOR_BLACK +#define SHADOW_HL TRUE + +#define DIALOG_FG COLOR_BLACK +#define DIALOG_BG COLOR_WHITE +#define DIALOG_HL FALSE + +#define TITLE_FG COLOR_YELLOW +#define TITLE_BG COLOR_WHITE +#define TITLE_HL TRUE + +#define BORDER_FG COLOR_WHITE +#define BORDER_BG COLOR_WHITE +#define BORDER_HL TRUE + +#define BUTTON_ACTIVE_FG COLOR_WHITE +#define BUTTON_ACTIVE_BG COLOR_BLUE +#define BUTTON_ACTIVE_HL TRUE + +#define BUTTON_INACTIVE_FG COLOR_BLACK +#define BUTTON_INACTIVE_BG COLOR_WHITE +#define BUTTON_INACTIVE_HL FALSE + +#define BUTTON_KEY_ACTIVE_FG COLOR_WHITE +#define BUTTON_KEY_ACTIVE_BG COLOR_BLUE +#define BUTTON_KEY_ACTIVE_HL TRUE + +#define BUTTON_KEY_INACTIVE_FG COLOR_RED +#define BUTTON_KEY_INACTIVE_BG COLOR_WHITE +#define BUTTON_KEY_INACTIVE_HL FALSE + +#define BUTTON_LABEL_ACTIVE_FG COLOR_YELLOW +#define BUTTON_LABEL_ACTIVE_BG COLOR_BLUE +#define BUTTON_LABEL_ACTIVE_HL TRUE + +#define BUTTON_LABEL_INACTIVE_FG COLOR_BLACK +#define BUTTON_LABEL_INACTIVE_BG COLOR_WHITE +#define BUTTON_LABEL_INACTIVE_HL TRUE + +#define INPUTBOX_FG COLOR_BLACK +#define INPUTBOX_BG COLOR_WHITE +#define INPUTBOX_HL FALSE + +#define INPUTBOX_BORDER_FG COLOR_BLACK +#define INPUTBOX_BORDER_BG COLOR_WHITE +#define INPUTBOX_BORDER_HL FALSE + +#define SEARCHBOX_FG COLOR_BLACK +#define SEARCHBOX_BG COLOR_WHITE +#define SEARCHBOX_HL FALSE + +#define SEARCHBOX_TITLE_FG COLOR_YELLOW +#define SEARCHBOX_TITLE_BG COLOR_WHITE +#define SEARCHBOX_TITLE_HL TRUE + +#define SEARCHBOX_BORDER_FG COLOR_WHITE +#define SEARCHBOX_BORDER_BG COLOR_WHITE +#define SEARCHBOX_BORDER_HL TRUE + +#define POSITION_INDICATOR_FG COLOR_YELLOW +#define POSITION_INDICATOR_BG COLOR_WHITE +#define POSITION_INDICATOR_HL TRUE + +#define MENUBOX_FG COLOR_BLACK +#define MENUBOX_BG COLOR_WHITE +#define MENUBOX_HL FALSE + +#define MENUBOX_BORDER_FG COLOR_WHITE +#define MENUBOX_BORDER_BG COLOR_WHITE +#define MENUBOX_BORDER_HL TRUE + +#define ITEM_FG COLOR_BLACK +#define ITEM_BG COLOR_WHITE +#define ITEM_HL FALSE + +#define ITEM_SELECTED_FG COLOR_WHITE +#define ITEM_SELECTED_BG COLOR_BLUE +#define ITEM_SELECTED_HL TRUE + +#define TAG_FG COLOR_YELLOW +#define TAG_BG COLOR_WHITE +#define TAG_HL TRUE + +#define TAG_SELECTED_FG COLOR_YELLOW +#define TAG_SELECTED_BG COLOR_BLUE +#define TAG_SELECTED_HL TRUE + +#define TAG_KEY_FG COLOR_YELLOW +#define TAG_KEY_BG COLOR_WHITE +#define TAG_KEY_HL TRUE + +#define TAG_KEY_SELECTED_FG COLOR_YELLOW +#define TAG_KEY_SELECTED_BG COLOR_BLUE +#define TAG_KEY_SELECTED_HL TRUE + +#define CHECK_FG COLOR_BLACK +#define CHECK_BG COLOR_WHITE +#define CHECK_HL FALSE + +#define CHECK_SELECTED_FG COLOR_WHITE +#define CHECK_SELECTED_BG COLOR_BLUE +#define CHECK_SELECTED_HL TRUE + +#define UARROW_FG COLOR_GREEN +#define UARROW_BG COLOR_WHITE +#define UARROW_HL TRUE + +#define DARROW_FG COLOR_GREEN +#define DARROW_BG COLOR_WHITE +#define DARROW_HL TRUE + +/* End of default color definitions */ + +#define C_ATTR(x,y) ((x ? A_BOLD : 0) | COLOR_PAIR((y))) +#define COLOR_NAME_LEN 10 +#define COLOR_COUNT 8 + +/* + * Global variables + */ + +typedef struct { + char name[COLOR_NAME_LEN]; + int value; +} color_names_st; + +extern color_names_st color_names[]; +extern int color_table[][3]; diff --git a/config/conf.c b/config/conf.c new file mode 100644 index 000000000..08e2895d8 --- /dev/null +++ b/config/conf.c @@ -0,0 +1,601 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include + +#define LKC_DIRECT_LINK +#include "lkc.h" + +extern int output_mode; + +static void conf(struct menu *menu); +static void check_conf(struct menu *menu); + +enum { + ask_all, + ask_new, + ask_silent, + set_default, + set_yes, + set_mod, + ask_mod, + set_no, + set_random +} input_mode = ask_all; +char *defconfig_file; + +static int indent = 1; +static int valid_stdin = 1; +static int conf_cnt; +static int press_enter = 0; +static char line[128]; +static struct menu *rootEntry; + +static char nohelp_text[] = "Sorry, no help available for this option yet.\n"; + +static void strip(char *str) +{ + char *p = str; + int l; + + while ((isspace(*p))) + p++; + l = strlen(p); + if (p != str) + memmove(str, p, l + 1); + if (!l) + return; + p = str + l - 1; + while ((isspace(*p))) + *p-- = 0; +} + +static void check_stdin(void) +{ + if (!valid_stdin && input_mode == ask_silent && !press_enter) { + printf("aborted!\n\n"); + printf("Console input/output is redirected. "); + printf("Run 'make oldconfig' to update configuration.\n\n"); + exit(1); + } +} + +static void conf_askvalue(struct symbol *sym, const char *def) +{ + enum symbol_type type = sym_get_type(sym); + tristate val; + + if (!sym_has_value(sym)) + printf("(NEW) "); + + line[0] = '\n'; + line[1] = 0; + + if (!sym_is_changable(sym)) { + printf("%s\n", def); + line[0] = '\n'; + line[1] = 0; + return; + } + + switch (input_mode) { + case ask_new: + case ask_silent: + if (sym_has_value(sym) || + (output_mode && !(sym->flags & SYMBOL_WRITE))) { + printf("%s\n", def); + return; + } + check_stdin(); + case ask_all: + fflush(stdout); + fgets(line, 128, stdin); + return; + case set_default: + printf("%s\n", def); + return; + default: + break; + } + + switch (type) { + case S_INT: + case S_HEX: + case S_STRING: + printf("%s\n", def); + return; + default: + ; + } + switch (input_mode) { + case set_yes: + if (sym_tristate_within_range(sym, yes)) { + line[0] = 'y'; + line[1] = '\n'; + line[2] = 0; + break; + } + case ask_mod: + case set_mod: + if (type == S_TRISTATE) { + if (sym_tristate_within_range(sym, mod)) { + line[0] = 'm'; + line[1] = '\n'; + line[2] = 0; + break; + } + } else { + if (sym_tristate_within_range(sym, yes)) { + line[0] = 'y'; + line[1] = '\n'; + line[2] = 0; + break; + } + } + case set_no: + if (sym_tristate_within_range(sym, no)) { + line[0] = 'n'; + line[1] = '\n'; + line[2] = 0; + break; + } + case set_random: + do { + val = (tristate)(random() % 3); + } while (!sym_tristate_within_range(sym, val)); + switch (val) { + case no: line[0] = 'n'; break; + case mod: line[0] = 'm'; break; + case yes: line[0] = 'y'; break; + } + line[1] = '\n'; + line[2] = 0; + break; + default: + break; + } + printf("%s", line); +} + +int conf_string(struct menu *menu) +{ + struct symbol *sym = menu->sym; + const char *def, *help; + + while (1) { + printf("%*s%s ", indent - 1, "", menu->prompt->text); + printf("(%s) ", sym->name); + def = sym_get_string_value(sym); + if (sym_get_string_value(sym)) + printf("[%s] ", def); + conf_askvalue(sym, def); + switch (line[0]) { + case '\n': + break; + case '?': + /* print help */ + if (line[1] == '\n') { + help = nohelp_text; + if (menu->sym->help) + help = menu->sym->help; + printf("\n%s\n", menu->sym->help); + def = NULL; + break; + } + default: + line[strlen(line)-1] = 0; + def = line; + } + if (def && sym_set_string_value(sym, def)) + return 0; + } +} + +static int conf_sym(struct menu *menu) +{ + struct symbol *sym = menu->sym; + int type; + tristate oldval, newval; + const char *help; + + while (1) { + printf("%*s%s ", indent - 1, "", menu->prompt->text); + if (sym->name) + printf("(%s) ", sym->name); + type = sym_get_type(sym); + putchar('['); + oldval = sym_get_tristate_value(sym); + switch (oldval) { + case no: + putchar('N'); + break; + case mod: + putchar('M'); + break; + case yes: + putchar('Y'); + break; + } + if (oldval != no && sym_tristate_within_range(sym, no)) + printf("/n"); + if (oldval != mod && sym_tristate_within_range(sym, mod)) + printf("/m"); + if (oldval != yes && sym_tristate_within_range(sym, yes)) + printf("/y"); + if (sym->help) + printf("/?"); + printf("] "); + conf_askvalue(sym, sym_get_string_value(sym)); + strip(line); + + switch (line[0]) { + case 'n': + case 'N': + newval = no; + if (!line[1] || !strcmp(&line[1], "o")) + break; + continue; + case 'm': + case 'M': + newval = mod; + if (!line[1]) + break; + continue; + case 'y': + case 'Y': + newval = yes; + if (!line[1] || !strcmp(&line[1], "es")) + break; + continue; + case 0: + newval = oldval; + break; + case '?': + goto help; + default: + continue; + } + if (sym_set_tristate_value(sym, newval)) + return 0; +help: + help = nohelp_text; + if (sym->help) + help = sym->help; + printf("\n%s\n", help); + } +} + +static int conf_choice(struct menu *menu) +{ + struct symbol *sym, *def_sym; + struct menu *child; + int type; + bool is_new; + + sym = menu->sym; + type = sym_get_type(sym); + is_new = !sym_has_value(sym); + if (sym_is_changable(sym)) { + conf_sym(menu); + sym_calc_value(sym); + switch (sym_get_tristate_value(sym)) { + case no: + return 1; + case mod: + return 0; + case yes: + break; + } + } else { + switch (sym_get_tristate_value(sym)) { + case no: + return 1; + case mod: + printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); + return 0; + case yes: + break; + } + } + + while (1) { + int cnt, def; + + printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); + def_sym = sym_get_choice_value(sym); + cnt = def = 0; + line[0] = '0'; + line[1] = 0; + for (child = menu->list; child; child = child->next) { + if (!menu_is_visible(child)) + continue; + if (!child->sym) { + printf("%*c %s\n", indent, '*', menu_get_prompt(child)); + continue; + } + cnt++; + if (child->sym == def_sym) { + def = cnt; + printf("%*c", indent, '>'); + } else + printf("%*c", indent, ' '); + printf(" %d. %s", cnt, menu_get_prompt(child)); + if (child->sym->name) + printf(" (%s)", child->sym->name); + if (!sym_has_value(child->sym)) + printf(" (NEW)"); + printf("\n"); + } + printf("%*schoice", indent - 1, ""); + if (cnt == 1) { + printf("[1]: 1\n"); + goto conf_childs; + } + printf("[1-%d", cnt); + if (sym->help) + printf("?"); + printf("]: "); + switch (input_mode) { + case ask_new: + case ask_silent: + if (!is_new) { + cnt = def; + printf("%d\n", cnt); + break; + } + check_stdin(); + case ask_all: + fflush(stdout); + fgets(line, 128, stdin); + strip(line); + if (line[0] == '?') { + printf("\n%s\n", menu->sym->help ? + menu->sym->help : nohelp_text); + continue; + } + if (!line[0]) + cnt = def; + else if (isdigit(line[0])) + cnt = atoi(line); + else + continue; + break; + case set_random: + def = (random() % cnt) + 1; + case set_default: + case set_yes: + case set_mod: + case set_no: + case ask_mod: + cnt = def; + printf("%d\n", cnt); + break; + } + + conf_childs: + for (child = menu->list; child; child = child->next) { + if (!child->sym || !menu_is_visible(child)) + continue; + if (!--cnt) + break; + } + if (!child) + continue; + if (line[strlen(line) - 1] == '?') { + printf("\n%s\n", child->sym->help ? + child->sym->help : nohelp_text); + continue; + } + sym_set_choice_value(sym, child->sym); + if (child->list) { + indent += 2; + conf(child->list); + indent -= 2; + } + return 1; + } +} + +static void conf(struct menu *menu) +{ + struct symbol *sym; + struct property *prop; + struct menu *child; + + if (!menu_is_visible(menu)) + return; + + sym = menu->sym; + prop = menu->prompt; + if (prop) { + const char *prompt; + + switch (prop->type) { + case P_MENU: + if (input_mode == ask_silent && rootEntry != menu) { + check_conf(menu); + return; + } + case P_COMMENT: + prompt = menu_get_prompt(menu); + if (prompt) + printf("%*c\n%*c %s\n%*c\n", + indent, '*', + indent, '*', prompt, + indent, '*'); + default: + ; + } + } + + if (!sym) + goto conf_childs; + + if (sym_is_choice(sym)) { + conf_choice(menu); + if (sym->curr.tri != mod) + return; + goto conf_childs; + } + + switch (sym->type) { + case S_INT: + case S_HEX: + case S_STRING: + conf_string(menu); + break; + default: + conf_sym(menu); + break; + } + +conf_childs: + if (sym) + indent += 2; + for (child = menu->list; child; child = child->next) + conf(child); + if (sym) + indent -= 2; +} + +static void check_conf(struct menu *menu) +{ + struct symbol *sym; + struct menu *child; + + if (!menu_is_visible(menu)) + return; + + sym = menu->sym; + if (sym) { + if (sym_is_changable(sym) && !sym_has_value(sym)) { + if (!conf_cnt++) + printf("*\n* Restart config...\n*\n"); + rootEntry = menu_get_parent_menu(menu); + conf(rootEntry); + } + if (sym_is_choice(sym) && sym_get_tristate_value(sym) != mod) + return; + } + + for (child = menu->list; child; child = child->next) + check_conf(child); +} + +int main(int ac, char **av) +{ + int i = 1; + const char *name; + struct stat tmpstat; + + if (ac > i && av[i][0] == '-') { + switch (av[i++][1]) { + case 'A': + output_mode = 1; + /* FALLTHROUGH */ + case 'o': + input_mode = ask_new; + break; + case 'a': + input_mode = ask_new; + press_enter = 1; + break; + case 's': + input_mode = ask_silent; + valid_stdin = isatty(0) && isatty(1) && isatty(2); + break; + case 'd': + input_mode = set_default; + break; + case 'D': + input_mode = set_default; + defconfig_file = av[i++]; + if (!defconfig_file) { + printf("%s: No default config file specified\n", + av[0]); + exit(1); + } + break; + case 'n': + input_mode = set_no; + break; + case 'M': + input_mode = ask_mod; + break; + case 'm': + input_mode = set_mod; + break; + case 'y': + input_mode = set_yes; + break; + case 'r': + input_mode = set_random; + srandom(time(NULL)); + break; + case 'h': + case '?': + printf("%s [-o|-s] config\n", av[0]); + exit(0); + } + } + name = av[i]; + if (!name) { + printf("%s: configuration file missing\n", av[0]); + } + conf_parse(name); + //zconfdump(stdout); + switch (input_mode) { + case set_default: + if (!defconfig_file) + defconfig_file = conf_get_default_confname(); + if (conf_read(defconfig_file)) { + printf("***\n" + "*** Can't find default configuration \"%s\"!\n" + "***\n", defconfig_file); + exit(1); + } + break; + case ask_silent: + if (stat(".config", &tmpstat)) { + printf("***\n" + "*** You have not yet configured OpenADK!\n" + "***\n" + "*** Please run some configurator (e.g. \"make oldconfig\" or\n" + "*** \"make menuconfig\" or \"make config\").\n" + "***\n"); + exit(1); + } + case ask_all: + case ask_new: + case ask_mod: + conf_read(NULL); + break; + default: + break; + } + + if (input_mode != ask_silent) { + rootEntry = &rootmenu; + conf(&rootmenu); + if (input_mode == ask_all) { + input_mode = ask_silent; + valid_stdin = 1; + } + } + do { + conf_cnt = 0; + check_conf(&rootmenu); + } while (conf_cnt); + if (conf_write(NULL)) { + fprintf(stderr, "\n*** Error during writing of the OpenADK configuration.\n\n"); + return 1; + } + return 0; +} diff --git a/config/confdata.c b/config/confdata.c new file mode 100644 index 000000000..3bebe2c22 --- /dev/null +++ b/config/confdata.c @@ -0,0 +1,449 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include + +#define LKC_DIRECT_LINK +#include "lkc.h" + +int output_mode = 0; + +const char conf_def_filename[] = ".config"; + +const char conf_defname[] = "Config.default"; + +const char *conf_confnames[] = { + ".config", + conf_defname, + NULL, +}; + +static char *conf_expand_value(const char *in) +{ + struct symbol *sym; + const char *src; + static char res_value[SYMBOL_MAXLENGTH]; + char *dst, name[SYMBOL_MAXLENGTH]; + + res_value[0] = 0; + dst = name; + while ((src = strchr(in, '$'))) { + strncat(res_value, in, src - in); + src++; + dst = name; + while (isalnum(*src) || *src == '_') + *dst++ = *src++; + *dst = 0; + sym = sym_lookup(name, 0); + sym_calc_value(sym); + strcat(res_value, sym_get_string_value(sym)); + in = src; + } + strcat(res_value, in); + + return res_value; +} + +char *conf_get_default_confname(void) +{ + struct stat buf; + static char fullname[PATH_MAX+1]; + char *env, *name; + + name = conf_expand_value(conf_defname); + env = getenv(SRCTREE); + if (env) { + sprintf(fullname, "%s/%s", env, name); + if (!stat(fullname, &buf)) + return fullname; + } + return name; +} + +int conf_read(const char *name) +{ + FILE *in = NULL; + char line[2048]; + char *p, *p2; + int lineno = 0; + struct symbol *sym; + struct property *prop; + struct expr *e; + int i; + + if (name) { + in = zconf_fopen(name); + } else { + const char **names = conf_confnames; + while ((name = *names++)) { + name = conf_expand_value(name); + in = zconf_fopen(name); + if (in) { + printf("#\n" + "# using defaults found in %s\n" + "#\n", name); + break; + } + } + } + + if (!in) + return 1; + + for_all_symbols(i, sym) { + sym->flags |= SYMBOL_NEW | SYMBOL_CHANGED; + sym->flags &= ~SYMBOL_VALID; + switch (sym->type) { + case S_INT: + case S_HEX: + case S_STRING: + if (sym->user.val) + free(sym->user.val); + default: + sym->user.val = NULL; + sym->user.tri = no; + } + } + + while (fgets(line, sizeof(line), in)) { + lineno++; + sym = NULL; + switch (line[0]) { + case '#': + if (line[1]!=' ') + continue; + p = strchr(line + 2, ' '); + if (!p) + continue; + *p++ = 0; + if (strncmp(p, "is not set", 10)) + continue; + sym = sym_find(line + 2); + if (!sym) { + fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line + 2); + break; + } + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + sym->user.tri = no; + sym->flags &= ~SYMBOL_NEW; + break; + default: + ; + } + break; + + case 'A' ... 'Z': + p = strchr(line, '='); + if (!p) + continue; + *p++ = 0; + p2 = strchr(p, '\n'); + if (p2) + *p2 = 0; + sym = sym_find(line); + if (!sym) { + fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line); + break; + } + switch (sym->type) { + case S_TRISTATE: + if (p[0] == 'm') { + sym->user.tri = mod; + sym->flags &= ~SYMBOL_NEW; + break; + } + case S_BOOLEAN: + if (p[0] == 'y') { + sym->user.tri = yes; + sym->flags &= ~SYMBOL_NEW; + break; + } + if (p[0] == 'n') { + sym->user.tri = no; + sym->flags &= ~SYMBOL_NEW; + break; + } + break; + case S_STRING: + if (*p++ != '"') + break; + for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) { + if (*p2 == '"') { + *p2 = 0; + break; + } + memmove(p2, p2 + 1, strlen(p2)); + } + if (!p2) { + fprintf(stderr, "%s:%d: invalid string found\n", name, lineno); + exit(1); + } + case S_INT: + case S_HEX: + if (sym_string_valid(sym, p)) { + sym->user.val = strdup(p); + sym->flags &= ~SYMBOL_NEW; + } else { + fprintf(stderr, "%s:%d: symbol value '%s' invalid for %s\n", name, lineno, p, sym->name); + exit(1); + } + break; + default: + ; + } + break; + case '\n': + break; + default: + continue; + } + if (sym && sym_is_choice_value(sym)) { + struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym)); + switch (sym->user.tri) { + case no: + break; + case mod: + if (cs->user.tri == yes) + /* warn? */; + break; + case yes: + if (cs->user.tri != no) + /* warn? */; + cs->user.val = sym; + break; + } + cs->user.tri = E_OR(cs->user.tri, sym->user.tri); + cs->flags &= ~SYMBOL_NEW; + } + } + fclose(in); + + if (modules_sym) + sym_calc_value(modules_sym); + for_all_symbols(i, sym) { + sym_calc_value(sym); + if (sym_has_value(sym) && !sym_is_choice_value(sym)) { + if (sym->visible == no) + sym->flags |= SYMBOL_NEW; + switch (sym->type) { + case S_STRING: + case S_INT: + case S_HEX: + if (!sym_string_within_range(sym, sym->user.val)) + sym->flags |= SYMBOL_NEW; + default: + break; + } + } + if (!sym_is_choice(sym)) + continue; + prop = sym_get_choice_prop(sym); + for (e = prop->expr; e; e = e->left.expr) + if (e->right.sym->visible != no) + sym->flags |= e->right.sym->flags & SYMBOL_NEW; + } + + sym_change_count = 1; + + return 0; +} + +int conf_write(const char *name) +{ + FILE *out, *out_h; + struct symbol *sym; + struct menu *menu; + const char *basename; + char dirname[128], tmpname[128], newname[128]; + int type, l; + const char *str; + + dirname[0] = 0; + if (name && name[0]) { + struct stat st; + char *slash; + + if (!stat(name, &st) && S_ISDIR(st.st_mode)) { + strcpy(dirname, name); + strcat(dirname, "/"); + basename = conf_def_filename; + } else if ((slash = strrchr(name, '/'))) { + int size = slash - name + 1; + memcpy(dirname, name, size); + dirname[size] = 0; + if (slash[1]) + basename = slash + 1; + else + basename = conf_def_filename; + } else + basename = name; + } else + basename = conf_def_filename; + + sprintf(newname, "%s.tmpconfig.%d", dirname, getpid()); + out = fopen(newname, "w"); + if (!out) + return 1; + out_h = NULL; + if (!name) { + out_h = fopen(".tmpconfig.h", "w"); + if (!out_h) + return 1; + } + fprintf(out, "#\n" + "# Automatically generated make config: don't edit\n" + "#\n"); + if (out_h) { + fprintf(out_h, "/*\n" + " * Automatically generated header file: don't edit\n" + " */\n\n" + "#define AUTOCONF_INCLUDED\n\n" + "/* Version Number */\n" + "#define BB_VER \"%s\"\n" + "#define BB_BT \"%s\"\n", + getenv("VERSION"), + getenv("BUILDTIME")); + if (getenv("EXTRA_VERSION")) + fprintf(out_h, "#define BB_EXTRA_VERSION \"%s\"\n", + getenv("EXTRA_VERSION")); + fprintf(out_h, "\n"); + } + + if (!sym_change_count) + sym_clear_all_valid(); + + menu = rootmenu.list; + while (menu) { + sym = menu->sym; + if (!sym) { + if (!menu_is_visible(menu)) + goto next; + str = menu_get_prompt(menu); + fprintf(out, "\n" + "#\n" + "# %s\n" + "#\n", str); + if (out_h) + fprintf(out_h, "\n" + "/*\n" + " * %s\n" + " */\n", str); + } else if (!(sym->flags & SYMBOL_CHOICE)) { + sym_calc_value(sym); + if (!(sym->flags & SYMBOL_WRITE) && !output_mode) + goto next; + sym->flags &= ~SYMBOL_WRITE; + type = sym->type; + if (type == S_TRISTATE) { + sym_calc_value(modules_sym); + if (modules_sym->curr.tri == no) + type = S_BOOLEAN; + } + switch (type) { + case S_BOOLEAN: + case S_TRISTATE: + switch (sym_get_tristate_value(sym)) { + case no: + fprintf(out, "# %s is not set\n", sym->name); + if (out_h) + fprintf(out_h, "#undef %s\n", sym->name); + break; + case mod: + fprintf(out, "%s=m\n", sym->name); +#if 0 + if (out_h) + fprintf(out_h, "#define %s_MODULE 1\n", sym->name); +#endif + break; + case yes: + fprintf(out, "%s=y\n", sym->name); + if (out_h) + fprintf(out_h, "#define %s 1\n", sym->name); + break; + } + break; + case S_STRING: + // fix me + str = sym_get_string_value(sym); + fprintf(out, "%s=\"", sym->name); + if (out_h) + fprintf(out_h, "#define %s \"", sym->name); + do { + l = strcspn(str, "\"\\"); + if (l) { + fwrite(str, l, 1, out); + if (out_h) + fwrite(str, l, 1, out_h); + } + str += l; + while (*str == '\\' || *str == '"') { + fprintf(out, "\\%c", *str); + if (out_h) + fprintf(out_h, "\\%c", *str); + str++; + } + } while (*str); + fputs("\"\n", out); + if (out_h) + fputs("\"\n", out_h); + break; + case S_HEX: + str = sym_get_string_value(sym); + if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) { + fprintf(out, "%s=%s\n", sym->name, str); + if (out_h) + fprintf(out_h, "#define %s 0x%s\n", sym->name, str); + break; + } + case S_INT: + str = sym_get_string_value(sym); + fprintf(out, "%s=%s\n", sym->name, str); + if (out_h) + fprintf(out_h, "#define %s %s\n", sym->name, str); + break; + } + } + + next: + if (menu->list) { + menu = menu->list; + continue; + } + if (menu->next) + menu = menu->next; + else while ((menu = menu->parent)) { + if (menu->next) { + menu = menu->next; + break; + } + } + } + fclose(out); + if (out_h) { + fclose(out_h); + rename(".tmpconfig.h", "include/config.h"); + file_write_dep(NULL); + } + if (!name || basename != conf_def_filename) { + if (!name) + name = conf_def_filename; + sprintf(tmpname, "%s.old", name); + rename(name, tmpname); + } + sprintf(tmpname, "%s%s", dirname, basename); + if (rename(newname, tmpname)) + return 1; + + sym_change_count = 0; + + return 0; +} diff --git a/config/dialog.h b/config/dialog.h new file mode 100644 index 000000000..6486cc8f7 --- /dev/null +++ b/config/dialog.h @@ -0,0 +1,196 @@ + +/* + * dialog.h -- common declarations for all dialog modules + * + * AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include + +#ifdef CURSES_LOC +#include CURSES_LOC + +/* + * Colors in ncurses 1.9.9e do not work properly since foreground and + * background colors are OR'd rather than separately masked. This version + * of dialog was hacked to work with ncurses 1.9.9e, making it incompatible + * with standard curses. The simplest fix (to make this work with standard + * curses) uses the wbkgdset() function, not used in the original hack. + * Turn it off if we're building with 1.9.9e, since it just confuses things. + */ +#if defined(NCURSES_VERSION) && defined(_NEED_WRAP) && !defined(GCC_PRINTFLIKE) +#define OLD_NCURSES 1 +#undef wbkgdset +#define wbkgdset(w,p) /*nothing*/ +#else +#define OLD_NCURSES 0 +#endif + +#define TR(params) _tracef params + +#define ESC 27 +#define TAB 9 +#define MAX_LEN 2048 +#define BUF_SIZE (10*1024) +#define MIN(x,y) (x < y ? x : y) +#define MAX(x,y) (x > y ? x : y) + + +#ifndef ACS_ULCORNER +#define ACS_ULCORNER '+' +#endif +#ifndef ACS_LLCORNER +#define ACS_LLCORNER '+' +#endif +#ifndef ACS_URCORNER +#define ACS_URCORNER '+' +#endif +#ifndef ACS_LRCORNER +#define ACS_LRCORNER '+' +#endif +#ifndef ACS_HLINE +#define ACS_HLINE '-' +#endif +#ifndef ACS_VLINE +#define ACS_VLINE '|' +#endif +#ifndef ACS_LTEE +#define ACS_LTEE '+' +#endif +#ifndef ACS_RTEE +#define ACS_RTEE '+' +#endif +#ifndef ACS_UARROW +#define ACS_UARROW '^' +#endif +#ifndef ACS_DARROW +#define ACS_DARROW 'v' +#endif + +/* + * Attribute names + */ +#define screen_attr attributes[0] +#define shadow_attr attributes[1] +#define dialog_attr attributes[2] +#define title_attr attributes[3] +#define border_attr attributes[4] +#define button_active_attr attributes[5] +#define button_inactive_attr attributes[6] +#define button_key_active_attr attributes[7] +#define button_key_inactive_attr attributes[8] +#define button_label_active_attr attributes[9] +#define button_label_inactive_attr attributes[10] +#define inputbox_attr attributes[11] +#define inputbox_border_attr attributes[12] +#define searchbox_attr attributes[13] +#define searchbox_title_attr attributes[14] +#define searchbox_border_attr attributes[15] +#define position_indicator_attr attributes[16] +#define menubox_attr attributes[17] +#define menubox_border_attr attributes[18] +#define item_attr attributes[19] +#define item_selected_attr attributes[20] +#define tag_attr attributes[21] +#define tag_selected_attr attributes[22] +#define tag_key_attr attributes[23] +#define tag_key_selected_attr attributes[24] +#define check_attr attributes[25] +#define check_selected_attr attributes[26] +#define uarrow_attr attributes[27] +#define darrow_attr attributes[28] + +/* number of attributes */ +#define ATTRIBUTE_COUNT 29 + +/* + * Global variables + */ +extern bool use_colors; + +extern chtype attributes[]; +#endif + +extern char *backtitle; + +struct dialog_list_item { + char *name; + int namelen; + char *tag; + int selected; /* Set to 1 by dialog_*() function. */ +}; + +/* + * Function prototypes + */ + +void init_dialog (void); +void end_dialog (void); +void dialog_clear (void); +#ifdef CURSES_LOC +void attr_clear (WINDOW * win, int height, int width, chtype attr); +void color_setup (void); +void print_autowrap (WINDOW * win, const char *prompt, int width, int y, int x); +void print_button (WINDOW * win, const char *label, int y, int x, int selected); +void draw_box (WINDOW * win, int y, int x, int height, int width, chtype box, + chtype border); +void draw_shadow (WINDOW * win, int y, int x, int height, int width); +#endif + +int first_alpha (const char *string, const char *exempt); +int dialog_yesno (const char *title, const char *prompt, int height, int width); +int dialog_msgbox (const char *title, const char *prompt, int height, + int width, int pause); +int dialog_textbox (const char *title, const char *file, int height, int width); +int dialog_menu (const char *title, const char *prompt, int height, int width, + int menu_height, const char *choice, int item_no, + struct dialog_list_item ** items); +int dialog_checklist (const char *title, const char *prompt, int height, + int width, int list_height, int item_no, + struct dialog_list_item ** items, int flag); +extern unsigned char dialog_input_result[]; +int dialog_inputbox (const char *title, const char *prompt, int height, + int width, const char *init); + +struct dialog_list_item *first_sel_item(int item_no, + struct dialog_list_item ** items); + +/* + * This is the base for fictitious keys, which activate + * the buttons. + * + * Mouse-generated keys are the following: + * -- the first 32 are used as numbers, in addition to '0'-'9' + * -- the lowercase are used to signal mouse-enter events (M_EVENT + 'o') + * -- uppercase chars are used to invoke the button (M_EVENT + 'O') + */ +#ifdef CURSES_LOC +#define M_EVENT (KEY_MAX+1) +#endif + + +/* + * The `flag' parameter in checklist is used to select between + * radiolist and checklist + */ +#define FLAG_CHECK 1 +#define FLAG_RADIO 0 diff --git a/config/expr.c b/config/expr.c new file mode 100644 index 000000000..10f45232b --- /dev/null +++ b/config/expr.c @@ -0,0 +1,1089 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include + +#define LKC_DIRECT_LINK +#include "lkc.h" + +#define DEBUG_EXPR 0 + +struct expr *expr_alloc_symbol(struct symbol *sym) +{ + struct expr *e = malloc(sizeof(*e)); + memset(e, 0, sizeof(*e)); + e->type = E_SYMBOL; + e->left.sym = sym; + return e; +} + +struct expr *expr_alloc_one(enum expr_type type, struct expr *ce) +{ + struct expr *e = malloc(sizeof(*e)); + memset(e, 0, sizeof(*e)); + e->type = type; + e->left.expr = ce; + return e; +} + +struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2) +{ + struct expr *e = malloc(sizeof(*e)); + memset(e, 0, sizeof(*e)); + e->type = type; + e->left.expr = e1; + e->right.expr = e2; + return e; +} + +struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2) +{ + struct expr *e = malloc(sizeof(*e)); + memset(e, 0, sizeof(*e)); + e->type = type; + e->left.sym = s1; + e->right.sym = s2; + return e; +} + +struct expr *expr_alloc_and(struct expr *e1, struct expr *e2) +{ + if (!e1) + return e2; + return e2 ? expr_alloc_two(E_AND, e1, e2) : e1; +} + +struct expr *expr_alloc_or(struct expr *e1, struct expr *e2) +{ + if (!e1) + return e2; + return e2 ? expr_alloc_two(E_OR, e1, e2) : e1; +} + +struct expr *expr_copy(struct expr *org) +{ + struct expr *e; + + if (!org) + return NULL; + + e = malloc(sizeof(*org)); + memcpy(e, org, sizeof(*org)); + switch (org->type) { + case E_SYMBOL: + e->left = org->left; + break; + case E_NOT: + e->left.expr = expr_copy(org->left.expr); + break; + case E_EQUAL: + case E_UNEQUAL: + e->left.sym = org->left.sym; + e->right.sym = org->right.sym; + break; + case E_AND: + case E_OR: + case E_CHOICE: + e->left.expr = expr_copy(org->left.expr); + e->right.expr = expr_copy(org->right.expr); + break; + default: + printf("can't copy type %d\n", e->type); + free(e); + e = NULL; + break; + } + + return e; +} + +void expr_free(struct expr *e) +{ + if (!e) + return; + + switch (e->type) { + case E_SYMBOL: + break; + case E_NOT: + expr_free(e->left.expr); + return; + case E_EQUAL: + case E_UNEQUAL: + break; + case E_OR: + case E_AND: + expr_free(e->left.expr); + expr_free(e->right.expr); + break; + default: + printf("how to free type %d?\n", e->type); + break; + } + free(e); +} + +static int trans_count; + +#define e1 (*ep1) +#define e2 (*ep2) + +static void __expr_eliminate_eq(enum expr_type type, struct expr **ep1, struct expr **ep2) +{ + if (e1->type == type) { + __expr_eliminate_eq(type, &e1->left.expr, &e2); + __expr_eliminate_eq(type, &e1->right.expr, &e2); + return; + } + if (e2->type == type) { + __expr_eliminate_eq(type, &e1, &e2->left.expr); + __expr_eliminate_eq(type, &e1, &e2->right.expr); + return; + } + if (e1->type == E_SYMBOL && e2->type == E_SYMBOL && + e1->left.sym == e2->left.sym && (e1->left.sym->flags & (SYMBOL_YES|SYMBOL_NO))) + return; + if (!expr_eq(e1, e2)) + return; + trans_count++; + expr_free(e1); expr_free(e2); + switch (type) { + case E_OR: + e1 = expr_alloc_symbol(&symbol_no); + e2 = expr_alloc_symbol(&symbol_no); + break; + case E_AND: + e1 = expr_alloc_symbol(&symbol_yes); + e2 = expr_alloc_symbol(&symbol_yes); + break; + default: + ; + } +} + +void expr_eliminate_eq(struct expr **ep1, struct expr **ep2) +{ + if (!e1 || !e2) + return; + switch (e1->type) { + case E_OR: + case E_AND: + __expr_eliminate_eq(e1->type, ep1, ep2); + default: + ; + } + if (e1->type != e2->type) switch (e2->type) { + case E_OR: + case E_AND: + __expr_eliminate_eq(e2->type, ep1, ep2); + default: + ; + } + e1 = expr_eliminate_yn(e1); + e2 = expr_eliminate_yn(e2); +} + +#undef e1 +#undef e2 + +int expr_eq(struct expr *e1, struct expr *e2) +{ + int res, old_count; + + if (e1->type != e2->type) + return 0; + switch (e1->type) { + case E_EQUAL: + case E_UNEQUAL: + return e1->left.sym == e2->left.sym && e1->right.sym == e2->right.sym; + case E_SYMBOL: + return e1->left.sym == e2->left.sym; + case E_NOT: + return expr_eq(e1->left.expr, e2->left.expr); + case E_AND: + case E_OR: + e1 = expr_copy(e1); + e2 = expr_copy(e2); + old_count = trans_count; + expr_eliminate_eq(&e1, &e2); + res = (e1->type == E_SYMBOL && e2->type == E_SYMBOL && + e1->left.sym == e2->left.sym); + expr_free(e1); + expr_free(e2); + trans_count = old_count; + return res; + case E_CHOICE: + case E_RANGE: + case E_NONE: + /* panic */; + } + + if (DEBUG_EXPR) { + expr_fprint(e1, stdout); + printf(" = "); + expr_fprint(e2, stdout); + printf(" ?\n"); + } + + return 0; +} + +struct expr *expr_eliminate_yn(struct expr *e) +{ + struct expr *tmp; + + if (e) switch (e->type) { + case E_AND: + e->left.expr = expr_eliminate_yn(e->left.expr); + e->right.expr = expr_eliminate_yn(e->right.expr); + if (e->left.expr->type == E_SYMBOL) { + if (e->left.expr->left.sym == &symbol_no) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + e->right.expr = NULL; + return e; + } else if (e->left.expr->left.sym == &symbol_yes) { + free(e->left.expr); + tmp = e->right.expr; + *e = *(e->right.expr); + free(tmp); + return e; + } + } + if (e->right.expr->type == E_SYMBOL) { + if (e->right.expr->left.sym == &symbol_no) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + e->right.expr = NULL; + return e; + } else if (e->right.expr->left.sym == &symbol_yes) { + free(e->right.expr); + tmp = e->left.expr; + *e = *(e->left.expr); + free(tmp); + return e; + } + } + break; + case E_OR: + e->left.expr = expr_eliminate_yn(e->left.expr); + e->right.expr = expr_eliminate_yn(e->right.expr); + if (e->left.expr->type == E_SYMBOL) { + if (e->left.expr->left.sym == &symbol_no) { + free(e->left.expr); + tmp = e->right.expr; + *e = *(e->right.expr); + free(tmp); + return e; + } else if (e->left.expr->left.sym == &symbol_yes) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + e->right.expr = NULL; + return e; + } + } + if (e->right.expr->type == E_SYMBOL) { + if (e->right.expr->left.sym == &symbol_no) { + free(e->right.expr); + tmp = e->left.expr; + *e = *(e->left.expr); + free(tmp); + return e; + } else if (e->right.expr->left.sym == &symbol_yes) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + e->right.expr = NULL; + return e; + } + } + break; + default: + ; + } + return e; +} + +/* + * bool FOO!=n => FOO + */ +struct expr *expr_trans_bool(struct expr *e) +{ + if (!e) + return NULL; + switch (e->type) { + case E_AND: + case E_OR: + case E_NOT: + e->left.expr = expr_trans_bool(e->left.expr); + e->right.expr = expr_trans_bool(e->right.expr); + break; + case E_UNEQUAL: + // FOO!=n -> FOO + if (e->left.sym->type == S_TRISTATE) { + if (e->right.sym == &symbol_no) { + e->type = E_SYMBOL; + e->right.sym = NULL; + } + } + break; + default: + ; + } + return e; +} + +/* + * e1 || e2 -> ? + */ +struct expr *expr_join_or(struct expr *e1, struct expr *e2) +{ + struct expr *tmp; + struct symbol *sym1, *sym2; + + if (expr_eq(e1, e2)) + return expr_copy(e1); + if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT) + return NULL; + if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT) + return NULL; + if (e1->type == E_NOT) { + tmp = e1->left.expr; + if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL) + return NULL; + sym1 = tmp->left.sym; + } else + sym1 = e1->left.sym; + if (e2->type == E_NOT) { + if (e2->left.expr->type != E_SYMBOL) + return NULL; + sym2 = e2->left.expr->left.sym; + } else + sym2 = e2->left.sym; + if (sym1 != sym2) + return NULL; + if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE) + return NULL; + if (sym1->type == S_TRISTATE) { + if (e1->type == E_EQUAL && e2->type == E_EQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || + (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) { + // (a='y') || (a='m') -> (a!='n') + return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_no); + } + if (e1->type == E_EQUAL && e2->type == E_EQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) { + // (a='y') || (a='n') -> (a!='m') + return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_mod); + } + if (e1->type == E_EQUAL && e2->type == E_EQUAL && + ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) { + // (a='m') || (a='n') -> (a!='y') + return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes); + } + } + if (sym1->type == S_BOOLEAN && sym1 == sym2) { + if ((e1->type == E_NOT && e1->left.expr->type == E_SYMBOL && e2->type == E_SYMBOL) || + (e2->type == E_NOT && e2->left.expr->type == E_SYMBOL && e1->type == E_SYMBOL)) + return expr_alloc_symbol(&symbol_yes); + } + + if (DEBUG_EXPR) { + printf("optimize ("); + expr_fprint(e1, stdout); + printf(") || ("); + expr_fprint(e2, stdout); + printf(")?\n"); + } + return NULL; +} + +struct expr *expr_join_and(struct expr *e1, struct expr *e2) +{ + struct expr *tmp; + struct symbol *sym1, *sym2; + + if (expr_eq(e1, e2)) + return expr_copy(e1); + if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT) + return NULL; + if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT) + return NULL; + if (e1->type == E_NOT) { + tmp = e1->left.expr; + if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL) + return NULL; + sym1 = tmp->left.sym; + } else + sym1 = e1->left.sym; + if (e2->type == E_NOT) { + if (e2->left.expr->type != E_SYMBOL) + return NULL; + sym2 = e2->left.expr->left.sym; + } else + sym2 = e2->left.sym; + if (sym1 != sym2) + return NULL; + if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE) + return NULL; + + if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) || + (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_yes)) + // (a) && (a='y') -> (a='y') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); + + if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_no) || + (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_no)) + // (a) && (a!='n') -> (a) + return expr_alloc_symbol(sym1); + + if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_mod) || + (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_mod)) + // (a) && (a!='m') -> (a='y') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); + + if (sym1->type == S_TRISTATE) { + if (e1->type == E_EQUAL && e2->type == E_UNEQUAL) { + // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' + sym2 = e1->right.sym; + if ((e2->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) + return sym2 != e2->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) + : expr_alloc_symbol(&symbol_no); + } + if (e1->type == E_UNEQUAL && e2->type == E_EQUAL) { + // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' + sym2 = e2->right.sym; + if ((e1->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) + return sym2 != e1->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) + : expr_alloc_symbol(&symbol_no); + } + if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) + // (a!='y') && (a!='n') -> (a='m') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_mod); + + if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || + (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) + // (a!='y') && (a!='m') -> (a='n') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_no); + + if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && + ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) + // (a!='m') && (a!='n') -> (a='m') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); + + if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_mod) || + (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_mod) || + (e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_yes) || + (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_yes)) + return NULL; + } + + if (DEBUG_EXPR) { + printf("optimize ("); + expr_fprint(e1, stdout); + printf(") && ("); + expr_fprint(e2, stdout); + printf(")?\n"); + } + return NULL; +} + +static void expr_eliminate_dups1(enum expr_type type, struct expr **ep1, struct expr **ep2) +{ +#define e1 (*ep1) +#define e2 (*ep2) + struct expr *tmp; + + if (e1->type == type) { + expr_eliminate_dups1(type, &e1->left.expr, &e2); + expr_eliminate_dups1(type, &e1->right.expr, &e2); + return; + } + if (e2->type == type) { + expr_eliminate_dups1(type, &e1, &e2->left.expr); + expr_eliminate_dups1(type, &e1, &e2->right.expr); + return; + } + if (e1 == e2) + return; + + switch (e1->type) { + case E_OR: case E_AND: + expr_eliminate_dups1(e1->type, &e1, &e1); + default: + ; + } + + switch (type) { + case E_OR: + tmp = expr_join_or(e1, e2); + if (tmp) { + expr_free(e1); expr_free(e2); + e1 = expr_alloc_symbol(&symbol_no); + e2 = tmp; + trans_count++; + } + break; + case E_AND: + tmp = expr_join_and(e1, e2); + if (tmp) { + expr_free(e1); expr_free(e2); + e1 = expr_alloc_symbol(&symbol_yes); + e2 = tmp; + trans_count++; + } + break; + default: + ; + } +#undef e1 +#undef e2 +} + +static void expr_eliminate_dups2(enum expr_type type, struct expr **ep1, struct expr **ep2) +{ +#define e1 (*ep1) +#define e2 (*ep2) + struct expr *tmp, *tmp1, *tmp2; + + if (e1->type == type) { + expr_eliminate_dups2(type, &e1->left.expr, &e2); + expr_eliminate_dups2(type, &e1->right.expr, &e2); + return; + } + if (e2->type == type) { + expr_eliminate_dups2(type, &e1, &e2->left.expr); + expr_eliminate_dups2(type, &e1, &e2->right.expr); + } + if (e1 == e2) + return; + + switch (e1->type) { + case E_OR: + expr_eliminate_dups2(e1->type, &e1, &e1); + // (FOO || BAR) && (!FOO && !BAR) -> n + tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); + tmp2 = expr_copy(e2); + tmp = expr_extract_eq_and(&tmp1, &tmp2); + if (expr_is_yes(tmp1)) { + expr_free(e1); + e1 = expr_alloc_symbol(&symbol_no); + trans_count++; + } + expr_free(tmp2); + expr_free(tmp1); + expr_free(tmp); + break; + case E_AND: + expr_eliminate_dups2(e1->type, &e1, &e1); + // (FOO && BAR) || (!FOO || !BAR) -> y + tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); + tmp2 = expr_copy(e2); + tmp = expr_extract_eq_or(&tmp1, &tmp2); + if (expr_is_no(tmp1)) { + expr_free(e1); + e1 = expr_alloc_symbol(&symbol_yes); + trans_count++; + } + expr_free(tmp2); + expr_free(tmp1); + expr_free(tmp); + break; + default: + ; + } +#undef e1 +#undef e2 +} + +struct expr *expr_eliminate_dups(struct expr *e) +{ + int oldcount; + if (!e) + return e; + + oldcount = trans_count; + while (1) { + trans_count = 0; + switch (e->type) { + case E_OR: case E_AND: + expr_eliminate_dups1(e->type, &e, &e); + expr_eliminate_dups2(e->type, &e, &e); + default: + ; + } + if (!trans_count) + break; + e = expr_eliminate_yn(e); + } + trans_count = oldcount; + return e; +} + +struct expr *expr_transform(struct expr *e) +{ + struct expr *tmp; + + if (!e) + return NULL; + switch (e->type) { + case E_EQUAL: + case E_UNEQUAL: + case E_SYMBOL: + case E_CHOICE: + break; + default: + e->left.expr = expr_transform(e->left.expr); + e->right.expr = expr_transform(e->right.expr); + } + + switch (e->type) { + case E_EQUAL: + if (e->left.sym->type != S_BOOLEAN) + break; + if (e->right.sym == &symbol_no) { + e->type = E_NOT; + e->left.expr = expr_alloc_symbol(e->left.sym); + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_mod) { + printf("boolean symbol %s tested for 'm'? test forced to 'n'\n", e->left.sym->name); + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_yes) { + e->type = E_SYMBOL; + e->right.sym = NULL; + break; + } + break; + case E_UNEQUAL: + if (e->left.sym->type != S_BOOLEAN) + break; + if (e->right.sym == &symbol_no) { + e->type = E_SYMBOL; + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_mod) { + printf("boolean symbol %s tested for 'm'? test forced to 'y'\n", e->left.sym->name); + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_yes) { + e->type = E_NOT; + e->left.expr = expr_alloc_symbol(e->left.sym); + e->right.sym = NULL; + break; + } + break; + case E_NOT: + switch (e->left.expr->type) { + case E_NOT: + // !!a -> a + tmp = e->left.expr->left.expr; + free(e->left.expr); + free(e); + e = tmp; + e = expr_transform(e); + break; + case E_EQUAL: + case E_UNEQUAL: + // !a='x' -> a!='x' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = e->type == E_EQUAL ? E_UNEQUAL : E_EQUAL; + break; + case E_OR: + // !(a || b) -> !a && !b + tmp = e->left.expr; + e->type = E_AND; + e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); + tmp->type = E_NOT; + tmp->right.expr = NULL; + e = expr_transform(e); + break; + case E_AND: + // !(a && b) -> !a || !b + tmp = e->left.expr; + e->type = E_OR; + e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); + tmp->type = E_NOT; + tmp->right.expr = NULL; + e = expr_transform(e); + break; + case E_SYMBOL: + if (e->left.expr->left.sym == &symbol_yes) { + // !'y' -> 'n' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + break; + } + if (e->left.expr->left.sym == &symbol_mod) { + // !'m' -> 'm' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = E_SYMBOL; + e->left.sym = &symbol_mod; + break; + } + if (e->left.expr->left.sym == &symbol_no) { + // !'n' -> 'y' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + break; + } + break; + default: + ; + } + break; + default: + ; + } + return e; +} + +int expr_contains_symbol(struct expr *dep, struct symbol *sym) +{ + if (!dep) + return 0; + + switch (dep->type) { + case E_AND: + case E_OR: + return expr_contains_symbol(dep->left.expr, sym) || + expr_contains_symbol(dep->right.expr, sym); + case E_SYMBOL: + return dep->left.sym == sym; + case E_EQUAL: + case E_UNEQUAL: + return dep->left.sym == sym || + dep->right.sym == sym; + case E_NOT: + return expr_contains_symbol(dep->left.expr, sym); + default: + ; + } + return 0; +} + +bool expr_depends_symbol(struct expr *dep, struct symbol *sym) +{ + if (!dep) + return false; + + switch (dep->type) { + case E_AND: + return expr_depends_symbol(dep->left.expr, sym) || + expr_depends_symbol(dep->right.expr, sym); + case E_SYMBOL: + return dep->left.sym == sym; + case E_EQUAL: + if (dep->left.sym == sym) { + if (dep->right.sym == &symbol_yes || dep->right.sym == &symbol_mod) + return true; + } + break; + case E_UNEQUAL: + if (dep->left.sym == sym) { + if (dep->right.sym == &symbol_no) + return true; + } + break; + default: + ; + } + return false; +} + +struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2) +{ + struct expr *tmp = NULL; + expr_extract_eq(E_AND, &tmp, ep1, ep2); + if (tmp) { + *ep1 = expr_eliminate_yn(*ep1); + *ep2 = expr_eliminate_yn(*ep2); + } + return tmp; +} + +struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2) +{ + struct expr *tmp = NULL; + expr_extract_eq(E_OR, &tmp, ep1, ep2); + if (tmp) { + *ep1 = expr_eliminate_yn(*ep1); + *ep2 = expr_eliminate_yn(*ep2); + } + return tmp; +} + +void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2) +{ +#define e1 (*ep1) +#define e2 (*ep2) + if (e1->type == type) { + expr_extract_eq(type, ep, &e1->left.expr, &e2); + expr_extract_eq(type, ep, &e1->right.expr, &e2); + return; + } + if (e2->type == type) { + expr_extract_eq(type, ep, ep1, &e2->left.expr); + expr_extract_eq(type, ep, ep1, &e2->right.expr); + return; + } + if (expr_eq(e1, e2)) { + *ep = *ep ? expr_alloc_two(type, *ep, e1) : e1; + expr_free(e2); + if (type == E_AND) { + e1 = expr_alloc_symbol(&symbol_yes); + e2 = expr_alloc_symbol(&symbol_yes); + } else if (type == E_OR) { + e1 = expr_alloc_symbol(&symbol_no); + e2 = expr_alloc_symbol(&symbol_no); + } + } +#undef e1 +#undef e2 +} + +struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym) +{ + struct expr *e1, *e2; + + if (!e) { + e = expr_alloc_symbol(sym); + if (type == E_UNEQUAL) + e = expr_alloc_one(E_NOT, e); + return e; + } + switch (e->type) { + case E_AND: + e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym); + e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym); + if (sym == &symbol_yes) + e = expr_alloc_two(E_AND, e1, e2); + if (sym == &symbol_no) + e = expr_alloc_two(E_OR, e1, e2); + if (type == E_UNEQUAL) + e = expr_alloc_one(E_NOT, e); + return e; + case E_OR: + e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym); + e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym); + if (sym == &symbol_yes) + e = expr_alloc_two(E_OR, e1, e2); + if (sym == &symbol_no) + e = expr_alloc_two(E_AND, e1, e2); + if (type == E_UNEQUAL) + e = expr_alloc_one(E_NOT, e); + return e; + case E_NOT: + return expr_trans_compare(e->left.expr, type == E_EQUAL ? E_UNEQUAL : E_EQUAL, sym); + case E_UNEQUAL: + case E_EQUAL: + if (type == E_EQUAL) { + if (sym == &symbol_yes) + return expr_copy(e); + if (sym == &symbol_mod) + return expr_alloc_symbol(&symbol_no); + if (sym == &symbol_no) + return expr_alloc_one(E_NOT, expr_copy(e)); + } else { + if (sym == &symbol_yes) + return expr_alloc_one(E_NOT, expr_copy(e)); + if (sym == &symbol_mod) + return expr_alloc_symbol(&symbol_yes); + if (sym == &symbol_no) + return expr_copy(e); + } + break; + case E_SYMBOL: + return expr_alloc_comp(type, e->left.sym, sym); + case E_CHOICE: + case E_RANGE: + case E_NONE: + /* panic */; + } + return NULL; +} + +tristate expr_calc_value(struct expr *e) +{ + tristate val1, val2; + const char *str1, *str2; + + if (!e) + return yes; + + switch (e->type) { + case E_SYMBOL: + sym_calc_value(e->left.sym); + return e->left.sym->curr.tri; + case E_AND: + val1 = expr_calc_value(e->left.expr); + val2 = expr_calc_value(e->right.expr); + return E_AND(val1, val2); + case E_OR: + val1 = expr_calc_value(e->left.expr); + val2 = expr_calc_value(e->right.expr); + return E_OR(val1, val2); + case E_NOT: + val1 = expr_calc_value(e->left.expr); + return E_NOT(val1); + case E_EQUAL: + sym_calc_value(e->left.sym); + sym_calc_value(e->right.sym); + str1 = sym_get_string_value(e->left.sym); + str2 = sym_get_string_value(e->right.sym); + return !strcmp(str1, str2) ? yes : no; + case E_UNEQUAL: + sym_calc_value(e->left.sym); + sym_calc_value(e->right.sym); + str1 = sym_get_string_value(e->left.sym); + str2 = sym_get_string_value(e->right.sym); + return !strcmp(str1, str2) ? no : yes; + default: + printf("expr_calc_value: %d?\n", e->type); + return no; + } +} + +int expr_compare_type(enum expr_type t1, enum expr_type t2) +{ +#if 0 + return 1; +#else + if (t1 == t2) + return 0; + switch (t1) { + case E_EQUAL: + case E_UNEQUAL: + if (t2 == E_NOT) + return 1; + case E_NOT: + if (t2 == E_AND) + return 1; + case E_AND: + if (t2 == E_OR) + return 1; + case E_OR: + if (t2 == E_CHOICE) + return 1; + case E_CHOICE: + if (t2 == 0) + return 1; + default: + return -1; + } + printf("[%dgt%d?]", t1, t2); + return 0; +#endif +} + +void expr_print(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken) +{ + if (!e) { + fn(data, "y"); + return; + } + + if (expr_compare_type(prevtoken, e->type) > 0) + fn(data, "("); + switch (e->type) { + case E_SYMBOL: + if (e->left.sym->name) + fn(data, e->left.sym->name); + else + fn(data, ""); + break; + case E_NOT: + fn(data, "!"); + expr_print(e->left.expr, fn, data, E_NOT); + break; + case E_EQUAL: + fn(data, e->left.sym->name); + fn(data, "="); + fn(data, e->right.sym->name); + break; + case E_UNEQUAL: + fn(data, e->left.sym->name); + fn(data, "!="); + fn(data, e->right.sym->name); + break; + case E_OR: + expr_print(e->left.expr, fn, data, E_OR); + fn(data, " || "); + expr_print(e->right.expr, fn, data, E_OR); + break; + case E_AND: + expr_print(e->left.expr, fn, data, E_AND); + fn(data, " && "); + expr_print(e->right.expr, fn, data, E_AND); + break; + case E_CHOICE: + fn(data, e->right.sym->name); + if (e->left.expr) { + fn(data, " ^ "); + expr_print(e->left.expr, fn, data, E_CHOICE); + } + break; + case E_RANGE: + fn(data, "["); + fn(data, e->left.sym->name); + fn(data, " "); + fn(data, e->right.sym->name); + fn(data, "]"); + break; + default: + { + char buf[32]; + sprintf(buf, "", e->type); + fn(data, buf); + break; + } + } + if (expr_compare_type(prevtoken, e->type) > 0) + fn(data, ")"); +} + +static void expr_print_file_helper(void *data, const char *str) +{ + fwrite(str, strlen(str), 1, data); +} + +void expr_fprint(struct expr *e, FILE *out) +{ + expr_print(e, expr_print_file_helper, out, E_NONE); +} diff --git a/config/expr.h b/config/expr.h new file mode 100644 index 000000000..3010013b2 --- /dev/null +++ b/config/expr.h @@ -0,0 +1,194 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#ifndef EXPR_H +#define EXPR_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#ifndef __cplusplus +#include +#endif + +struct file { + struct file *next; + struct file *parent; + char *name; + int lineno; + int flags; +}; + +#define FILE_BUSY 0x0001 +#define FILE_SCANNED 0x0002 +#define FILE_PRINTED 0x0004 + +typedef enum tristate { + no, mod, yes +} tristate; + +enum expr_type { + E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_CHOICE, E_SYMBOL, E_RANGE +}; + +union expr_data { + struct expr *expr; + struct symbol *sym; +}; + +struct expr { + enum expr_type type; + union expr_data left, right; +}; + +#define E_OR(dep1, dep2) (((dep1)>(dep2))?(dep1):(dep2)) +#define E_AND(dep1, dep2) (((dep1)<(dep2))?(dep1):(dep2)) +#define E_NOT(dep) (2-(dep)) + +struct expr_value { + struct expr *expr; + tristate tri; +}; + +struct symbol_value { + void *val; + tristate tri; +}; + +enum symbol_type { + S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER +}; + +struct symbol { + struct symbol *next; + char *name; + char *help; + enum symbol_type type; + struct symbol_value curr, user; + tristate visible; + int flags; + struct property *prop; + struct expr *dep, *dep2; + struct expr_value rev_dep; + struct expr_value rev_dep_inv; +}; + +#define for_all_symbols(i, sym) for (i = 0; i < 257; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER) + +#define SYMBOL_YES 0x0001 +#define SYMBOL_MOD 0x0002 +#define SYMBOL_NO 0x0004 +#define SYMBOL_CONST 0x0007 +#define SYMBOL_CHECK 0x0008 +#define SYMBOL_CHOICE 0x0010 +#define SYMBOL_CHOICEVAL 0x0020 +#define SYMBOL_PRINTED 0x0040 +#define SYMBOL_VALID 0x0080 +#define SYMBOL_OPTIONAL 0x0100 +#define SYMBOL_WRITE 0x0200 +#define SYMBOL_CHANGED 0x0400 +#define SYMBOL_NEW 0x0800 +#define SYMBOL_AUTO 0x1000 +#define SYMBOL_CHECKED 0x2000 +#define SYMBOL_CHECK_DONE 0x4000 +#define SYMBOL_WARNED 0x8000 + +#define SYMBOL_MAXLENGTH 256 +#define SYMBOL_HASHSIZE 257 +#define SYMBOL_HASHMASK 0xff + +enum prop_type { + P_UNKNOWN, P_PROMPT, P_COMMENT, P_MENU, P_DEFAULT, P_CHOICE, P_SELECT, P_SELECTNOT, P_RANGE +}; + +struct property { + struct property *next; + struct symbol *sym; + enum prop_type type; + const char *text; + struct expr_value visible; + struct expr *expr; + struct menu *menu; + struct file *file; + int lineno; +}; + +#define for_all_properties(sym, st, tok) \ + for (st = sym->prop; st; st = st->next) \ + if (st->type == (tok)) +#define for_all_defaults(sym, st) for_all_properties(sym, st, P_DEFAULT) +#define for_all_choices(sym, st) for_all_properties(sym, st, P_CHOICE) +#define for_all_prompts(sym, st) \ + for (st = sym->prop; st; st = st->next) \ + if (st->text) + +struct menu { + struct menu *next; + struct menu *parent; + struct menu *list; + struct symbol *sym; + struct property *prompt; + struct expr *dep; + unsigned int flags; + //char *help; + struct file *file; + int lineno; + void *data; +}; + +#define MENU_CHANGED 0x0001 +#define MENU_ROOT 0x0002 + +#ifndef SWIG + +extern struct file *file_list; +extern struct file *current_file; +struct file *lookup_file(const char *name); + +extern struct symbol symbol_yes, symbol_no, symbol_mod; +extern struct symbol *modules_sym; +extern int cdebug; +struct expr *expr_alloc_symbol(struct symbol *sym); +struct expr *expr_alloc_one(enum expr_type type, struct expr *ce); +struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2); +struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2); +struct expr *expr_alloc_and(struct expr *e1, struct expr *e2); +struct expr *expr_alloc_or(struct expr *e1, struct expr *e2); +struct expr *expr_copy(struct expr *org); +void expr_free(struct expr *e); +int expr_eq(struct expr *e1, struct expr *e2); +void expr_eliminate_eq(struct expr **ep1, struct expr **ep2); +tristate expr_calc_value(struct expr *e); +struct expr *expr_eliminate_yn(struct expr *e); +struct expr *expr_trans_bool(struct expr *e); +struct expr *expr_eliminate_dups(struct expr *e); +struct expr *expr_transform(struct expr *e); +int expr_contains_symbol(struct expr *dep, struct symbol *sym); +bool expr_depends_symbol(struct expr *dep, struct symbol *sym); +struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2); +struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2); +void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2); +struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym); + +void expr_fprint(struct expr *e, FILE *out); + +static inline int expr_is_yes(struct expr *e) +{ + return !e || (e->type == E_SYMBOL && e->left.sym == &symbol_yes); +} + +static inline int expr_is_no(struct expr *e) +{ + return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no); +} +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* EXPR_H */ diff --git a/config/glob.c b/config/glob.c new file mode 100644 index 000000000..b8928b1b6 --- /dev/null +++ b/config/glob.c @@ -0,0 +1,848 @@ +/* $OpenBSD: glob.c,v 1.25 2005/08/08 08:05:34 espie Exp $ */ +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Guido van Rossum. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * glob(3) -- a superset of the one defined in POSIX 1003.2. + * + * The [!...] convention to negate a range is supported (SysV, Posix, ksh). + * + * Optional extra services, controlled by flags not defined by POSIX: + * + * GLOB_QUOTE: + * Escaping convention: \ inhibits any special meaning the following + * character might have (except \ at end of string is retained). + * GLOB_MAGCHAR: + * Set in gl_flags if pattern contained a globbing character. + * GLOB_NOMAGIC: + * Same as GLOB_NOCHECK, but it will only append pattern if it did + * not contain any magic characters. [Used in csh style globbing] + * GLOB_ALTDIRFUNC: + * Use alternately specified directory access functions. + * GLOB_TILDE: + * expand ~user/foo to the /home/dir/of/user/foo + * GLOB_BRACE: + * expand {1,2}{a,b} to 1a 1b 2a 2b + * gl_matchc: + * Number of matches in the current invocation of glob. + */ + +#ifdef __APPLE__ +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DOLLAR '$' +#define DOT '.' +#define EOS '\0' +#define LBRACKET '[' +#define NOT '!' +#define QUESTION '?' +#define QUOTE '\\' +#define RANGE '-' +#define RBRACKET ']' +#define SEP '/' +#define STAR '*' +#define TILDE '~' +#define UNDERSCORE '_' +#define LBRACE '{' +#define RBRACE '}' +#define SLASH '/' +#define COMMA ',' + +#ifndef DEBUG + +#define M_QUOTE 0x8000 +#define M_PROTECT 0x4000 +#define M_MASK 0xffff +#define M_ASCII 0x00ff + +typedef u_short Char; + +#else + +#define M_QUOTE 0x80 +#define M_PROTECT 0x40 +#define M_MASK 0xff +#define M_ASCII 0x7f + +typedef char Char; + +#endif + + +#define CHAR(c) ((Char)((c)&M_ASCII)) +#define META(c) ((Char)((c)|M_QUOTE)) +#define M_ALL META('*') +#define M_END META(']') +#define M_NOT META('!') +#define M_ONE META('?') +#define M_RNG META('-') +#define M_SET META('[') +#define ismeta(c) (((c)&M_QUOTE) != 0) + + +static int compare(const void *, const void *); +static int g_Ctoc(const Char *, char *, u_int); +static int g_lstat(Char *, struct stat *, glob_t *); +static DIR *g_opendir(Char *, glob_t *); +static const Char *g_strchr(const Char *, int); +static int g_stat(Char *, struct stat *, glob_t *); +static int glob0(const Char *, glob_t *); +static int glob1(Char *, Char *, glob_t *, size_t *); +static int glob2(Char *, Char *, Char *, Char *, Char *, Char *, + glob_t *, size_t *); +static int glob3(Char *, Char *, Char *, Char *, Char *, Char *, + Char *, Char *, glob_t *, size_t *); +static int globextend(const Char *, glob_t *, size_t *); +static const Char * + globtilde(const Char *, Char *, size_t, glob_t *); +static int globexp1(const Char *, glob_t *); +static int globexp2(const Char *, const Char *, glob_t *, int *); +static int match(Char *, Char *, Char *); +#ifdef DEBUG +static void qprintf(const char *, Char *); +#endif + +int +glob(const char *pattern, int flags, int (*errfunc)(const char *, int), + glob_t *pglob) +{ + const u_char *patnext; + int c; + Char *bufnext, *bufend, patbuf[MAXPATHLEN]; + + patnext = (const u_char *) pattern; + if (!(flags & GLOB_APPEND)) { + pglob->gl_pathc = 0; + pglob->gl_pathv = NULL; + if (!(flags & GLOB_DOOFFS)) + pglob->gl_offs = 0; + } + pglob->gl_flags = flags & ~GLOB_MAGCHAR; + pglob->gl_errfunc = errfunc; + pglob->gl_matchc = 0; + + bufnext = patbuf; + bufend = bufnext + MAXPATHLEN - 1; + if (flags & GLOB_NOESCAPE) + while (bufnext < bufend && (c = *patnext++) != EOS) + *bufnext++ = c; + else { + /* Protect the quoted characters. */ + while (bufnext < bufend && (c = *patnext++) != EOS) + if (c == QUOTE) { + if ((c = *patnext++) == EOS) { + c = QUOTE; + --patnext; + } + *bufnext++ = c | M_PROTECT; + } else + *bufnext++ = c; + } + *bufnext = EOS; + + if (flags & GLOB_BRACE) + return globexp1(patbuf, pglob); + else + return glob0(patbuf, pglob); +} + +/* + * Expand recursively a glob {} pattern. When there is no more expansion + * invoke the standard globbing routine to glob the rest of the magic + * characters + */ +static int +globexp1(const Char *pattern, glob_t *pglob) +{ + const Char* ptr = pattern; + int rv; + + /* Protect a single {}, for find(1), like csh */ + if (pattern[0] == LBRACE && pattern[1] == RBRACE && pattern[2] == EOS) + return glob0(pattern, pglob); + + while ((ptr = g_strchr(ptr, LBRACE)) != NULL) + if (!globexp2(ptr, pattern, pglob, &rv)) + return rv; + + return glob0(pattern, pglob); +} + + +/* + * Recursive brace globbing helper. Tries to expand a single brace. + * If it succeeds then it invokes globexp1 with the new pattern. + * If it fails then it tries to glob the rest of the pattern and returns. + */ +static int +globexp2(const Char *ptr, const Char *pattern, glob_t *pglob, int *rv) +{ + int i; + Char *lm, *ls; + const Char *pe, *pm, *pl; + Char patbuf[MAXPATHLEN]; + + /* copy part up to the brace */ + for (lm = patbuf, pm = pattern; pm != ptr; *lm++ = *pm++) + ; + *lm = EOS; + ls = lm; + + /* Find the balanced brace */ + for (i = 0, pe = ++ptr; *pe; pe++) + if (*pe == LBRACKET) { + /* Ignore everything between [] */ + for (pm = pe++; *pe != RBRACKET && *pe != EOS; pe++) + ; + if (*pe == EOS) { + /* + * We could not find a matching RBRACKET. + * Ignore and just look for RBRACE + */ + pe = pm; + } + } else if (*pe == LBRACE) + i++; + else if (*pe == RBRACE) { + if (i == 0) + break; + i--; + } + + /* Non matching braces; just glob the pattern */ + if (i != 0 || *pe == EOS) { + *rv = glob0(patbuf, pglob); + return 0; + } + + for (i = 0, pl = pm = ptr; pm <= pe; pm++) { + switch (*pm) { + case LBRACKET: + /* Ignore everything between [] */ + for (pl = pm++; *pm != RBRACKET && *pm != EOS; pm++) + ; + if (*pm == EOS) { + /* + * We could not find a matching RBRACKET. + * Ignore and just look for RBRACE + */ + pm = pl; + } + break; + + case LBRACE: + i++; + break; + + case RBRACE: + if (i) { + i--; + break; + } + /* FALLTHROUGH */ + case COMMA: + if (i && *pm == COMMA) + break; + else { + /* Append the current string */ + for (lm = ls; (pl < pm); *lm++ = *pl++) + ; + + /* + * Append the rest of the pattern after the + * closing brace + */ + for (pl = pe + 1; (*lm++ = *pl++) != EOS; ) + ; + + /* Expand the current pattern */ +#ifdef DEBUG + qprintf("globexp2:", patbuf); +#endif + *rv = globexp1(patbuf, pglob); + + /* move after the comma, to the next string */ + pl = pm + 1; + } + break; + + default: + break; + } + } + *rv = 0; + return 0; +} + + + +/* + * expand tilde from the passwd file. + */ +static const Char * +globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob) +{ + struct passwd *pwd; + char *h; + const Char *p; + Char *b, *eb; + + if (*pattern != TILDE || !(pglob->gl_flags & GLOB_TILDE)) + return pattern; + + /* Copy up to the end of the string or / */ + eb = &patbuf[patbuf_len - 1]; + for (p = pattern + 1, h = (char *) patbuf; + h < (char *)eb && *p && *p != SLASH; *h++ = *p++) + ; + + *h = EOS; + +#if 0 + if (h == (char *)eb) + return what; +#endif + + if (((char *) patbuf)[0] == EOS) { + /* + * handle a plain ~ or ~/ by expanding $HOME + * first and then trying the password file + */ + if (issetugid() != 0 || (h = getenv("HOME")) == NULL) { + if ((pwd = getpwuid(getuid())) == NULL) + return pattern; + else + h = pwd->pw_dir; + } + } else { + /* + * Expand a ~user + */ + if ((pwd = getpwnam((char*) patbuf)) == NULL) + return pattern; + else + h = pwd->pw_dir; + } + + /* Copy the home directory */ + for (b = patbuf; b < eb && *h; *b++ = *h++) + ; + + /* Append the rest of the pattern */ + while (b < eb && (*b++ = *p++) != EOS) + ; + *b = EOS; + + return patbuf; +} + + +/* + * The main glob() routine: compiles the pattern (optionally processing + * quotes), calls glob1() to do the real pattern matching, and finally + * sorts the list (unless unsorted operation is requested). Returns 0 + * if things went well, nonzero if errors occurred. It is not an error + * to find no matches. + */ +static int +glob0(const Char *pattern, glob_t *pglob) +{ + const Char *qpatnext; + int c, err, oldpathc; + Char *bufnext, patbuf[MAXPATHLEN]; + size_t limit = 0; + + qpatnext = globtilde(pattern, patbuf, MAXPATHLEN, pglob); + oldpathc = pglob->gl_pathc; + bufnext = patbuf; + + /* We don't need to check for buffer overflow any more. */ + while ((c = *qpatnext++) != EOS) { + switch (c) { + case LBRACKET: + c = *qpatnext; + if (c == NOT) + ++qpatnext; + if (*qpatnext == EOS || + g_strchr(qpatnext+1, RBRACKET) == NULL) { + *bufnext++ = LBRACKET; + if (c == NOT) + --qpatnext; + break; + } + *bufnext++ = M_SET; + if (c == NOT) + *bufnext++ = M_NOT; + c = *qpatnext++; + do { + *bufnext++ = CHAR(c); + if (*qpatnext == RANGE && + (c = qpatnext[1]) != RBRACKET) { + *bufnext++ = M_RNG; + *bufnext++ = CHAR(c); + qpatnext += 2; + } + } while ((c = *qpatnext++) != RBRACKET); + pglob->gl_flags |= GLOB_MAGCHAR; + *bufnext++ = M_END; + break; + case QUESTION: + pglob->gl_flags |= GLOB_MAGCHAR; + *bufnext++ = M_ONE; + break; + case STAR: + pglob->gl_flags |= GLOB_MAGCHAR; + /* collapse adjacent stars to one, + * to avoid exponential behavior + */ + if (bufnext == patbuf || bufnext[-1] != M_ALL) + *bufnext++ = M_ALL; + break; + default: + *bufnext++ = CHAR(c); + break; + } + } + *bufnext = EOS; +#ifdef DEBUG + qprintf("glob0:", patbuf); +#endif + + if ((err = glob1(patbuf, patbuf+MAXPATHLEN-1, pglob, &limit)) != 0) + return(err); + + /* + * If there was no match we are going to append the pattern + * if GLOB_NOCHECK was specified or if GLOB_NOMAGIC was specified + * and the pattern did not contain any magic characters + * GLOB_NOMAGIC is there just for compatibility with csh. + */ + if (pglob->gl_pathc == oldpathc) { + if ((pglob->gl_flags & GLOB_NOCHECK) || + ((pglob->gl_flags & GLOB_NOMAGIC) && + !(pglob->gl_flags & GLOB_MAGCHAR))) + return(globextend(pattern, pglob, &limit)); + else + return(GLOB_NOMATCH); + } + if (!(pglob->gl_flags & GLOB_NOSORT)) + qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc, + pglob->gl_pathc - oldpathc, sizeof(char *), compare); + return(0); +} + +static int +compare(const void *p, const void *q) +{ + return(strcmp(*(char *const *)p, *(char *const *)q)); +} + +static int +glob1(Char *pattern, Char *pattern_last, glob_t *pglob, size_t *limitp) +{ + Char pathbuf[MAXPATHLEN]; + + /* A null pathname is invalid -- POSIX 1003.1 sect. 2.4. */ + if (*pattern == EOS) + return(0); + return(glob2(pathbuf, pathbuf+MAXPATHLEN-1, + pathbuf, pathbuf+MAXPATHLEN-1, + pattern, pattern_last, pglob, limitp)); +} + +/* + * The functions glob2 and glob3 are mutually recursive; there is one level + * of recursion for each segment in the pattern that contains one or more + * meta characters. + */ +static int +glob2(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last, + Char *pattern, Char *pattern_last, glob_t *pglob, size_t *limitp) +{ + struct stat sb; + Char *p, *q; + int anymeta; + + /* + * Loop over pattern segments until end of pattern or until + * segment with meta character found. + */ + for (anymeta = 0;;) { + if (*pattern == EOS) { /* End of pattern? */ + *pathend = EOS; + if (g_lstat(pathbuf, &sb, pglob)) + return(0); + + if (((pglob->gl_flags & GLOB_MARK) && + pathend[-1] != SEP) && (S_ISDIR(sb.st_mode) || + (S_ISLNK(sb.st_mode) && + (g_stat(pathbuf, &sb, pglob) == 0) && + S_ISDIR(sb.st_mode)))) { + if (pathend+1 > pathend_last) + return (1); + *pathend++ = SEP; + *pathend = EOS; + } + ++pglob->gl_matchc; + return(globextend(pathbuf, pglob, limitp)); + } + + /* Find end of next segment, copy tentatively to pathend. */ + q = pathend; + p = pattern; + while (*p != EOS && *p != SEP) { + if (ismeta(*p)) + anymeta = 1; + if (q+1 > pathend_last) + return (1); + *q++ = *p++; + } + + if (!anymeta) { /* No expansion, do next segment. */ + pathend = q; + pattern = p; + while (*pattern == SEP) { + if (pathend+1 > pathend_last) + return (1); + *pathend++ = *pattern++; + } + } else + /* Need expansion, recurse. */ + return(glob3(pathbuf, pathbuf_last, pathend, + pathend_last, pattern, pattern_last, + p, pattern_last, pglob, limitp)); + } + /* NOTREACHED */ +} + +static int +glob3(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last, + Char *pattern, Char *pattern_last __attribute__((unused)), Char *restpattern, + Char *restpattern_last, glob_t *pglob, size_t *limitp) +{ + struct dirent *dp; + DIR *dirp; + int err; + char buf[MAXPATHLEN]; + + /* + * The readdirfunc declaration can't be prototyped, because it is + * assigned, below, to two functions which are prototyped in glob.h + * and dirent.h as taking pointers to differently typed opaque + * structures. + */ + struct dirent *(*readdirfunc)(void *); + + if (pathend > pathend_last) + return (1); + *pathend = EOS; + errno = 0; + + if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { + /* TODO: don't call for ENOENT or ENOTDIR? */ + if (pglob->gl_errfunc) { + if (g_Ctoc(pathbuf, buf, sizeof(buf))) + return(GLOB_ABORTED); + if (pglob->gl_errfunc(buf, errno) || + pglob->gl_flags & GLOB_ERR) + return(GLOB_ABORTED); + } + return(0); + } + + err = 0; + + /* Search directory for matching names. */ + if (pglob->gl_flags & GLOB_ALTDIRFUNC) + readdirfunc = pglob->gl_readdir; + else + readdirfunc = (struct dirent *(*)(void *))readdir; + while ((dp = (*readdirfunc)(dirp))) { + u_char *sc; + Char *dc; + + /* Initial DOT must be matched literally. */ + if (dp->d_name[0] == DOT && *pattern != DOT) + continue; + dc = pathend; + sc = (u_char *) dp->d_name; + while (dc < pathend_last && (*dc++ = *sc++) != EOS) + ; + if (dc >= pathend_last) { + *dc = EOS; + err = 1; + break; + } + + if (!match(pathend, pattern, restpattern)) { + *pathend = EOS; + continue; + } + err = glob2(pathbuf, pathbuf_last, --dc, pathend_last, + restpattern, restpattern_last, pglob, limitp); + if (err) + break; + } + + if (pglob->gl_flags & GLOB_ALTDIRFUNC) + (*pglob->gl_closedir)(dirp); + else + closedir(dirp); + return(err); +} + + +/* + * Extend the gl_pathv member of a glob_t structure to accommodate a new item, + * add the new item, and update gl_pathc. + * + * This assumes the BSD realloc, which only copies the block when its size + * crosses a power-of-two boundary; for v7 realloc, this would cause quadratic + * behavior. + * + * Return 0 if new item added, error code if memory couldn't be allocated. + * + * Invariant of the glob_t structure: + * Either gl_pathc is zero and gl_pathv is NULL; or gl_pathc > 0 and + * gl_pathv points to (gl_offs + gl_pathc + 1) items. + */ +static int +globextend(const Char *path, glob_t *pglob, size_t *limitp) +{ + char **pathv; + int i; + u_int newsize, len; + char *copy; + const Char *p; + + newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs); + pathv = pglob->gl_pathv ? realloc((char *)pglob->gl_pathv, newsize) : + malloc(newsize); + if (pathv == NULL) { + if (pglob->gl_pathv) { + free(pglob->gl_pathv); + pglob->gl_pathv = NULL; + } + return(GLOB_NOSPACE); + } + + if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) { + /* first time around -- clear initial gl_offs items */ + pathv += pglob->gl_offs; + for (i = pglob->gl_offs; --i >= 0; ) + *--pathv = NULL; + } + pglob->gl_pathv = pathv; + + for (p = path; *p++;) + ; + len = (size_t)(p - path); + *limitp += len; + if ((copy = malloc(len)) != NULL) { + if (g_Ctoc(path, copy, len)) { + free(copy); + return(GLOB_NOSPACE); + } + pathv[pglob->gl_offs + pglob->gl_pathc++] = copy; + } + pathv[pglob->gl_offs + pglob->gl_pathc] = NULL; + + if ((pglob->gl_flags & GLOB_LIMIT) && + newsize + *limitp >= ARG_MAX) { + errno = 0; + return(GLOB_NOSPACE); + } + + return(copy == NULL ? GLOB_NOSPACE : 0); +} + + +/* + * pattern matching function for filenames. Each occurrence of the * + * pattern causes a recursion level. + */ +static int +match(Char *name, Char *pat, Char *patend) +{ + int ok, negate_range; + Char c, k; + + while (pat < patend) { + c = *pat++; + switch (c & M_MASK) { + case M_ALL: + if (pat == patend) + return(1); + do { + if (match(name, pat, patend)) + return(1); + } while (*name++ != EOS); + return(0); + case M_ONE: + if (*name++ == EOS) + return(0); + break; + case M_SET: + ok = 0; + if ((k = *name++) == EOS) + return(0); + if ((negate_range = ((*pat & M_MASK) == M_NOT)) != EOS) + ++pat; + while (((c = *pat++) & M_MASK) != M_END) + if ((*pat & M_MASK) == M_RNG) { + if (c <= k && k <= pat[1]) + ok = 1; + pat += 2; + } else if (c == k) + ok = 1; + if (ok == negate_range) + return(0); + break; + default: + if (*name++ != c) + return(0); + break; + } + } + return(*name == EOS); +} + +/* Free allocated data belonging to a glob_t structure. */ +void +globfree(glob_t *pglob) +{ + int i; + char **pp; + + if (pglob->gl_pathv != NULL) { + pp = pglob->gl_pathv + pglob->gl_offs; + for (i = pglob->gl_pathc; i--; ++pp) + if (*pp) + free(*pp); + free(pglob->gl_pathv); + pglob->gl_pathv = NULL; + } +} + +static DIR * +g_opendir(Char *str, glob_t *pglob) +{ + char buf[MAXPATHLEN]; + + if (!*str) + strlcpy(buf, ".", sizeof buf); + else { + if (g_Ctoc(str, buf, sizeof(buf))) + return(NULL); + } + + if (pglob->gl_flags & GLOB_ALTDIRFUNC) + return((*pglob->gl_opendir)(buf)); + + return(opendir(buf)); +} + +static int +g_lstat(Char *fn, struct stat *sb, glob_t *pglob) +{ + char buf[MAXPATHLEN]; + + if (g_Ctoc(fn, buf, sizeof(buf))) + return(-1); + if (pglob->gl_flags & GLOB_ALTDIRFUNC) + return((*pglob->gl_lstat)(buf, sb)); + return(lstat(buf, sb)); +} + +static int +g_stat(Char *fn, struct stat *sb, glob_t *pglob) +{ + char buf[MAXPATHLEN]; + + if (g_Ctoc(fn, buf, sizeof(buf))) + return(-1); + if (pglob->gl_flags & GLOB_ALTDIRFUNC) + return((*pglob->gl_stat)(buf, sb)); + return(stat(buf, sb)); +} + +static const Char * +g_strchr(const Char *str, int ch) +{ + do { + if (*str == ch) + return (str); + } while (*str++); + return (NULL); +} + +static int +g_Ctoc(const Char *str, char *buf, u_int len) +{ + + while (len--) { + if ((*buf++ = *str++) == EOS) + return (0); + } + return (1); +} + +#ifdef DEBUG +static void +qprintf(const char *str, Char *s) +{ + Char *p; + + (void)printf("%s:\n", str); + for (p = s; *p; p++) + (void)printf("%c", CHAR(*p)); + (void)printf("\n"); + for (p = s; *p; p++) + (void)printf("%c", *p & M_PROTECT ? '"' : ' '); + (void)printf("\n"); + for (p = s; *p; p++) + (void)printf("%c", ismeta(*p) ? '_' : ' '); + (void)printf("\n"); +} +#endif +#endif diff --git a/config/glob.h b/config/glob.h new file mode 100644 index 000000000..15ade2a04 --- /dev/null +++ b/config/glob.h @@ -0,0 +1,100 @@ +/* $OpenBSD: glob.h,v 1.9 2004/10/07 16:56:11 millert Exp $ */ +/* $NetBSD: glob.h,v 1.5 1994/10/26 00:55:56 cgd Exp $ */ + +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Guido van Rossum. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)glob.h 8.1 (Berkeley) 6/2/93 + */ + +#ifndef __APPLE__ +#include_next +#else +#ifndef _GLOB_H_ +#define _GLOB_H_ + +#include + +struct stat; +typedef struct { + int gl_pathc; /* Count of total paths so far. */ + int gl_matchc; /* Count of paths matching pattern. */ + int gl_offs; /* Reserved at beginning of gl_pathv. */ + int gl_flags; /* Copy of flags parameter to glob. */ + char **gl_pathv; /* List of paths matching pattern. */ + /* Copy of errfunc parameter to glob. */ + int (*gl_errfunc)(const char *, int); + + /* + * Alternate filesystem access methods for glob; replacement + * versions of closedir(3), readdir(3), opendir(3), stat(2) + * and lstat(2). + */ + void (*gl_closedir)(void *); + struct dirent *(*gl_readdir)(void *); + void *(*gl_opendir)(const char *); + int (*gl_lstat)(const char *, struct stat *); + int (*gl_stat)(const char *, struct stat *); +} glob_t; + +/* Flags */ +#define GLOB_APPEND 0x0001 /* Append to output from previous call. */ +#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */ +#define GLOB_ERR 0x0004 /* Return on error. */ +#define GLOB_MARK 0x0008 /* Append / to matching directories. */ +#define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */ +#define GLOB_NOSORT 0x0020 /* Don't sort. */ +#define GLOB_NOESCAPE 0x1000 /* Disable backslash escaping. */ + +#ifndef _POSIX_SOURCE +#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */ +#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */ +#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */ +#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */ +#define GLOB_QUOTE 0x0400 /* Quote special chars with \. */ +#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */ +#define GLOB_LIMIT 0x2000 /* Limit pattern match output to ARG_MAX */ +#endif + +/* Error values returned by glob(3) */ +#define GLOB_NOSPACE (-1) /* Malloc call failed. */ +#define GLOB_ABORTED (-2) /* Unignored error. */ +#define GLOB_NOMATCH (-3) /* No match and GLOB_NOCHECK not set. */ +#define GLOB_NOSYS (-4) /* Function not supported. */ +#define GLOB_ABEND GLOB_ABORTED + +__BEGIN_DECLS +int glob(const char *, int, int (*)(const char *, int), glob_t *); +void globfree(glob_t *); +__END_DECLS + +#endif /* !_GLOB_H_ */ +#endif diff --git a/config/inputbox.c b/config/inputbox.c new file mode 100644 index 000000000..8c4c1ce99 --- /dev/null +++ b/config/inputbox.c @@ -0,0 +1,240 @@ +/* + * inputbox.c -- implements the input box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +unsigned char dialog_input_result[MAX_LEN + 1]; + +/* + * Print the termination buttons + */ +static void +print_buttons(WINDOW *dialog, int height, int width, int selected) +{ + int x = width / 2 - 11; + int y = height - 2; + + print_button (dialog, " Ok ", y, x, selected==0); + print_button (dialog, " Help ", y, x + 14, selected==1); + + wmove(dialog, y, x+1+14*selected); + wrefresh(dialog); +} + +/* + * Display a dialog box for inputing a string + */ +int +dialog_inputbox (const char *title, const char *prompt, int height, int width, + const char *init) +{ + int i, x, y, box_y, box_x, box_width; + int input_x = 0, scroll = 0, key = 0, button = -1; + char *instr = (char*)dialog_input_result; + WINDOW *dialog; + + /* center dialog box on screen */ + x = (COLS - width) / 2; + y = (LINES - height) / 2; + + + draw_shadow (stdscr, y, x, height, width); + + dialog = newwin (height, width, y, x); + keypad (dialog, TRUE); + + draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr); + wattrset (dialog, border_attr); + mvwaddch (dialog, height-3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch (dialog, ACS_HLINE); + wattrset (dialog, dialog_attr); + waddch (dialog, ACS_RTEE); + + if (title != NULL && strlen(title) >= width-2 ) { + /* truncate long title -- mec */ + char * title2 = malloc(width-2+1); + memcpy( title2, title, width-2 ); + title2[width-2] = '\0'; + title = title2; + } + + if (title != NULL) { + wattrset (dialog, title_attr); + mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); + waddstr (dialog, (char *)title); + waddch (dialog, ' '); + } + + wattrset (dialog, dialog_attr); + print_autowrap (dialog, prompt, width - 2, 1, 3); + + /* Draw the input field box */ + box_width = width - 6; + getyx (dialog, y, x); + box_y = y + 2; + box_x = (width - box_width) / 2; + draw_box (dialog, y + 1, box_x - 1, 3, box_width + 2, + border_attr, dialog_attr); + + print_buttons(dialog, height, width, 0); + + /* Set up the initial value */ + wmove (dialog, box_y, box_x); + wattrset (dialog, inputbox_attr); + + if (!init) + instr[0] = '\0'; + else + strcpy (instr, init); + + input_x = strlen (instr); + + if (input_x >= box_width) { + scroll = input_x - box_width + 1; + input_x = box_width - 1; + for (i = 0; i < box_width - 1; i++) + waddch (dialog, instr[scroll + i]); + } else + waddstr (dialog, instr); + + wmove (dialog, box_y, box_x + input_x); + + wrefresh (dialog); + + while (key != ESC) { + key = wgetch (dialog); + + if (button == -1) { /* Input box selected */ + switch (key) { + case TAB: + case KEY_UP: + case KEY_DOWN: + break; + case KEY_LEFT: + continue; + case KEY_RIGHT: + continue; + case KEY_BACKSPACE: + case 127: + if (input_x || scroll) { + wattrset (dialog, inputbox_attr); + if (!input_x) { + scroll = scroll < box_width - 1 ? + 0 : scroll - (box_width - 1); + wmove (dialog, box_y, box_x); + for (i = 0; i < box_width; i++) + waddch (dialog, instr[scroll + input_x + i] ? + instr[scroll + input_x + i] : ' '); + input_x = strlen (instr) - scroll; + } else + input_x--; + instr[scroll + input_x] = '\0'; + mvwaddch (dialog, box_y, input_x + box_x, ' '); + wmove (dialog, box_y, input_x + box_x); + wrefresh (dialog); + } + continue; + default: + if (key < 0x100 && isprint (key)) { + if (scroll + input_x < MAX_LEN) { + wattrset (dialog, inputbox_attr); + instr[scroll + input_x] = key; + instr[scroll + input_x + 1] = '\0'; + if (input_x == box_width - 1) { + scroll++; + wmove (dialog, box_y, box_x); + for (i = 0; i < box_width - 1; i++) + waddch (dialog, instr[scroll + i]); + } else { + wmove (dialog, box_y, input_x++ + box_x); + waddch (dialog, key); + } + wrefresh (dialog); + } else + flash (); /* Alarm user about overflow */ + continue; + } + } + } + switch (key) { + case 'O': + case 'o': + delwin (dialog); + return 0; + case 'H': + case 'h': + delwin (dialog); + return 1; + case KEY_UP: + case KEY_LEFT: + switch (button) { + case -1: + button = 1; /* Indicates "Cancel" button is selected */ + print_buttons(dialog, height, width, 1); + break; + case 0: + button = -1; /* Indicates input box is selected */ + print_buttons(dialog, height, width, 0); + wmove (dialog, box_y, box_x + input_x); + wrefresh (dialog); + break; + case 1: + button = 0; /* Indicates "OK" button is selected */ + print_buttons(dialog, height, width, 0); + break; + } + break; + case TAB: + case KEY_DOWN: + case KEY_RIGHT: + switch (button) { + case -1: + button = 0; /* Indicates "OK" button is selected */ + print_buttons(dialog, height, width, 0); + break; + case 0: + button = 1; /* Indicates "Cancel" button is selected */ + print_buttons(dialog, height, width, 1); + break; + case 1: + button = -1; /* Indicates input box is selected */ + print_buttons(dialog, height, width, 0); + wmove (dialog, box_y, box_x + input_x); + wrefresh (dialog); + break; + } + break; + case ' ': + case '\n': + delwin (dialog); + return (button == -1 ? 0 : button); + case 'X': + case 'x': + key = ESC; + case ESC: + break; + } + } + + delwin (dialog); + return -1; /* ESC pressed */ +} diff --git a/config/lex.backup b/config/lex.backup new file mode 100644 index 000000000..afb1b53c7 --- /dev/null +++ b/config/lex.backup @@ -0,0 +1 @@ +No backing up. diff --git a/config/lkc.h b/config/lkc.h new file mode 100644 index 000000000..dd040f7a8 --- /dev/null +++ b/config/lkc.h @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#ifndef LKC_H +#define LKC_H + +#include "expr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef LKC_DIRECT_LINK +#define P(name,type,arg) extern type name arg +#else +#include "lkc_defs.h" +#define P(name,type,arg) extern type (*name ## _p) arg +#endif +#include "lkc_proto.h" +#undef P + +#define SRCTREE "srctree" + +int zconfparse(void); +void zconfdump(FILE *out); + +extern int zconfdebug; +void zconf_starthelp(void); +FILE *zconf_fopen(const char *name); +void zconf_initscan(const char *name); +void zconf_nextfile(const char *name); +int zconf_lineno(void); +char *zconf_curname(void); + +/* confdata.c */ +extern const char conf_def_filename[]; +extern char conf_filename[]; + +char *conf_get_default_confname(void); + +/* kconfig_load.c */ +void kconfig_load(void); + +/* menu.c */ +void menu_init(void); +void menu_add_menu(void); +void menu_end_menu(void); +void menu_add_entry(struct symbol *sym); +void menu_end_entry(void); +void menu_add_dep(struct expr *dep); +struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep); +void menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); +void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); +void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); +void menu_finalize(struct menu *parent); +void menu_set_type(int type); +struct file *file_lookup(const char *name); +int file_write_dep(const char *name); + +extern struct menu *current_entry; +extern struct menu *current_menu; + +/* symbol.c */ +void sym_init(void); +void sym_clear_all_valid(void); +void sym_set_changed(struct symbol *sym); +struct symbol *sym_check_deps(struct symbol *sym); +struct property *prop_alloc(enum prop_type type, struct symbol *sym); +struct symbol *prop_get_symbol(struct property *prop); + +static inline tristate sym_get_tristate_value(struct symbol *sym) +{ + return sym->curr.tri; +} + + +static inline struct symbol *sym_get_choice_value(struct symbol *sym) +{ + return (struct symbol *)sym->curr.val; +} + +static inline bool sym_set_choice_value(struct symbol *ch, struct symbol *chval) +{ + return sym_set_tristate_value(chval, yes); +} + +static inline bool sym_is_choice(struct symbol *sym) +{ + return sym->flags & SYMBOL_CHOICE ? true : false; +} + +static inline bool sym_is_choice_value(struct symbol *sym) +{ + return sym->flags & SYMBOL_CHOICEVAL ? true : false; +} + +static inline bool sym_is_optional(struct symbol *sym) +{ + return sym->flags & SYMBOL_OPTIONAL ? true : false; +} + +static inline bool sym_has_value(struct symbol *sym) +{ + return sym->flags & SYMBOL_NEW ? false : true; +} + +#ifdef __cplusplus +} +#endif + +#endif /* LKC_H */ diff --git a/config/lkc_proto.h b/config/lkc_proto.h new file mode 100644 index 000000000..97c79178e --- /dev/null +++ b/config/lkc_proto.h @@ -0,0 +1,39 @@ + +/* confdata.c */ +P(conf_parse,void,(const char *name)); +P(conf_read,int,(const char *name)); +P(conf_write,int,(const char *name)); + +/* menu.c */ +P(rootmenu,struct menu,); + +P(menu_is_visible,bool,(struct menu *menu)); +P(menu_get_prompt,const char *,(struct menu *menu)); +P(menu_get_root_menu,struct menu *,(struct menu *menu)); +P(menu_get_parent_menu,struct menu *,(struct menu *menu)); + +/* symbol.c */ +P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); +P(sym_change_count,int,); + +P(sym_lookup,struct symbol *,(const char *name, int isconst)); +P(sym_find,struct symbol *,(const char *name)); +P(sym_type_name,const char *,(enum symbol_type type)); +P(sym_calc_value,void,(struct symbol *sym)); +P(sym_get_type,enum symbol_type,(struct symbol *sym)); +P(sym_tristate_within_range,bool,(struct symbol *sym,tristate tri)); +P(sym_set_tristate_value,bool,(struct symbol *sym,tristate tri)); +P(sym_toggle_tristate_value,tristate,(struct symbol *sym)); +P(sym_string_valid,bool,(struct symbol *sym, const char *newval)); +P(sym_string_within_range,bool,(struct symbol *sym, const char *str)); +P(sym_set_string_value,bool,(struct symbol *sym, const char *newval)); +P(sym_is_changable,bool,(struct symbol *sym)); +P(sym_get_choice_prop,struct property *,(struct symbol *sym)); +P(sym_get_default_prop,struct property *,(struct symbol *sym)); +P(sym_get_string_value,const char *,(struct symbol *sym)); + +P(prop_get_type_name,const char *,(enum prop_type type)); + +/* expr.c */ +P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2)); +P(expr_print,void,(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken)); diff --git a/config/mconf.c b/config/mconf.c new file mode 100644 index 000000000..878554245 --- /dev/null +++ b/config/mconf.c @@ -0,0 +1,717 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + * + * Introduced single menu mode (show all sub-menus in one large tree). + * 2002-11-06 Petr Baudis + * + * Directly use liblxdialog library routines. + * 2002-11-14 Petr Baudis + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dialog.h" + +#define LKC_DIRECT_LINK +#include "lkc.h" + +static char menu_backtitle[128]; +static const char menu_instructions[] = + "Arrow keys navigate the menu. " + " selects submenus --->. " + "Highlighted letters are hotkeys. " + "Pressing selectes a feature, while will exclude a feature. " + "Press to exit, for Help. " + "Legend: [*] feature is selected [ ] feature is excluded", +radiolist_instructions[] = + "Use the arrow keys to navigate this window or " + "press the hotkey of the item you wish to select " + "followed by the . " + "Press for additional information about this option.", +inputbox_instructions_int[] = + "Please enter a decimal value. " + "Fractions will not be accepted. " + "Use the key to move from the input field to the buttons below it.", +inputbox_instructions_hex[] = + "Please enter a hexadecimal value. " + "Use the key to move from the input field to the buttons below it.", +inputbox_instructions_string[] = + "Please enter a string value. " + "Use the key to move from the input field to the buttons below it.", +setmod_text[] = + "This feature depends on another which has been configured as a module.\n" + "As a result, this feature will be built as a module.", +nohelp_text[] = + "There is no help available for this option.\n", +load_config_text[] = + "Enter the name of the configuration file you wish to load. " + "Accept the name shown to restore the configuration you " + "last retrieved. Leave blank to abort.", +load_config_help[] = + "\n" + "For various reasons, one may wish to keep several different OpenADK\n" + "configurations available on a single machine.\n" + "\n" + "If you have saved a previous configuration in a file other than the\n" + "OpenADK's default, entering the name of the file here will allow you\n" + "to modify that configuration.\n" + "\n" + "If you are uncertain, then you have probably never used alternate\n" + "configuration files. You should therefor leave this blank to abort.\n", +save_config_text[] = + "Enter a filename to which this configuration should be saved " + "as an alternate. Leave blank to abort.", +save_config_help[] = + "\n" + "For various reasons, one may wish to keep different OpenADK\n" + "configurations available on a single machine.\n" + "\n" + "Entering a file name here will allow you to later retrieve, modify\n" + "and use the current configuration as an alternate to whatever\n" + "configuration options you have selected at that time.\n" + "\n" + "If you are uncertain what all this means then you should probably\n" + "leave this blank.\n", +top_menu_help[] = + "\n" + "Use the Up/Down arrow keys (cursor keys) to highlight the item\n" + "you wish to change or submenu wish to select and press .\n" + "Submenus are designated by \"--->\".\n" + "\n" + "Shortcut: Press the option's highlighted letter (hotkey).\n" + "\n" + "You may also use the and keys to scroll\n" + "unseen options into view.\n" +; + +static char filename[PATH_MAX+1] = ".config"; +static int indent = 0; +static struct termios ios_org; +static int rows, cols; +struct menu *current_menu; +static int child_count; +static int single_menu_mode; + +static struct dialog_list_item *items[16384]; /* FIXME: This ought to be dynamic. */ +static int item_no; + +static void conf(struct menu *menu); +static void conf_choice(struct menu *menu); +static void conf_string(struct menu *menu); +static void conf_load(void); +static void conf_save(void); +static void show_textbox(const char *title, const char *text, int r, int c); +static void show_helptext(const char *title, const char *text); +static void show_help(struct menu *menu); +static void show_readme(void); + +static void init_wsize(void) +{ + struct winsize ws; + char *env; + + if (ioctl(1, TIOCGWINSZ, &ws) == -1) { + rows = 24; + cols = 80; + } else { + rows = ws.ws_row; + cols = ws.ws_col; + if (!rows) { + env = getenv("LINES"); + if (env) + rows = atoi(env); + if (!rows) + rows = 24; + } + if (!cols) { + env = getenv("COLUMNS"); + if (env) + cols = atoi(env); + if (!cols) + cols = 80; + } + } + + if (rows < 19 || cols < 80) { + fprintf(stderr, "Your display is too small to run Menuconfig!\n"); + fprintf(stderr, "It must be at least 19 lines by 80 columns.\n"); + exit(1); + } + + rows -= 4; + cols -= 5; +} + +static void cinit(void) +{ + item_no = 0; +} + +static void cmake(void) +{ + items[item_no] = malloc(sizeof(struct dialog_list_item)); + memset(items[item_no], 0, sizeof(struct dialog_list_item)); + items[item_no]->tag = malloc(32); items[item_no]->tag[0] = 0; + items[item_no]->name = malloc(512); items[item_no]->name[0] = 0; + items[item_no]->namelen = 0; + item_no++; +} + +static int cprint_name(const char *fmt, ...) +{ + va_list ap; + int res; + + if (!item_no) + cmake(); + va_start(ap, fmt); + res = vsnprintf(items[item_no - 1]->name + items[item_no - 1]->namelen, + 512 - items[item_no - 1]->namelen, fmt, ap); + if (res > 0) + items[item_no - 1]->namelen += res; + va_end(ap); + + return res; +} + +static int cprint_tag(const char *fmt, ...) +{ + va_list ap; + int res; + + if (!item_no) + cmake(); + va_start(ap, fmt); + res = vsnprintf(items[item_no - 1]->tag, 32, fmt, ap); + va_end(ap); + + return res; +} + +static void cdone(void) +{ + int i; + + for (i = 0; i < item_no; i++) { + free(items[i]->tag); + free(items[i]->name); + free(items[i]); + } + + item_no = 0; +} + +static void build_conf(struct menu *menu) +{ + struct symbol *sym; + struct property *prop; + struct menu *child; + int type, tmp, doint = 2; + tristate val; + char ch; + + if (!menu_is_visible(menu)) + return; + + sym = menu->sym; + prop = menu->prompt; + if (!sym) { + if (prop && menu != current_menu) { + const char *prompt = menu_get_prompt(menu); + switch (prop->type) { + case P_MENU: + child_count++; + cmake(); + cprint_tag("m%p", menu); + + if (single_menu_mode) { + cprint_name("%s%*c%s", + menu->data ? "-->" : "++>", + indent + 1, ' ', prompt); + } else { + cprint_name(" %*c%s --->", indent + 1, ' ', prompt); + } + + if (single_menu_mode && menu->data) + goto conf_childs; + return; + default: + if (prompt) { + child_count++; + cmake(); + cprint_tag(":%p", menu); + cprint_name("---%*c%s", indent + 1, ' ', prompt); + } + } + } else + doint = 0; + goto conf_childs; + } + + cmake(); + type = sym_get_type(sym); + if (sym_is_choice(sym)) { + struct symbol *def_sym = sym_get_choice_value(sym); + struct menu *def_menu = NULL; + + child_count++; + for (child = menu->list; child; child = child->next) { + if (menu_is_visible(child) && child->sym == def_sym) + def_menu = child; + } + + val = sym_get_tristate_value(sym); + if (sym_is_changable(sym)) { + cprint_tag("t%p", menu); + switch (type) { + case S_BOOLEAN: + cprint_name("[%c]", val == no ? ' ' : '*'); + break; + case S_TRISTATE: + switch (val) { + case yes: ch = '*'; break; + case mod: ch = 'M'; break; + default: ch = ' '; break; + } + cprint_name("<%c>", ch); + break; + } + } else { + cprint_tag("%c%p", def_menu ? 't' : ':', menu); + cprint_name(" "); + } + + cprint_name("%*c%s", indent + 1, ' ', menu_get_prompt(menu)); + if (val == yes) { + if (def_menu) { + cprint_name(" (%s)", menu_get_prompt(def_menu)); + cprint_name(" --->"); + if (def_menu->list) { + indent += 2; + build_conf(def_menu); + indent -= 2; + } + } + return; + } + } else { + if (menu == current_menu) { + cprint_tag(":%p", menu); + cprint_name("---%*c%s", indent + 1, ' ', menu_get_prompt(menu)); + goto conf_childs; + } + + child_count++; + val = sym_get_tristate_value(sym); + if (sym_is_choice_value(sym) && val == yes) { + cprint_tag(":%p", menu); + cprint_name(" "); + } else { + switch (type) { + case S_BOOLEAN: + cprint_tag("t%p", menu); + if (sym_is_changable(sym)) + cprint_name("[%c]", val == no ? ' ' : '*'); + else + cprint_name(val == no ? "_ _" : "-+-"); + break; + case S_TRISTATE: + cprint_tag("t%p", menu); + switch (val) { + case yes: ch = '*'; break; + case mod: ch = 'M'; break; + default: ch = ' '; break; + } + if (sym_is_changable(sym)) + cprint_name("<%c>", ch); + else + cprint_name(val == no ? "_ _" : "-+-"); + break; + default: + cprint_tag("s%p", menu); + tmp = cprint_name("(%s)", sym_get_string_value(sym)); + tmp = indent - tmp + 4; + if (tmp < 0) + tmp = 0; + cprint_name("%*c%s%s", tmp, ' ', menu_get_prompt(menu), + (sym_has_value(sym) || !sym_is_changable(sym)) ? + "" : " (NEW)"); + goto conf_childs; + } + } + cprint_name("%*c%s%s", indent + 1, ' ', menu_get_prompt(menu), + (sym_has_value(sym) || !sym_is_changable(sym)) ? + "" : " (NEW)"); + if (menu->prompt->type == P_MENU) { + cprint_name(" --->"); + return; + } + } + +conf_childs: + indent += doint; + for (child = menu->list; child; child = child->next) + build_conf(child); + indent -= doint; +} + +static void conf(struct menu *menu) +{ + struct dialog_list_item *active_item = NULL; + struct menu *submenu; + const char *prompt = menu_get_prompt(menu); + struct symbol *sym; + char active_entry[40]; + int stat, type; + + unlink("lxdialog.scrltmp"); + active_entry[0] = 0; + while (1) { + indent = 0; + child_count = 0; + current_menu = menu; + cdone(); cinit(); + build_conf(menu); + if (!child_count) + break; + if (menu == &rootmenu) { + cmake(); cprint_tag(":"); cprint_name("--- "); + cmake(); cprint_tag("L"); cprint_name("Load an Alternate Configuration File"); + cmake(); cprint_tag("S"); cprint_name("Save Configuration to an Alternate File"); + } + dialog_clear(); + stat = dialog_menu(prompt ? prompt : "Main Menu", + menu_instructions, rows, cols, rows - 10, + active_entry, item_no, items); + if (stat < 0) + return; + + if (stat == 1 || stat == 255) + break; + + active_item = first_sel_item(item_no, items); + if (!active_item) + continue; + active_item->selected = 0; + strncpy(active_entry, active_item->tag, sizeof(active_entry)); + active_entry[sizeof(active_entry)-1] = 0; + type = active_entry[0]; + if (!type) + continue; + + sym = NULL; + submenu = NULL; + if (sscanf(active_entry + 1, "%p", &submenu) == 1) + sym = submenu->sym; + + switch (stat) { + case 0: + switch (type) { + case 'm': + if (single_menu_mode) + submenu->data = (void *) (long) !submenu->data; + else + conf(submenu); + break; + case 't': + if (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes) + conf_choice(submenu); + else if (submenu->prompt->type == P_MENU) + conf(submenu); + break; + case 's': + conf_string(submenu); + break; + case 'L': + conf_load(); + break; + case 'S': + conf_save(); + break; + } + break; + case 2: + if (sym) + show_help(submenu); + else + show_readme(); + break; + case 3: + if (type == 't') { + if (sym_set_tristate_value(sym, yes)) + break; + if (sym_set_tristate_value(sym, mod)) + show_textbox(NULL, setmod_text, 6, 74); + } + break; + case 4: + if (type == 't') + sym_set_tristate_value(sym, no); + break; + case 5: + if (type == 't') + sym_set_tristate_value(sym, mod); + break; + case 6: + if (type == 't') + sym_toggle_tristate_value(sym); + else if (type == 'm') + conf(submenu); + break; + } + } +} + +static void show_textbox(const char *title, const char *text, int r, int c) +{ + int fd; + + fd = creat(".help.tmp", 0777); + write(fd, text, strlen(text)); + close(fd); + while (dialog_textbox(title, ".help.tmp", r, c) < 0) + ; + unlink(".help.tmp"); +} + +static void show_helptext(const char *title, const char *text) +{ + show_textbox(title, text, rows, cols); +} + +static void show_help(struct menu *menu) +{ + const char *help; + char *helptext; + struct symbol *sym = menu->sym; + + help = sym->help; + if (!help) + help = nohelp_text; + if (sym->name) { + helptext = malloc(strlen(sym->name) + strlen(help) + 16); + sprintf(helptext, "%s:\n\n%s", sym->name, help); + show_helptext(menu_get_prompt(menu), helptext); + free(helptext); + } else + show_helptext(menu_get_prompt(menu), help); +} + +static void show_readme(void) +{ + show_helptext("Help", top_menu_help); +} + +static void conf_choice(struct menu *menu) +{ + const char *prompt = menu_get_prompt(menu); + struct menu *child; + struct symbol *active; + + active = sym_get_choice_value(menu->sym); + while (1) { + current_menu = menu; + cdone(); cinit(); + for (child = menu->list; child; child = child->next) { + if (!menu_is_visible(child)) + continue; + cmake(); + cprint_tag("%p", child); + cprint_name("%s", menu_get_prompt(child)); + if (child->sym == sym_get_choice_value(menu->sym)) + items[item_no - 1]->selected = 1; /* ON */ + else if (child->sym == active) + items[item_no - 1]->selected = 2; /* SELECTED */ + else + items[item_no - 1]->selected = 0; /* OFF */ + } + + switch (dialog_checklist(prompt ? prompt : "Main Menu", + radiolist_instructions, 15, 70, 6, + item_no, items, FLAG_RADIO)) { + case 0: + if (sscanf(first_sel_item(item_no, items)->tag, "%p", &child) != 1) + break; + sym_set_tristate_value(child->sym, yes); + return; + case 1: + if (sscanf(first_sel_item(item_no, items)->tag, "%p", &child) == 1) { + show_help(child); + active = child->sym; + } else + show_help(menu); + break; + case 255: + return; + } + } +} + +static void conf_string(struct menu *menu) +{ + const char *prompt = menu_get_prompt(menu); + + while (1) { + char *heading; + + switch (sym_get_type(menu->sym)) { + case S_INT: + heading = (char *) inputbox_instructions_int; + break; + case S_HEX: + heading = (char *) inputbox_instructions_hex; + break; + case S_STRING: + heading = (char *) inputbox_instructions_string; + break; + default: + heading = "Internal mconf error!"; + /* panic? */; + } + + switch (dialog_inputbox(prompt ? prompt : "Main Menu", + heading, 10, 75, + sym_get_string_value(menu->sym))) { + case 0: + if (sym_set_string_value(menu->sym, (const char*)dialog_input_result)) + return; + show_textbox(NULL, "You have made an invalid entry.", 5, 43); + break; + case 1: + show_help(menu); + break; + case 255: + return; + } + } +} + +static void conf_load(void) +{ + while (1) { + switch (dialog_inputbox(NULL, load_config_text, 11, 55, + filename)) { + case 0: + if (!dialog_input_result[0]) + return; + if (!conf_read((const char*)dialog_input_result)) + return; + show_textbox(NULL, "File does not exist!", 5, 38); + break; + case 1: + show_helptext("Load Alternate Configuration", load_config_help); + break; + case 255: + return; + } + } +} + +static void conf_save(void) +{ + while (1) { + switch (dialog_inputbox(NULL, save_config_text, 11, 55, + filename)) { + case 0: + if (!dialog_input_result[0]) + return; + if (!conf_write((const char*)dialog_input_result)) + return; + show_textbox(NULL, "Can't create file! Probably a nonexistent directory.", 5, 60); + break; + case 1: + show_helptext("Save Alternate Configuration", save_config_help); + break; + case 255: + return; + } + } +} + +static void conf_cleanup(void) +{ + tcsetattr(1, TCSAFLUSH, &ios_org); + unlink(".help.tmp"); +} + +static void winch_handler(int sig) +{ + struct winsize ws; + + if (ioctl(1, TIOCGWINSZ, &ws) == -1) { + rows = 24; + cols = 80; + } else { + rows = ws.ws_row; + cols = ws.ws_col; + } + + if (rows < 19 || cols < 80) { + end_dialog(); + fprintf(stderr, "Your display is too small to run Menuconfig!\n"); + fprintf(stderr, "It must be at least 19 lines by 80 columns.\n"); + exit(1); + } + + rows -= 4; + cols -= 5; + +} + +int main(int ac, char **av) +{ + int stat; + char *mode; + struct symbol *sym; + + conf_parse(av[1]); + conf_read(NULL); + + sym = sym_lookup("VERSION", 0); + sym_calc_value(sym); + snprintf(menu_backtitle, 128, "OpenADK v%s Configuration", + sym_get_string_value(sym)); + + mode = getenv("MENUCONFIG_MODE"); + if (mode) { + if (!strcasecmp(mode, "single_menu")) + single_menu_mode = 1; + } + + tcgetattr(1, &ios_org); + atexit(conf_cleanup); + init_wsize(); + init_dialog(); + signal(SIGWINCH, winch_handler); + conf(&rootmenu); + end_dialog(); + + /* Restart dialog to act more like when lxdialog was still separate */ + init_dialog(); + do { + stat = dialog_yesno(NULL, + "Do you wish to save your new OpenADK configuration?", 5, 60); + } while (stat < 0); + end_dialog(); + + if (stat == 0) { + conf_write(NULL); + printf("\n\n*** End of OpenADK configuration.\n"); + } else + printf("\n\nYour OpenADK configuration changes were NOT saved.\n\n"); + + return 0; +} diff --git a/config/menu.c b/config/menu.c new file mode 100644 index 000000000..f6e6200ce --- /dev/null +++ b/config/menu.c @@ -0,0 +1,436 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include + +#define LKC_DIRECT_LINK +#include "lkc.h" + +struct menu rootmenu; +struct menu *current_menu, *current_entry; +static struct menu **last_entry_ptr; + +struct file *file_list; +struct file *current_file; + +static void menu_warn(struct menu *menu, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + fprintf(stderr, "%s:%d:warning: ", menu->file->name, menu->lineno); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + va_end(ap); +} + +static void prop_warn(struct property *prop, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + fprintf(stderr, "%s:%d:warning: ", prop->file->name, prop->lineno); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + va_end(ap); +} + +void menu_init(void) +{ + current_entry = current_menu = &rootmenu; + last_entry_ptr = &rootmenu.list; +} + +void menu_add_entry(struct symbol *sym) +{ + struct menu *menu; + + menu = malloc(sizeof(*menu)); + memset(menu, 0, sizeof(*menu)); + menu->sym = sym; + menu->parent = current_menu; + menu->file = current_file; + menu->lineno = zconf_lineno(); + + *last_entry_ptr = menu; + last_entry_ptr = &menu->next; + current_entry = menu; +} + +void menu_end_entry(void) +{ +} + +void menu_add_menu(void) +{ + current_menu = current_entry; + last_entry_ptr = ¤t_entry->list; +} + +void menu_end_menu(void) +{ + last_entry_ptr = ¤t_menu->next; + current_menu = current_menu->parent; +} + +struct expr *menu_check_dep(struct expr *e) +{ + if (!e) + return e; + + switch (e->type) { + case E_NOT: + e->left.expr = menu_check_dep(e->left.expr); + break; + case E_OR: + case E_AND: + e->left.expr = menu_check_dep(e->left.expr); + e->right.expr = menu_check_dep(e->right.expr); + break; + case E_SYMBOL: + /* change 'm' into 'm' && MODULES */ + if (e->left.sym == &symbol_mod) + return expr_alloc_and(e, expr_alloc_symbol(modules_sym)); + break; + default: + break; + } + return e; +} + +void menu_add_dep(struct expr *dep) +{ + current_entry->dep = expr_alloc_and(current_entry->dep, menu_check_dep(dep)); +} + +void menu_set_type(int type) +{ + struct symbol *sym = current_entry->sym; + + if (sym->type == type) + return; + if (sym->type == S_UNKNOWN) { + sym->type = type; + return; + } + menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'\n", + sym->name ? sym->name : "", + sym_type_name(sym->type), sym_type_name(type)); +} + +struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep) +{ + struct property *prop = prop_alloc(type, current_entry->sym); + + prop->menu = current_entry; + prop->text = prompt; + prop->expr = expr; + prop->visible.expr = menu_check_dep(dep); + + if (prompt) { + if (current_entry->prompt) + menu_warn(current_entry, "prompt redefined\n"); + current_entry->prompt = prop; + } + + return prop; +} + +void menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep) +{ + menu_add_prop(type, prompt, NULL, dep); +} + +void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep) +{ + menu_add_prop(type, NULL, expr, dep); +} + +void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) +{ + menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep); +} + +void sym_check_prop(struct symbol *sym) +{ + struct property *prop; + struct symbol *sym2; + for (prop = sym->prop; prop; prop = prop->next) { + switch (prop->type) { + case P_DEFAULT: + if ((sym->type == S_STRING || sym->type == S_INT || sym->type == S_HEX) && + prop->expr->type != E_SYMBOL) + prop_warn(prop, + "default for config symbol '%'" + " must be a single symbol", sym->name); + break; + case P_SELECT: + case P_SELECTNOT: + sym2 = prop_get_symbol(prop); + if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE) + prop_warn(prop, + "config symbol '%s' uses select, but is " + "not boolean or tristate", sym->name); + else if (sym2->type == S_UNKNOWN) + prop_warn(prop, + "'select' used by config symbol '%s' " + "refer to undefined symbol '%s'", + sym->name, sym2->name); + else if (sym2->type != S_BOOLEAN && sym2->type != S_TRISTATE) + prop_warn(prop, + "'%s' has wrong type. 'select' only " + "accept arguments of boolean and " + "tristate type", sym2->name); + break; + case P_RANGE: + if (sym->type != S_INT && sym->type != S_HEX) + prop_warn(prop, "range is only allowed " + "for int or hex symbols"); + if (!sym_string_valid(sym, prop->expr->left.sym->name) || + !sym_string_valid(sym, prop->expr->right.sym->name)) + prop_warn(prop, "range is invalid"); + break; + default: + ; + } + } +} + +void menu_finalize(struct menu *parent) +{ + struct menu *menu, *last_menu; + struct symbol *sym; + struct property *prop; + struct expr *parentdep, *basedep, *dep, *dep2, **ep; + + sym = parent->sym; + if (parent->list) { + if (sym && sym_is_choice(sym)) { + /* find the first choice value and find out choice type */ + for (menu = parent->list; menu; menu = menu->next) { + if (menu->sym) { + current_entry = parent; + menu_set_type(menu->sym->type); + current_entry = menu; + menu_set_type(sym->type); + break; + } + } + parentdep = expr_alloc_symbol(sym); + } else if (parent->prompt) + parentdep = parent->prompt->visible.expr; + else + parentdep = parent->dep; + + for (menu = parent->list; menu; menu = menu->next) { + basedep = expr_transform(menu->dep); + basedep = expr_alloc_and(expr_copy(parentdep), basedep); + basedep = expr_eliminate_dups(basedep); + menu->dep = basedep; + if (menu->sym) + prop = menu->sym->prop; + else + prop = menu->prompt; + for (; prop; prop = prop->next) { + if (prop->menu != menu) + continue; + dep = expr_transform(prop->visible.expr); + dep = expr_alloc_and(expr_copy(basedep), dep); + dep = expr_eliminate_dups(dep); + if (menu->sym && menu->sym->type != S_TRISTATE) + dep = expr_trans_bool(dep); + prop->visible.expr = dep; + if (prop->type == P_SELECT) { + struct symbol *es = prop_get_symbol(prop); + es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr, + expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep))); + } else if (prop->type == P_SELECTNOT) { + struct symbol *es = prop_get_symbol(prop); + es->rev_dep_inv.expr = expr_alloc_or(es->rev_dep_inv.expr, + expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep))); + } + } + } + for (menu = parent->list; menu; menu = menu->next) + menu_finalize(menu); + } else if (sym) { + basedep = parent->prompt ? parent->prompt->visible.expr : NULL; + basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no); + basedep = expr_eliminate_dups(expr_transform(basedep)); + last_menu = NULL; + for (menu = parent->next; menu; menu = menu->next) { + dep = menu->prompt ? menu->prompt->visible.expr : menu->dep; + if (!expr_contains_symbol(dep, sym)) + break; + if (expr_depends_symbol(dep, sym)) + goto next; + dep = expr_trans_compare(dep, E_UNEQUAL, &symbol_no); + dep = expr_eliminate_dups(expr_transform(dep)); + dep2 = expr_copy(basedep); + expr_eliminate_eq(&dep, &dep2); + expr_free(dep); + if (!expr_is_yes(dep2)) { + expr_free(dep2); + break; + } + expr_free(dep2); + next: + menu_finalize(menu); + menu->parent = parent; + last_menu = menu; + } + if (last_menu) { + parent->list = parent->next; + parent->next = last_menu->next; + last_menu->next = NULL; + } + } + for (menu = parent->list; menu; menu = menu->next) { + if (sym && sym_is_choice(sym) && menu->sym) { + menu->sym->flags |= SYMBOL_CHOICEVAL; + if (!menu->prompt) + menu_warn(menu, "choice value must have a prompt"); + for (prop = menu->sym->prop; prop; prop = prop->next) { + if (prop->type == P_PROMPT && prop->menu != menu) { + prop_warn(prop, "choice values " + "currently only support a " + "single prompt"); + } + if (prop->type == P_DEFAULT) + prop_warn(prop, "defaults for choice " + "values not supported"); + } + current_entry = menu; + menu_set_type(sym->type); + menu_add_symbol(P_CHOICE, sym, NULL); + prop = sym_get_choice_prop(sym); + for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr) + ; + *ep = expr_alloc_one(E_CHOICE, NULL); + (*ep)->right.sym = menu->sym; + } + if (menu->list && (!menu->prompt || !menu->prompt->text)) { + for (last_menu = menu->list; ; last_menu = last_menu->next) { + last_menu->parent = parent; + if (!last_menu->next) + break; + } + last_menu->next = menu->next; + menu->next = menu->list; + menu->list = NULL; + } + } + + if (sym && !(sym->flags & SYMBOL_WARNED)) { + if (sym->type == S_UNKNOWN) + menu_warn(parent, "config symbol defined " + "without type\n"); + + if (sym_is_choice(sym) && !parent->prompt) + menu_warn(parent, "choice must have a prompt\n"); + + /* Check properties connected to this symbol */ + sym_check_prop(sym); + sym->flags |= SYMBOL_WARNED; + } + + if (sym && !sym_is_optional(sym) && parent->prompt) { + sym->rev_dep.expr = expr_alloc_or(sym->rev_dep.expr, + expr_alloc_and(parent->prompt->visible.expr, + expr_alloc_symbol(&symbol_mod))); + } +} + +bool menu_is_visible(struct menu *menu) +{ + struct menu *child; + struct symbol *sym; + tristate visible; + + if (!menu->prompt) + return false; + sym = menu->sym; + if (sym) { + sym_calc_value(sym); + visible = menu->prompt->visible.tri; + } else + visible = menu->prompt->visible.tri = expr_calc_value(menu->prompt->visible.expr); + + if (visible != no) + return true; + if (!sym || sym_get_tristate_value(menu->sym) == no) + return false; + + for (child = menu->list; child; child = child->next) + if (menu_is_visible(child)) + return true; + return false; +} + +const char *menu_get_prompt(struct menu *menu) +{ + if (menu->prompt) + return menu->prompt->text; + else if (menu->sym) + return menu->sym->name; + return NULL; +} + +struct menu *menu_get_root_menu(struct menu *menu) +{ + return &rootmenu; +} + +struct menu *menu_get_parent_menu(struct menu *menu) +{ + enum prop_type type; + + for (; menu != &rootmenu; menu = menu->parent) { + type = menu->prompt ? menu->prompt->type : 0; + if (type == P_MENU) + break; + } + return menu; +} + +struct file *file_lookup(const char *name) +{ + struct file *file; + + for (file = file_list; file; file = file->next) { + if (!strcmp(name, file->name)) + return file; + } + + file = malloc(sizeof(*file)); + memset(file, 0, sizeof(*file)); + file->name = strdup(name); + file->next = file_list; + file_list = file; + return file; +} + +int file_write_dep(const char *name) +{ + struct file *file; + FILE *out; + + if (!name) + name = ".config.cmd"; + out = fopen(".config.tmp", "w"); + if (!out) + return 1; + fprintf(out, "deps_config := \\\n"); + for (file = file_list; file; file = file->next) { + if (file->next) + fprintf(out, "\t%s \\\n", file->name); + else + fprintf(out, "\t%s\n", file->name); + } + fprintf(out, "\n.config include/config.h: $(deps_config)\n\n$(deps_config):\n"); + fclose(out); + rename(".config.tmp", name); + return 0; +} + diff --git a/config/menubox.c b/config/menubox.c new file mode 100644 index 000000000..c2fd755b4 --- /dev/null +++ b/config/menubox.c @@ -0,0 +1,438 @@ +/* + * menubox.c -- implements the menu box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcapw@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + * Changes by Clifford Wolf (god@clifford.at) + * + * [ 1998-06-13 ] + * + * *) A bugfix for the Page-Down problem + * + * *) Formerly when I used Page Down and Page Up, the cursor would be set + * to the first position in the menu box. Now lxdialog is a bit + * smarter and works more like other menu systems (just have a look at + * it). + * + * *) Formerly if I selected something my scrolling would be broken because + * lxdialog is re-invoked by the Menuconfig shell script, can't + * remember the last scrolling position, and just sets it so that the + * cursor is at the bottom of the box. Now it writes the temporary file + * lxdialog.scrltmp which contains this information. The file is + * deleted by lxdialog if the user leaves a submenu or enters a new + * one, but it would be nice if Menuconfig could make another "rm -f" + * just to be sure. Just try it out - you will recognise a difference! + * + * [ 1998-06-14 ] + * + * *) Now lxdialog is crash-safe against broken "lxdialog.scrltmp" files + * and menus change their size on the fly. + * + * *) If for some reason the last scrolling position is not saved by + * lxdialog, it sets the scrolling so that the selected item is in the + * middle of the menu box, not at the bottom. + * + * 02 January 1999, Michael Elizabeth Chastain (mec@shout.net) + * Reset 'scroll' to 0 if the value from lxdialog.scrltmp is bogus. + * This fixes a bug in Menuconfig where using ' ' to descend into menus + * would leave mis-synchronized lxdialog.scrltmp files lying around, + * fscanf would read in 'scroll', and eventually that value would get used. + */ + +#include "dialog.h" + +static int menu_width, item_x; + +/* + * Print menu item + */ +static void +print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey) +{ + int j; + char menu_item[menu_width+1]; + + strncpy(menu_item, item, menu_width); + menu_item[menu_width] = 0; + j = first_alpha(menu_item, "YyNnMm"); + + /* Clear 'residue' of last item */ + wattrset (win, menubox_attr); + wmove (win, choice, 0); +#if OLD_NCURSES + { + int i; + for (i = 0; i < menu_width; i++) + waddch (win, ' '); + } +#else + wclrtoeol(win); +#endif + wattrset (win, selected ? item_selected_attr : item_attr); + mvwaddstr (win, choice, item_x, menu_item); +#if 0 + if (hotkey) { + wattrset (win, selected ? tag_key_selected_attr : tag_key_attr); + mvwaddch(win, choice, item_x+j, menu_item[j]); + } +#endif + if (selected) { + wmove (win, choice, item_x+1); + wrefresh (win); + } +} + +/* + * Print the scroll indicators. + */ +static void +print_arrows (WINDOW * win, int item_no, int scroll, + int y, int x, int height) +{ + int cur_y, cur_x; + + getyx(win, cur_y, cur_x); + + wmove(win, y, x); + + if (scroll > 0) { + wattrset (win, uarrow_attr); + waddch (win, ACS_UARROW); + waddstr (win, "(-)"); + } + else { + wattrset (win, menubox_attr); + waddch (win, ACS_HLINE); + waddch (win, ACS_HLINE); + waddch (win, ACS_HLINE); + waddch (win, ACS_HLINE); + } + + y = y + height + 1; + wmove(win, y, x); + + if ((height < item_no) && (scroll + height < item_no)) { + wattrset (win, darrow_attr); + waddch (win, ACS_DARROW); + waddstr (win, "(+)"); + } + else { + wattrset (win, menubox_border_attr); + waddch (win, ACS_HLINE); + waddch (win, ACS_HLINE); + waddch (win, ACS_HLINE); + waddch (win, ACS_HLINE); + } + + wmove(win, cur_y, cur_x); +} + +/* + * Display the termination buttons. + */ +static void +print_buttons (WINDOW *win, int height, int width, int selected) +{ + int x = width / 2 - 16; + int y = height - 2; + + print_button (win, "Select", y, x, selected == 0); + print_button (win, " Exit ", y, x + 12, selected == 1); + print_button (win, " Help ", y, x + 24, selected == 2); + + wmove(win, y, x+1+12*selected); + wrefresh (win); +} + +/* + * Display a menu for choosing among a number of options + */ +int +dialog_menu (const char *title, const char *prompt, int height, int width, + int menu_height, const char *current, int item_no, + struct dialog_list_item ** items) +{ + int i, j, x, y, box_x, box_y; + int key = 0, button = 0, scroll = 0, choice = 0, first_item = 0, max_choice; + WINDOW *dialog, *menu; + FILE *f; + + max_choice = MIN (menu_height, item_no); + + /* center dialog box on screen */ + x = (COLS - width) / 2; + y = (LINES - height) / 2; + + draw_shadow (stdscr, y, x, height, width); + + dialog = newwin (height, width, y, x); + keypad (dialog, TRUE); + + draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr); + wattrset (dialog, border_attr); + mvwaddch (dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch (dialog, ACS_HLINE); + wattrset (dialog, dialog_attr); + wbkgdset (dialog, dialog_attr & A_COLOR); + waddch (dialog, ACS_RTEE); + + if (title != NULL && strlen(title) >= width-2 ) { + /* truncate long title -- mec */ + char * title2 = malloc(width-2+1); + memcpy( title2, title, width-2 ); + title2[width-2] = '\0'; + title = title2; + } + + if (title != NULL) { + wattrset (dialog, title_attr); + mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); + waddstr (dialog, (char *)title); + waddch (dialog, ' '); + } + + wattrset (dialog, dialog_attr); + print_autowrap (dialog, prompt, width - 2, 1, 3); + + menu_width = width - 6; + box_y = height - menu_height - 5; + box_x = (width - menu_width) / 2 - 1; + + /* create new window for the menu */ + menu = subwin (dialog, menu_height, menu_width, + y + box_y + 1, x + box_x + 1); + keypad (menu, TRUE); + + /* draw a box around the menu items */ + draw_box (dialog, box_y, box_x, menu_height + 2, menu_width + 2, + menubox_border_attr, menubox_attr); + + /* + * Find length of longest item in order to center menu. + * Set 'choice' to default item. + */ + item_x = 0; + for (i = 0; i < item_no; i++) { + item_x = MAX (item_x, MIN(menu_width, strlen (items[i]->name) + 2)); + if (strcmp(current, items[i]->tag) == 0) choice = i; + } + + item_x = (menu_width - item_x) / 2; + + /* get the scroll info from the temp file */ + if ( (f=fopen("lxdialog.scrltmp","r")) != NULL ) { + if ( (fscanf(f,"%d\n",&scroll) == 1) && (scroll <= choice) && + (scroll+max_choice > choice) && (scroll >= 0) && + (scroll+max_choice <= item_no) ) { + first_item = scroll; + choice = choice - scroll; + fclose(f); + } else { + scroll=0; + remove("lxdialog.scrltmp"); + fclose(f); + f=NULL; + } + } + if ( (choice >= max_choice) || (f==NULL && choice >= max_choice/2) ) { + if (choice >= item_no-max_choice/2) + scroll = first_item = item_no-max_choice; + else + scroll = first_item = choice - max_choice/2; + choice = choice - scroll; + } + + /* Print the menu */ + for (i=0; i < max_choice; i++) { + print_item (menu, items[first_item + i]->name, i, i == choice, + (items[first_item + i]->tag[0] != ':')); + } + + wnoutrefresh (menu); + + print_arrows(dialog, item_no, scroll, + box_y, box_x+item_x+1, menu_height); + + print_buttons (dialog, height, width, 0); + wmove (menu, choice, item_x+1); + wrefresh (menu); + + while (key != ESC) { + key = wgetch(menu); + + if (key < 256 && isalpha(key)) key = tolower(key); + + if (strchr("ynm", key)) + i = max_choice; + else { + for (i = choice+1; i < max_choice; i++) { + j = first_alpha(items[scroll + i]->name, "YyNnMm>"); + if (key == tolower(items[scroll + i]->name[j])) + break; + } + if (i == max_choice) + for (i = 0; i < max_choice; i++) { + j = first_alpha(items[scroll + i]->name, "YyNnMm>"); + if (key == tolower(items[scroll + i]->name[j])) + break; + } + } + + if (i < max_choice || + key == KEY_UP || key == KEY_DOWN || + key == '-' || key == '+' || + key == KEY_PPAGE || key == KEY_NPAGE) { + + print_item (menu, items[scroll + choice]->name, choice, FALSE, + (items[scroll + choice]->tag[0] != ':')); + + if (key == KEY_UP || key == '-') { + if (choice < 2 && scroll) { + /* Scroll menu down */ + scrollok (menu, TRUE); + wscrl (menu, -1); + scrollok (menu, FALSE); + + scroll--; + + print_item (menu, items[scroll]->name, 0, FALSE, + (items[scroll]->tag[0] != ':')); + } else + choice = MAX(choice - 1, 0); + + } else if (key == KEY_DOWN || key == '+') { + + print_item (menu, items[scroll + choice]->name, choice, FALSE, + (items[scroll + choice]->tag[0] != ':')); + + if ((choice > max_choice-3) && + (scroll + max_choice < item_no) + ) { + /* Scroll menu up */ + scrollok (menu, TRUE); + scroll (menu); + scrollok (menu, FALSE); + + scroll++; + + print_item (menu, items[scroll + max_choice - 1]->name, + max_choice-1, FALSE, + (items[scroll + max_choice - 1]->tag[0] != ':')); + } else + choice = MIN(choice+1, max_choice-1); + + } else if (key == KEY_PPAGE) { + scrollok (menu, TRUE); + for (i=0; (i < max_choice); i++) { + if (scroll > 0) { + wscrl (menu, -1); + scroll--; + print_item (menu, items[scroll]->name, 0, FALSE, + (items[scroll]->tag[0] != ':')); + } else { + if (choice > 0) + choice--; + } + } + scrollok (menu, FALSE); + + } else if (key == KEY_NPAGE) { + for (i=0; (i < max_choice); i++) { + if (scroll+max_choice < item_no) { + scrollok (menu, TRUE); + scroll(menu); + scrollok (menu, FALSE); + scroll++; + print_item (menu, items[scroll + max_choice - 1]->name, + max_choice-1, FALSE, + (items[scroll + max_choice - 1]->tag[0] != ':')); + } else { + if (choice+1 < max_choice) + choice++; + } + } + + } else + choice = i; + + print_item (menu, items[scroll + choice]->name, choice, TRUE, + (items[scroll + choice]->tag[0] != ':')); + + print_arrows(dialog, item_no, scroll, + box_y, box_x+item_x+1, menu_height); + + wnoutrefresh (dialog); + wrefresh (menu); + + continue; /* wait for another key press */ + } + + switch (key) { + case KEY_LEFT: + case TAB: + case KEY_RIGHT: + button = ((key == KEY_LEFT ? --button : ++button) < 0) + ? 2 : (button > 2 ? 0 : button); + + print_buttons(dialog, height, width, button); + wrefresh (menu); + break; + case ' ': + case 's': + case 'y': + case 'n': + case 'm': + /* save scroll info */ + if ( (f=fopen("lxdialog.scrltmp","w")) != NULL ) { + fprintf(f,"%d\n",scroll); + fclose(f); + } + delwin (dialog); + items[scroll + choice]->selected = 1; + switch (key) { + case 's': return 3; + case 'y': return 3; + case 'n': return 4; + case 'm': return 5; + case ' ': return 6; + } + return 0; + case 'h': + case '?': + button = 2; + case '\n': + delwin (dialog); + items[scroll + choice]->selected = 1; + + remove("lxdialog.scrltmp"); + return button; + case 'e': + case 'x': + key = ESC; + case ESC: + break; + } + } + + delwin (dialog); + remove("lxdialog.scrltmp"); + return -1; /* ESC pressed */ +} diff --git a/config/msgbox.c b/config/msgbox.c new file mode 100644 index 000000000..93692e1fb --- /dev/null +++ b/config/msgbox.c @@ -0,0 +1,85 @@ +/* + * msgbox.c -- implements the message box and info box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcapw@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +/* + * Display a message box. Program will pause and display an "OK" button + * if the parameter 'pause' is non-zero. + */ +int +dialog_msgbox (const char *title, const char *prompt, int height, int width, + int pause) +{ + int i, x, y, key = 0; + WINDOW *dialog; + + /* center dialog box on screen */ + x = (COLS - width) / 2; + y = (LINES - height) / 2; + + draw_shadow (stdscr, y, x, height, width); + + dialog = newwin (height, width, y, x); + keypad (dialog, TRUE); + + draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr); + + if (title != NULL && strlen(title) >= width-2 ) { + /* truncate long title -- mec */ + char * title2 = malloc(width-2+1); + memcpy( title2, title, width-2 ); + title2[width-2] = '\0'; + title = title2; + } + + if (title != NULL) { + wattrset (dialog, title_attr); + mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); + waddstr (dialog, (char *)title); + waddch (dialog, ' '); + } + wattrset (dialog, dialog_attr); + print_autowrap (dialog, prompt, width - 2, 1, 2); + + if (pause) { + wattrset (dialog, border_attr); + mvwaddch (dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch (dialog, ACS_HLINE); + wattrset (dialog, dialog_attr); + waddch (dialog, ACS_RTEE); + + print_button (dialog, " Ok ", + height - 2, width / 2 - 4, TRUE); + + wrefresh (dialog); + while (key != ESC && key != '\n' && key != ' ' && + key != 'O' && key != 'o' && key != 'X' && key != 'x') + key = wgetch (dialog); + } else { + key = '\n'; + wrefresh (dialog); + } + + delwin (dialog); + return key == ESC ? -1 : 0; +} diff --git a/config/symbol.c b/config/symbol.c new file mode 100644 index 000000000..b9d2c3d2a --- /dev/null +++ b/config/symbol.c @@ -0,0 +1,782 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include + +#define LKC_DIRECT_LINK +#include "lkc.h" + +extern int output_mode; + +struct symbol symbol_yes = { + .name = "y", + .curr = { "y", yes }, + .flags = SYMBOL_YES|SYMBOL_VALID, +}, symbol_mod = { + .name = "m", + .curr = { "m", mod }, + .flags = SYMBOL_MOD|SYMBOL_VALID, +}, symbol_no = { + .name = "n", + .curr = { "n", no }, + .flags = SYMBOL_NO|SYMBOL_VALID, +}, symbol_empty = { + .name = "", + .curr = { "", no }, + .flags = SYMBOL_VALID, +}; + +int sym_change_count; +struct symbol *modules_sym; +tristate modules_val; + +void sym_add_default(struct symbol *sym, const char *def) +{ + struct property *prop = prop_alloc(P_DEFAULT, sym); + + prop->expr = expr_alloc_symbol(sym_lookup(def, 1)); +} + +void sym_init(void) +{ + struct symbol *sym; + char *p; + static bool inited = false; + + if (inited) + return; + inited = true; + + sym = sym_lookup("VERSION", 0); + sym->type = S_STRING; + sym->flags |= SYMBOL_AUTO; + p = getenv("VERSION"); + if (p) + sym_add_default(sym, p); + + sym = sym_lookup("TARGET_ARCH", 0); + sym->type = S_STRING; + sym->flags |= SYMBOL_AUTO; + p = getenv("TARGET_ARCH"); + if (p) + sym_add_default(sym, p); + +} + +enum symbol_type sym_get_type(struct symbol *sym) +{ + enum symbol_type type = sym->type; + + if (type == S_TRISTATE) { + if (sym_is_choice_value(sym) && sym->visible == yes) + type = S_BOOLEAN; + else if (modules_val == no) + type = S_BOOLEAN; + } + return type; +} + +const char *sym_type_name(enum symbol_type type) +{ + switch (type) { + case S_BOOLEAN: + return "boolean"; + case S_TRISTATE: + return "tristate"; + case S_INT: + return "integer"; + case S_HEX: + return "hex"; + case S_STRING: + return "string"; + case S_UNKNOWN: + return "unknown"; + case S_OTHER: + break; + } + return "???"; +} + +struct property *sym_get_choice_prop(struct symbol *sym) +{ + struct property *prop; + + for_all_choices(sym, prop) + return prop; + return NULL; +} + +struct property *sym_get_default_prop(struct symbol *sym) +{ + struct property *prop; + + for_all_defaults(sym, prop) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + if (prop->visible.tri != no || output_mode) + return prop; + } + return NULL; +} + +struct property *sym_get_range_prop(struct symbol *sym) +{ + struct property *prop; + + for_all_properties(sym, prop, P_RANGE) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + if (prop->visible.tri != no) + return prop; + } + return NULL; +} + +static void sym_calc_visibility(struct symbol *sym) +{ + struct property *prop; + tristate tri; + bool deselected = false; + + /* any prompt visible? */ + tri = no; + for_all_prompts(sym, prop) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + tri = E_OR(tri, prop->visible.tri); + } + if (tri == mod && (sym->type != S_TRISTATE || modules_val == no)) + tri = yes; + if (sym->rev_dep_inv.expr && (expr_calc_value(sym->rev_dep_inv.expr) == yes)) { + tri = no; + deselected = true; + } + if (sym->visible != tri) { + sym->visible = tri; + sym_set_changed(sym); + } + if (sym_is_choice_value(sym) || deselected) + return; + tri = no; + if (sym->rev_dep.expr) + tri = expr_calc_value(sym->rev_dep.expr); + if (tri == mod && sym_get_type(sym) == S_BOOLEAN) + tri = yes; + if (sym->rev_dep.tri != tri) { + sym->rev_dep.tri = tri; + sym_set_changed(sym); + } +} + +static struct symbol *sym_calc_choice(struct symbol *sym) +{ + struct symbol *def_sym; + struct property *prop; + struct expr *e; + + /* is the user choice visible? */ + def_sym = sym->user.val; + if (def_sym) { + sym_calc_visibility(def_sym); + if (def_sym->visible != no) + return def_sym; + } + + /* any of the defaults visible? */ + for_all_defaults(sym, prop) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + if (prop->visible.tri == no) + continue; + def_sym = prop_get_symbol(prop); + sym_calc_visibility(def_sym); + if (def_sym->visible != no) + return def_sym; + } + + /* just get the first visible value */ + prop = sym_get_choice_prop(sym); + for (e = prop->expr; e; e = e->left.expr) { + def_sym = e->right.sym; + sym_calc_visibility(def_sym); + if (def_sym->visible != no) + return def_sym; + } + + /* no choice? reset tristate value */ + sym->curr.tri = no; + return NULL; +} + +void sym_calc_value(struct symbol *sym) +{ + struct symbol_value newval, oldval; + struct property *prop; + struct expr *e; + + if (!sym) + return; + + if (sym->flags & SYMBOL_VALID) + return; + sym->flags |= SYMBOL_VALID; + + oldval = sym->curr; + + switch (sym->type) { + case S_INT: + case S_HEX: + case S_STRING: + newval = symbol_empty.curr; + break; + case S_BOOLEAN: + case S_TRISTATE: + newval = symbol_no.curr; + break; + default: + sym->curr.val = sym->name; + sym->curr.tri = no; + return; + } + if (!sym_is_choice_value(sym)) + sym->flags &= ~SYMBOL_WRITE; + + sym_calc_visibility(sym); + + /* set default if recursively called */ + sym->curr = newval; + + switch (sym_get_type(sym)) { + case S_BOOLEAN: + case S_TRISTATE: + if (sym_is_choice_value(sym) && sym->visible == yes) { + prop = sym_get_choice_prop(sym); + newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no; + } else if (sym->rev_dep_inv.expr && (expr_calc_value(sym->rev_dep_inv.expr) == yes)) { + newval.tri = no; + } else if (E_OR(sym->visible, sym->rev_dep.tri) != no) { + sym->flags |= SYMBOL_WRITE; + if (sym_has_value(sym)) + newval.tri = sym->user.tri; + else if (!sym_is_choice(sym)) { + prop = sym_get_default_prop(sym); + if (prop) + newval.tri = expr_calc_value(prop->expr); + } + newval.tri = E_OR(E_AND(newval.tri, sym->visible), sym->rev_dep.tri); + } else if (!sym_is_choice(sym)) { + prop = sym_get_default_prop(sym); + if (prop) { + sym->flags |= SYMBOL_WRITE; + newval.tri = expr_calc_value(prop->expr); + } + } + if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) + newval.tri = yes; + break; + case S_STRING: + case S_HEX: + case S_INT: + if (sym->visible != no) { + sym->flags |= SYMBOL_WRITE; + if (sym_has_value(sym)) { + newval.val = sym->user.val; + break; + } + } + prop = sym_get_default_prop(sym); + if (prop) { + struct symbol *ds = prop_get_symbol(prop); + if (ds) { + sym->flags |= SYMBOL_WRITE; + sym_calc_value(ds); + newval.val = ds->curr.val; + } + } + break; + default: + ; + } + + sym->curr = newval; + if (sym_is_choice(sym) && newval.tri == yes) + sym->curr.val = sym_calc_choice(sym); + + if (memcmp(&oldval, &sym->curr, sizeof(oldval))) + sym_set_changed(sym); + if (modules_sym == sym) + modules_val = modules_sym->curr.tri; + + if (sym_is_choice(sym)) { + int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE); + prop = sym_get_choice_prop(sym); + for (e = prop->expr; e; e = e->left.expr) { + e->right.sym->flags |= flags; + if (flags & SYMBOL_CHANGED) + sym_set_changed(e->right.sym); + } + } +} + +void sym_clear_all_valid(void) +{ + struct symbol *sym; + int i; + + for_all_symbols(i, sym) + sym->flags &= ~SYMBOL_VALID; + sym_change_count++; + if (modules_sym) + sym_calc_value(modules_sym); +} + +void sym_set_changed(struct symbol *sym) +{ + struct property *prop; + + sym->flags |= SYMBOL_CHANGED; + for (prop = sym->prop; prop; prop = prop->next) { + if (prop->menu) + prop->menu->flags |= MENU_CHANGED; + } +} + +void sym_set_all_changed(void) +{ + struct symbol *sym; + int i; + + for_all_symbols(i, sym) + sym_set_changed(sym); +} + +bool sym_tristate_within_range(struct symbol *sym, tristate val) +{ + int type = sym_get_type(sym); + + if (sym->visible == no) + return false; + + if (type != S_BOOLEAN && type != S_TRISTATE) + return false; + + if (type == S_BOOLEAN && val == mod) + return false; + if (sym->visible <= sym->rev_dep.tri) + return false; + if (sym_is_choice_value(sym) && sym->visible == yes) + return val == yes; + return val >= sym->rev_dep.tri && val <= sym->visible; +} + +bool sym_set_tristate_value(struct symbol *sym, tristate val) +{ + tristate oldval = sym_get_tristate_value(sym); + + if (oldval != val && !sym_tristate_within_range(sym, val)) + return false; + + if (sym->flags & SYMBOL_NEW) { + sym->flags &= ~SYMBOL_NEW; + sym_set_changed(sym); + } + if (sym_is_choice_value(sym) && val == yes) { + struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym)); + + cs->user.val = sym; + cs->flags &= ~SYMBOL_NEW; + } + + sym->user.tri = val; + if (oldval != val) { + sym_clear_all_valid(); + if (sym == modules_sym) + sym_set_all_changed(); + } + + return true; +} + +tristate sym_toggle_tristate_value(struct symbol *sym) +{ + tristate oldval, newval; + + oldval = newval = sym_get_tristate_value(sym); + do { + switch (newval) { + case no: + newval = mod; + break; + case mod: + newval = yes; + break; + case yes: + newval = no; + break; + } + if (sym_set_tristate_value(sym, newval)) + break; + } while (oldval != newval); + return newval; +} + +bool sym_string_valid(struct symbol *sym, const char *str) +{ + char ch; + + switch (sym->type) { + case S_STRING: + return true; + case S_INT: + ch = *str++; + if (ch == '-') + ch = *str++; + if (!isdigit(ch)) + return false; + if (ch == '0' && *str != 0) + return false; + while ((ch = *str++)) { + if (!isdigit(ch)) + return false; + } + return true; + case S_HEX: + if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) + str += 2; + ch = *str++; + do { + if (!isxdigit(ch)) + return false; + } while ((ch = *str++)); + return true; + case S_BOOLEAN: + case S_TRISTATE: + switch (str[0]) { + case 'y': case 'Y': + case 'm': case 'M': + case 'n': case 'N': + return true; + } + return false; + default: + return false; + } +} + +bool sym_string_within_range(struct symbol *sym, const char *str) +{ + struct property *prop; + int val; + + switch (sym->type) { + case S_STRING: + return sym_string_valid(sym, str); + case S_INT: + if (!sym_string_valid(sym, str)) + return false; + prop = sym_get_range_prop(sym); + if (!prop) + return true; + val = strtol(str, NULL, 10); + return val >= strtol(prop->expr->left.sym->name, NULL, 10) && + val <= strtol(prop->expr->right.sym->name, NULL, 10); + case S_HEX: + if (!sym_string_valid(sym, str)) + return false; + prop = sym_get_range_prop(sym); + if (!prop) + return true; + val = strtol(str, NULL, 16); + return val >= strtol(prop->expr->left.sym->name, NULL, 16) && + val <= strtol(prop->expr->right.sym->name, NULL, 16); + case S_BOOLEAN: + case S_TRISTATE: + switch (str[0]) { + case 'y': case 'Y': + return sym_tristate_within_range(sym, yes); + case 'm': case 'M': + return sym_tristate_within_range(sym, mod); + case 'n': case 'N': + return sym_tristate_within_range(sym, no); + } + return false; + default: + return false; + } +} + +bool sym_set_string_value(struct symbol *sym, const char *newval) +{ + const char *oldval; + char *val; + int size; + + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + switch (newval[0]) { + case 'y': case 'Y': + return sym_set_tristate_value(sym, yes); + case 'm': case 'M': + return sym_set_tristate_value(sym, mod); + case 'n': case 'N': + return sym_set_tristate_value(sym, no); + } + return false; + default: + ; + } + + if (!sym_string_within_range(sym, newval)) + return false; + + if (sym->flags & SYMBOL_NEW) { + sym->flags &= ~SYMBOL_NEW; + sym_set_changed(sym); + } + + oldval = sym->user.val; + size = strlen(newval) + 1; + if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) { + size += 2; + sym->user.val = val = malloc(size); + *val++ = '0'; + *val++ = 'x'; + } else if (!oldval || strcmp(oldval, newval)) + sym->user.val = val = malloc(size); + else + return true; + + strcpy(val, newval); + free((void *)oldval); + sym_clear_all_valid(); + + return true; +} + +const char *sym_get_string_value(struct symbol *sym) +{ + tristate val; + + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + val = sym_get_tristate_value(sym); + switch (val) { + case no: + return "n"; + case mod: + return "m"; + case yes: + return "y"; + } + break; + default: + ; + } + return (const char *)sym->curr.val; +} + +bool sym_is_changable(struct symbol *sym) +{ + return sym->visible > sym->rev_dep.tri; +} + +struct symbol *sym_lookup(const char *name, int isconst) +{ + struct symbol *symbol; + const char *ptr; + char *new_name; + int hash = 0; + + if (name) { + if (name[0] && !name[1]) { + switch (name[0]) { + case 'y': return &symbol_yes; + case 'm': return &symbol_mod; + case 'n': return &symbol_no; + } + } + for (ptr = name; *ptr; ptr++) + hash += *ptr; + hash &= 0xff; + + for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) { + if (!strcmp(symbol->name, name)) { + if ((isconst && symbol->flags & SYMBOL_CONST) || + (!isconst && !(symbol->flags & SYMBOL_CONST))) + return symbol; + } + } + new_name = strdup(name); + } else { + new_name = NULL; + hash = 256; + } + + symbol = malloc(sizeof(*symbol)); + memset(symbol, 0, sizeof(*symbol)); + symbol->name = new_name; + symbol->type = S_UNKNOWN; + symbol->flags = SYMBOL_NEW; + if (isconst) + symbol->flags |= SYMBOL_CONST; + + symbol->next = symbol_hash[hash]; + symbol_hash[hash] = symbol; + + return symbol; +} + +struct symbol *sym_find(const char *name) +{ + struct symbol *symbol = NULL; + const char *ptr; + int hash = 0; + + if (!name) + return NULL; + + if (name[0] && !name[1]) { + switch (name[0]) { + case 'y': return &symbol_yes; + case 'm': return &symbol_mod; + case 'n': return &symbol_no; + } + } + for (ptr = name; *ptr; ptr++) + hash += *ptr; + hash &= 0xff; + + for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) { + if (!strcmp(symbol->name, name) && + !(symbol->flags & SYMBOL_CONST)) + break; + } + + return symbol; +} + +struct symbol *sym_check_deps(struct symbol *sym); + +static struct symbol *sym_check_expr_deps(struct expr *e) +{ + struct symbol *sym; + + if (!e) + return NULL; + switch (e->type) { + case E_OR: + case E_AND: + sym = sym_check_expr_deps(e->left.expr); + if (sym) + return sym; + return sym_check_expr_deps(e->right.expr); + case E_NOT: + return sym_check_expr_deps(e->left.expr); + case E_EQUAL: + case E_UNEQUAL: + sym = sym_check_deps(e->left.sym); + if (sym) + return sym; + return sym_check_deps(e->right.sym); + case E_SYMBOL: + return sym_check_deps(e->left.sym); + default: + break; + } + printf("Oops! How to check %d?\n", e->type); + return NULL; +} + +struct symbol *sym_check_deps(struct symbol *sym) +{ + struct symbol *sym2; + struct property *prop; + + if (sym->flags & SYMBOL_CHECK_DONE) + return NULL; + if (sym->flags & SYMBOL_CHECK) { + printf("Warning! Found recursive dependency: %s", sym->name); + return sym; + } + + sym->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED); + sym2 = sym_check_expr_deps(sym->rev_dep.expr); + if (sym2) + goto out; + + for (prop = sym->prop; prop; prop = prop->next) { + if (prop->type == P_CHOICE || prop->type == P_SELECT || prop->type == P_SELECTNOT) + continue; + sym2 = sym_check_expr_deps(prop->visible.expr); + if (sym2) + goto out; + if (prop->type != P_DEFAULT || sym_is_choice(sym)) + continue; + sym2 = sym_check_expr_deps(prop->expr); + if (sym2) + goto out; + } +out: + if (sym2) + printf(" %s", sym->name); + sym->flags &= ~SYMBOL_CHECK; + return sym2; +} + +struct property *prop_alloc(enum prop_type type, struct symbol *sym) +{ + struct property *prop; + struct property **propp; + + prop = malloc(sizeof(*prop)); + memset(prop, 0, sizeof(*prop)); + prop->type = type; + prop->sym = sym; + prop->file = current_file; + prop->lineno = zconf_lineno(); + + /* append property to the prop list of symbol */ + if (sym) { + for (propp = &sym->prop; *propp; propp = &(*propp)->next) + ; + *propp = prop; + } + + return prop; +} + +struct symbol *prop_get_symbol(struct property *prop) +{ + if (prop->expr && (prop->expr->type == E_SYMBOL || + prop->expr->type == E_CHOICE)) + return prop->expr->left.sym; + return NULL; +} + +const char *prop_get_type_name(enum prop_type type) +{ + switch (type) { + case P_PROMPT: + return "prompt"; + case P_COMMENT: + return "comment"; + case P_MENU: + return "menu"; + case P_DEFAULT: + return "default"; + case P_CHOICE: + return "choice"; + case P_SELECT: + case P_SELECTNOT: + return "select"; + case P_RANGE: + return "range"; + case P_UNKNOWN: + break; + } + return "unknown"; +} diff --git a/config/textbox.c b/config/textbox.c new file mode 100644 index 000000000..a5a460b5c --- /dev/null +++ b/config/textbox.c @@ -0,0 +1,556 @@ +/* + * textbox.c -- implements the text box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +static void back_lines (int n); +static void print_page (WINDOW * win, int height, int width); +static void print_line (WINDOW * win, int row, int width); +static char *get_line (void); +static void print_position (WINDOW * win, int height, int width); + +static int hscroll, fd, file_size, bytes_read; +static int begin_reached = 1, end_reached, page_length; +static char *buf, *page; + +/* + * Display text from a file in a dialog box. + */ +int +dialog_textbox (const char *title, const char *file, int height, int width) +{ + int i, x, y, cur_x, cur_y, fpos, key = 0; + int passed_end; + char search_term[MAX_LEN + 1]; + WINDOW *dialog, *text; + + search_term[0] = '\0'; /* no search term entered yet */ + + /* Open input file for reading */ + if ((fd = open (file, O_RDONLY)) == -1) { + endwin (); + fprintf (stderr, + "\nCan't open input file in dialog_textbox().\n"); + exit (-1); + } + /* Get file size. Actually, 'file_size' is the real file size - 1, + since it's only the last byte offset from the beginning */ + if ((file_size = lseek (fd, 0, SEEK_END)) == -1) { + endwin (); + fprintf (stderr, "\nError getting file size in dialog_textbox().\n"); + exit (-1); + } + /* Restore file pointer to beginning of file after getting file size */ + if (lseek (fd, 0, SEEK_SET) == -1) { + endwin (); + fprintf (stderr, "\nError moving file pointer in dialog_textbox().\n"); + exit (-1); + } + /* Allocate space for read buffer */ + if ((buf = malloc (BUF_SIZE + 1)) == NULL) { + endwin (); + fprintf (stderr, "\nCan't allocate memory in dialog_textbox().\n"); + exit (-1); + } + if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { + endwin (); + fprintf (stderr, "\nError reading file in dialog_textbox().\n"); + exit (-1); + } + buf[bytes_read] = '\0'; /* mark end of valid data */ + page = buf; /* page is pointer to start of page to be displayed */ + + /* center dialog box on screen */ + x = (COLS - width) / 2; + y = (LINES - height) / 2; + + + draw_shadow (stdscr, y, x, height, width); + + dialog = newwin (height, width, y, x); + keypad (dialog, TRUE); + + /* Create window for text region, used for scrolling text */ + text = subwin (dialog, height - 4, width - 2, y + 1, x + 1); + wattrset (text, dialog_attr); + wbkgdset (text, dialog_attr & A_COLOR); + + keypad (text, TRUE); + + /* register the new window, along with its borders */ + draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr); + + wattrset (dialog, border_attr); + mvwaddch (dialog, height-3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch (dialog, ACS_HLINE); + wattrset (dialog, dialog_attr); + wbkgdset (dialog, dialog_attr & A_COLOR); + waddch (dialog, ACS_RTEE); + + if (title != NULL && strlen(title) >= width-2 ) { + /* truncate long title -- mec */ + char * title2 = malloc(width-2+1); + memcpy( title2, title, width-2 ); + title2[width-2] = '\0'; + title = title2; + } + + if (title != NULL) { + wattrset (dialog, title_attr); + mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); + waddstr (dialog, (char *)title); + waddch (dialog, ' '); + } + print_button (dialog, " Exit ", height - 2, width / 2 - 4, TRUE); + wnoutrefresh (dialog); + getyx (dialog, cur_y, cur_x); /* Save cursor position */ + + /* Print first page of text */ + attr_clear (text, height - 4, width - 2, dialog_attr); + print_page (text, height - 4, width - 2); + print_position (dialog, height, width); + wmove (dialog, cur_y, cur_x); /* Restore cursor position */ + wrefresh (dialog); + + while ((key != ESC) && (key != '\n')) { + key = wgetch (dialog); + switch (key) { + case 'E': /* Exit */ + case 'e': + case 'X': + case 'x': + delwin (dialog); + free (buf); + close (fd); + return 0; + case 'g': /* First page */ + case KEY_HOME: + if (!begin_reached) { + begin_reached = 1; + /* First page not in buffer? */ + if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) { + endwin (); + fprintf (stderr, + "\nError moving file pointer in dialog_textbox().\n"); + exit (-1); + } + if (fpos > bytes_read) { /* Yes, we have to read it in */ + if (lseek (fd, 0, SEEK_SET) == -1) { + endwin (); + fprintf (stderr, "\nError moving file pointer in " + "dialog_textbox().\n"); + exit (-1); + } + if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { + endwin (); + fprintf (stderr, + "\nError reading file in dialog_textbox().\n"); + exit (-1); + } + buf[bytes_read] = '\0'; + } + page = buf; + print_page (text, height - 4, width - 2); + print_position (dialog, height, width); + wmove (dialog, cur_y, cur_x); /* Restore cursor position */ + wrefresh (dialog); + } + break; + case 'G': /* Last page */ + case KEY_END: + + end_reached = 1; + /* Last page not in buffer? */ + if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) { + endwin (); + fprintf (stderr, + "\nError moving file pointer in dialog_textbox().\n"); + exit (-1); + } + if (fpos < file_size) { /* Yes, we have to read it in */ + if (lseek (fd, -BUF_SIZE, SEEK_END) == -1) { + endwin (); + fprintf (stderr, + "\nError moving file pointer in dialog_textbox().\n"); + exit (-1); + } + if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { + endwin (); + fprintf (stderr, + "\nError reading file in dialog_textbox().\n"); + exit (-1); + } + buf[bytes_read] = '\0'; + } + page = buf + bytes_read; + back_lines (height - 4); + print_page (text, height - 4, width - 2); + print_position (dialog, height, width); + wmove (dialog, cur_y, cur_x); /* Restore cursor position */ + wrefresh (dialog); + break; + case 'K': /* Previous line */ + case 'k': + case KEY_UP: + if (!begin_reached) { + back_lines (page_length + 1); + + /* We don't call print_page() here but use scrolling to ensure + faster screen update. However, 'end_reached' and + 'page_length' should still be updated, and 'page' should + point to start of next page. This is done by calling + get_line() in the following 'for' loop. */ + scrollok (text, TRUE); + wscrl (text, -1); /* Scroll text region down one line */ + scrollok (text, FALSE); + page_length = 0; + passed_end = 0; + for (i = 0; i < height - 4; i++) { + if (!i) { + /* print first line of page */ + print_line (text, 0, width - 2); + wnoutrefresh (text); + } else + /* Called to update 'end_reached' and 'page' */ + get_line (); + if (!passed_end) + page_length++; + if (end_reached && !passed_end) + passed_end = 1; + } + + print_position (dialog, height, width); + wmove (dialog, cur_y, cur_x); /* Restore cursor position */ + wrefresh (dialog); + } + break; + case 'B': /* Previous page */ + case 'b': + case KEY_PPAGE: + if (begin_reached) + break; + back_lines (page_length + height - 4); + print_page (text, height - 4, width - 2); + print_position (dialog, height, width); + wmove (dialog, cur_y, cur_x); + wrefresh (dialog); + break; + case 'J': /* Next line */ + case 'j': + case KEY_DOWN: + if (!end_reached) { + begin_reached = 0; + scrollok (text, TRUE); + scroll (text); /* Scroll text region up one line */ + scrollok (text, FALSE); + print_line (text, height - 5, width - 2); + wnoutrefresh (text); + print_position (dialog, height, width); + wmove (dialog, cur_y, cur_x); /* Restore cursor position */ + wrefresh (dialog); + } + break; + case KEY_NPAGE: /* Next page */ + case ' ': + if (end_reached) + break; + + begin_reached = 0; + print_page (text, height - 4, width - 2); + print_position (dialog, height, width); + wmove (dialog, cur_y, cur_x); + wrefresh (dialog); + break; + case '0': /* Beginning of line */ + case 'H': /* Scroll left */ + case 'h': + case KEY_LEFT: + if (hscroll <= 0) + break; + + if (key == '0') + hscroll = 0; + else + hscroll--; + /* Reprint current page to scroll horizontally */ + back_lines (page_length); + print_page (text, height - 4, width - 2); + wmove (dialog, cur_y, cur_x); + wrefresh (dialog); + break; + case 'L': /* Scroll right */ + case 'l': + case KEY_RIGHT: + if (hscroll >= MAX_LEN) + break; + hscroll++; + /* Reprint current page to scroll horizontally */ + back_lines (page_length); + print_page (text, height - 4, width - 2); + wmove (dialog, cur_y, cur_x); + wrefresh (dialog); + break; + case ESC: + break; + } + } + + delwin (dialog); + free (buf); + close (fd); + return 1; /* ESC pressed */ +} + +/* + * Go back 'n' lines in text file. Called by dialog_textbox(). + * 'page' will be updated to point to the desired line in 'buf'. + */ +static void +back_lines (int n) +{ + int i, fpos; + + begin_reached = 0; + /* We have to distinguish between end_reached and !end_reached + since at end of file, the line is not ended by a '\n'. + The code inside 'if' basically does a '--page' to move one + character backward so as to skip '\n' of the previous line */ + if (!end_reached) { + /* Either beginning of buffer or beginning of file reached? */ + if (page == buf) { + if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) { + endwin (); + fprintf (stderr, "\nError moving file pointer in " + "back_lines().\n"); + exit (-1); + } + if (fpos > bytes_read) { /* Not beginning of file yet */ + /* We've reached beginning of buffer, but not beginning of + file yet, so read previous part of file into buffer. + Note that we only move backward for BUF_SIZE/2 bytes, + but not BUF_SIZE bytes to avoid re-reading again in + print_page() later */ + /* Really possible to move backward BUF_SIZE/2 bytes? */ + if (fpos < BUF_SIZE / 2 + bytes_read) { + /* No, move less then */ + if (lseek (fd, 0, SEEK_SET) == -1) { + endwin (); + fprintf (stderr, "\nError moving file pointer in " + "back_lines().\n"); + exit (-1); + } + page = buf + fpos - bytes_read; + } else { /* Move backward BUF_SIZE/2 bytes */ + if (lseek (fd, -(BUF_SIZE / 2 + bytes_read), SEEK_CUR) + == -1) { + endwin (); + fprintf (stderr, "\nError moving file pointer " + "in back_lines().\n"); + exit (-1); + } + page = buf + BUF_SIZE / 2; + } + if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { + endwin (); + fprintf (stderr, "\nError reading file in back_lines().\n"); + exit (-1); + } + buf[bytes_read] = '\0'; + } else { /* Beginning of file reached */ + begin_reached = 1; + return; + } + } + if (*(--page) != '\n') { /* '--page' here */ + /* Something's wrong... */ + endwin (); + fprintf (stderr, "\nInternal error in back_lines().\n"); + exit (-1); + } + } + /* Go back 'n' lines */ + for (i = 0; i < n; i++) + do { + if (page == buf) { + if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) { + endwin (); + fprintf (stderr, + "\nError moving file pointer in back_lines().\n"); + exit (-1); + } + if (fpos > bytes_read) { + /* Really possible to move backward BUF_SIZE/2 bytes? */ + if (fpos < BUF_SIZE / 2 + bytes_read) { + /* No, move less then */ + if (lseek (fd, 0, SEEK_SET) == -1) { + endwin (); + fprintf (stderr, "\nError moving file pointer " + "in back_lines().\n"); + exit (-1); + } + page = buf + fpos - bytes_read; + } else { /* Move backward BUF_SIZE/2 bytes */ + if (lseek (fd, -(BUF_SIZE / 2 + bytes_read), + SEEK_CUR) == -1) { + endwin (); + fprintf (stderr, "\nError moving file pointer" + " in back_lines().\n"); + exit (-1); + } + page = buf + BUF_SIZE / 2; + } + if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { + endwin (); + fprintf (stderr, "\nError reading file in " + "back_lines().\n"); + exit (-1); + } + buf[bytes_read] = '\0'; + } else { /* Beginning of file reached */ + begin_reached = 1; + return; + } + } + } while (*(--page) != '\n'); + page++; +} + +/* + * Print a new page of text. Called by dialog_textbox(). + */ +static void +print_page (WINDOW * win, int height, int width) +{ + int i, passed_end = 0; + + page_length = 0; + for (i = 0; i < height; i++) { + print_line (win, i, width); + if (!passed_end) + page_length++; + if (end_reached && !passed_end) + passed_end = 1; + } + wnoutrefresh (win); +} + +/* + * Print a new line of text. Called by dialog_textbox() and print_page(). + */ +static void +print_line (WINDOW * win, int row, int width) +{ + int y, x; + char *line; + + line = get_line (); + line += MIN (strlen (line), hscroll); /* Scroll horizontally */ + wmove (win, row, 0); /* move cursor to correct line */ + waddch (win, ' '); + waddnstr (win, line, MIN (strlen (line), width - 2)); + + getyx (win, y, x); + /* Clear 'residue' of previous line */ +#if OLD_NCURSES + { + int i; + for (i = 0; i < width - x; i++) + waddch (win, ' '); + } +#else + wclrtoeol(win); +#endif +} + +/* + * Return current line of text. Called by dialog_textbox() and print_line(). + * 'page' should point to start of current line before calling, and will be + * updated to point to start of next line. + */ +static char * +get_line (void) +{ + int i = 0, fpos; + static char line[MAX_LEN + 1]; + + end_reached = 0; + while (*page != '\n') { + if (*page == '\0') { + /* Either end of file or end of buffer reached */ + if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) { + endwin (); + fprintf (stderr, "\nError moving file pointer in " + "get_line().\n"); + exit (-1); + } + if (fpos < file_size) { /* Not end of file yet */ + /* We've reached end of buffer, but not end of file yet, + so read next part of file into buffer */ + if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { + endwin (); + fprintf (stderr, "\nError reading file in get_line().\n"); + exit (-1); + } + buf[bytes_read] = '\0'; + page = buf; + } else { + if (!end_reached) + end_reached = 1; + break; + } + } else if (i < MAX_LEN) + line[i++] = *(page++); + else { + /* Truncate lines longer than MAX_LEN characters */ + if (i == MAX_LEN) + line[i++] = '\0'; + page++; + } + } + if (i <= MAX_LEN) + line[i] = '\0'; + if (!end_reached) + page++; /* move pass '\n' */ + + return line; +} + +/* + * Print current position + */ +static void +print_position (WINDOW * win, int height, int width) +{ + int fpos, percent; + + if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) { + endwin (); + fprintf (stderr, "\nError moving file pointer in print_position().\n"); + exit (-1); + } + wattrset (win, position_indicator_attr); + wbkgdset (win, position_indicator_attr & A_COLOR); + percent = !file_size ? + 100 : ((fpos - bytes_read + page - buf) * 100) / file_size; + wmove (win, height - 3, width - 9); + wprintw (win, "(%3d%%)", percent); +} diff --git a/config/util.c b/config/util.c new file mode 100644 index 000000000..0a2f82757 --- /dev/null +++ b/config/util.c @@ -0,0 +1,375 @@ +/* + * util.c + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + + +/* use colors by default? */ +bool use_colors = 1; + +char *backtitle = NULL; + +const char *dialog_result; + +/* + * Attribute values, default is for mono display + */ +chtype attributes[] = +{ + A_NORMAL, /* screen_attr */ + A_NORMAL, /* shadow_attr */ + A_NORMAL, /* dialog_attr */ + A_BOLD, /* title_attr */ + A_NORMAL, /* border_attr */ + A_REVERSE, /* button_active_attr */ + A_DIM, /* button_inactive_attr */ + A_REVERSE, /* button_key_active_attr */ + A_BOLD, /* button_key_inactive_attr */ + A_REVERSE, /* button_label_active_attr */ + A_NORMAL, /* button_label_inactive_attr */ + A_NORMAL, /* inputbox_attr */ + A_NORMAL, /* inputbox_border_attr */ + A_NORMAL, /* searchbox_attr */ + A_BOLD, /* searchbox_title_attr */ + A_NORMAL, /* searchbox_border_attr */ + A_BOLD, /* position_indicator_attr */ + A_NORMAL, /* menubox_attr */ + A_NORMAL, /* menubox_border_attr */ + A_NORMAL, /* item_attr */ + A_REVERSE, /* item_selected_attr */ + A_BOLD, /* tag_attr */ + A_REVERSE, /* tag_selected_attr */ + A_BOLD, /* tag_key_attr */ + A_REVERSE, /* tag_key_selected_attr */ + A_BOLD, /* check_attr */ + A_REVERSE, /* check_selected_attr */ + A_BOLD, /* uarrow_attr */ + A_BOLD /* darrow_attr */ +}; + + +#include "colors.h" + +/* + * Table of color values + */ +int color_table[][3] = +{ + {SCREEN_FG, SCREEN_BG, SCREEN_HL}, + {SHADOW_FG, SHADOW_BG, SHADOW_HL}, + {DIALOG_FG, DIALOG_BG, DIALOG_HL}, + {TITLE_FG, TITLE_BG, TITLE_HL}, + {BORDER_FG, BORDER_BG, BORDER_HL}, + {BUTTON_ACTIVE_FG, BUTTON_ACTIVE_BG, BUTTON_ACTIVE_HL}, + {BUTTON_INACTIVE_FG, BUTTON_INACTIVE_BG, BUTTON_INACTIVE_HL}, + {BUTTON_KEY_ACTIVE_FG, BUTTON_KEY_ACTIVE_BG, BUTTON_KEY_ACTIVE_HL}, + {BUTTON_KEY_INACTIVE_FG, BUTTON_KEY_INACTIVE_BG, BUTTON_KEY_INACTIVE_HL}, + {BUTTON_LABEL_ACTIVE_FG, BUTTON_LABEL_ACTIVE_BG, BUTTON_LABEL_ACTIVE_HL}, + {BUTTON_LABEL_INACTIVE_FG, BUTTON_LABEL_INACTIVE_BG, + BUTTON_LABEL_INACTIVE_HL}, + {INPUTBOX_FG, INPUTBOX_BG, INPUTBOX_HL}, + {INPUTBOX_BORDER_FG, INPUTBOX_BORDER_BG, INPUTBOX_BORDER_HL}, + {SEARCHBOX_FG, SEARCHBOX_BG, SEARCHBOX_HL}, + {SEARCHBOX_TITLE_FG, SEARCHBOX_TITLE_BG, SEARCHBOX_TITLE_HL}, + {SEARCHBOX_BORDER_FG, SEARCHBOX_BORDER_BG, SEARCHBOX_BORDER_HL}, + {POSITION_INDICATOR_FG, POSITION_INDICATOR_BG, POSITION_INDICATOR_HL}, + {MENUBOX_FG, MENUBOX_BG, MENUBOX_HL}, + {MENUBOX_BORDER_FG, MENUBOX_BORDER_BG, MENUBOX_BORDER_HL}, + {ITEM_FG, ITEM_BG, ITEM_HL}, + {ITEM_SELECTED_FG, ITEM_SELECTED_BG, ITEM_SELECTED_HL}, + {TAG_FG, TAG_BG, TAG_HL}, + {TAG_SELECTED_FG, TAG_SELECTED_BG, TAG_SELECTED_HL}, + {TAG_KEY_FG, TAG_KEY_BG, TAG_KEY_HL}, + {TAG_KEY_SELECTED_FG, TAG_KEY_SELECTED_BG, TAG_KEY_SELECTED_HL}, + {CHECK_FG, CHECK_BG, CHECK_HL}, + {CHECK_SELECTED_FG, CHECK_SELECTED_BG, CHECK_SELECTED_HL}, + {UARROW_FG, UARROW_BG, UARROW_HL}, + {DARROW_FG, DARROW_BG, DARROW_HL}, +}; /* color_table */ + +/* + * Set window to attribute 'attr' + */ +void +attr_clear (WINDOW * win, int height, int width, chtype attr) +{ + int i, j; + + wattrset (win, attr); + for (i = 0; i < height; i++) { + wmove (win, i, 0); + for (j = 0; j < width; j++) + waddch (win, ' '); + } + touchwin (win); +} + +void dialog_clear (void) +{ + attr_clear (stdscr, LINES, COLS, screen_attr); + /* Display background title if it exists ... - SLH */ + if (backtitle != NULL) { + int i; + + wattrset (stdscr, screen_attr); + mvwaddstr (stdscr, 0, 1, (char *)backtitle); + wmove (stdscr, 1, 1); + for (i = 1; i < COLS - 1; i++) + waddch (stdscr, ACS_HLINE); + } + wnoutrefresh (stdscr); +} + +/* + * Do some initialization for dialog + */ +void +init_dialog (void) +{ + initscr (); /* Init curses */ + keypad (stdscr, TRUE); + cbreak (); + noecho (); + + + if (use_colors) /* Set up colors */ + color_setup (); + + + dialog_clear (); +} + +/* + * Setup for color display + */ +void +color_setup (void) +{ + int i; + + if (has_colors ()) { /* Terminal supports color? */ + start_color (); + + /* Initialize color pairs */ + for (i = 0; i < ATTRIBUTE_COUNT; i++) + init_pair (i + 1, color_table[i][0], color_table[i][1]); + + /* Setup color attributes */ + for (i = 0; i < ATTRIBUTE_COUNT; i++) + attributes[i] = C_ATTR (color_table[i][2], i + 1); + } +} + +/* + * End using dialog functions. + */ +void +end_dialog (void) +{ + endwin (); +} + + +/* + * Print a string of text in a window, automatically wrap around to the + * next line if the string is too long to fit on one line. Newline + * characters '\n' are replaced by spaces. We start on a new line + * if there is no room for at least 4 nonblanks following a double-space. + */ +void +print_autowrap (WINDOW * win, const char *prompt, int width, int y, int x) +{ + int newl, cur_x, cur_y; + int i, prompt_len, room, wlen; + char tempstr[MAX_LEN + 1], *word, *sp, *sp2; + + strcpy (tempstr, prompt); + + prompt_len = strlen(tempstr); + + /* + * Remove newlines + */ + for(i=0; i room || + (newl && wlen < 4 && sp && wlen+1+strlen(sp) > room + && (!(sp2 = index(sp, ' ')) || wlen+1+(sp2-sp) > room))) { + cur_y++; + cur_x = x; + } + wmove (win, cur_y, cur_x); + waddstr (win, word); + getyx (win, cur_y, cur_x); + cur_x++; + if (sp && *sp == ' ') { + cur_x++; /* double space */ + while (*++sp == ' '); + newl = 1; + } else + newl = 0; + word = sp; + } + } +} + +/* + * Print a button + */ +void +print_button (WINDOW * win, const char *label, int y, int x, int selected) +{ + int i, temp; + + wmove (win, y, x); + wattrset (win, selected ? button_active_attr : button_inactive_attr); + waddstr (win, "<"); + temp = strspn (label, " "); + label += temp; + wattrset (win, selected ? button_label_active_attr + : button_label_inactive_attr); + for (i = 0; i < temp; i++) + waddch (win, ' '); + wattrset (win, selected ? button_key_active_attr + : button_key_inactive_attr); + waddch (win, label[0]); + wattrset (win, selected ? button_label_active_attr + : button_label_inactive_attr); + waddstr (win, (char *)label + 1); + wattrset (win, selected ? button_active_attr : button_inactive_attr); + waddstr (win, ">"); + wmove (win, y, x + temp + 1); +} + +/* + * Draw a rectangular box with line drawing characters + */ +void +draw_box (WINDOW * win, int y, int x, int height, int width, + chtype box, chtype border) +{ + int i, j; + + wattrset (win, 0); + for (i = 0; i < height; i++) { + wmove (win, y + i, x); + for (j = 0; j < width; j++) + if (!i && !j) + waddch (win, border | ACS_ULCORNER); + else if (i == height - 1 && !j) + waddch (win, border | ACS_LLCORNER); + else if (!i && j == width - 1) + waddch (win, box | ACS_URCORNER); + else if (i == height - 1 && j == width - 1) + waddch (win, box | ACS_LRCORNER); + else if (!i) + waddch (win, border | ACS_HLINE); + else if (i == height - 1) + waddch (win, box | ACS_HLINE); + else if (!j) + waddch (win, border | ACS_VLINE); + else if (j == width - 1) + waddch (win, box | ACS_VLINE); + else + waddch (win, box | ' '); + } +} + +/* + * Draw shadows along the right and bottom edge to give a more 3D look + * to the boxes + */ +void +draw_shadow (WINDOW * win, int y, int x, int height, int width) +{ + int i; + + if (has_colors ()) { /* Whether terminal supports color? */ + wattrset (win, shadow_attr); + wmove (win, y + height, x + 2); + for (i = 0; i < width; i++) + waddch (win, winch (win) & A_CHARTEXT); + for (i = y + 1; i < y + height + 1; i++) { + wmove (win, i, x + width); + waddch (win, winch (win) & A_CHARTEXT); + waddch (win, winch (win) & A_CHARTEXT); + } + wnoutrefresh (win); + } +} + +/* + * Return the position of the first alphabetic character in a string. + */ +int +first_alpha(const char *string, const char *exempt) +{ + int i, in_paren=0, c; + + for (i = 0; i < strlen(string); i++) { + c = tolower(string[i]); + + if (strchr("<[(", c)) ++in_paren; + if (strchr(">])", c) && in_paren > 0) --in_paren; + + if ((! in_paren) && isalpha(c) && + strchr(exempt, c) == 0) + return i; + } + + return 0; +} + +/* + * Get the first selected item in the dialog_list_item list. + */ +struct dialog_list_item * +first_sel_item(int item_no, struct dialog_list_item ** items) +{ + int i; + + for (i = 0; i < item_no; i++) { + if (items[i]->selected) + return items[i]; + } + + return NULL; +} diff --git a/config/yesno.c b/config/yesno.c new file mode 100644 index 000000000..11fcc25f5 --- /dev/null +++ b/config/yesno.c @@ -0,0 +1,118 @@ +/* + * yesno.c -- implements the yes/no box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +/* + * Display termination buttons + */ +static void +print_buttons(WINDOW *dialog, int height, int width, int selected) +{ + int x = width / 2 - 10; + int y = height - 2; + + print_button (dialog, " Yes ", y, x, selected == 0); + print_button (dialog, " No ", y, x + 13, selected == 1); + + wmove(dialog, y, x+1 + 13*selected ); + wrefresh (dialog); +} + +/* + * Display a dialog box with two buttons - Yes and No + */ +int +dialog_yesno (const char *title, const char *prompt, int height, int width) +{ + int i, x, y, key = 0, button = 0; + WINDOW *dialog; + + /* center dialog box on screen */ + x = (COLS - width) / 2; + y = (LINES - height) / 2; + + draw_shadow (stdscr, y, x, height, width); + + dialog = newwin (height, width, y, x); + keypad (dialog, TRUE); + + draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr); + wattrset (dialog, border_attr); + mvwaddch (dialog, height-3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch (dialog, ACS_HLINE); + wattrset (dialog, dialog_attr); + waddch (dialog, ACS_RTEE); + + if (title != NULL && strlen(title) >= width-2 ) { + /* truncate long title -- mec */ + char * title2 = malloc(width-2+1); + memcpy( title2, title, width-2 ); + title2[width-2] = '\0'; + title = title2; + } + + if (title != NULL) { + wattrset (dialog, title_attr); + mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); + waddstr (dialog, (char *)title); + waddch (dialog, ' '); + } + + wattrset (dialog, dialog_attr); + print_autowrap (dialog, prompt, width - 2, 1, 3); + + print_buttons(dialog, height, width, 0); + + while (key != ESC) { + key = wgetch (dialog); + switch (key) { + case 'Y': + case 'y': + delwin (dialog); + return 0; + case 'N': + case 'n': + delwin (dialog); + return 1; + + case TAB: + case KEY_LEFT: + case KEY_RIGHT: + button = ((key == KEY_LEFT ? --button : ++button) < 0) + ? 1 : (button > 1 ? 0 : button); + + print_buttons(dialog, height, width, button); + wrefresh (dialog); + break; + case ' ': + case '\n': + delwin (dialog); + return button; + case ESC: + break; + } + } + + delwin (dialog); + return -1; /* ESC pressed */ +} diff --git a/config/zconf.l b/config/zconf.l new file mode 100644 index 000000000..3a4947a88 --- /dev/null +++ b/config/zconf.l @@ -0,0 +1,387 @@ +%option backup nostdinit noyywrap never-interactive full ecs +%option 8bit backup nodefault perf-report perf-report +%x COMMAND HELP STRING PARAM +%{ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include + +#define LKC_DIRECT_LINK +#include "lkc.h" + +#define START_STRSIZE 16 + +char *text; +static char *text_ptr; +static int text_size, text_asize; + +struct buffer { + struct buffer *parent; + YY_BUFFER_STATE state; +}; + +struct buffer *current_buf; + +static int last_ts, first_ts; + +static void zconf_endhelp(void); +static struct buffer *zconf_endfile(void); + +void new_string(void) +{ + text = malloc(START_STRSIZE); + text_asize = START_STRSIZE; + text_ptr = text; + text_size = 0; + *text_ptr = 0; +} + +void append_string(const char *str, int size) +{ + int new_size = text_size + size + 1; + if (new_size > text_asize) { + text = realloc(text, new_size); + text_asize = new_size; + text_ptr = text + text_size; + } + memcpy(text_ptr, str, size); + text_ptr += size; + text_size += size; + *text_ptr = 0; +} + +void alloc_string(const char *str, int size) +{ + text = malloc(size + 1); + memcpy(text, str, size); + text[size] = 0; +} +%} + +ws [ \n\t] +n [A-Za-z0-9_] + +%% + int str = 0; + int ts, i; + +[ \t]*#.*\n current_file->lineno++; +[ \t]*#.* + +[ \t]*\n current_file->lineno++; return T_EOL; + +[ \t]+ { + BEGIN(COMMAND); +} + +. { + unput(yytext[0]); + BEGIN(COMMAND); +} + + +{ + "mainmenu" BEGIN(PARAM); return T_MAINMENU; + "menu" BEGIN(PARAM); return T_MENU; + "endmenu" BEGIN(PARAM); return T_ENDMENU; + "source" BEGIN(PARAM); return T_SOURCE; + "choice" BEGIN(PARAM); return T_CHOICE; + "endchoice" BEGIN(PARAM); return T_ENDCHOICE; + "comment" BEGIN(PARAM); return T_COMMENT; + "config" BEGIN(PARAM); return T_CONFIG; + "menuconfig" BEGIN(PARAM); return T_MENUCONFIG; + "help" BEGIN(PARAM); return T_HELP; + "if" BEGIN(PARAM); return T_IF; + "endif" BEGIN(PARAM); return T_ENDIF; + "depends" BEGIN(PARAM); return T_DEPENDS; + "requires" BEGIN(PARAM); return T_REQUIRES; + "optional" BEGIN(PARAM); return T_OPTIONAL; + "default" BEGIN(PARAM); return T_DEFAULT; + "prompt" BEGIN(PARAM); return T_PROMPT; + "tristate" BEGIN(PARAM); return T_TRISTATE; + "def_tristate" BEGIN(PARAM); return T_DEF_TRISTATE; + "bool" BEGIN(PARAM); return T_BOOLEAN; + "boolean" BEGIN(PARAM); return T_BOOLEAN; + "def_bool" BEGIN(PARAM); return T_DEF_BOOLEAN; + "def_boolean" BEGIN(PARAM); return T_DEF_BOOLEAN; + "int" BEGIN(PARAM); return T_INT; + "hex" BEGIN(PARAM); return T_HEX; + "string" BEGIN(PARAM); return T_STRING; + "select" BEGIN(PARAM); return T_SELECT; + "enable" BEGIN(PARAM); return T_SELECT; + "range" BEGIN(PARAM); return T_RANGE; + {n}+ { + alloc_string(yytext, yyleng); + zconflval.string = text; + return T_WORD; + } + . + \n current_file->lineno++; BEGIN(INITIAL); +} + +{ + "&&" return T_AND; + "||" return T_OR; + "(" return T_OPEN_PAREN; + ")" return T_CLOSE_PAREN; + "!" return T_NOT; + "=" return T_EQUAL; + "!=" return T_UNEQUAL; + "if" return T_IF; + "on" return T_ON; + \"|\' { + str = yytext[0]; + new_string(); + BEGIN(STRING); + } + \n BEGIN(INITIAL); current_file->lineno++; return T_EOL; + --- /* ignore */ + ({n}|[-/.])+ { + alloc_string(yytext, yyleng); + zconflval.string = text; + return T_WORD; + } + #.* /* comment */ + \\\n current_file->lineno++; + . + <> { + BEGIN(INITIAL); + } +} + +{ + [^'"\\\n]+/\n { + append_string(yytext, yyleng); + zconflval.string = text; + return T_WORD_QUOTE; + } + [^'"\\\n]+ { + append_string(yytext, yyleng); + } + \\.?/\n { + append_string(yytext + 1, yyleng - 1); + zconflval.string = text; + return T_WORD_QUOTE; + } + \\.? { + append_string(yytext + 1, yyleng - 1); + } + \'|\" { + if (str == yytext[0]) { + BEGIN(PARAM); + zconflval.string = text; + return T_WORD_QUOTE; + } else + append_string(yytext, 1); + } + \n { + printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); + current_file->lineno++; + BEGIN(INITIAL); + return T_EOL; + } + <> { + BEGIN(INITIAL); + } +} + +{ + [ \t]+ { + ts = 0; + for (i = 0; i < yyleng; i++) { + if (yytext[i] == '\t') + ts = (ts & ~7) + 8; + else + ts++; + } + last_ts = ts; + if (first_ts) { + if (ts < first_ts) { + zconf_endhelp(); + return T_HELPTEXT; + } + ts -= first_ts; + while (ts > 8) { + append_string(" ", 8); + ts -= 8; + } + append_string(" ", ts); + } + } + [ \t]*\n/[^ \t\n] { + current_file->lineno++; + zconf_endhelp(); + return T_HELPTEXT; + } + [ \t]*\n { + current_file->lineno++; + append_string("\n", 1); + } + [^ \t\n].* { + append_string(yytext, yyleng); + if (!first_ts) + first_ts = last_ts; + } + <> { + zconf_endhelp(); + return T_HELPTEXT; + } +} + +<> { + if (current_buf) { + zconf_endfile(); + return T_EOF; + } + fclose(yyin); + yyterminate(); +} + +%% +void zconf_starthelp(void) +{ + new_string(); + last_ts = first_ts = 0; + BEGIN(HELP); +} + +static void zconf_endhelp(void) +{ + zconflval.string = text; + BEGIN(INITIAL); +} + + +/* + * Try to open specified file with following names: + * ./name + * $(srctree)/name + * The latter is used when srctree is separate from objtree + * when compiling the kernel. + * Return NULL if file is not found. + */ +FILE *zconf_fopen(const char *name) +{ + char *env, fullname[PATH_MAX+1]; + FILE *f; + + f = fopen(name, "r"); + if (!f && name[0] != '/') { + env = getenv(SRCTREE); + if (env) { + sprintf(fullname, "%s/%s", env, name); + f = fopen(fullname, "r"); + } + } + return f; +} + +void zconf_initscan(const char *name) +{ + yyin = zconf_fopen(name); + if (!yyin) { + printf("can't find file %s\n", name); + exit(1); + } + + current_buf = malloc(sizeof(*current_buf)); + memset(current_buf, 0, sizeof(*current_buf)); + + current_file = file_lookup(name); + current_file->lineno = 1; + current_file->flags = FILE_BUSY; +} + +void zconf_nextfile(const char *name) +{ + size_t i; + int retval; + glob_t files; + char *filename; + struct file *file; + struct buffer *buf; + + retval = glob(name, GLOB_ERR | GLOB_MARK, NULL, &files); + if (retval == GLOB_NOSPACE || retval == GLOB_ABORTED || retval == GLOB_NOMATCH) { + printf("%s:%d: glob failed: %s \"%s\"\n", zconf_curname(), zconf_lineno(), + retval == GLOB_NOSPACE ? "failed to allocate memory" : + retval == GLOB_ABORTED ? "read error" : "no match", + name); + exit(1); + } + + for (i = files.gl_pathc-1; i != (size_t)-1; --i) { + filename = files.gl_pathv[i]; + + file = file_lookup(filename); + buf = malloc(sizeof(*buf)); + memset(buf, 0, sizeof(*buf)); + current_buf->state = YY_CURRENT_BUFFER; + zconfin = zconf_fopen(filename); + if (!zconfin) { + printf("%s:%d: can't open file \"%s\"\n", + zconf_curname(), zconf_lineno(), filename); + exit(1); + } + zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE)); + buf->parent = current_buf; + current_buf = buf; + + if (file->flags & FILE_BUSY) { + printf("recursive scan (%s)?\n", filename); + exit(1); + } + if (file->flags & FILE_SCANNED) { + printf("file %s already scanned?\n", filename); + exit(1); + } + file->flags |= FILE_BUSY; + file->lineno = 1; + file->parent = current_file; + current_file = file; + } +} + +static struct buffer *zconf_endfile(void) +{ + struct buffer *parent; + + current_file->flags |= FILE_SCANNED; + current_file->flags &= ~FILE_BUSY; + current_file = current_file->parent; + + parent = current_buf->parent; + if (parent) { + fclose(yyin); + yy_delete_buffer(YY_CURRENT_BUFFER); + yy_switch_to_buffer(parent->state); + } + free(current_buf); + current_buf = parent; + + return parent; +} + +int zconf_lineno(void) +{ + if (current_buf) + return current_file->lineno - 1; + else + return 0; +} + +char *zconf_curname(void) +{ + if (current_buf) + return current_file->name; + else + return ""; +} diff --git a/config/zconf.output b/config/zconf.output new file mode 100644 index 000000000..a4d86e975 --- /dev/null +++ b/config/zconf.output @@ -0,0 +1,2133 @@ +State 52 conflicts: 1 shift/reduce +State 53 conflicts: 1 shift/reduce +State 54 conflicts: 1 shift/reduce +State 55 conflicts: 10 shift/reduce +State 56 conflicts: 12 shift/reduce +State 57 conflicts: 1 shift/reduce +State 58 conflicts: 13 shift/reduce +State 59 conflicts: 1 shift/reduce + + +Grammar + + 0 $accept: input $end + + 1 input: /* empty */ + 2 | input block + + 3 block: common_block + 4 | choice_stmt + 5 | menu_stmt + 6 | T_MAINMENU prompt nl_or_eof + 7 | T_ENDMENU + 8 | T_ENDIF + 9 | T_ENDCHOICE + 10 | error nl_or_eof + + 11 common_block: if_stmt + 12 | comment_stmt + 13 | config_stmt + 14 | menuconfig_stmt + 15 | source_stmt + 16 | nl_or_eof + + 17 config_entry_start: T_CONFIG T_WORD T_EOL + + 18 config_stmt: config_entry_start config_option_list + + 19 menuconfig_entry_start: T_MENUCONFIG T_WORD T_EOL + + 20 menuconfig_stmt: menuconfig_entry_start config_option_list + + 21 config_option_list: /* empty */ + 22 | config_option_list config_option + 23 | config_option_list depends + 24 | config_option_list help + 25 | config_option_list T_EOL + + 26 config_option: T_TRISTATE prompt_stmt_opt T_EOL + 27 | T_DEF_TRISTATE expr if_expr T_EOL + 28 | T_BOOLEAN prompt_stmt_opt T_EOL + 29 | T_DEF_BOOLEAN expr if_expr T_EOL + 30 | T_INT prompt_stmt_opt T_EOL + 31 | T_HEX prompt_stmt_opt T_EOL + 32 | T_STRING prompt_stmt_opt T_EOL + 33 | T_PROMPT prompt if_expr T_EOL + 34 | T_DEFAULT expr if_expr T_EOL + 35 | T_SELECT T_WORD if_expr T_EOL + 36 | T_SELECT T_NOT T_WORD if_expr T_EOL + 37 | T_RANGE symbol symbol if_expr T_EOL + + 38 choice: T_CHOICE T_EOL + + 39 choice_entry: choice choice_option_list + + 40 choice_end: end + + 41 choice_stmt: choice_entry choice_block choice_end + 42 | choice_entry choice_block + + 43 choice_option_list: /* empty */ + 44 | choice_option_list choice_option + 45 | choice_option_list depends + 46 | choice_option_list help + 47 | choice_option_list T_EOL + + 48 choice_option: T_PROMPT prompt if_expr T_EOL + 49 | T_TRISTATE prompt_stmt_opt T_EOL + 50 | T_BOOLEAN prompt_stmt_opt T_EOL + 51 | T_OPTIONAL T_EOL + 52 | T_DEFAULT T_WORD if_expr T_EOL + + 53 choice_block: /* empty */ + 54 | choice_block common_block + + 55 if: T_IF expr T_EOL + + 56 if_end: end + + 57 if_stmt: if if_block if_end + 58 | if if_block + + 59 if_block: /* empty */ + 60 | if_block common_block + 61 | if_block menu_stmt + 62 | if_block choice_stmt + + 63 menu: T_MENU prompt T_EOL + + 64 menu_entry: menu depends_list + + 65 menu_end: end + + 66 menu_stmt: menu_entry menu_block menu_end + 67 | menu_entry menu_block + + 68 menu_block: /* empty */ + 69 | menu_block common_block + 70 | menu_block menu_stmt + 71 | menu_block choice_stmt + 72 | menu_block error T_EOL + + 73 source: T_SOURCE prompt T_EOL + + 74 source_stmt: source + + 75 comment: T_COMMENT prompt T_EOL + + 76 comment_stmt: comment depends_list + + 77 help_start: T_HELP T_EOL + + 78 help: help_start T_HELPTEXT + + 79 depends_list: /* empty */ + 80 | depends_list depends + 81 | depends_list T_EOL + + 82 depends: T_DEPENDS T_ON expr T_EOL + 83 | T_DEPENDS expr T_EOL + 84 | T_REQUIRES expr T_EOL + + 85 prompt_stmt_opt: /* empty */ + 86 | prompt if_expr + + 87 prompt: T_WORD + 88 | T_WORD_QUOTE + + 89 end: T_ENDMENU nl_or_eof + 90 | T_ENDCHOICE nl_or_eof + 91 | T_ENDIF nl_or_eof + + 92 nl_or_eof: T_EOL + 93 | T_EOF + + 94 if_expr: /* empty */ + 95 | T_IF expr + + 96 expr: symbol + 97 | symbol T_EQUAL symbol + 98 | symbol T_UNEQUAL symbol + 99 | T_OPEN_PAREN expr T_CLOSE_PAREN + 100 | T_NOT expr + 101 | expr T_OR expr + 102 | expr T_AND expr + + 103 symbol: T_WORD + 104 | T_WORD_QUOTE + + +Terminals, with rules where they appear + +$end (0) 0 +error (256) 10 72 +T_MAINMENU (258) 6 +T_MENU (259) 63 +T_ENDMENU (260) 7 89 +T_SOURCE (261) 73 +T_CHOICE (262) 38 +T_ENDCHOICE (263) 9 90 +T_COMMENT (264) 75 +T_CONFIG (265) 17 +T_MENUCONFIG (266) 19 +T_HELP (267) 77 +T_HELPTEXT (268) 78 +T_IF (269) 55 95 +T_ENDIF (270) 8 91 +T_DEPENDS (271) 82 83 +T_REQUIRES (272) 84 +T_OPTIONAL (273) 51 +T_PROMPT (274) 33 48 +T_DEFAULT (275) 34 52 +T_TRISTATE (276) 26 49 +T_DEF_TRISTATE (277) 27 +T_BOOLEAN (278) 28 50 +T_DEF_BOOLEAN (279) 29 +T_STRING (280) 32 +T_INT (281) 30 +T_HEX (282) 31 +T_WORD (283) 17 19 35 36 52 87 103 +T_WORD_QUOTE (284) 88 104 +T_UNEQUAL (285) 98 +T_EOF (286) 93 +T_EOL (287) 17 19 25 26 27 28 29 30 31 32 33 34 35 36 37 38 47 48 49 + 50 51 52 55 63 72 73 75 77 81 82 83 84 92 +T_CLOSE_PAREN (288) 99 +T_OPEN_PAREN (289) 99 +T_ON (290) 82 +T_SELECT (291) 35 36 +T_RANGE (292) 37 +T_OR (293) 101 +T_AND (294) 102 +T_EQUAL (295) 97 +T_NOT (296) 36 100 + + +Nonterminals, with rules where they appear + +$accept (42) + on left: 0 +input (43) + on left: 1 2, on right: 0 2 +block (44) + on left: 3 4 5 6 7 8 9 10, on right: 2 +common_block (45) + on left: 11 12 13 14 15 16, on right: 3 54 60 69 +config_entry_start (46) + on left: 17, on right: 18 +config_stmt (47) + on left: 18, on right: 13 +menuconfig_entry_start (48) + on left: 19, on right: 20 +menuconfig_stmt (49) + on left: 20, on right: 14 +config_option_list (50) + on left: 21 22 23 24 25, on right: 18 20 22 23 24 25 +config_option (51) + on left: 26 27 28 29 30 31 32 33 34 35 36 37, on right: 22 +choice (52) + on left: 38, on right: 39 +choice_entry (53) + on left: 39, on right: 41 42 +choice_end (54) + on left: 40, on right: 41 +choice_stmt (55) + on left: 41 42, on right: 4 62 71 +choice_option_list (56) + on left: 43 44 45 46 47, on right: 39 44 45 46 47 +choice_option (57) + on left: 48 49 50 51 52, on right: 44 +choice_block (58) + on left: 53 54, on right: 41 42 54 +if (59) + on left: 55, on right: 57 58 +if_end (60) + on left: 56, on right: 57 +if_stmt (61) + on left: 57 58, on right: 11 +if_block (62) + on left: 59 60 61 62, on right: 57 58 60 61 62 +menu (63) + on left: 63, on right: 64 +menu_entry (64) + on left: 64, on right: 66 67 +menu_end (65) + on left: 65, on right: 66 +menu_stmt (66) + on left: 66 67, on right: 5 61 70 +menu_block (67) + on left: 68 69 70 71 72, on right: 66 67 69 70 71 72 +source (68) + on left: 73, on right: 74 +source_stmt (69) + on left: 74, on right: 15 +comment (70) + on left: 75, on right: 76 +comment_stmt (71) + on left: 76, on right: 12 +help_start (72) + on left: 77, on right: 78 +help (73) + on left: 78, on right: 24 46 +depends_list (74) + on left: 79 80 81, on right: 64 76 80 81 +depends (75) + on left: 82 83 84, on right: 23 45 80 +prompt_stmt_opt (76) + on left: 85 86, on right: 26 28 30 31 32 49 50 +prompt (77) + on left: 87 88, on right: 6 33 48 63 73 75 86 +end (78) + on left: 89 90 91, on right: 40 56 65 +nl_or_eof (79) + on left: 92 93, on right: 6 10 16 89 90 91 +if_expr (80) + on left: 94 95, on right: 27 29 33 34 35 36 37 48 52 86 +expr (81) + on left: 96 97 98 99 100 101 102, on right: 27 29 34 55 82 83 84 + 95 99 100 101 102 +symbol (82) + on left: 103 104, on right: 37 96 97 98 + + +state 0 + + 0 $accept: . input $end + + $default reduce using rule 1 (input) + + input go to state 1 + + +state 1 + + 0 $accept: input . $end + 2 input: input . block + + $end shift, and go to state 2 + error shift, and go to state 3 + T_MAINMENU shift, and go to state 4 + T_MENU shift, and go to state 5 + T_ENDMENU shift, and go to state 6 + T_SOURCE shift, and go to state 7 + T_CHOICE shift, and go to state 8 + T_ENDCHOICE shift, and go to state 9 + T_COMMENT shift, and go to state 10 + T_CONFIG shift, and go to state 11 + T_MENUCONFIG shift, and go to state 12 + T_IF shift, and go to state 13 + T_ENDIF shift, and go to state 14 + T_EOF shift, and go to state 15 + T_EOL shift, and go to state 16 + + block go to state 17 + common_block go to state 18 + config_entry_start go to state 19 + config_stmt go to state 20 + menuconfig_entry_start go to state 21 + menuconfig_stmt go to state 22 + choice go to state 23 + choice_entry go to state 24 + choice_stmt go to state 25 + if go to state 26 + if_stmt go to state 27 + menu go to state 28 + menu_entry go to state 29 + menu_stmt go to state 30 + source go to state 31 + source_stmt go to state 32 + comment go to state 33 + comment_stmt go to state 34 + nl_or_eof go to state 35 + + +state 2 + + 0 $accept: input $end . + + $default accept + + +state 3 + + 10 block: error . nl_or_eof + + T_EOF shift, and go to state 15 + T_EOL shift, and go to state 16 + + nl_or_eof go to state 36 + + +state 4 + + 6 block: T_MAINMENU . prompt nl_or_eof + + T_WORD shift, and go to state 37 + T_WORD_QUOTE shift, and go to state 38 + + prompt go to state 39 + + +state 5 + + 63 menu: T_MENU . prompt T_EOL + + T_WORD shift, and go to state 37 + T_WORD_QUOTE shift, and go to state 38 + + prompt go to state 40 + + +state 6 + + 7 block: T_ENDMENU . + + $default reduce using rule 7 (block) + + +state 7 + + 73 source: T_SOURCE . prompt T_EOL + + T_WORD shift, and go to state 37 + T_WORD_QUOTE shift, and go to state 38 + + prompt go to state 41 + + +state 8 + + 38 choice: T_CHOICE . T_EOL + + T_EOL shift, and go to state 42 + + +state 9 + + 9 block: T_ENDCHOICE . + + $default reduce using rule 9 (block) + + +state 10 + + 75 comment: T_COMMENT . prompt T_EOL + + T_WORD shift, and go to state 37 + T_WORD_QUOTE shift, and go to state 38 + + prompt go to state 43 + + +state 11 + + 17 config_entry_start: T_CONFIG . T_WORD T_EOL + + T_WORD shift, and go to state 44 + + +state 12 + + 19 menuconfig_entry_start: T_MENUCONFIG . T_WORD T_EOL + + T_WORD shift, and go to state 45 + + +state 13 + + 55 if: T_IF . expr T_EOL + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + T_OPEN_PAREN shift, and go to state 48 + T_NOT shift, and go to state 49 + + expr go to state 50 + symbol go to state 51 + + +state 14 + + 8 block: T_ENDIF . + + $default reduce using rule 8 (block) + + +state 15 + + 93 nl_or_eof: T_EOF . + + $default reduce using rule 93 (nl_or_eof) + + +state 16 + + 92 nl_or_eof: T_EOL . + + $default reduce using rule 92 (nl_or_eof) + + +state 17 + + 2 input: input block . + + $default reduce using rule 2 (input) + + +state 18 + + 3 block: common_block . + + $default reduce using rule 3 (block) + + +state 19 + + 18 config_stmt: config_entry_start . config_option_list + + $default reduce using rule 21 (config_option_list) + + config_option_list go to state 52 + + +state 20 + + 13 common_block: config_stmt . + + $default reduce using rule 13 (common_block) + + +state 21 + + 20 menuconfig_stmt: menuconfig_entry_start . config_option_list + + $default reduce using rule 21 (config_option_list) + + config_option_list go to state 53 + + +state 22 + + 14 common_block: menuconfig_stmt . + + $default reduce using rule 14 (common_block) + + +state 23 + + 39 choice_entry: choice . choice_option_list + + $default reduce using rule 43 (choice_option_list) + + choice_option_list go to state 54 + + +state 24 + + 41 choice_stmt: choice_entry . choice_block choice_end + 42 | choice_entry . choice_block + + $default reduce using rule 53 (choice_block) + + choice_block go to state 55 + + +state 25 + + 4 block: choice_stmt . + + $default reduce using rule 4 (block) + + +state 26 + + 57 if_stmt: if . if_block if_end + 58 | if . if_block + + $default reduce using rule 59 (if_block) + + if_block go to state 56 + + +state 27 + + 11 common_block: if_stmt . + + $default reduce using rule 11 (common_block) + + +state 28 + + 64 menu_entry: menu . depends_list + + $default reduce using rule 79 (depends_list) + + depends_list go to state 57 + + +state 29 + + 66 menu_stmt: menu_entry . menu_block menu_end + 67 | menu_entry . menu_block + + $default reduce using rule 68 (menu_block) + + menu_block go to state 58 + + +state 30 + + 5 block: menu_stmt . + + $default reduce using rule 5 (block) + + +state 31 + + 74 source_stmt: source . + + $default reduce using rule 74 (source_stmt) + + +state 32 + + 15 common_block: source_stmt . + + $default reduce using rule 15 (common_block) + + +state 33 + + 76 comment_stmt: comment . depends_list + + $default reduce using rule 79 (depends_list) + + depends_list go to state 59 + + +state 34 + + 12 common_block: comment_stmt . + + $default reduce using rule 12 (common_block) + + +state 35 + + 16 common_block: nl_or_eof . + + $default reduce using rule 16 (common_block) + + +state 36 + + 10 block: error nl_or_eof . + + $default reduce using rule 10 (block) + + +state 37 + + 87 prompt: T_WORD . + + $default reduce using rule 87 (prompt) + + +state 38 + + 88 prompt: T_WORD_QUOTE . + + $default reduce using rule 88 (prompt) + + +state 39 + + 6 block: T_MAINMENU prompt . nl_or_eof + + T_EOF shift, and go to state 15 + T_EOL shift, and go to state 16 + + nl_or_eof go to state 60 + + +state 40 + + 63 menu: T_MENU prompt . T_EOL + + T_EOL shift, and go to state 61 + + +state 41 + + 73 source: T_SOURCE prompt . T_EOL + + T_EOL shift, and go to state 62 + + +state 42 + + 38 choice: T_CHOICE T_EOL . + + $default reduce using rule 38 (choice) + + +state 43 + + 75 comment: T_COMMENT prompt . T_EOL + + T_EOL shift, and go to state 63 + + +state 44 + + 17 config_entry_start: T_CONFIG T_WORD . T_EOL + + T_EOL shift, and go to state 64 + + +state 45 + + 19 menuconfig_entry_start: T_MENUCONFIG T_WORD . T_EOL + + T_EOL shift, and go to state 65 + + +state 46 + + 103 symbol: T_WORD . + + $default reduce using rule 103 (symbol) + + +state 47 + + 104 symbol: T_WORD_QUOTE . + + $default reduce using rule 104 (symbol) + + +state 48 + + 99 expr: T_OPEN_PAREN . expr T_CLOSE_PAREN + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + T_OPEN_PAREN shift, and go to state 48 + T_NOT shift, and go to state 49 + + expr go to state 66 + symbol go to state 51 + + +state 49 + + 100 expr: T_NOT . expr + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + T_OPEN_PAREN shift, and go to state 48 + T_NOT shift, and go to state 49 + + expr go to state 67 + symbol go to state 51 + + +state 50 + + 55 if: T_IF expr . T_EOL + 101 expr: expr . T_OR expr + 102 | expr . T_AND expr + + T_EOL shift, and go to state 68 + T_OR shift, and go to state 69 + T_AND shift, and go to state 70 + + +state 51 + + 96 expr: symbol . + 97 | symbol . T_EQUAL symbol + 98 | symbol . T_UNEQUAL symbol + + T_UNEQUAL shift, and go to state 71 + T_EQUAL shift, and go to state 72 + + $default reduce using rule 96 (expr) + + +state 52 + + 18 config_stmt: config_entry_start config_option_list . + 22 config_option_list: config_option_list . config_option + 23 | config_option_list . depends + 24 | config_option_list . help + 25 | config_option_list . T_EOL + + T_HELP shift, and go to state 73 + T_DEPENDS shift, and go to state 74 + T_REQUIRES shift, and go to state 75 + T_PROMPT shift, and go to state 76 + T_DEFAULT shift, and go to state 77 + T_TRISTATE shift, and go to state 78 + T_DEF_TRISTATE shift, and go to state 79 + T_BOOLEAN shift, and go to state 80 + T_DEF_BOOLEAN shift, and go to state 81 + T_STRING shift, and go to state 82 + T_INT shift, and go to state 83 + T_HEX shift, and go to state 84 + T_EOL shift, and go to state 85 + T_SELECT shift, and go to state 86 + T_RANGE shift, and go to state 87 + + T_EOL [reduce using rule 18 (config_stmt)] + $default reduce using rule 18 (config_stmt) + + config_option go to state 88 + help_start go to state 89 + help go to state 90 + depends go to state 91 + + +state 53 + + 20 menuconfig_stmt: menuconfig_entry_start config_option_list . + 22 config_option_list: config_option_list . config_option + 23 | config_option_list . depends + 24 | config_option_list . help + 25 | config_option_list . T_EOL + + T_HELP shift, and go to state 73 + T_DEPENDS shift, and go to state 74 + T_REQUIRES shift, and go to state 75 + T_PROMPT shift, and go to state 76 + T_DEFAULT shift, and go to state 77 + T_TRISTATE shift, and go to state 78 + T_DEF_TRISTATE shift, and go to state 79 + T_BOOLEAN shift, and go to state 80 + T_DEF_BOOLEAN shift, and go to state 81 + T_STRING shift, and go to state 82 + T_INT shift, and go to state 83 + T_HEX shift, and go to state 84 + T_EOL shift, and go to state 85 + T_SELECT shift, and go to state 86 + T_RANGE shift, and go to state 87 + + T_EOL [reduce using rule 20 (menuconfig_stmt)] + $default reduce using rule 20 (menuconfig_stmt) + + config_option go to state 88 + help_start go to state 89 + help go to state 90 + depends go to state 91 + + +state 54 + + 39 choice_entry: choice choice_option_list . + 44 choice_option_list: choice_option_list . choice_option + 45 | choice_option_list . depends + 46 | choice_option_list . help + 47 | choice_option_list . T_EOL + + T_HELP shift, and go to state 73 + T_DEPENDS shift, and go to state 74 + T_REQUIRES shift, and go to state 75 + T_OPTIONAL shift, and go to state 92 + T_PROMPT shift, and go to state 93 + T_DEFAULT shift, and go to state 94 + T_TRISTATE shift, and go to state 95 + T_BOOLEAN shift, and go to state 96 + T_EOL shift, and go to state 97 + + T_EOL [reduce using rule 39 (choice_entry)] + $default reduce using rule 39 (choice_entry) + + choice_option go to state 98 + help_start go to state 89 + help go to state 99 + depends go to state 100 + + +state 55 + + 41 choice_stmt: choice_entry choice_block . choice_end + 42 | choice_entry choice_block . + 54 choice_block: choice_block . common_block + + T_ENDMENU shift, and go to state 101 + T_SOURCE shift, and go to state 7 + T_ENDCHOICE shift, and go to state 102 + T_COMMENT shift, and go to state 10 + T_CONFIG shift, and go to state 11 + T_MENUCONFIG shift, and go to state 12 + T_IF shift, and go to state 13 + T_ENDIF shift, and go to state 103 + T_EOF shift, and go to state 15 + T_EOL shift, and go to state 16 + + T_ENDMENU [reduce using rule 42 (choice_stmt)] + T_SOURCE [reduce using rule 42 (choice_stmt)] + T_ENDCHOICE [reduce using rule 42 (choice_stmt)] + T_COMMENT [reduce using rule 42 (choice_stmt)] + T_CONFIG [reduce using rule 42 (choice_stmt)] + T_MENUCONFIG [reduce using rule 42 (choice_stmt)] + T_IF [reduce using rule 42 (choice_stmt)] + T_ENDIF [reduce using rule 42 (choice_stmt)] + T_EOF [reduce using rule 42 (choice_stmt)] + T_EOL [reduce using rule 42 (choice_stmt)] + $default reduce using rule 42 (choice_stmt) + + common_block go to state 104 + config_entry_start go to state 19 + config_stmt go to state 20 + menuconfig_entry_start go to state 21 + menuconfig_stmt go to state 22 + choice_end go to state 105 + if go to state 26 + if_stmt go to state 27 + source go to state 31 + source_stmt go to state 32 + comment go to state 33 + comment_stmt go to state 34 + end go to state 106 + nl_or_eof go to state 35 + + +state 56 + + 57 if_stmt: if if_block . if_end + 58 | if if_block . + 60 if_block: if_block . common_block + 61 | if_block . menu_stmt + 62 | if_block . choice_stmt + + T_MENU shift, and go to state 5 + T_ENDMENU shift, and go to state 101 + T_SOURCE shift, and go to state 7 + T_CHOICE shift, and go to state 8 + T_ENDCHOICE shift, and go to state 102 + T_COMMENT shift, and go to state 10 + T_CONFIG shift, and go to state 11 + T_MENUCONFIG shift, and go to state 12 + T_IF shift, and go to state 13 + T_ENDIF shift, and go to state 103 + T_EOF shift, and go to state 15 + T_EOL shift, and go to state 16 + + T_MENU [reduce using rule 58 (if_stmt)] + T_ENDMENU [reduce using rule 58 (if_stmt)] + T_SOURCE [reduce using rule 58 (if_stmt)] + T_CHOICE [reduce using rule 58 (if_stmt)] + T_ENDCHOICE [reduce using rule 58 (if_stmt)] + T_COMMENT [reduce using rule 58 (if_stmt)] + T_CONFIG [reduce using rule 58 (if_stmt)] + T_MENUCONFIG [reduce using rule 58 (if_stmt)] + T_IF [reduce using rule 58 (if_stmt)] + T_ENDIF [reduce using rule 58 (if_stmt)] + T_EOF [reduce using rule 58 (if_stmt)] + T_EOL [reduce using rule 58 (if_stmt)] + $default reduce using rule 58 (if_stmt) + + common_block go to state 107 + config_entry_start go to state 19 + config_stmt go to state 20 + menuconfig_entry_start go to state 21 + menuconfig_stmt go to state 22 + choice go to state 23 + choice_entry go to state 24 + choice_stmt go to state 108 + if go to state 26 + if_end go to state 109 + if_stmt go to state 27 + menu go to state 28 + menu_entry go to state 29 + menu_stmt go to state 110 + source go to state 31 + source_stmt go to state 32 + comment go to state 33 + comment_stmt go to state 34 + end go to state 111 + nl_or_eof go to state 35 + + +state 57 + + 64 menu_entry: menu depends_list . + 80 depends_list: depends_list . depends + 81 | depends_list . T_EOL + + T_DEPENDS shift, and go to state 74 + T_REQUIRES shift, and go to state 75 + T_EOL shift, and go to state 112 + + T_EOL [reduce using rule 64 (menu_entry)] + $default reduce using rule 64 (menu_entry) + + depends go to state 113 + + +state 58 + + 66 menu_stmt: menu_entry menu_block . menu_end + 67 | menu_entry menu_block . + 69 menu_block: menu_block . common_block + 70 | menu_block . menu_stmt + 71 | menu_block . choice_stmt + 72 | menu_block . error T_EOL + + error shift, and go to state 114 + T_MENU shift, and go to state 5 + T_ENDMENU shift, and go to state 101 + T_SOURCE shift, and go to state 7 + T_CHOICE shift, and go to state 8 + T_ENDCHOICE shift, and go to state 102 + T_COMMENT shift, and go to state 10 + T_CONFIG shift, and go to state 11 + T_MENUCONFIG shift, and go to state 12 + T_IF shift, and go to state 13 + T_ENDIF shift, and go to state 103 + T_EOF shift, and go to state 15 + T_EOL shift, and go to state 16 + + $end reduce using rule 67 (menu_stmt) + error [reduce using rule 67 (menu_stmt)] + T_MAINMENU reduce using rule 67 (menu_stmt) + T_MENU [reduce using rule 67 (menu_stmt)] + T_ENDMENU [reduce using rule 67 (menu_stmt)] + T_SOURCE [reduce using rule 67 (menu_stmt)] + T_CHOICE [reduce using rule 67 (menu_stmt)] + T_ENDCHOICE [reduce using rule 67 (menu_stmt)] + T_COMMENT [reduce using rule 67 (menu_stmt)] + T_CONFIG [reduce using rule 67 (menu_stmt)] + T_MENUCONFIG [reduce using rule 67 (menu_stmt)] + T_IF [reduce using rule 67 (menu_stmt)] + T_ENDIF [reduce using rule 67 (menu_stmt)] + T_EOF [reduce using rule 67 (menu_stmt)] + T_EOL [reduce using rule 67 (menu_stmt)] + + common_block go to state 115 + config_entry_start go to state 19 + config_stmt go to state 20 + menuconfig_entry_start go to state 21 + menuconfig_stmt go to state 22 + choice go to state 23 + choice_entry go to state 24 + choice_stmt go to state 116 + if go to state 26 + if_stmt go to state 27 + menu go to state 28 + menu_entry go to state 29 + menu_end go to state 117 + menu_stmt go to state 118 + source go to state 31 + source_stmt go to state 32 + comment go to state 33 + comment_stmt go to state 34 + end go to state 119 + nl_or_eof go to state 35 + + +state 59 + + 76 comment_stmt: comment depends_list . + 80 depends_list: depends_list . depends + 81 | depends_list . T_EOL + + T_DEPENDS shift, and go to state 74 + T_REQUIRES shift, and go to state 75 + T_EOL shift, and go to state 112 + + T_EOL [reduce using rule 76 (comment_stmt)] + $default reduce using rule 76 (comment_stmt) + + depends go to state 113 + + +state 60 + + 6 block: T_MAINMENU prompt nl_or_eof . + + $default reduce using rule 6 (block) + + +state 61 + + 63 menu: T_MENU prompt T_EOL . + + $default reduce using rule 63 (menu) + + +state 62 + + 73 source: T_SOURCE prompt T_EOL . + + $default reduce using rule 73 (source) + + +state 63 + + 75 comment: T_COMMENT prompt T_EOL . + + $default reduce using rule 75 (comment) + + +state 64 + + 17 config_entry_start: T_CONFIG T_WORD T_EOL . + + $default reduce using rule 17 (config_entry_start) + + +state 65 + + 19 menuconfig_entry_start: T_MENUCONFIG T_WORD T_EOL . + + $default reduce using rule 19 (menuconfig_entry_start) + + +state 66 + + 99 expr: T_OPEN_PAREN expr . T_CLOSE_PAREN + 101 | expr . T_OR expr + 102 | expr . T_AND expr + + T_CLOSE_PAREN shift, and go to state 120 + T_OR shift, and go to state 69 + T_AND shift, and go to state 70 + + +state 67 + + 100 expr: T_NOT expr . + 101 | expr . T_OR expr + 102 | expr . T_AND expr + + $default reduce using rule 100 (expr) + + +state 68 + + 55 if: T_IF expr T_EOL . + + $default reduce using rule 55 (if) + + +state 69 + + 101 expr: expr T_OR . expr + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + T_OPEN_PAREN shift, and go to state 48 + T_NOT shift, and go to state 49 + + expr go to state 121 + symbol go to state 51 + + +state 70 + + 102 expr: expr T_AND . expr + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + T_OPEN_PAREN shift, and go to state 48 + T_NOT shift, and go to state 49 + + expr go to state 122 + symbol go to state 51 + + +state 71 + + 98 expr: symbol T_UNEQUAL . symbol + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + + symbol go to state 123 + + +state 72 + + 97 expr: symbol T_EQUAL . symbol + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + + symbol go to state 124 + + +state 73 + + 77 help_start: T_HELP . T_EOL + + T_EOL shift, and go to state 125 + + +state 74 + + 82 depends: T_DEPENDS . T_ON expr T_EOL + 83 | T_DEPENDS . expr T_EOL + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + T_OPEN_PAREN shift, and go to state 48 + T_ON shift, and go to state 126 + T_NOT shift, and go to state 49 + + expr go to state 127 + symbol go to state 51 + + +state 75 + + 84 depends: T_REQUIRES . expr T_EOL + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + T_OPEN_PAREN shift, and go to state 48 + T_NOT shift, and go to state 49 + + expr go to state 128 + symbol go to state 51 + + +state 76 + + 33 config_option: T_PROMPT . prompt if_expr T_EOL + + T_WORD shift, and go to state 37 + T_WORD_QUOTE shift, and go to state 38 + + prompt go to state 129 + + +state 77 + + 34 config_option: T_DEFAULT . expr if_expr T_EOL + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + T_OPEN_PAREN shift, and go to state 48 + T_NOT shift, and go to state 49 + + expr go to state 130 + symbol go to state 51 + + +state 78 + + 26 config_option: T_TRISTATE . prompt_stmt_opt T_EOL + + T_WORD shift, and go to state 37 + T_WORD_QUOTE shift, and go to state 38 + + $default reduce using rule 85 (prompt_stmt_opt) + + prompt_stmt_opt go to state 131 + prompt go to state 132 + + +state 79 + + 27 config_option: T_DEF_TRISTATE . expr if_expr T_EOL + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + T_OPEN_PAREN shift, and go to state 48 + T_NOT shift, and go to state 49 + + expr go to state 133 + symbol go to state 51 + + +state 80 + + 28 config_option: T_BOOLEAN . prompt_stmt_opt T_EOL + + T_WORD shift, and go to state 37 + T_WORD_QUOTE shift, and go to state 38 + + $default reduce using rule 85 (prompt_stmt_opt) + + prompt_stmt_opt go to state 134 + prompt go to state 132 + + +state 81 + + 29 config_option: T_DEF_BOOLEAN . expr if_expr T_EOL + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + T_OPEN_PAREN shift, and go to state 48 + T_NOT shift, and go to state 49 + + expr go to state 135 + symbol go to state 51 + + +state 82 + + 32 config_option: T_STRING . prompt_stmt_opt T_EOL + + T_WORD shift, and go to state 37 + T_WORD_QUOTE shift, and go to state 38 + + $default reduce using rule 85 (prompt_stmt_opt) + + prompt_stmt_opt go to state 136 + prompt go to state 132 + + +state 83 + + 30 config_option: T_INT . prompt_stmt_opt T_EOL + + T_WORD shift, and go to state 37 + T_WORD_QUOTE shift, and go to state 38 + + $default reduce using rule 85 (prompt_stmt_opt) + + prompt_stmt_opt go to state 137 + prompt go to state 132 + + +state 84 + + 31 config_option: T_HEX . prompt_stmt_opt T_EOL + + T_WORD shift, and go to state 37 + T_WORD_QUOTE shift, and go to state 38 + + $default reduce using rule 85 (prompt_stmt_opt) + + prompt_stmt_opt go to state 138 + prompt go to state 132 + + +state 85 + + 25 config_option_list: config_option_list T_EOL . + + $default reduce using rule 25 (config_option_list) + + +state 86 + + 35 config_option: T_SELECT . T_WORD if_expr T_EOL + 36 | T_SELECT . T_NOT T_WORD if_expr T_EOL + + T_WORD shift, and go to state 139 + T_NOT shift, and go to state 140 + + +state 87 + + 37 config_option: T_RANGE . symbol symbol if_expr T_EOL + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + + symbol go to state 141 + + +state 88 + + 22 config_option_list: config_option_list config_option . + + $default reduce using rule 22 (config_option_list) + + +state 89 + + 78 help: help_start . T_HELPTEXT + + T_HELPTEXT shift, and go to state 142 + + +state 90 + + 24 config_option_list: config_option_list help . + + $default reduce using rule 24 (config_option_list) + + +state 91 + + 23 config_option_list: config_option_list depends . + + $default reduce using rule 23 (config_option_list) + + +state 92 + + 51 choice_option: T_OPTIONAL . T_EOL + + T_EOL shift, and go to state 143 + + +state 93 + + 48 choice_option: T_PROMPT . prompt if_expr T_EOL + + T_WORD shift, and go to state 37 + T_WORD_QUOTE shift, and go to state 38 + + prompt go to state 144 + + +state 94 + + 52 choice_option: T_DEFAULT . T_WORD if_expr T_EOL + + T_WORD shift, and go to state 145 + + +state 95 + + 49 choice_option: T_TRISTATE . prompt_stmt_opt T_EOL + + T_WORD shift, and go to state 37 + T_WORD_QUOTE shift, and go to state 38 + + $default reduce using rule 85 (prompt_stmt_opt) + + prompt_stmt_opt go to state 146 + prompt go to state 132 + + +state 96 + + 50 choice_option: T_BOOLEAN . prompt_stmt_opt T_EOL + + T_WORD shift, and go to state 37 + T_WORD_QUOTE shift, and go to state 38 + + $default reduce using rule 85 (prompt_stmt_opt) + + prompt_stmt_opt go to state 147 + prompt go to state 132 + + +state 97 + + 47 choice_option_list: choice_option_list T_EOL . + + $default reduce using rule 47 (choice_option_list) + + +state 98 + + 44 choice_option_list: choice_option_list choice_option . + + $default reduce using rule 44 (choice_option_list) + + +state 99 + + 46 choice_option_list: choice_option_list help . + + $default reduce using rule 46 (choice_option_list) + + +state 100 + + 45 choice_option_list: choice_option_list depends . + + $default reduce using rule 45 (choice_option_list) + + +state 101 + + 89 end: T_ENDMENU . nl_or_eof + + T_EOF shift, and go to state 15 + T_EOL shift, and go to state 16 + + nl_or_eof go to state 148 + + +state 102 + + 90 end: T_ENDCHOICE . nl_or_eof + + T_EOF shift, and go to state 15 + T_EOL shift, and go to state 16 + + nl_or_eof go to state 149 + + +state 103 + + 91 end: T_ENDIF . nl_or_eof + + T_EOF shift, and go to state 15 + T_EOL shift, and go to state 16 + + nl_or_eof go to state 150 + + +state 104 + + 54 choice_block: choice_block common_block . + + $default reduce using rule 54 (choice_block) + + +state 105 + + 41 choice_stmt: choice_entry choice_block choice_end . + + $default reduce using rule 41 (choice_stmt) + + +state 106 + + 40 choice_end: end . + + $default reduce using rule 40 (choice_end) + + +state 107 + + 60 if_block: if_block common_block . + + $default reduce using rule 60 (if_block) + + +state 108 + + 62 if_block: if_block choice_stmt . + + $default reduce using rule 62 (if_block) + + +state 109 + + 57 if_stmt: if if_block if_end . + + $default reduce using rule 57 (if_stmt) + + +state 110 + + 61 if_block: if_block menu_stmt . + + $default reduce using rule 61 (if_block) + + +state 111 + + 56 if_end: end . + + $default reduce using rule 56 (if_end) + + +state 112 + + 81 depends_list: depends_list T_EOL . + + $default reduce using rule 81 (depends_list) + + +state 113 + + 80 depends_list: depends_list depends . + + $default reduce using rule 80 (depends_list) + + +state 114 + + 72 menu_block: menu_block error . T_EOL + + T_EOL shift, and go to state 151 + + +state 115 + + 69 menu_block: menu_block common_block . + + $default reduce using rule 69 (menu_block) + + +state 116 + + 71 menu_block: menu_block choice_stmt . + + $default reduce using rule 71 (menu_block) + + +state 117 + + 66 menu_stmt: menu_entry menu_block menu_end . + + $default reduce using rule 66 (menu_stmt) + + +state 118 + + 70 menu_block: menu_block menu_stmt . + + $default reduce using rule 70 (menu_block) + + +state 119 + + 65 menu_end: end . + + $default reduce using rule 65 (menu_end) + + +state 120 + + 99 expr: T_OPEN_PAREN expr T_CLOSE_PAREN . + + $default reduce using rule 99 (expr) + + +state 121 + + 101 expr: expr . T_OR expr + 101 | expr T_OR expr . + 102 | expr . T_AND expr + + T_AND shift, and go to state 70 + + $default reduce using rule 101 (expr) + + +state 122 + + 101 expr: expr . T_OR expr + 102 | expr . T_AND expr + 102 | expr T_AND expr . + + $default reduce using rule 102 (expr) + + +state 123 + + 98 expr: symbol T_UNEQUAL symbol . + + $default reduce using rule 98 (expr) + + +state 124 + + 97 expr: symbol T_EQUAL symbol . + + $default reduce using rule 97 (expr) + + +state 125 + + 77 help_start: T_HELP T_EOL . + + $default reduce using rule 77 (help_start) + + +state 126 + + 82 depends: T_DEPENDS T_ON . expr T_EOL + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + T_OPEN_PAREN shift, and go to state 48 + T_NOT shift, and go to state 49 + + expr go to state 152 + symbol go to state 51 + + +state 127 + + 83 depends: T_DEPENDS expr . T_EOL + 101 expr: expr . T_OR expr + 102 | expr . T_AND expr + + T_EOL shift, and go to state 153 + T_OR shift, and go to state 69 + T_AND shift, and go to state 70 + + +state 128 + + 84 depends: T_REQUIRES expr . T_EOL + 101 expr: expr . T_OR expr + 102 | expr . T_AND expr + + T_EOL shift, and go to state 154 + T_OR shift, and go to state 69 + T_AND shift, and go to state 70 + + +state 129 + + 33 config_option: T_PROMPT prompt . if_expr T_EOL + + T_IF shift, and go to state 155 + + $default reduce using rule 94 (if_expr) + + if_expr go to state 156 + + +state 130 + + 34 config_option: T_DEFAULT expr . if_expr T_EOL + 101 expr: expr . T_OR expr + 102 | expr . T_AND expr + + T_IF shift, and go to state 155 + T_OR shift, and go to state 69 + T_AND shift, and go to state 70 + + $default reduce using rule 94 (if_expr) + + if_expr go to state 157 + + +state 131 + + 26 config_option: T_TRISTATE prompt_stmt_opt . T_EOL + + T_EOL shift, and go to state 158 + + +state 132 + + 86 prompt_stmt_opt: prompt . if_expr + + T_IF shift, and go to state 155 + + $default reduce using rule 94 (if_expr) + + if_expr go to state 159 + + +state 133 + + 27 config_option: T_DEF_TRISTATE expr . if_expr T_EOL + 101 expr: expr . T_OR expr + 102 | expr . T_AND expr + + T_IF shift, and go to state 155 + T_OR shift, and go to state 69 + T_AND shift, and go to state 70 + + $default reduce using rule 94 (if_expr) + + if_expr go to state 160 + + +state 134 + + 28 config_option: T_BOOLEAN prompt_stmt_opt . T_EOL + + T_EOL shift, and go to state 161 + + +state 135 + + 29 config_option: T_DEF_BOOLEAN expr . if_expr T_EOL + 101 expr: expr . T_OR expr + 102 | expr . T_AND expr + + T_IF shift, and go to state 155 + T_OR shift, and go to state 69 + T_AND shift, and go to state 70 + + $default reduce using rule 94 (if_expr) + + if_expr go to state 162 + + +state 136 + + 32 config_option: T_STRING prompt_stmt_opt . T_EOL + + T_EOL shift, and go to state 163 + + +state 137 + + 30 config_option: T_INT prompt_stmt_opt . T_EOL + + T_EOL shift, and go to state 164 + + +state 138 + + 31 config_option: T_HEX prompt_stmt_opt . T_EOL + + T_EOL shift, and go to state 165 + + +state 139 + + 35 config_option: T_SELECT T_WORD . if_expr T_EOL + + T_IF shift, and go to state 155 + + $default reduce using rule 94 (if_expr) + + if_expr go to state 166 + + +state 140 + + 36 config_option: T_SELECT T_NOT . T_WORD if_expr T_EOL + + T_WORD shift, and go to state 167 + + +state 141 + + 37 config_option: T_RANGE symbol . symbol if_expr T_EOL + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + + symbol go to state 168 + + +state 142 + + 78 help: help_start T_HELPTEXT . + + $default reduce using rule 78 (help) + + +state 143 + + 51 choice_option: T_OPTIONAL T_EOL . + + $default reduce using rule 51 (choice_option) + + +state 144 + + 48 choice_option: T_PROMPT prompt . if_expr T_EOL + + T_IF shift, and go to state 155 + + $default reduce using rule 94 (if_expr) + + if_expr go to state 169 + + +state 145 + + 52 choice_option: T_DEFAULT T_WORD . if_expr T_EOL + + T_IF shift, and go to state 155 + + $default reduce using rule 94 (if_expr) + + if_expr go to state 170 + + +state 146 + + 49 choice_option: T_TRISTATE prompt_stmt_opt . T_EOL + + T_EOL shift, and go to state 171 + + +state 147 + + 50 choice_option: T_BOOLEAN prompt_stmt_opt . T_EOL + + T_EOL shift, and go to state 172 + + +state 148 + + 89 end: T_ENDMENU nl_or_eof . + + $default reduce using rule 89 (end) + + +state 149 + + 90 end: T_ENDCHOICE nl_or_eof . + + $default reduce using rule 90 (end) + + +state 150 + + 91 end: T_ENDIF nl_or_eof . + + $default reduce using rule 91 (end) + + +state 151 + + 72 menu_block: menu_block error T_EOL . + + $default reduce using rule 72 (menu_block) + + +state 152 + + 82 depends: T_DEPENDS T_ON expr . T_EOL + 101 expr: expr . T_OR expr + 102 | expr . T_AND expr + + T_EOL shift, and go to state 173 + T_OR shift, and go to state 69 + T_AND shift, and go to state 70 + + +state 153 + + 83 depends: T_DEPENDS expr T_EOL . + + $default reduce using rule 83 (depends) + + +state 154 + + 84 depends: T_REQUIRES expr T_EOL . + + $default reduce using rule 84 (depends) + + +state 155 + + 95 if_expr: T_IF . expr + + T_WORD shift, and go to state 46 + T_WORD_QUOTE shift, and go to state 47 + T_OPEN_PAREN shift, and go to state 48 + T_NOT shift, and go to state 49 + + expr go to state 174 + symbol go to state 51 + + +state 156 + + 33 config_option: T_PROMPT prompt if_expr . T_EOL + + T_EOL shift, and go to state 175 + + +state 157 + + 34 config_option: T_DEFAULT expr if_expr . T_EOL + + T_EOL shift, and go to state 176 + + +state 158 + + 26 config_option: T_TRISTATE prompt_stmt_opt T_EOL . + + $default reduce using rule 26 (config_option) + + +state 159 + + 86 prompt_stmt_opt: prompt if_expr . + + $default reduce using rule 86 (prompt_stmt_opt) + + +state 160 + + 27 config_option: T_DEF_TRISTATE expr if_expr . T_EOL + + T_EOL shift, and go to state 177 + + +state 161 + + 28 config_option: T_BOOLEAN prompt_stmt_opt T_EOL . + + $default reduce using rule 28 (config_option) + + +state 162 + + 29 config_option: T_DEF_BOOLEAN expr if_expr . T_EOL + + T_EOL shift, and go to state 178 + + +state 163 + + 32 config_option: T_STRING prompt_stmt_opt T_EOL . + + $default reduce using rule 32 (config_option) + + +state 164 + + 30 config_option: T_INT prompt_stmt_opt T_EOL . + + $default reduce using rule 30 (config_option) + + +state 165 + + 31 config_option: T_HEX prompt_stmt_opt T_EOL . + + $default reduce using rule 31 (config_option) + + +state 166 + + 35 config_option: T_SELECT T_WORD if_expr . T_EOL + + T_EOL shift, and go to state 179 + + +state 167 + + 36 config_option: T_SELECT T_NOT T_WORD . if_expr T_EOL + + T_IF shift, and go to state 155 + + $default reduce using rule 94 (if_expr) + + if_expr go to state 180 + + +state 168 + + 37 config_option: T_RANGE symbol symbol . if_expr T_EOL + + T_IF shift, and go to state 155 + + $default reduce using rule 94 (if_expr) + + if_expr go to state 181 + + +state 169 + + 48 choice_option: T_PROMPT prompt if_expr . T_EOL + + T_EOL shift, and go to state 182 + + +state 170 + + 52 choice_option: T_DEFAULT T_WORD if_expr . T_EOL + + T_EOL shift, and go to state 183 + + +state 171 + + 49 choice_option: T_TRISTATE prompt_stmt_opt T_EOL . + + $default reduce using rule 49 (choice_option) + + +state 172 + + 50 choice_option: T_BOOLEAN prompt_stmt_opt T_EOL . + + $default reduce using rule 50 (choice_option) + + +state 173 + + 82 depends: T_DEPENDS T_ON expr T_EOL . + + $default reduce using rule 82 (depends) + + +state 174 + + 95 if_expr: T_IF expr . + 101 expr: expr . T_OR expr + 102 | expr . T_AND expr + + T_OR shift, and go to state 69 + T_AND shift, and go to state 70 + + $default reduce using rule 95 (if_expr) + + +state 175 + + 33 config_option: T_PROMPT prompt if_expr T_EOL . + + $default reduce using rule 33 (config_option) + + +state 176 + + 34 config_option: T_DEFAULT expr if_expr T_EOL . + + $default reduce using rule 34 (config_option) + + +state 177 + + 27 config_option: T_DEF_TRISTATE expr if_expr T_EOL . + + $default reduce using rule 27 (config_option) + + +state 178 + + 29 config_option: T_DEF_BOOLEAN expr if_expr T_EOL . + + $default reduce using rule 29 (config_option) + + +state 179 + + 35 config_option: T_SELECT T_WORD if_expr T_EOL . + + $default reduce using rule 35 (config_option) + + +state 180 + + 36 config_option: T_SELECT T_NOT T_WORD if_expr . T_EOL + + T_EOL shift, and go to state 184 + + +state 181 + + 37 config_option: T_RANGE symbol symbol if_expr . T_EOL + + T_EOL shift, and go to state 185 + + +state 182 + + 48 choice_option: T_PROMPT prompt if_expr T_EOL . + + $default reduce using rule 48 (choice_option) + + +state 183 + + 52 choice_option: T_DEFAULT T_WORD if_expr T_EOL . + + $default reduce using rule 52 (choice_option) + + +state 184 + + 36 config_option: T_SELECT T_NOT T_WORD if_expr T_EOL . + + $default reduce using rule 36 (config_option) + + +state 185 + + 37 config_option: T_RANGE symbol symbol if_expr T_EOL . + + $default reduce using rule 37 (config_option) diff --git a/config/zconf.y b/config/zconf.y new file mode 100644 index 000000000..e1f1c151c --- /dev/null +++ b/config/zconf.y @@ -0,0 +1,693 @@ +%{ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include + +#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) + +#define PRINTD 0x0001 +#define DEBUG_PARSE 0x0002 + +int cdebug = PRINTD; + +extern int zconflex(void); +static void zconfprint(const char *err, ...); +static void zconferror(const char *err); +static bool zconf_endtoken(int token, int starttoken, int endtoken); + +struct symbol *symbol_hash[257]; + +#define YYERROR_VERBOSE +%} +%expect 40 + +%union +{ + int token; + char *string; + struct symbol *symbol; + struct expr *expr; + struct menu *menu; +} + +%token T_MAINMENU +%token T_MENU +%token T_ENDMENU +%token T_SOURCE +%token T_CHOICE +%token T_ENDCHOICE +%token T_COMMENT +%token T_CONFIG +%token T_MENUCONFIG +%token T_HELP +%token T_HELPTEXT +%token T_IF +%token T_ENDIF +%token T_DEPENDS +%token T_REQUIRES +%token T_OPTIONAL +%token T_PROMPT +%token T_DEFAULT +%token T_TRISTATE +%token T_DEF_TRISTATE +%token T_BOOLEAN +%token T_DEF_BOOLEAN +%token T_STRING +%token T_INT +%token T_HEX +%token T_WORD +%token T_WORD_QUOTE +%token T_UNEQUAL +%token T_EOF +%token T_EOL +%token T_CLOSE_PAREN +%token T_OPEN_PAREN +%token T_ON +%token T_SELECT +%token T_RANGE + +%left T_OR +%left T_AND +%left T_EQUAL T_UNEQUAL +%nonassoc T_NOT + +%type prompt +%type source +%type symbol +%type expr +%type if_expr +%type end + +%{ +#define LKC_DIRECT_LINK +#include "lkc.h" +%} +%% +input: /* empty */ + | input block +; + +block: common_block + | choice_stmt + | menu_stmt + | T_MAINMENU prompt nl_or_eof + | T_ENDMENU { zconfprint("unexpected 'endmenu' statement"); } + | T_ENDIF { zconfprint("unexpected 'endif' statement"); } + | T_ENDCHOICE { zconfprint("unexpected 'endchoice' statement"); } + | error nl_or_eof { zconfprint("syntax error"); yyerrok; } +; + +common_block: + if_stmt + | comment_stmt + | config_stmt + | menuconfig_stmt + | source_stmt + | nl_or_eof +; + + +/* config/menuconfig entry */ + +config_entry_start: T_CONFIG T_WORD T_EOL +{ + struct symbol *sym = sym_lookup($2, 0); + sym->flags |= SYMBOL_OPTIONAL; + menu_add_entry(sym); + printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), $2); +}; + +config_stmt: config_entry_start config_option_list +{ + menu_end_entry(); + printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); +}; + +menuconfig_entry_start: T_MENUCONFIG T_WORD T_EOL +{ + struct symbol *sym = sym_lookup($2, 0); + sym->flags |= SYMBOL_OPTIONAL; + menu_add_entry(sym); + printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), $2); +}; + +menuconfig_stmt: menuconfig_entry_start config_option_list +{ + if (current_entry->prompt) + current_entry->prompt->type = P_MENU; + else + zconfprint("warning: menuconfig statement without prompt"); + menu_end_entry(); + printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); +}; + +config_option_list: + /* empty */ + | config_option_list config_option + | config_option_list depends + | config_option_list help + | config_option_list T_EOL +; + +config_option: T_TRISTATE prompt_stmt_opt T_EOL +{ + menu_set_type(S_TRISTATE); + printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_DEF_TRISTATE expr if_expr T_EOL +{ + menu_add_expr(P_DEFAULT, $2, $3); + menu_set_type(S_TRISTATE); + printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_BOOLEAN prompt_stmt_opt T_EOL +{ + menu_set_type(S_BOOLEAN); + printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_DEF_BOOLEAN expr if_expr T_EOL +{ + menu_add_expr(P_DEFAULT, $2, $3); + menu_set_type(S_BOOLEAN); + printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_INT prompt_stmt_opt T_EOL +{ + menu_set_type(S_INT); + printd(DEBUG_PARSE, "%s:%d:int\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_HEX prompt_stmt_opt T_EOL +{ + menu_set_type(S_HEX); + printd(DEBUG_PARSE, "%s:%d:hex\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_STRING prompt_stmt_opt T_EOL +{ + menu_set_type(S_STRING); + printd(DEBUG_PARSE, "%s:%d:string\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_PROMPT prompt if_expr T_EOL +{ + menu_add_prompt(P_PROMPT, $2, $3); + printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_DEFAULT expr if_expr T_EOL +{ + menu_add_expr(P_DEFAULT, $2, $3); + printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_SELECT T_WORD if_expr T_EOL +{ + menu_add_symbol(P_SELECT, sym_lookup($2, 0), $3); + printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_SELECT T_NOT T_WORD if_expr T_EOL +{ + menu_add_symbol(P_SELECTNOT, sym_lookup($3, 0), $4); + printd(DEBUG_PARSE, "%s:%d:selectnot\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_RANGE symbol symbol if_expr T_EOL +{ + menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,$2, $3), $4); + printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); +}; + +/* choice entry */ + +choice: T_CHOICE T_EOL +{ + struct symbol *sym = sym_lookup(NULL, 0); + sym->flags |= SYMBOL_CHOICE; + menu_add_entry(sym); + menu_add_expr(P_CHOICE, NULL, NULL); + printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); +}; + +choice_entry: choice choice_option_list +{ + menu_end_entry(); + menu_add_menu(); +}; + +choice_end: end +{ + if (zconf_endtoken($1, T_CHOICE, T_ENDCHOICE)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); + } +}; + +choice_stmt: + choice_entry choice_block choice_end + | choice_entry choice_block +{ + printf("%s:%d: missing 'endchoice' for this 'choice' statement\n", current_menu->file->name, current_menu->lineno); + zconfnerrs++; +}; + +choice_option_list: + /* empty */ + | choice_option_list choice_option + | choice_option_list depends + | choice_option_list help + | choice_option_list T_EOL +; + +choice_option: T_PROMPT prompt if_expr T_EOL +{ + menu_add_prompt(P_PROMPT, $2, $3); + printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); +}; + +choice_option: T_TRISTATE prompt_stmt_opt T_EOL +{ + menu_set_type(S_TRISTATE); + printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno()); +}; + +choice_option: T_BOOLEAN prompt_stmt_opt T_EOL +{ + menu_set_type(S_BOOLEAN); + printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno()); +}; + +choice_option: T_OPTIONAL T_EOL +{ + current_entry->sym->flags |= SYMBOL_OPTIONAL; + printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); +}; + +choice_option: T_DEFAULT T_WORD if_expr T_EOL +{ + menu_add_symbol(P_DEFAULT, sym_lookup($2, 0), $3); + printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno()); +}; + +choice_block: + /* empty */ + | choice_block common_block +; + +/* if entry */ + +if: T_IF expr T_EOL +{ + printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); + menu_add_entry(NULL); + menu_add_dep($2); + menu_end_entry(); + menu_add_menu(); +}; + +if_end: end +{ + if (zconf_endtoken($1, T_IF, T_ENDIF)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); + } +}; + +if_stmt: + if if_block if_end + | if if_block +{ + printf("%s:%d: missing 'endif' for this 'if' statement\n", current_menu->file->name, current_menu->lineno); + zconfnerrs++; +}; + +if_block: + /* empty */ + | if_block common_block + | if_block menu_stmt + | if_block choice_stmt +; + +/* menu entry */ + +menu: T_MENU prompt T_EOL +{ + menu_add_entry(NULL); + menu_add_prop(P_MENU, $2, NULL, NULL); + printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); +}; + +menu_entry: menu depends_list +{ + menu_end_entry(); + menu_add_menu(); +}; + +menu_end: end +{ + if (zconf_endtoken($1, T_MENU, T_ENDMENU)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); + } +}; + +menu_stmt: + menu_entry menu_block menu_end + | menu_entry menu_block +{ + printf("%s:%d: missing 'endmenu' for this 'menu' statement\n", current_menu->file->name, current_menu->lineno); + zconfnerrs++; +}; + +menu_block: + /* empty */ + | menu_block common_block + | menu_block menu_stmt + | menu_block choice_stmt + | menu_block error T_EOL { zconfprint("invalid menu option"); yyerrok; } +; + +source: T_SOURCE prompt T_EOL +{ + $$ = $2; + printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), $2); +}; + +source_stmt: source +{ + zconf_nextfile($1); +}; + +/* comment entry */ + +comment: T_COMMENT prompt T_EOL +{ + menu_add_entry(NULL); + menu_add_prop(P_COMMENT, $2, NULL, NULL); + printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); +}; + +comment_stmt: comment depends_list +{ + menu_end_entry(); +}; + +/* help option */ + +help_start: T_HELP T_EOL +{ + printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); + zconf_starthelp(); +}; + +help: help_start T_HELPTEXT +{ + current_entry->sym->help = $2; +}; + +/* depends option */ + +depends_list: /* empty */ + | depends_list depends + | depends_list T_EOL +; + +depends: T_DEPENDS T_ON expr T_EOL +{ + menu_add_dep($3); + printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); +} + | T_DEPENDS expr T_EOL +{ + menu_add_dep($2); + printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno()); +} + | T_REQUIRES expr T_EOL +{ + menu_add_dep($2); + printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno()); +}; + +/* prompt statement */ + +prompt_stmt_opt: + /* empty */ + | prompt if_expr +{ + menu_add_prop(P_PROMPT, $1, NULL, $2); +}; + +prompt: T_WORD + | T_WORD_QUOTE +; + +end: T_ENDMENU nl_or_eof { $$ = T_ENDMENU; } + | T_ENDCHOICE nl_or_eof { $$ = T_ENDCHOICE; } + | T_ENDIF nl_or_eof { $$ = T_ENDIF; } +; + +nl_or_eof: + T_EOL | T_EOF; + +if_expr: /* empty */ { $$ = NULL; } + | T_IF expr { $$ = $2; } +; + +expr: symbol { $$ = expr_alloc_symbol($1); } + | symbol T_EQUAL symbol { $$ = expr_alloc_comp(E_EQUAL, $1, $3); } + | symbol T_UNEQUAL symbol { $$ = expr_alloc_comp(E_UNEQUAL, $1, $3); } + | T_OPEN_PAREN expr T_CLOSE_PAREN { $$ = $2; } + | T_NOT expr { $$ = expr_alloc_one(E_NOT, $2); } + | expr T_OR expr { $$ = expr_alloc_two(E_OR, $1, $3); } + | expr T_AND expr { $$ = expr_alloc_two(E_AND, $1, $3); } +; + +symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); } + | T_WORD_QUOTE { $$ = sym_lookup($1, 1); free($1); } +; + +%% + +void conf_parse(const char *name) +{ + struct symbol *sym; + int i; + + zconf_initscan(name); + + sym_init(); + menu_init(); + modules_sym = sym_lookup("MODULES", 0); + rootmenu.prompt = menu_add_prop(P_MENU, "OpenADK Configuration", NULL, NULL); + + //zconfdebug = 1; + zconfparse(); + if (zconfnerrs) + exit(1); + menu_finalize(&rootmenu); + for_all_symbols(i, sym) { + if (!(sym->flags & SYMBOL_CHECKED) && sym_check_deps(sym)) + printf("\n"); + else + sym->flags |= SYMBOL_CHECK_DONE; + } + + sym_change_count = 1; +} + +const char *zconf_tokenname(int token) +{ + switch (token) { + case T_MENU: return "menu"; + case T_ENDMENU: return "endmenu"; + case T_CHOICE: return "choice"; + case T_ENDCHOICE: return "endchoice"; + case T_IF: return "if"; + case T_ENDIF: return "endif"; + } + return ""; +} + +static bool zconf_endtoken(int token, int starttoken, int endtoken) +{ + if (token != endtoken) { + zconfprint("unexpected '%s' within %s block", zconf_tokenname(token), zconf_tokenname(starttoken)); + zconfnerrs++; + return false; + } + if (current_menu->file != current_file) { + zconfprint("'%s' in different file than '%s'", zconf_tokenname(token), zconf_tokenname(starttoken)); + zconfprint("location of the '%s'", zconf_tokenname(starttoken)); + zconfnerrs++; + return false; + } + return true; +} + +static void zconfprint(const char *err, ...) +{ + va_list ap; + + fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno() + 1); + va_start(ap, err); + vfprintf(stderr, err, ap); + va_end(ap); + fprintf(stderr, "\n"); +} + +static void zconferror(const char *err) +{ + fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); +} + +void print_quoted_string(FILE *out, const char *str) +{ + const char *p; + int len; + + putc('"', out); + while ((p = strchr(str, '"'))) { + len = p - str; + if (len) + fprintf(out, "%.*s", len, str); + fputs("\\\"", out); + str = p + 1; + } + fputs(str, out); + putc('"', out); +} + +void print_symbol(FILE *out, struct menu *menu) +{ + struct symbol *sym = menu->sym; + struct property *prop; + + if (sym_is_choice(sym)) + fprintf(out, "choice\n"); + else + fprintf(out, "config %s\n", sym->name); + switch (sym->type) { + case S_BOOLEAN: + fputs(" boolean\n", out); + break; + case S_TRISTATE: + fputs(" tristate\n", out); + break; + case S_STRING: + fputs(" string\n", out); + break; + case S_INT: + fputs(" integer\n", out); + break; + case S_HEX: + fputs(" hex\n", out); + break; + default: + fputs(" ???\n", out); + break; + } + for (prop = sym->prop; prop; prop = prop->next) { + if (prop->menu != menu) + continue; + switch (prop->type) { + case P_PROMPT: + fputs(" prompt ", out); + print_quoted_string(out, prop->text); + if (!expr_is_yes(prop->visible.expr)) { + fputs(" if ", out); + expr_fprint(prop->visible.expr, out); + } + fputc('\n', out); + break; + case P_DEFAULT: + fputs( " default ", out); + expr_fprint(prop->expr, out); + if (!expr_is_yes(prop->visible.expr)) { + fputs(" if ", out); + expr_fprint(prop->visible.expr, out); + } + fputc('\n', out); + break; + case P_CHOICE: + fputs(" #choice value\n", out); + break; + default: + fprintf(out, " unknown prop %d!\n", prop->type); + break; + } + } + if (sym->help) { + int len = strlen(sym->help); + while (sym->help[--len] == '\n') + sym->help[len] = 0; + fprintf(out, " help\n%s\n", sym->help); + } + fputc('\n', out); +} + +void zconfdump(FILE *out) +{ + struct property *prop; + struct symbol *sym; + struct menu *menu; + + menu = rootmenu.list; + while (menu) { + if ((sym = menu->sym)) + print_symbol(out, menu); + else if ((prop = menu->prompt)) { + switch (prop->type) { + case P_COMMENT: + fputs("\ncomment ", out); + print_quoted_string(out, prop->text); + fputs("\n", out); + break; + case P_MENU: + fputs("\nmenu ", out); + print_quoted_string(out, prop->text); + fputs("\n", out); + break; + default: + ; + } + if (!expr_is_yes(prop->visible.expr)) { + fputs(" depends ", out); + expr_fprint(prop->visible.expr, out); + fputc('\n', out); + } + fputs("\n", out); + } + + if (menu->list) + menu = menu->list; + else if (menu->next) + menu = menu->next; + else while ((menu = menu->parent)) { + if (menu->prompt && menu->prompt->type == P_MENU) + fputs("\nendmenu\n", out); + if (menu->next) { + menu = menu->next; + break; + } + } + } +} + +#include "lex.zconf.c" +#include "confdata.c" +#include "expr.c" +#include "symbol.c" +#include "menu.c" diff --git a/mk/build.mk b/mk/build.mk new file mode 100644 index 000000000..b08b97273 --- /dev/null +++ b/mk/build.mk @@ -0,0 +1,182 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +TOPDIR=$(shell pwd) +export TOPDIR + +ifneq ($(shell umask 2>/dev/null | sed 's/0*022/OK/'),OK) +$(error your umask is not 022) +endif + +CONFIG_CONFIG_IN = Config.in +CONFIG = config + +noconfig_targets:= menuconfig \ + _config \ + _mconfig \ + tags + +MAKECLEAN_SYMBOLS= ADK_TARGET_LIB_UCLIBC ADK_TARGET_LIB_GLIBC ADK_SSP ADK_IPV6 ADK_CXX +POSTCONFIG= -@\ + if [ -f .config.old ];then \ + if [ -d .cfg ];then \ + what=cleandevice; \ + for symbol in ${MAKECLEAN_SYMBOLS}; do \ + newval=$$(grep -e "^$$symbol=" -e "^\# $$symbol " .config); \ + oldval=$$(cat .cfg/"$$symbol" 2>&-); \ + [[ $$newval = $$oldval ]] && continue; \ + echo; \ + echo >&2 "WARNING: Toolchain related options have changed, 'make" \ + "$$what' might be required!"; \ + break; \ + done; \ + fi; \ + if [ "$$(grep ^BUSYBOX .config|md5sum)" != "$$(grep ^BUSYBOX .config.old|md5sum)" ];then \ + if [ -f build_$(CPU_ARCH)/w-busybox*/busybox*/.configure_done ];then \ + rm build_$(CPU_ARCH)/w-busybox*/busybox*/.configure_done; \ + fi; \ + fi; \ + fi + +# Pull in the user's configuration file +ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) +-include $(TOPDIR)/.config +endif + +ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y) +include $(TOPDIR)/rules.mk +include ${TOPDIR}/mk/split-cfg.mk + +all: world + +.NOTPARALLEL: +.PHONY: all world clean cleandevice cleandir distclean image_clean + +world: $(DISTDIR) $(BUILD_DIR) $(TARGET_DIR) $(PACKAGE_DIR) ${TOPDIR}/.cfg/ADK_HAVE_DOT_CONFIG + ${BASH} ${TOPDIR}/scripts/scan-pkgs.sh + $(MAKE) -f mk/build.mk toolchain/install target/config-prepare target/compile package/compile root_clean package/install package_index target/install + +package_index: + -cd ${PACKAGE_DIR} && \ + ${BASH} ${TOPDIR}/scripts/ipkg-make-index.sh . >Packages + +$(DISTDIR): + mkdir -p $(DISTDIR) + +$(BUILD_DIR): + mkdir -p $(BUILD_DIR) + +$(TARGET_DIR): + mkdir -p $(TARGET_DIR) + +$(PACKAGE_DIR): + mkdir -p ${PACKAGE_DIR}/.stamps + +${STAGING_DIR} ${STAGING_DIR}/etc ${STAGING_TOOLS}: + mkdir -p ${STAGING_DIR}/{bin,etc,include,lib,usr} \ + ${STAGING_TOOLS}/{bin,lib} + cd ${STAGING_DIR}/usr; ln -s ../include include + +${STAGING_DIR}/etc/ipkg.conf: ${STAGING_DIR}/etc + echo "dest root /" >${STAGING_DIR}/etc/ipkg.conf + echo "option offline_root ${TARGET_DIR}" >>$(STAGING_DIR)/etc/ipkg.conf + +package/%: ${TOPDIR}/.cfg/ADK_HAVE_DOT_CONFIG ${STAGING_DIR}/etc/ipkg.conf + $(MAKE) -C package $(patsubst package/%,%,$@) + +target/%: ${TOPDIR}/.cfg/ADK_HAVE_DOT_CONFIG + $(MAKE) -C target $(patsubst target/%,%,$@) + +toolchain/%: ${STAGING_DIR} + $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) + +image: + $(MAKE) -C target image + +switch: + echo "Saving configuration for device: ${DEVICE}" + cp .config .config.${DEVICE} + if [ -f .config.${DEV} ];then cp .config.${DEV} .config; \ + cp .config.${DEV} .config.old; \ + echo "Setting configuration to device: ${DEV}"; \ + else echo "No old device config found";mv .config .config.bak;fi + +############################################################# +# +# Cleanup and misc junk +# +############################################################# +root_clean: + @$(TRACE) root_clean + rm -rf $(TARGET_DIR) + +clean: + @$(TRACE) clean + $(MAKE) -C $(CONFIG) clean + rm -rf $(BUILD_DIR) $(BIN_DIR) $(TARGET_DIR) ${TOPDIR}/.cfg + rm -f ${TOPDIR}/package/*/info.mk + +cleankernel: + @$(TRACE) cleankernel + rm -rf $(TOOLCHAIN_BUILD_DIR)/linux* $(BUILD_DIR)/linux + +cleandir: + @$(TRACE) cleandir + $(MAKE) -C $(CONFIG) clean + rm -rf $(BUILD_DIR_PFX) $(BIN_DIR_PFX) $(TARGET_DIR_PFX) ${TOPDIR}/.cfg + rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_PARENT_PFX) $(TOOLS_BUILD_DIR) + rm -f .tmpconfig.h ${TOPDIR}/package/*/info.mk + +cleandevice: + @$(TRACE) cleandevice + $(MAKE) -C $(CONFIG) clean + rm -rf $(BUILD_DIR) $(BIN_DIR) $(TARGET_DIR) ${TOPDIR}/.cfg + rm -rf $(TOOLCHAIN_BUILD_DIR) $(STAGING_PARENT) + rm -f .tmpconfig.h ${TOPDIR}/package/*/info.mk + +distclean: + @$(TRACE) distclean + $(MAKE) -C $(CONFIG) clean + rm -rf $(BUILD_DIR_PFX) $(BIN_DIR_PFX) $(TARGET_DIR_PFX) $(DISTDIR) ${TOPDIR}/.cfg + rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_PARENT_PFX) $(TOOLS_BUILD_DIR) + rm -f .config* .tmpconfig.h ${TOPDIR}/package/*/info.mk + +else # ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y) + +include $(TOPDIR)/prereq.mk + +all: menuconfig + @echo "Start the build with \"make\" or with \"make v\" to be verbose" + +# configuration +# --------------------------------------------------------------------------- + +$(CONFIG)/conf: + @$(MAKE) -C $(CONFIG) conf + +$(CONFIG)/mconf: + @$(MAKE) -C $(CONFIG) + +menuconfig: $(CONFIG)/mconf + @$(CONFIG)/mconf $(CONFIG_CONFIG_IN) + ${POSTCONFIG} + +_config: $(CONFIG)/conf + -@touch .config + @$(CONFIG)/conf ${W} $(CONFIG_CONFIG_IN) >/dev/null + ${POSTCONFIG} + +.NOTPARALLEL: _mconfig +_mconfig: ${CONFIG}/conf _mconfig2 _config +_mconfig2: ${CONFIG}/conf + @${CONFIG}/conf -M ${RCONFIG} >/dev/null + +distclean: + @$(MAKE) -C $(CONFIG) clean + rm -rf $(BUILD_DIR) $(TOOLS_BUILD_DIR) $(BIN_DIR) $(DISTDIR) ${TOPDIR}/.cfg + rm -rf $(TOOLCHAIN_BUILD_DIR) $(STAGING_PARENT) $(TARGET_DIR) + rm -f .config* .tmpconfig.h ${TOPDIR}/package/*/info.mk + +endif # ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y) diff --git a/mk/buildhlp.mk b/mk/buildhlp.mk new file mode 100644 index 000000000..b6b70d67d --- /dev/null +++ b/mk/buildhlp.mk @@ -0,0 +1,98 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +ifneq ($(strip ${MASTER_SITES}),) +ifeq ($(strip ${DISTFILES}),) +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz +endif +endif + +# This is where all package operation is done in +WRKDIR?= ${WRKDIR_BASE}/w-${PKG_NAME}-${PKG_VERSION}-${PKG_RELEASE} +# This is where source code is extracted and patched +WRKDIST?= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION} +# This is where the configure script is seeked (localed) +WRKSRC?= ${WRKDIST} +# This is where configure, make and make install (fake) run from +WRKBUILD?= ${WRKSRC} +# This is where make install (fake) writes to +WRKINST?= ${WRKDIR}/fake-${ARCH}/root + +ifeq ($(strip ${NO_CHECKSUM}),) +_CHECKSUM_COOKIE= ${WRKDIR}/.checksum_done +else +_CHECKSUM_COOKIE= +endif + +post-extract: + +ifeq ($(strip ${NO_DISTFILES}),1) +${WRKDIST}/.extract_done: + rm -rf ${WRKDIST} ${WRKSRC} ${WRKBUILD} + mkdir -p ${WRKDIR} ${WRKDIST} + ${MAKE} do-extract + @${MAKE} post-extract + touch $@ + +fetch refetch checksum do-extract: + +__use_generic_patch_target:=42 +else ifneq ($(strip ${DISTFILES}),) +include ${TOPDIR}/mk/fetch.mk + +${WRKDIST}/.extract_done: ${_CHECKSUM_COOKIE} +ifeq (${_CHECKSUM_COOKIE},) + rm -rf ${WRKDIST} ${WRKSRC} ${WRKBUILD} +endif + ${EXTRACT_CMD} + @${MAKE} post-extract + touch $@ + +__use_generic_patch_target:=42 +else ifeq ($(strip ${_IN_PACKAGE}),1) +$(warning This package does not use the generic extraction and patch target; it's most likely to fail.) +endif + +ifeq ($(strip ${__use_generic_patch_target}),42) +post-patch: +${WRKDIST}/.prepared: ${WRKDIST}/.extract_done + [ ! -d ./patches ] || ${PREVENT_PATCH} ${PATCH} ${WRKDIST} ./patches \ + '{patch-!(*.orig),*.patch}' $(MAKE_TRACE) + [ ! -d ./extra ] || (cd extra; $(PREVENT_PATCH) cp -Rp . ${WRKDIST}/) \ + $(MAKE_TRACE) + @${MAKE} post-patch $(MAKE_TRACE) + touch $@ +endif + +update-patches: + @test ! -d ${WRKDIR}.orig || rm -rf ${WRKDIR}.orig + @test ! -d ${WRKDIR}.orig +ifeq ($(strip ${_IN_PACKAGE})$(strip ${_IN_CVTC}),1) + @$(MAKE) -s V=0 patch WRKDIR=${WRKDIR}.orig PREVENT_PATCH=: NO_CHECKSUM=1 +else + @$(MAKE) -s V=0 prepare WRKDIR=${WRKDIR}.orig PREVENT_PATCH=: NO_CHECKSUM=1 +endif + @# restore config.sub/config.guess + @for i in $$(find ${WRKDIR} -name config.sub);do \ + if [ -f $$i.bak ];then \ + mv $$i.bak $$i; \ + fi;\ + done + @for i in $$(find ${WRKDIR} -name config.guess);do \ + if [ -f $$i.bak ];then \ + mv $$i.bak $$i; \ + fi;\ + done + @toedit=$$(WRKDIST='${WRKDIST}' CURDIR=$$(pwd) \ + PATCH_LIST='patch-* *.patch' WRKDIR1='${WRKDIR}' \ + ${BASH} ${TOPDIR}/scripts/update-patches); \ + if [[ -n $$toedit && $$toedit != FAIL ]]; then \ + echo -n 'edit patches: '; read i; \ + cd patches && $${VISUAL:-$${EDITOR:-/usr/bin/vi}} $$toedit; \ + fi; \ + rm -rf ${WRKDIR}.orig; \ + [[ $$toedit != FAIL ]] + +.PHONY: update-patches diff --git a/mk/cpu.mk b/mk/cpu.mk new file mode 100644 index 000000000..8eb047bc9 --- /dev/null +++ b/mk/cpu.mk @@ -0,0 +1,23 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. +# +# optimization configure options for CPU features + +ifeq ($(DEVICE),alix1c) +CONFIGURE_CPU_OPTS:= --disable-ssse3 \ + --disable-sse \ + --enable-amd3dnow \ + --enable-amd3dnowext \ + --enable-mmx \ + --enable-mmx2 +else +CONFIGURE_CPU_OPTS:= --disable-ssse3 \ + --disable-sse \ + --disable-mmxext \ + --disable-amd3dnow \ + --disable-amd3dnowext \ + --disable-mmx \ + --disable-mmx2 +endif diff --git a/mk/fetch.mk b/mk/fetch.mk new file mode 100644 index 000000000..c4625ccee --- /dev/null +++ b/mk/fetch.mk @@ -0,0 +1,83 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. +#- + +ifneq ($(strip ${DIST_SUBDIR}),) +FULLDISTDIR?= ${DISTDIR}/${DIST_SUBDIR} +else +FULLDISTDIR?= ${DISTDIR} +endif + +FULLDISTFILES= $(patsubst %,${FULLDISTDIR}/%,${DISTFILES}) + +FETCH_STYLE?= auto +#pre-fetch: +do-fetch: +#post-fetch: +fetch: +# @${MAKE} pre-fetch +ifneq ($(filter auto,${FETCH_STYLE}),) + ${MAKE} ${FULLDISTFILES} +else + ${MAKE} do-fetch +endif +# @${MAKE} post-fetch + +refetch: + -rm -f ${FULLDISTFILES} + ${MAKE} fetch + +# XXX for now +_CHECKSUM_COOKIE?= ${WRKDIR}/.checksum_done +checksum: ${_CHECKSUM_COOKIE} +ifeq ($(strip ${NO_CHECKSUM}),) +${_CHECKSUM_COOKIE}: ${FULLDISTFILES} + rm -rf ${WRKDIR} + @OK=n; \ + (md5sum ${FULLDISTFILES}; echo exit) | while read sum name; do \ + if [[ $$sum = exit ]]; then \ + [[ $$OK = n ]] && echo >&2 "==> No distfile found!" || :; \ + [[ $$OK = 1 ]] || exit 1; \ + break; \ + fi; \ + if [[ $$sum = "$(strip ${PKG_MD5SUM})" ]]; then \ + [[ $$OK = 0 ]] || OK=1; \ + continue; \ + fi; \ + echo >&2 "==> Checksum mismatch for $${name##*/} (MD5)"; \ + echo >&2 ":---> should be '$(strip ${PKG_MD5SUM})'"; \ + echo >&2 ":---> really is '$$sum'"; \ + OK=0; \ + done + mkdir -p ${WRKDIR} + touch ${_CHECKSUM_COOKIE} +endif + +# GNU make's poor excuse for loops +define FETCH_template +$(1): + @fullname='$(1)'; \ + subname=$$$${fullname##$${DISTDIR}/}; \ + filename=$$$${fullname##*/}; \ + i='$${LOCAL_DISTDIR}'; \ + if [[ -n $$$$i && -e $$$$i/$$$$subname ]]; then \ + cd "$$$$i"; \ + echo pax -rw "$$$$subname" '$${DISTDIR}/'; \ + exec pax -rw "$$$$subname" '$${DISTDIR}/'; \ + fi; \ + mkdir -p "$$$${fullname%%/$$$$filename}"; \ + cd "$$$${fullname%%/$$$$filename}"; \ + for site in $${MASTER_SITES} $${MASTER_SITE_BACKUP}; do \ + : echo "$${FETCH_CMD} $$$$site$$$$filename"; \ + rm -f "$$$$filename"; \ + if $${FETCH_CMD} $$$$site$$$$filename; then \ + : check the size here; \ + [[ ! -e $$$$filename ]] || exit 0; \ + fi; \ + done; \ + exit 1 +endef + +$(foreach distfile,${FULLDISTFILES},$(eval $(call FETCH_template,$(distfile)))) diff --git a/mk/image.mk b/mk/image.mk new file mode 100644 index 000000000..4388dcaad --- /dev/null +++ b/mk/image.mk @@ -0,0 +1,69 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +imageprepare: kernel-install image-prepare-post + +image-prepare-post: + rng=/dev/arandom; test -e $$rng || rng=/dev/urandom; \ + dd if=$$rng bs=512 count=1 >>${TARGET_DIR}/etc/.rnd 2>/dev/null; \ + chmod 600 ${TARGET_DIR}/etc/.rnd + # Sanity checks + @cd ${TARGET_DIR}; ls=; ln=; li=; x=1; md5sum $$(find . -type f) | \ + sed -e "s/*//" | \ + while read sum name; do \ + inode=$$(ls -i "$$name"); \ + echo "$$sum $${inode%% *} $$name"; \ + done | sort | while read sum inode name; do \ + if [[ $$sum = $$ls ]]; then \ + [[ $$li = $$inode ]] && continue; \ + case $$x in \ + 1) echo 'WARNING: duplicate files found' \ + 'in filesystem! Please fix them.' >&2; \ + echo -n "> $$ln "; \ + ;; \ + 2) echo -n "> $$ln "; \ + ;; \ + 3) echo -n ' '; \ + ;; \ + esac; \ + echo -n "$$name"; \ + x=3; \ + else \ + case $$x in \ + 3) echo; \ + x=2; \ + ;; \ + esac; \ + fi; \ + ls=$$sum; \ + ln=$$name; \ + li=$$inode; \ + done + chmod 4511 ${TARGET_DIR}/bin/busybox + chmod 1777 ${TARGET_DIR}/tmp + +INITRAMFS= ${DEVICE}-${ARCH}-${FS} +ROOTFSSQUASHFS= ${DEVICE}-${ARCH}-${FS}.fimage +ROOTFSTARBALL= ${DEVICE}-${ARCH}-${FS}.tar.gz + +${BIN_DIR}/${ROOTFSTARBALL}: ${TARGET_DIR} + cd ${TARGET_DIR}; tar -cf - --owner=0 --group=0 . | gzip -n9 >$@ + +${BIN_DIR}/${INITRAMFS}: ${TARGET_DIR} + cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | sort | \ + cpio -R 0:0 --quiet -oC512 -Mdist -Hnewc | gzip -n9 >$@ + +${BIN_DIR}/${ROOTFSSQUASHFS}: ${TARGET_DIR} + PATH='${TARGET_PATH}' \ + mksquashfs ${TARGET_DIR} ${BUILD_DIR}/root.squashfs \ + -nopad -noappend -root-owned -le $(MAKE_TRACE) + # padding of images is required + cat ${BIN_DIR}/${DEVICE}-${ARCH}-kernel ${BUILD_DIR}/root.squashfs > \ + ${BUILD_DIR}/${ROOTFSSQUASHFS} + dd if=${BUILD_DIR}/${ROOTFSSQUASHFS} of=${BIN_DIR}/${ROOTFSSQUASHFS} \ + bs=4063232 conv=sync $(MAKE_TRACE) + +imageclean: + rm -f $(BIN_DIR)/$(DEVICE)-* diff --git a/mk/kernel-build.mk b/mk/kernel-build.mk new file mode 100644 index 000000000..c07e34c23 --- /dev/null +++ b/mk/kernel-build.mk @@ -0,0 +1,61 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk +include $(TOPDIR)/mk/linux.mk +include ${TOPDIR}/mk/buildhlp.mk + +KERNEL_IDIR:=$(LINUX_BUILD_DIR)/kernel-ipkg + +$(TOOLCHAIN_BUILD_DIR)/linux-$(KERNEL_VERSION)/.patched: + $(TRACE) target/$(DEVICE)-kernel-patch + $(PATCH) $(TOOLCHAIN_BUILD_DIR)/linux-$(KERNEL_VERSION) ../linux/patches *.patch $(MAKE_TRACE) + $(PATCH) $(TOOLCHAIN_BUILD_DIR)/linux-$(KERNEL_VERSION) ../linux/patches/$(KERNEL_VERSION) *.patch $(MAKE_TRACE) + $(PATCH) $(TOOLCHAIN_BUILD_DIR)/linux-$(KERNEL_VERSION) ../$(DEVICE)/patches *.patch $(MAKE_TRACE) + touch $@ + +$(LINUX_DIR)/.prepared: $(TOOLCHAIN_BUILD_DIR)/linux-$(KERNEL_VERSION)/.patched + $(TRACE) target/$(DEVICE)-kernel-prepare + ln -sf $(TOOLCHAIN_BUILD_DIR)/linux-$(KERNEL_VERSION) $(LINUX_DIR) + mkdir -p $(LINUX_BUILD_DIR)/kmod-control + touch $@ + +$(LINUX_DIR)/.config: $(LINUX_DIR)/.prepared $(BUILD_DIR)/.kernelconfig + $(TRACE) target/$(DEVICE)-kernel-configure + for f in $(TARGETS);do if [ -f $$f ];then rm $$f;fi;done $(MAKE_TRACE) + $(CP) $(BUILD_DIR)/.kernelconfig $(LINUX_DIR)/.config + echo N | $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(ARCH) CC="$(TARGET_CC)" oldconfig $(MAKE_TRACE) + $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(ARCH) CC="$(TARGET_CC)" prepare scripts $(MAKE_TRACE) + touch -c $(LINUX_DIR)/.config + +$(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.config + $(TRACE) target/$(DEVICE)-kernel-compile + $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(ARCH) CC="$(TARGET_CC)" $(MAKE_TRACE) + $(TRACE) target/$(DEVICE)-kernel-modules-install + rm -rf $(LINUX_BUILD_DIR)/modules + $(MAKE) -C "$(LINUX_DIR)" V=1 CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(ARCH) DEPMOD=true INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules modules_install $(MAKE_TRACE) + $(TRACE) target/$(DEVICE)-create-packages + $(MAKE) $(KERNEL_IPKG) $(TARGETS) + touch -c $(LINUX_DIR)/vmlinux + +$(KERNEL_IPKG): + $(TRACE) target/$(DEVICE)-create-kernel-package + rm -rf $(KERNEL_IDIR) + @mkdir -p $(KERNEL_IDIR)/etc + ${BASH} ${SCRIPT_DIR}/make-ipkg-dir.sh ${KERNEL_IDIR} \ + ../linux/kernel.control ${DEVICE}-${KERNEL_VERSION} ${ARCH} + $(IPKG_BUILD) $(KERNEL_IDIR) $(PACKAGE_DIR) $(MAKE_TRACE) + +prepare: +compile: $(LINUX_DIR)/vmlinux +install: compile +ifneq ($(strip $(INSTALL_TARGETS)),) + $(TRACE) target/${DEVICE}-modules-install + $(IPKG) install $(INSTALL_TARGETS) $(MAKE_TRACE) +endif + +clean: + rm -rf $(LINUX_BUILD_DIR) + rm -f $(TARGETS) diff --git a/mk/kernel.mk b/mk/kernel.mk new file mode 100644 index 000000000..06f3ebde2 --- /dev/null +++ b/mk/kernel.mk @@ -0,0 +1,77 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + + +LINUX_KMOD_SUFFIX=ko +MODULES_SUBDIR := lib/modules/$(KERNEL_VERSION) +LINUX_BUILD_DIR := $(BUILD_DIR)/linux-$(ARCH)-$(DEVICE) +KMOD_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules +MODULES_DIR := $(LINUX_BUILD_DIR)/modules/$(MODULES_SUBDIR) +TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) + +KERNEL_IPKG:=$(PACKAGE_DIR)/kernel_$(DEVICE)-$(KERNEL_VERSION)_$(ARCH).ipk +INSTALL_TARGETS:= $(KERNEL_IPKG) +NOINSTALL_TARGETS:= +TARGETS:= + +# KMOD_template +# +# Adds a target for creating a package containing +# the specified (kernel-provided) modules. +# Parameters: +# 1: the config symbol name (without leading 'ADK_[K,]PACKAGE_KMOD_') +# this _must_ be equal to the kernel config symbol name +# 2: the name for the package, should be unique +# 3: actual modules to add; absolute path inside $(MODULES_DIR) +# OMIT THE KERNEL-SPECIFIC EXTENSION! +# 4: order of module loading at system startup; the modules in $(3) are (in their order) +# added to this file, if $(6) is non-empty +# 5: the kmod packages this package depends on +# +define KMOD_template + +IDEPENDK_$(1):=kernel ($(DEVICE)-$(KERNEL_VERSION)) $(foreach pkg,$(5),", $(pkg)") + +PKG_$(1) := $(PACKAGE_DIR)/kmod-$(2)_$(DEVICE)-$(KERNEL_VERSION)-$(KERNEL_RELEASE)_$(ARCH).ipk +I_$(1) := $(KMOD_BUILD_DIR)/ipkg/$(2) + +ifeq ($$(ADK_KPACKAGE_KMOD_$(1)),m) +TARGETS+=$$(PKG_$(1)) +endif +ifeq ($$(ADK_KPACKAGE_KMOD_$(1)),y) +TARGETS+=$$(PKG_$(1)) +INSTALL_TARGETS+=$$(PKG_$(1)) +endif + +$$(PKG_$(1)): + rm -rf $$(I_$(1)) + echo "Package: kmod-$(2)" > $(LINUX_BUILD_DIR)/kmod-control/kmod-$(2).control + echo "Priority: optional" >> $(LINUX_BUILD_DIR)/kmod-control/kmod-$(2).control + echo "Section: sys" >> $(LINUX_BUILD_DIR)/kmod-control/kmod-$(2).control + echo "Description: kernel module $(2)" >> $(LINUX_BUILD_DIR)/kmod-control/kmod-$(2).control + ${BASH} ${SCRIPT_DIR}/make-ipkg-dir.sh $$(I_$(1)) \ + $(LINUX_BUILD_DIR)/kmod-control/kmod-$(2).control \ + $(DEVICE)-$(KERNEL_VERSION)-$(KERNEL_RELEASE) $(ARCH) + echo "Depends: $$(IDEPENDK_$(1))" >> $$(I_$(1))/CONTROL/control +ifneq ($(strip $(3)),) + mkdir -p $$(I_$(1))/lib/modules/$(KERNEL_VERSION) + $(CP) $(foreach mod,$(3),$(mod).$(LINUX_KMOD_SUFFIX)) $$(I_$(1))/lib/modules/$(KERNEL_VERSION) +ifneq ($(4),) + mkdir -p $$(I_$(1))/etc/modules.d + for module in $(notdir $(3)); do \ + echo $$$$module >> $$(I_$(1))/etc/modules.d/$(4)-$(2); \ + done + echo "#!/bin/sh" >> $$(I_$(1))/CONTROL/postinst + echo "if [ -z \"\$$$${IPKG_INSTROOT}\" ]; then" >> $$(I_$(1))/CONTROL/postinst + echo ". /etc/functions.sh" >> $$(I_$(1))/CONTROL/postinst + echo "load_modules /etc/modules.d/$(4)-$(2)" >> $$(I_$(1))/CONTROL/postinst + echo "fi" >> $$(I_$(1))/CONTROL/postinst + chmod 0755 $$(I_$(1))/CONTROL/postinst +endif +endif + $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR) $(MAKE_TRACE) +endef + +include $(BUILD_DIR)/.kernelconfig diff --git a/mk/linux.mk b/mk/linux.mk new file mode 100644 index 000000000..e9d17e231 --- /dev/null +++ b/mk/linux.mk @@ -0,0 +1,11 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +PKG_NAME:= linux +PKG_VERSION:= $(KERNEL_VERSION) +PKG_RELEASE:= $(KERNEL_RELEASE) +PKG_MD5SUM= $(KERNEL_MD5SUM) +DISTFILES= $(PKG_NAME)-$(PKG_VERSION).tar.bz2 +MASTER_SITES= ${MASTER_SITE_KERNEL:=kernel/v2.6/} diff --git a/mk/mirrors.mk b/mk/mirrors.mk new file mode 100644 index 000000000..bbf41417a --- /dev/null +++ b/mk/mirrors.mk @@ -0,0 +1,147 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +MASTER_SITE_BACKUP?= ${MASTER_SITE_OPENADK} + +MASTER_SITE_OPENADK?= \ + http://www.openadk.org/distfiles/ \ + +MASTER_SITE_MIRBSD?= \ + http://www.mirbsd.org/MirOS/distfiles/ \ + http://pub.allbsd.org/MirOS/distfiles/ \ + +MASTER_SITE_KERNEL?= \ + http://www.de.kernel.org/pub/linux/ \ + http://www.fi.kernel.org/pub/linux/ \ + http://www.fr.kernel.org/pub/linux/ \ + http://www.kernel.org/pub/linux/ \ + +MASTER_SITE_XORG?= \ + http://ftp.gwdg.de/pub/x11/x.org/pub/X11R7.4/src/everything/ \ + http://xorg.freedesktop.org/releases/X11R7.4/src/everything/ \ + http://xorg.freedesktop.org/releases/individual/lib/ \ + +MASTER_SITE_GNU?= \ + http://ftp.gnu.org/gnu/ \ + ftp://ftp.gnu.org/gnu/ \ + ftp://ftp.funet.fi/pub/gnu/prep/ \ + ftp://mirrors.usc.edu/pub/gnu/ \ + ftp://ftp.cs.tu-berlin.de/pub/gnu/ \ + ftp://aeneas.mit.edu/pub/gnu/ \ + ftp://mirrors.dotsrc.org/gnu/ \ + ftp://ftp.wustl.edu/pub/gnu/ \ + ftp://ftp.kddilabs.jp/GNU/ \ + ftp://ftp.mirror.ac.uk/sites/ftp.gnu.org/gnu/ \ + ftp://sunsite.org.uk/package/gnu/ \ + ftp://ftp.informatik.hu-berlin.de/pub/gnu/ \ + ftp://ftp.rediris.es/mirror/gnu/gnu/ \ + ftp://ftp.cs.univ-paris8.fr/mirrors/ftp.gnu.org/ \ + ftp://ftp.chg.ru/pub/gnu/ \ + ftp://ftp.uvsq.fr/pub/gnu/ \ + ftp://ftp.sunet.se/pub/gnu/ \ + +MASTER_SITE_SOURCEFORGE?= \ + http://easynews.dl.sourceforge.net/sourceforge/ \ + http://puzzle.dl.sourceforge.net/sourceforge/ \ + http://optusnet.dl.sourceforge.net/sourceforge/ \ + http://heanet.dl.sourceforge.net/sourceforge/ \ + http://jaist.dl.sourceforge.net/sourceforge/ \ + http://nchc.dl.sourceforge.net/sourceforge/ \ + http://switch.dl.sourceforge.net/sourceforge/ \ + http://kent.dl.sourceforge.net/sourceforge/ \ + http://internap.dl.sourceforge.net/sourceforge/ \ + http://mesh.dl.sourceforge.net/sourceforge/ \ + http://ovh.dl.sourceforge.net/sourceforge/ \ + http://surfnet.dl.sourceforge.net/sourceforge/ \ + http://ufpr.dl.sourceforge.net/sourceforge/ \ + +MASTER_SITE_MYSQL?= \ + ftp://ftp.fu-berlin.de/unix/databases/mysql/ \ + http://sunsite.informatik.rwth-aachen.de/mysql/ \ + http://mysql.easynet.be/ \ + http://mysql.blic.net/ \ + http://mysql.online.bg/ \ + http://mysql.mirrors.cybercity.dk/ \ + http://mirrors.dotsrc.org/mysql/ \ + http://mysql.tonnikala.org/ \ + ftp://ftp.inria.fr/pub/MySQL/ \ + http://mirrors.ircam.fr/pub/mysql/ \ + http://mirrors.ee.teiath.gr/mysql/ \ + http://mysql.sote.hu/ \ + http://mysql.mirrors.crysys.hit.bme.hu/ \ + http://na.mirror.garr.it/mirrors/MySQL/ \ + http://mysql.bst.lt/ \ + http://mysql.proserve.nl/ \ + http://mirror.hostfuss.com/mysql/ \ + http://mysql.mirrors.webazilla.nl/ \ + http://mirror.dinpris.com/mysql/ \ + http://mysql.nfsi.pt/ \ + http://lisa.gov.pt/ftp/mysql/ \ + ftp://mirrors.fibernet.ro/1/MySQL/ \ + http://mysql.ran.ro/ \ + http://mysql.directnet.ru/ \ + ftp://ftp.dn.ru/pub/MySQL/ \ + http://mysql.dn.ru/ \ + http://mysql.mix.su/ \ + http://www.fastmirrors.org/mysql/ \ + http://mirrors.bevc.net/mysql/ \ + http://www.wsection.com/mysql/ \ + http://mysql.paknet.org/ \ + http://mysql.rediris.es/ \ + http://mysql.dataphone.se/ \ + http://mirror.switch.ch/ftp/mirror/mysql/ \ + ftp://ftp.solnet.ch/mirror/mysql/ \ + http://mysql.net.ua/ \ + ftp://ftp.tlk-l.net/pub/mirrors/mysql.com/ \ + http://mysql.infocom.ua/ \ + http://www.mirrorservice.org/sites/ftp.mysql.com/ \ + http://mirrors.dedipower.com/www.mysql.com/ \ + http://www.mirror.ac.uk/mirror/www.mysql.org/ \ + http://mysql.mirror.rafal.ca/ \ + http://mysql.serenitynet.com/ \ + ftp://mirror.mcs.anl.gov/pub/mysql/ \ + http://mirror.services.wisc.edu/mysql/ \ + http://mysql.orst.edu/ \ + http://mysql.he.net/ \ + http://mysql.mirrors.pair.com/ \ + http://mysql.mirror.redwire.net/ \ + http://mysql.mirrors.hoobly.com/ \ + http://mirror.trouble-free.net/mysql_mirror/ \ + http://mirrors.24-7-solutions.net/pub/mysql/ \ + http://www.stathy.com/mysql/ \ + http://mirror.x10.com/mirror/mysql/ \ + http://mysql.localhost.net.ar/ \ + http://mirrors.uol.com.br/pub/mysql/ \ + http://mysql.vision.cl/ \ + http://mysql.tecnoera.com/ \ + http://mysql.mirrors.arminco.com/ \ + http://mysqlmirror.netandhost.in/ \ + http://mirror.mysql-partners-jp.biz/ \ + http://ftp.iij.ad.jp/pub/db/mysql/ \ + http://mysql.oss.eznetsols.org/ \ + http://mysql.holywar.net/ \ + http://mysql.new21.com/ \ + http://mysql.byungsoo.net/ \ + http://mysql.isu.edu.tw/ \ + http://mysql.cdpa.nsysu.edu.tw/ \ + http://mysql.cs.pu.edu.tw/ \ + http://ftp.stu.edu.tw/pub/Unix/Database/Mysql/ \ + http://mysql.ntu.edu.tw/ \ + http://mysql.planetmirror.com/ \ + http://mysql.mirrors.ilisys.com.au/ \ + http://mysql.inspire.net.nz/ \ + http://mysql.mirror.ac.za/ \ + +MASTER_SITE_GNOME+= \ + ftp://ftp.acc.umu.se/pub/GNOME/sources/ \ + ftp://ftp.rpmfind.net/linux/gnome.org/sources/ \ + ftp://ftp.unina.it/pub/linux/GNOME/sources/ \ + ftp://ftp.belnet.be/mirror/ftp.gnome.org/sources/ \ + ftp://ftp.dit.upm.es/linux/gnome/sources/ \ + ftp://ftp.dataplus.se/pub/linux/gnome/sources/ \ + ftp://ftp.cse.buffalo.edu/pub/Gnome/sources/ \ + ftp://ftp.linux.org.uk/mirrors/ftp.gnome.org/sources/ \ + ftp://ftp.gnome.org/pub/GNOME/sources/ \ + diff --git a/mk/modules.mk b/mk/modules.mk new file mode 100644 index 000000000..5283d1ed7 --- /dev/null +++ b/mk/modules.mk @@ -0,0 +1,1254 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +# +# Ethernet network devices +# +$(eval $(call KMOD_template,NE2K_PCI,ne2k-pci,\ + $(MODULES_DIR)/kernel/drivers/net/8390 \ + $(MODULES_DIR)/kernel/drivers/net/ne2k-pci \ +,20)) + +$(eval $(call KMOD_template,E100,e100,\ + $(MODULES_DIR)/kernel/drivers/net/e100 \ +,20)) + +$(eval $(call KMOD_template,E1000,e1000,\ + $(MODULES_DIR)/kernel/drivers/net/e1000/e1000 \ +,20)) + +# +# Wireless network devices +# +$(eval $(call KMOD_template,MAC80211,mac80211,\ + $(MODULES_DIR)/kernel/net/wireless/cfg80211 \ + $(MODULES_DIR)/kernel/net/mac80211/mac80211 \ +,15, kmod-crypto-aes kmod-crypto-arc4 kmod-crypto-ecb kmod-crc32)) + +$(eval $(call KMOD_template,ATH5K,mac80211-ath5k,\ + $(MODULES_DIR)/kernel/drivers/net/wireless/ath5k/ath5k \ +,20, kmod-led-class)) + +$(eval $(call KMOD_template,RT2X00,mac80211-rt2x00,\ + $(MODULES_DIR)/kernel/drivers/net/wireless/rt2x00/rt2x00lib \ + $(MODULES_DIR)/kernel/drivers/net/wireless/rt2x00/rt2x00pci \ +,17)) + +$(eval $(call KMOD_template,RT2400PCI,mac80211-rt2400pci,\ + $(MODULES_DIR)/kernel/drivers/net/wireless/rt2x00/rt2400pci \ +,20, kmod-led-class kmod-mac80211-rt2x00)) + +$(eval $(call KMOD_template,RT2500PCI,mac80211-rt2500pci,\ + $(MODULES_DIR)/kernel/drivers/net/wireless/rt2x00/rt2500pci \ +,20, kmod-led-class kmod-mac80211-rt2x00)) + +$(eval $(call KMOD_template,RT61PCI,mac80211-rt61pci,\ + $(MODULES_DIR)/kernel/drivers/net/wireless/rt2x00/rt61pci \ +,20, kmod-led-class kmod-mac80211-rt2x00)) + +# +# Networking +# +$(eval $(call KMOD_template,ATM,atm,\ + $(MODULES_DIR)/kernel/net/atm/atm \ +,50)) + +$(eval $(call KMOD_template,BRIDGE,bridge,\ + $(MODULES_DIR)/kernel/net/llc/llc \ + $(MODULES_DIR)/kernel/net/bridge/bridge \ +,10)) + +$(eval $(call KMOD_template,NET_IPGRE,gre,\ + $(MODULES_DIR)/kernel/net/ipv4/ip_gre \ +,50)) + +$(eval $(call KMOD_template,NET_IPIP,ipip,\ + $(MODULES_DIR)/kernel/net/ipv4/tunnel4 \ + $(MODULES_DIR)/kernel/net/ipv4/ipip \ +,60)) + +$(eval $(call KMOD_template,IPV6,ipv6,\ + $(MODULES_DIR)/kernel/net/ipv6/ipv6 \ +,20)) + +$(eval $(call KMOD_template,IPV6_SIT,ipv6-sit,\ + $(MODULES_DIR)/kernel/net/ipv6/sit \ +,25)) + +$(eval $(call KMOD_template,PPP,ppp,\ + $(MODULES_DIR)/kernel/drivers/net/slhc \ + $(MODULES_DIR)/kernel/drivers/net/ppp_generic \ + $(MODULES_DIR)/kernel/drivers/net/ppp_async \ + $(MODULES_DIR)/kernel/drivers/net/pppox \ +,50)) + +$(eval $(call KMOD_template,MPPE,mppe,\ + $(MODULES_DIR)/kernel/drivers/net/ppp_mppe_mppc \ +,55)) + +$(eval $(call KMOD_template,PPPOATM,pppoatm,\ + $(MODULES_DIR)/kernel/net/atm/pppoatm \ +,60)) + +$(eval $(call KMOD_template,PPPOE,pppoe,\ + $(MODULES_DIR)/kernel/drivers/net/pppoe \ +,60)) + +$(eval $(call KMOD_template,TUN,tun,\ + $(MODULES_DIR)/kernel/drivers/net/tun \ +,20)) + +$(eval $(call KMOD_template,BONDING,bonding,\ + $(MODULES_DIR)/kernel/drivers/net/bonding/bonding \ +,20)) + +# +# Traffic scheduling +# +$(eval $(call KMOD_template,NET_SCH_CBQ,net-sched-cbq,\ + $(MODULES_DIR)/kernel/net/sched/sch_cbq \ +,40)) + +$(eval $(call KMOD_template,NET_SCH_HTB,net-sched-htb,\ + $(MODULES_DIR)/kernel/net/sched/sch_htb \ +,40)) + +$(eval $(call KMOD_template,NET_SCH_HFSC,net-sched-hfsc,\ + $(MODULES_DIR)/kernel/net/sched/sch_hfsc \ +,40)) + +$(eval $(call KMOD_template,NET_SCH_ATM,net-sched-atm,\ + $(MODULES_DIR)/kernel/net/sched/sch_atm \ +,40)) + +$(eval $(call KMOD_template,NET_SCH_PRIO,net-sched-prio,\ + $(MODULES_DIR)/kernel/net/sched/sch_prio \ +,40)) + +$(eval $(call KMOD_template,NET_SCH_RED,net-sched-red,\ + $(MODULES_DIR)/kernel/net/sched/sch_red \ +,40)) + +$(eval $(call KMOD_template,NET_SCH_SFQ,net-sched-sfq,\ + $(MODULES_DIR)/kernel/net/sched/sch_sfq \ +,40)) + +# busybox netapps crash, when module loaded +#$(eval $(call KMOD_template,NET_SCH_TEQL,net-sched-teql,\ +# $(MODULES_DIR)/kernel/net/sched/sch_teql \ +#,40)) + +$(eval $(call KMOD_template,NET_SCH_TBF,net-sched-tbf,\ + $(MODULES_DIR)/kernel/net/sched/sch_tbf \ +,40)) + +$(eval $(call KMOD_template,NET_SCH_GRED,net-sched-gred,\ + $(MODULES_DIR)/kernel/net/sched/sch_gred \ +,40)) + +$(eval $(call KMOD_template,NET_SCH_DSMARK,net-sched-dsmark,\ + $(MODULES_DIR)/kernel/net/sched/sch_dsmark \ +,40)) + +$(eval $(call KMOD_template,NET_SCH_INGRESS,net-sched-ingress,\ + $(MODULES_DIR)/kernel/net/sched/sch_ingress \ +,40)) + +# +# classifications +# +$(eval $(call KMOD_template,NET_CLS_BASIC,net-cls-basic,\ + $(MODULES_DIR)/kernel/net/sched/cls_basic \ +,40)) + +$(eval $(call KMOD_template,NET_CLS_TCINDEX,net-cls-tcindex,\ + $(MODULES_DIR)/kernel/net/sched/cls_tcindex \ +,40)) + +$(eval $(call KMOD_template,NET_CLS_ROUTE4,net-cls-route,\ + $(MODULES_DIR)/kernel/net/sched/cls_route \ +,40)) + +$(eval $(call KMOD_template,NET_CLS_FW,net-cls-fw,\ + $(MODULES_DIR)/kernel/net/sched/cls_fw \ +,40)) + +$(eval $(call KMOD_template,NET_CLS_U32,net-cls-u32,\ + $(MODULES_DIR)/kernel/net/sched/cls_u32 \ +,40)) + +# +# actions +# +$(eval $(call KMOD_template,NET_ACT_POLICE,net-act-police,\ + $(MODULES_DIR)/kernel/net/sched/act_police \ +,45)) + +$(eval $(call KMOD_template,NET_ACT_GACT,net-act-gact,\ + $(MODULES_DIR)/kernel/net/sched/act_gact \ +,45)) + +$(eval $(call KMOD_template,NET_ACT_MIRRED,net-act-mirred,\ + $(MODULES_DIR)/kernel/net/sched/act_mirred \ +,45)) + +$(eval $(call KMOD_template,NET_ACT_IPT,net-act-ipt,\ + $(MODULES_DIR)/kernel/net/sched/act_ipt \ +,45)) + +$(eval $(call KMOD_template,NET_ACT_PEDIT,net-act-pedit,\ + $(MODULES_DIR)/kernel/net/sched/act_pedit \ +,45)) + +## +## Filtering / Firewalling +## +# +# Netfilter Core +# +$(eval $(call KMOD_template,NETFILTER_XT_TARGET_CLASSIFY,nf-classify,\ + $(MODULES_DIR)/kernel/net/netfilter/xt_CLASSIFY \ +,50)) + +$(eval $(call KMOD_template,NETFILTER_XT_TARGET_CONNMARK,nf-connmark,\ + $(MODULES_DIR)/kernel/net/netfilter/xt_CONNMARK \ +,50)) + +$(eval $(call KMOD_template,NETFILTER_XT_TARGET_MARK,nf-mark,\ + $(MODULES_DIR)/kernel/net/netfilter/xt_MARK \ +,50)) + +$(eval $(call KMOD_template,NETFILTER_XT_TARGET_NFQUEUE,nf-queue,\ + $(MODULES_DIR)/kernel/net/netfilter/xt_NFQUEUE \ +,50)) + +$(eval $(call KMOD_template,NETFILTER_XT_TARGET_NOTRACK,nf-notrack,\ + $(MODULES_DIR)/kernel/net/netfilter/xt_NOTRACK \ +,50)) + +# +# IP: Netfilter +# +$(eval $(call KMOD_template,NF_CONNTRACK,nf-conntrack,\ + $(MODULES_DIR)/kernel/net/netfilter/nf_conntrack \ +,50)) + +$(eval $(call KMOD_template,NF_CONNTRACK_IPV4,nf-conntrack-ipv4,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/nf_defrag_ipv4 \ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/nf_conntrack_ipv4 \ +,51)) + +$(eval $(call KMOD_template,IP_NF_FTP,nf-ip-conntrack-ftp,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_conntrack_ftp \ +,55)) + +$(eval $(call KMOD_template,IP_NF_IRC,nf-ip-conntrack-irc,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_conntrack_irc \ +,55)) + +$(eval $(call KMOD_template,IP_NF_NETBIOS_NS,nf-ip-conntrack-netbios-ns,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_conntrack_netbios_ns \ +,55)) + +$(eval $(call KMOD_template,IP_NF_TFTP,nf-ip-conntrack-tftp,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_conntrack_tftp \ +,55)) + +$(eval $(call KMOD_template,IP_NF_AMANDA,nf-ip-conntrack-amanda,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_conntrack_amanda \ +,55)) + +$(eval $(call KMOD_template,IP_NF_PPTP,nf-ip-conntrack-pptp,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_conntrack_pptp \ +,55)) + +$(eval $(call KMOD_template,IP_NF_H323,nf-ip-conntrack-h323,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_conntrack_h323 \ +,55)) + +$(eval $(call KMOD_template,IP_NF_SIP,nf-ip-conntrack-sip,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_conntrack_sip \ +,55)) + +$(eval $(call KMOD_template,IP_NF_IPTABLES,nf-ip-iptables,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_tables \ +,50)) + +$(eval $(call KMOD_template,IP_NF_MATCH_IPRANGE,nf-ip-match-iprange,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_iprange \ +,55)) + +$(eval $(call KMOD_template,IP_NF_MATCH_TOS,nf-ip-match-tos,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_tos \ +,55)) + +$(eval $(call KMOD_template,IP_NF_MATCH_RECENT,nf-ip-match-recent,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_recent \ +,55)) + +$(eval $(call KMOD_template,IP_NF_MATCH_ECN,nf-ip-match-ecn,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_ecn \ +,55)) + +$(eval $(call KMOD_template,IP_NF_MATCH_AH,nf-ip-match-ah,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_ah \ +,55)) + +$(eval $(call KMOD_template,IP_NF_MATCH_TTL,nf-ip-match-ttl,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_ttl \ +,55)) + +$(eval $(call KMOD_template,IP_NF_MATCH_OWNER,nf-ip-match-owner,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_owner \ +,55)) + +$(eval $(call KMOD_template,IP_NF_MATCH_ADDRTYPE,nf-ip-match-addrtype,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_addrtype \ +,55)) + +$(eval $(call KMOD_template,IP_NF_MATCH_HASHLIMIT,nf-ip-match-hashlimit,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_hashlimit \ +,55)) + +$(eval $(call KMOD_template,IP_NF_MATCH_STATE,nf-ip-match-state,\ + $(MODULES_DIR)/kernel/net/netfilter/xt_state \ +,55)) + +$(eval $(call KMOD_template,IP_NF_MATCH_MULTIPORT,nf-ip-match-multiport,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_multiport \ +,55)) + +# +# Filtering +# +$(eval $(call KMOD_template,IP_NF_FILTER,nf-ip-filter,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/iptable_filter \ +,55)) + +$(eval $(call KMOD_template,IP_NF_TARGET_REJECT,nf-ip-target-reject,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_REJECT \ +,60)) + +$(eval $(call KMOD_template,IP_NF_TARGET_LOG,nf-ip-target-log,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_LOG \ +,60)) + +$(eval $(call KMOD_template,IP_NF_TARGET_ULOG,nf-ip-target-ulog,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_ULOG \ +,60)) + +$(eval $(call KMOD_template,IP_NF_TARGET_TCPMSS,nf-ip-target-tcpmss,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_TCPMSS \ +,60)) + +$(eval $(call KMOD_template,NF_NAT,nf-nat,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/nf_nat \ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/iptable_nat \ +,60)) + +$(eval $(call KMOD_template,IP_NF_PPTP,nf-ip-nat-pptp,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_nat_pptp \ +,65)) + +$(eval $(call KMOD_template,IP_NF_TFTP,nf-ip-nat-tftp,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_nat_tftp \ +,65)) + +$(eval $(call KMOD_template,IP_NF_FTP,nf-ip-nat-ftp,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_nat_ftp \ +,65)) + +$(eval $(call KMOD_template,IP_NF_IRC,nf-ip-nat-irc,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_nat_irc \ +,65)) + +$(eval $(call KMOD_template,IP_NF_AMANDA,nf-ip-nat-amanda,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_nat_amanda \ +,65)) + +$(eval $(call KMOD_template,IP_NF_SIP,nf-ip-nat-sip,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_nat_sip \ +,65)) + +$(eval $(call KMOD_template,IP_NF_H323,nf-ip-nat-h323,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip_nat_h323 \ +,65)) + +$(eval $(call KMOD_template,IP_NF_TARGET_MASQUERADE,nf-ip-target-masquerade,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_MASQUERADE \ +,65)) + +$(eval $(call KMOD_template,IP_NF_TARGET_REDIRECT,nf-ip-target-redirect,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_REDIRECT \ +,65)) + +$(eval $(call KMOD_template,IP_NF_TARGET_NETMAP,nf-ip-target-netmap,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_NETMAP \ +,65)) + +$(eval $(call KMOD_template,IP_NF_TARGET_SAME,nf-ip-target-same,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_SAME \ +,65)) + +# +# Mangle +# +$(eval $(call KMOD_template,IP_NF_MANGLE,nf-ip-mangle,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/iptable_mangle \ +,60)) + +$(eval $(call KMOD_template,IP_NF_TARGET_TOS,nf-ip-target-tos,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_TOS \ +,65)) + +$(eval $(call KMOD_template,IP_NF_TARGET_ECN,nf-ip-target-ecn,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_ECN \ +,65)) + +$(eval $(call KMOD_template,IP_NF_TARGET_TTL,nf-ip-target-ttl,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_TTL \ +,65)) + +# +# IPVS +# + +IPVSPATH=$(MODULES_DIR)/kernel/net/netfilter/ipvs + +$(eval $(call KMOD_template,IP_VS,ip-vs,\ + $(IPVSPATH)/ip_vs \ +,55)) + +$(eval $(call KMOD_template,IP_VS_RR,ip-vs-rr,\ + $(IPVSPATH)/ip_vs_rr \ +,55)) + +$(eval $(call KMOD_template,IP_VS_WRR,ip-vs-wrr,\ + $(IPVSPATH)/ip_vs_wrr \ +,55)) + +$(eval $(call KMOD_template,IP_VS_LC,ip-vs-lc,\ + $(IPVSPATH)/ip_vs_lc \ +,55)) + +$(eval $(call KMOD_template,IP_VS_WLC,ip-vs-wlc,\ + $(IPVSPATH)/ip_vs_wlc \ +,55)) + +$(eval $(call KMOD_template,IP_VS_LBLC,ip-vs-lblc,\ + $(IPVSPATH)/ip_vs_lblc \ +,55)) + +$(eval $(call KMOD_template,IP_VS_LBLCR,ip-vs-lblcr,\ + $(IPVSPATH)/ip_vs_lblcr \ +,55)) + +$(eval $(call KMOD_template,IP_VS_DH,ip-vs-dh,\ + $(IPVSPATH)/ip_vs_dh \ +,55)) + +$(eval $(call KMOD_template,IP_VS_SH,ip-vs-sh,\ + $(IPVSPATH)/ip_vs_sh \ +,55)) + +$(eval $(call KMOD_template,IP_VS_SED,ip-vs-sed,\ + $(IPVSPATH)/ip_vs_sed \ +,55)) + +$(eval $(call KMOD_template,IP_VS_NQ,ip-vs-nq,\ + $(IPVSPATH)/ip_vs_nq \ +,55)) + +$(eval $(call KMOD_template,IP_VS_FTP,ip-vs-ftp,\ + $(IPVSPATH)/ip_vs_ftp \ +,55)) + +# +# Block devices +# +$(eval $(call KMOD_template,BLK_DEV_LOOP,loop,\ + $(MODULES_DIR)/kernel/drivers/block/loop \ +,20)) + +$(eval $(call KMOD_template,BLK_DEV_NBD,nbd,\ + $(MODULES_DIR)/kernel/drivers/block/nbd \ +,20)) + +$(eval $(call KMOD_template,SCSI,scsi,\ + $(MODULES_DIR)/kernel/drivers/scsi/scsi_wait_scan \ +,20)) + +$(eval $(call KMOD_template,BLK_DEV_SD,scsi-disk,\ + $(MODULES_DIR)/kernel/drivers/scsi/sd_mod \ +,25)) + +$(eval $(call KMOD_template,BLK_DEV_SR,scsi-cdrom,\ + $(MODULES_DIR)/kernel/drivers/cdrom/cdrom \ + $(MODULES_DIR)/kernel/drivers/scsi/sr_mod \ +,25)) + +# +# RAID +# +$(eval $(call KMOD_template,BLK_DEV_MD,md,\ + $(MODULES_DIR)/kernel/drivers/md/md-mod \ +,30)) + +$(eval $(call KMOD_template,MD_RAID0,md-raid0,\ + $(MODULES_DIR)/kernel/drivers/md/raid0 \ +,35)) + +$(eval $(call KMOD_template,MD_RAID1,md-raid1,\ + $(MODULES_DIR)/kernel/drivers/md/raid1 \ +,35)) + +$(eval $(call KMOD_template,MD_RAID456,md-raid456,\ + $(MODULES_DIR)/kernel/drivers/md/raid456 \ +,35)) + +# +# Device Mapper +# +$(eval $(call KMOD_template,BLK_DEV_DM,dm-mod,\ + $(MODULES_DIR)/kernel/drivers/md/dm-mod \ +,35)) + +$(eval $(call KMOD_template,DM_CRYPT,dm-crypt,\ + $(MODULES_DIR)/kernel/drivers/md/dm-crypt \ +,40)) + +$(eval $(call KMOD_template,DM_MIRROR,dm-mirror,\ + $(MODULES_DIR)/kernel/drivers/md/dm-mirror \ +,40)) + +$(eval $(call KMOD_template,DM_SNAPSHOT,dm-snapshot,\ + $(MODULES_DIR)/kernel/drivers/md/dm-snapshot \ +,40)) + + +# +# Crypto +# + +$(eval $(call KMOD_template,CRYPTO_DEV_GEODE,crypto-hw-geode,\ + $(MODULES_DIR)/kernel/drivers/crypto/geode-aes \ +,10)) + +$(eval $(call KMOD_template,CRYPTO_ALGAPI,crypto-algapi,\ + $(MODULES_DIR)/kernel/crypto/crypto_algapi \ +,03)) + +$(eval $(call KMOD_template,CRYPTO_AEAD,crypto-aead,\ + $(MODULES_DIR)/kernel/crypto/aead \ +,04)) + +$(eval $(call KMOD_template,CRYPTO_BLKCIPHER,crypto-blkcipher,\ + $(MODULES_DIR)/kernel/crypto/crypto_blkcipher \ + $(MODULES_DIR)/kernel/crypto/rng \ + $(MODULES_DIR)/kernel/crypto/krng \ + $(MODULES_DIR)/kernel/crypto/eseqiv \ + $(MODULES_DIR)/kernel/crypto/chainiv \ +,05)) + +$(eval $(call KMOD_template,CRYPTO_HASH,crypto-hash,\ + $(MODULES_DIR)/kernel/crypto/crypto_hash \ +,05)) + +$(eval $(call KMOD_template,CRYPTO_MANAGER,crypto-manager,\ + $(MODULES_DIR)/kernel/crypto/cryptomgr \ +,06)) + +$(eval $(call KMOD_template,CRYPTO_HMAC,crypto-hmac,\ + $(MODULES_DIR)/kernel/crypto/hmac \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_NULL,crypto-null,\ + $(MODULES_DIR)/kernel/crypto/crypto_null \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_MD4,crypto-md4,\ + $(MODULES_DIR)/kernel/crypto/md4 \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_MD5,crypto-md5,\ + $(MODULES_DIR)/kernel/crypto/md5 \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_SHA1,crypto-sha1,\ + $(MODULES_DIR)/kernel/crypto/sha1_generic \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_SHA256,crypto-sha256,\ + $(MODULES_DIR)/kernel/crypto/sha256_generic \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_SHA512,crypto-sha512,\ + $(MODULES_DIR)/kernel/crypto/sha512_generic \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_WP512,crypto-whirlpool,\ + $(MODULES_DIR)/kernel/crypto/wp512 \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_TGR192,crypto-tiger,\ + $(MODULES_DIR)/kernel/crypto/tgr192 \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_ECB,crypto-ecb,\ + $(MODULES_DIR)/kernel/crypto/ecb \ +,10)) + +$(eval $(call KMOD_template,CRYPTO_CBC,crypto-cbc,\ + $(MODULES_DIR)/kernel/crypto/cbc \ +,10)) + +$(eval $(call KMOD_template,CRYPTO_DES,crypto-des,\ + $(MODULES_DIR)/kernel/crypto/des_generic \ +,10)) + +$(eval $(call KMOD_template,CRYPTO_BLOWFISH,crypto-blowfish,\ + $(MODULES_DIR)/kernel/crypto/blowfish \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_TWOFISH,crypto-twofish,\ + $(MODULES_DIR)/kernel/crypto/twofish_common \ + $(MODULES_DIR)/kernel/crypto/twofish \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_TWOFISH_586,crypto-twofish-i586,\ + $(MODULES_DIR)/kernel/arch/x86/crypto/twofish-i586 \ +,12)) + +$(eval $(call KMOD_template,CRYPTO_SERPENT,crypto-serpent,\ + $(MODULES_DIR)/kernel/crypto/serpent \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_AES,crypto-aes,\ + $(MODULES_DIR)/kernel/crypto/aes_generic \ +,10)) + +$(eval $(call KMOD_template,CRYPTO_AES_586,crypto-aes-i586,\ + $(MODULES_DIR)/kernel/arch/x86/crypto/aes-i586 \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_CAST5,crypto-cast5,\ + $(MODULES_DIR)/kernel/crypto/cast5 \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_CAST6,crypto-cast6,\ + $(MODULES_DIR)/kernel/crypto/cast6 \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_TEA,crypto-tea,\ + $(MODULES_DIR)/kernel/crypto/tea \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_ARC4,crypto-arc4,\ + $(MODULES_DIR)/kernel/crypto/arc4 \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_KHAZAD,crypto-khazad,\ + $(MODULES_DIR)/kernel/crypto/khazad \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_ANUBIS,crypto-anubis,\ + $(MODULES_DIR)/kernel/crypto/anubis \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_CAMELLIA,crypto-camellia,\ + $(MODULES_DIR)/kernel/crypto/camellia \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_FCRYPT,crypto-fcrypt,\ + $(MODULES_DIR)/kernel/crypto/fcrypt \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_DEFLATE,crypto-deflate,\ + $(MODULES_DIR)/kernel/crypto/deflate \ +,10)) + +$(eval $(call KMOD_template,CRYPTO_LZO,crypto-lzo,\ + $(MODULES_DIR)/kernel/crypto/lzo \ +,10)) + +$(eval $(call KMOD_template,CRYPTO_MICHAEL_MIC,crypto-michael-mic,\ + $(MODULES_DIR)/kernel/crypto/michael_mic \ +,11)) + +$(eval $(call KMOD_template,CRYPTO_CRC32C,crypto-crc32c,\ + $(MODULES_DIR)/kernel/crypto/crc32c \ +,11)) + +$(eval $(call KMOD_template,OCF_CRYPTOSOFT,cryptodev-cryptosoft,\ + ${MODULES_DIR}/kernel/crypto/ocf/cryptosoft \ +,12)) + +$(eval $(call KMOD_template,OCF_SAFE,cryptodev-safe,\ + ${MODULES_DIR}/kernel/crypto/ocf/safe/safe \ +,12)) + +$(eval $(call KMOD_template,OCF_IXP4XX,cryptodev-ixp4xx,\ + ${MODULES_DIR}/kernel/crypto/ocf/ixp4xx/ixp4xx \ +,12)) + +$(eval $(call KMOD_template,OCF_HIFN,cryptodev-hifn,\ + ${MODULES_DIR}/kernel/crypto/ocf/hifn/hifn7751 \ +,12)) + +$(eval $(call KMOD_template,OCF_TALITOS,cryptodev-talitos,\ + ${MODULES_DIR}/kernel/crypto/ocf/talitos/talitos \ +,12)) + +# +# Filesystems +# +$(eval $(call KMOD_template,CIFS,fs-cifs,\ + $(MODULES_DIR)/kernel/fs/cifs/cifs \ +,30)) + +$(eval $(call KMOD_template,CODA_FS,fs-coda,\ + $(MODULES_DIR)/kernel/fs/coda/coda \ +,30)) + +ifneq ($(ADK_KERNEL_EXT2_FS),y) +$(eval $(call KMOD_template,EXT2_FS,fs-ext2,\ + $(MODULES_DIR)/kernel/fs/ext2/ext2 \ +,30)) +endif + +$(eval $(call KMOD_template,EXT3_FS,fs-ext3,\ + $(MODULES_DIR)/kernel/fs/jbd/jbd \ + $(MODULES_DIR)/kernel/fs/ext3/ext3 \ +,30)) + +$(eval $(call KMOD_template,FUSE_FS,fs-fuse,\ + $(MODULES_DIR)/kernel/fs/fuse/fuse \ +,30)) + +$(eval $(call KMOD_template,HFSPLUS_FS,fs-hfsplus,\ + $(MODULES_DIR)/kernel/fs/hfsplus/hfsplus \ +,30)) + +$(eval $(call KMOD_template,SUNRPC,fs-rpc,\ + $(MODULES_DIR)/kernel/net/sunrpc/sunrpc \ +,24)) + +$(eval $(call KMOD_template,SUNRPC_GSS,fs-rpcgss,\ + $(MODULES_DIR)/kernel/net/sunrpc/auth_gss/auth_rpcgss \ +,25)) + +$(eval $(call KMOD_template,RPCSEC_GSS_KRB5,fs-rpcsec-krb5,\ + $(MODULES_DIR)/kernel/net/sunrpc/auth_gss/rpcsec_gss_krb5 \ +,26)) + +ifneq ($(ADK_KERNEL_NFS_FS),y) +$(eval $(call KMOD_template,NFS_FS,fs-nfs,\ + $(MODULES_DIR)/kernel/fs/lockd/lockd \ + $(MODULES_DIR)/kernel/fs/nfs/nfs \ +,30)) +endif + +$(eval $(call KMOD_template,EXPORTFS,fs-exportfs,\ + $(MODULES_DIR)/kernel/fs/exportfs/exportfs \ +,20)) + +$(eval $(call KMOD_template,NFSD,fs-nfsd,\ + $(MODULES_DIR)/kernel/fs/nfsd/nfsd \ +,30)) + +$(eval $(call KMOD_template,NTFS_FS,fs-ntfs,\ + $(MODULES_DIR)/kernel/fs/ntfs/ntfs \ +,30)) + +$(eval $(call KMOD_template,VFAT_FS,fs-vfat,\ + $(MODULES_DIR)/kernel/fs/fat/fat \ + $(MODULES_DIR)/kernel/fs/fat/vfat \ +,30)) + +$(eval $(call KMOD_template,XFS_FS,fs-xfs,\ + $(MODULES_DIR)/kernel/fs/xfs/xfs \ +,30)) + +$(eval $(call KMOD_template,YAFFS_FS,fs-yaffs,\ + $(MODULES_DIR)/kernel/fs/yaffs2/yaffs \ +,30)) + +$(eval $(call KMOD_template,REISERFS_FS,fs-reiserfs,\ + $(MODULES_DIR)/kernel/fs/reiserfs/reiserfs \ +,30)) + +$(eval $(call KMOD_template,ISO9660_FS,fs-iso9660,\ + $(MODULES_DIR)/kernel/fs/isofs/isofs \ +,30)) + +$(eval $(call KMOD_template,UDF_FS,fs-udf,\ + $(MODULES_DIR)/kernel/fs/udf/udf \ +,30)) + +# +# Multimedia +# +$(eval $(call KMOD_template,SOUND,soundcore,\ + $(MODULES_DIR)/kernel/sound/soundcore \ +,30)) + +$(eval $(call KMOD_template,SND,sound-alsa,\ + $(MODULES_DIR)/kernel/sound/core/snd-page-alloc \ + $(MODULES_DIR)/kernel/sound/core/snd \ + $(MODULES_DIR)/kernel/sound/core/snd-timer \ + $(MODULES_DIR)/kernel/sound/core/snd-pcm \ +,40)) + +$(eval $(call KMOD_template,SND_OSSEMUL,sound-alsa-oss-emul,\ + $(MODULES_DIR)/kernel/sound/core/oss/snd-mixer-oss \ + $(MODULES_DIR)/kernel/sound/core/oss/snd-pcm-oss \ +,45)) + +$(eval $(call KMOD_template,SND_AC97_CODEC,sound-alsa-ac97-codec,\ + $(MODULES_DIR)/kernel/sound/ac97_bus \ + $(MODULES_DIR)/kernel/sound/pci/ac97/snd-ac97-codec \ +,50)) + +$(eval $(call KMOD_template,SND_VIA82XX,sound-alsa-via82xx,\ + $(MODULES_DIR)/kernel/sound/drivers/mpu401/snd-mpu401-uart \ + $(MODULES_DIR)/kernel/sound/pci/snd-via82xx \ +,55)) + +$(eval $(call KMOD_template,SND_CS5535AUDIO,sound-alsa-cs5535,\ + $(MODULES_DIR)/kernel/sound/pci/cs5535audio/snd-cs5535audio \ +,55)) + +$(eval $(call KMOD_template,VIDEODEV,videodev,\ + $(MODULES_DIR)/kernel/drivers/media/video/videodev \ +,65)) + +$(eval $(call KMOD_template,PWC,pwc,\ + $(MODULES_DIR)/kernel/drivers/usb/pwc \ +,70)) + + +# +# PCMCIA/CardBus +# + +$(eval $(call KMOD_template,PCCARD,pccard,\ + $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia_core \ +,40)) + +$(eval $(call KMOD_template,PCMCIA,pcmcia,\ + $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia \ +,50)) + +$(eval $(call KMOD_template,CARDBUS,cardbus,\ + $(MODULES_DIR)/kernel/drivers/pcmcia/rsrc_nonstatic \ + $(MODULES_DIR)/kernel/drivers/pcmcia/yenta_socket \ +,50)) + +$(eval $(call KMOD_template,PCMCIA_SERIAL_CS,pcmcia-serial,\ + $(MODULES_DIR)/kernel/drivers/serial/serial_cs \ +,55)) + +# +# Input +# + +$(eval $(call KMOD_template,KEYBOARD_ATKBD,input-keyboard,\ + $(MODULES_DIR)/kernel/drivers/input/keyboard/atkbd \ +,45)) + +$(eval $(call KMOD_template,INPUT_MOUSEDEV,input-mouse,\ + $(MODULES_DIR)/kernel/drivers/input/mousedev \ +,45)) + +# +# USB +# +USB_CORE_MODULE = drivers/usb/core/usbcore +USB_OHCI_MODULE = drivers/usb/host/ohci-hcd +USB_UHCI_MODULE = drivers/usb/host/uhci-hcd +USB_OHCI_SYMBOL = USB_OHCI_HCD +USB_UHCI_SYMBOL = USB_UHCI_HCD + +ifeq ($(ADK_LINUX_CRIS_FOXBOARD),) +$(eval $(call KMOD_template,USB,usb-core,\ + $(MODULES_DIR)/kernel/$(USB_CORE_MODULE) \ +,50)) +endif + +$(eval $(call KMOD_template,$(USB_OHCI_SYMBOL),usb-ohci,\ + $(MODULES_DIR)/kernel/$(USB_OHCI_MODULE) \ +,60)) + +$(eval $(call KMOD_template,$(USB_UHCI_SYMBOL),usb-uhci,\ + $(MODULES_DIR)/kernel/$(USB_UHCI_MODULE) \ +,60)) + +$(eval $(call KMOD_template,USB_EHCI_HCD,usb-ehci,\ + $(MODULES_DIR)/kernel/drivers/usb/host/ehci-hcd \ +,60)) + +USB_ACM_MODULES = drivers/usb/class/cdc-acm +USB_PRINTER_MODULES = drivers/usb/class/usblp + +$(eval $(call KMOD_template,USB_ACM,usb-acm,\ + $(foreach mod,$(USB_ACM_MODULES),$(MODULES_DIR)/kernel/$(mod)) \ +,70)) + +$(eval $(call KMOD_template,USB_HID,usb-hid,\ + $(MODULES_DIR)/kernel/drivers/hid/usbhid/usbhid \ +,60)) + +$(eval $(call KMOD_template,USB_PRINTER,usb-printer,\ + $(foreach mod,$(USB_PRINTER_MODULES),$(MODULES_DIR)/kernel/$(mod)) \ +,60)) + +$(eval $(call KMOD_template,USB_SERIAL,usb-serial,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/usbserial \ +,60)) + +$(eval $(call KMOD_template,USB_SERIAL_BELKIN,usb-serial-belkin,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/belkin_sa \ +,61)) + +$(eval $(call KMOD_template,USB_SERIAL_FTDI_SIO,usb-serial-ftdi,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/ftdi_sio \ +,61)) + +$(eval $(call KMOD_template,USB_SERIAL_MCT_U232,usb-serial-mct-u232,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/mct_u232 \ +,61)) + +$(eval $(call KMOD_template,USB_SERIAL_PL2303,usb-serial-pl2303,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/pl2303 \ +,61)) + +$(eval $(call KMOD_template,USB_SERIAL_VISOR,usb-serial-visor,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/visor \ +,61)) + +$(eval $(call KMOD_template,USB_STORAGE,usb-storage,\ + $(MODULES_DIR)/kernel/drivers/usb/storage/usb-storage \ +,65)) + +$(eval $(call KMOD_template,USB_PEGASUS,usb-pegasus,\ + $(MODULES_DIR)/kernel/drivers/net/usb/pegasus \ +,65)) + +# +# Bluetooth +# +BLUETOOTH_PREFIX = BT +BLUETOOTH = bluetooth + +$(eval $(call KMOD_template,$(BLUETOOTH_PREFIX),bluetooth,\ + $(MODULES_DIR)/kernel/net/bluetooth/$(BLUETOOTH) \ +,70)) + +$(eval $(call KMOD_template,$(BLUETOOTH_PREFIX)_HCIUSB,bluetooth-hci-usb,\ + $(MODULES_DIR)/kernel/drivers/bluetooth/hci_usb \ +,75)) + +$(eval $(call KMOD_template,$(BLUETOOTH_PREFIX)_HCIUART,bluetooth-hci-uart,\ + $(MODULES_DIR)/kernel/drivers/bluetooth/hci_uart \ +,75)) + +$(eval $(call KMOD_template,$(BLUETOOTH_PREFIX)_L2CAP,bluetooth-l2cap,\ + $(MODULES_DIR)/kernel/net/bluetooth/l2cap \ +,80)) + +$(eval $(call KMOD_template,$(BLUETOOTH_PREFIX)_SCO,bluetooth-sco,\ + $(MODULES_DIR)/kernel/net/bluetooth/sco \ +,85)) + +$(eval $(call KMOD_template,$(BLUETOOTH_PREFIX)_BNEP,bluetooth-bnep,\ + $(MODULES_DIR)/kernel/net/bluetooth/bnep/bnep \ +,85)) + +$(eval $(call KMOD_template,$(BLUETOOTH_PREFIX)_RFCOMM,bluetooth-rfcomm,\ + $(MODULES_DIR)/kernel/net/bluetooth/rfcomm/rfcomm \ +,85)) + +# +# Misc devices +# +SOFTDOG_MODULES = drivers/char/watchdog/softdog + +$(eval $(call KMOD_template,SOFTDOG,softdog,\ + $(foreach mod,$(SOFTDOG_MODULES),$(MODULES_DIR)/kernel/$(mod)) \ +,95)) + +$(eval $(call KMOD_template,FW_LOADER,fw-loader,\ + $(MODULES_DIR)/kernel/drivers/base/firmware_class \ +,01)) + +$(eval $(call KMOD_template,EEPROM_93CX6,eeprom-93cx6,\ + $(MODULES_DIR)/kernel/drivers/misc/eeprom/eeprom_93cx6 \ +,05)) + +$(eval $(call KMOD_template,LEDS_CLASS,led-class,\ + $(MODULES_DIR)/kernel/drivers/leds/led-class \ +,05)) + +# +# NLS +# +$(eval $(call KMOD_template,NLS,nls-base,\ + $(MODULES_DIR)/kernel/fs/nls/nls_base \ +,10)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_437,nls-cp437,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp437 \ +,20)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_737,nls-cp737,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp737 \ +,20)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_775,nls-cp775,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp775 \ +,20)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_850,nls-cp850,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp850 \ +,20)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_852,nls-cp852,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp852 \ +,20)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_857,nls-cp857,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp857 \ +,20)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_860,nls-cp860,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp860 \ +,20)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_861,nls-cp861,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp861 \ +,20)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_862,nls-cp862,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp862 \ +,20)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_863,nls-cp863,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp863 \ +,20)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_864,nls-cp864,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp864 \ +,20)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_865,nls-cp865,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp865 \ +,20)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_866,nls-cp866,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp866 \ +,20)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_869,nls-cp869,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp869 \ +,20)) + +NLS_CODEPAGE_874_MODULES := fs/nls/nls_cp874 + +$(eval $(call KMOD_template,NLS_CODEPAGE_874,nls-cp874,\ + $(foreach mod,$(NLS_CODEPAGE_874_MODULES),$(MODULES_DIR)/kernel/$(mod)) \ +,20)) + +NLS_CODEPAGE_932_MODULES := fs/nls/nls_cp932 +NLS_CODEPAGE_932_MODULES += fs/nls/nls_euc-jp + +$(eval $(call KMOD_template,NLS_CODEPAGE_932,nls-cp932,\ + $(foreach mod,$(NLS_CODEPAGE_932_MODULES),$(MODULES_DIR)/kernel/$(mod)) \ +,20)) + +NLS_CODEPAGE_936_MODULES := fs/nls/nls_cp936 + +$(eval $(call KMOD_template,NLS_CODEPAGE_936,nls-cp936,\ + $(foreach mod,$(NLS_CODEPAGE_936_MODULES),$(MODULES_DIR)/kernel/$(mod)) \ +,20)) + +NLS_CODEPAGE_949_MODULES := fs/nls/nls_cp949 + +$(eval $(call KMOD_template,NLS_CODEPAGE_949,nls-cp949,\ + $(foreach mod,$(NLS_CODEPAGE_949_MODULES),$(MODULES_DIR)/kernel/$(mod)) \ +,20)) + +NLS_CODEPAGE_950_MODULES := fs/nls/nls_cp950 + +$(eval $(call KMOD_template,NLS_CODEPAGE_950,nls-cp950,\ + $(foreach mod,$(NLS_CODEPAGE_950_MODULES),$(MODULES_DIR)/kernel/$(mod)) \ +,20)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_1250,nls-cp1250,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp1250 \ +,20)) + +$(eval $(call KMOD_template,NLS_CODEPAGE_1251,nls-cp1251,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp1251 \ +,20)) + +$(eval $(call KMOD_template,NLS_ASCII,nls-ascii, \ + $(MODULES_DIR)/kernel/fs/nls/nls_ascii \ +,20)) + +$(eval $(call KMOD_template,NLS_ISO8859_1,nls-iso8859-1, \ + $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-1 \ +,20)) + +$(eval $(call KMOD_template,NLS_ISO8859_2,nls-iso8859-2, \ + $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-2 \ +,20)) + +$(eval $(call KMOD_template,NLS_ISO8859_3,nls-iso8859-3, \ + $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-3 \ +,20)) + +$(eval $(call KMOD_template,NLS_ISO8859_4,nls-iso8859-4, \ + $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-4 \ +,20)) + +$(eval $(call KMOD_template,NLS_ISO8859_5,nls-iso8859-5, \ + $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-5 \ +,20)) + +$(eval $(call KMOD_template,NLS_ISO8859_6,nls-iso8859-6, \ + $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-6 \ +,20)) + +$(eval $(call KMOD_template,NLS_ISO8859_7,nls-iso8859-7, \ + $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-7 \ +,20)) + +NLS_ISO8859_8_MODULES := fs/nls/nls_cp1255 + +$(eval $(call KMOD_template,NLS_ISO8859_8,nls-iso8859-8, \ + $(foreach mod,$(NLS_ISO8859_8_MODULES),$(MODULES_DIR)/kernel/$(mod)) \ +,20)) + +$(eval $(call KMOD_template,NLS_ISO8859_9,nls-iso8859-9, \ + $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-9 \ +,20)) + +$(eval $(call KMOD_template,NLS_ISO8859_13,nls-iso8859-13, \ + $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-13 \ +,20)) + +$(eval $(call KMOD_template,NLS_ISO8859_14,nls-iso8859-14, \ + $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-14 \ +,20)) + +$(eval $(call KMOD_template,NLS_ISO8859_15,nls-iso8859-15, \ + $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-15 \ +,20)) + +$(eval $(call KMOD_template,NLS_KOI8_R,nls-koi8-r, \ + $(MODULES_DIR)/kernel/fs/nls/nls_koi8-r \ +,20)) + +$(eval $(call KMOD_template,NLS_KOI8_U,nls-koi8-u, \ + $(MODULES_DIR)/kernel/fs/nls/nls_koi8-u \ + $(MODULES_DIR)/kernel/fs/nls/nls_koi8-ru \ +,20)) + +$(eval $(call KMOD_template,NLS_UTF8,nls-utf8, \ + $(MODULES_DIR)/kernel/fs/nls/nls_utf8 \ +,20)) + +# ISDN +ISDN_MODULES=drivers/isdn/i4l/isdn + +$(eval $(call KMOD_template,ISDN,isdn, \ + $(foreach mod,$(ISDN_MODULES),$(MODULES_DIR)/kernel/$(mod)) \ +,60)) + +$(eval $(call KMOD_template,ISDN_CAPI,isdn-capi, \ + $(MODULES_DIR)/kernel/drivers/isdn/capi/kernelcapi \ + $(MODULES_DIR)/kernel/drivers/isdn/capi/capi \ +,60)) + +$(eval $(call KMOD_template,SLHC,slhc, \ + $(MODULES_DIR)/kernel/drivers/net/slhc \ +,65)) + +$(eval $(call KMOD_template,HISAX,hisax, \ + $(MODULES_DIR)/kernel/drivers/isdn/hisax/hisax \ +,70)) + +MISDN_MODULES=drivers/isdn/hardware/mISDN/mISDN_core +MISDN_MODULES+=drivers/isdn/hardware/mISDN/mISDN_l1 +MISDN_MODULES+=drivers/isdn/hardware/mISDN/mISDN_l2 +MISDN_MODULES+=drivers/isdn/hardware/mISDN/mISDN_dsp +MISDN_MODULES+=drivers/isdn/hardware/mISDN/mISDN_dtmf +MISDN_MODULES+=drivers/isdn/hardware/mISDN/mISDN_isac +MISDN_MODULES+=drivers/isdn/hardware/mISDN/mISDN_x25dte +MISDN_MODULES+=drivers/isdn/hardware/mISDN/l3udss1 + +$(eval $(call KMOD_template,MISDN_DRV,misdn, \ + $(foreach mod, $(MISDN_MODULES),$(MODULES_DIR)/kernel/$(mod)) \ +,75)) + +$(eval $(call KMOD_template,MISDN_AVM_FRITZ,misdn-avm, \ + $(MODULES_DIR)/kernel/drivers/isdn/hardware/mISDN/avmfritz \ +,80)) + +$(eval $(call KMOD_template,MISDN_HFCPCI,misdn-hfc-pci, \ + $(MODULES_DIR)/kernel/drivers/isdn/hardware/mISDN/hfcpci \ +,80)) + +$(eval $(call KMOD_template,MISDN_HFCMULTI,misdn-hfc-multi, \ + $(MODULES_DIR)/kernel/drivers/isdn/hardware/mISDN/hfcmulti \ +,80)) + +$(eval $(call KMOD_template,MISDN_HFCMINI,misdn-hfc-minipci, \ + $(MODULES_DIR)/kernel/drivers/isdn/hardware/mISDN/hfcsmini \ +,80)) + +$(eval $(call KMOD_template,MISDN_XHFC,misdn-xhfc, \ + $(MODULES_DIR)/kernel/drivers/isdn/hardware/mISDN/xhfc \ +,80)) + +$(eval $(call KMOD_template,MISDN_SPEEDFAX,misdn-speedfax, \ + $(MODULES_DIR)/kernel/drivers/isdn/hardware/mISDN/sedlfax \ +,80)) + +# Library modules +$(eval $(call KMOD_template,CRC_CCITT,crc-ccitt, \ + $(MODULES_DIR)/kernel/lib/crc-ccitt \ +,01)) + +$(eval $(call KMOD_template,CRC_ITU_T,crc-itu-t, \ + $(MODULES_DIR)/kernel/lib/crc-itu-t \ +,01)) + +$(eval $(call KMOD_template,CRC32,crc32, \ + $(MODULES_DIR)/kernel/lib/crc32 \ +,01)) + +$(eval $(call KMOD_template,LIBCRC32C,libcrc32c, \ + $(MODULES_DIR)/kernel/lib/libcrc32c \ +,01)) + +# +# parallel port support + +$(eval $(call KMOD_template,LP,lp,\ + $(MODULES_DIR)/kernel/drivers/char/lp \ +,60)) + +$(eval $(call KMOD_template,PPDEV,ppdev,\ + $(MODULES_DIR)/kernel/drivers/char/ppdev \ +,60)) + +$(eval $(call KMOD_template,PARPORT,parport,\ + $(MODULES_DIR)/kernel/drivers/parport/parport \ +,50)) + +$(eval $(call KMOD_template,PLIP,plip,\ + $(MODULES_DIR)/kernel/drivers/net/plip \ +,51)) diff --git a/mk/package.mk b/mk/package.mk new file mode 100644 index 000000000..8b5d547b8 --- /dev/null +++ b/mk/package.mk @@ -0,0 +1,212 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +all: build-all-ipkgs + +TCFLAGS:= ${TARGET_CFLAGS} +TCXXFLAGS:= ${TARGET_CFLAGS} +TCPPFLAGS:= ${TARGET_CPPFLAGS} +ifneq ($(DEBUG),1) +TCPPFLAGS+= -DNDEBUG +endif +TLDFLAGS:= ${TARGET_LDFLAGS} -Wl,-rpath -Wl,/usr/lib \ + -Wl,-rpath-link -Wl,${STAGING_DIR}/usr/lib \ + -L${STAGING_DIR}/lib -L${STAGING_DIR}/usr/lib +ifeq ($(DEBUG),1) +CONFIGURE_ARGS+= --enable-debug +else +CONFIGURE_ARGS+= --disable-debug +endif +ifeq ($(ADK_IPV6),y) +CONFIGURE_ARGS+= --enable-ipv6 +else +CONFIGURE_ARGS+= --disable-ipv6 +endif +CONFIGURE_ENV+= ${TARGET_CONFIGURE_OPTS} \ + ${HOST_CONFIGURE_OPTS} \ + CC='${TARGET_CC}' CXX='${TARGET_CXX}' \ + CFLAGS='$(strip ${TCFLAGS})' \ + CXXFLAGS='$(strip ${TCXXFLAGS})' \ + CPPFLAGS='$(strip ${TCPPFLAGS})' \ + LDFLAGS='$(strip ${TLDFLAGS})' \ + PKG_CONFIG_PATH='${STAGING_DIR}/usr/lib/pkgconfig' \ + PKG_CONFIG_LIBDIR=/dev/null \ + CONFIG_SHELL='$(strip ${SHELL})' \ + ac_cv_func_realloc_0_nonnull=yes \ + ac_cv_func_malloc_0_nonnull=yes +MAKE_FILE?= Makefile +# this is environment for 'make all' and 'make install' +MAKE_ENV?= +# this is arguments for 'make all' and 'make install' +XAKE_FLAGS?= +# this is arguments for 'make all' ONLY +MAKE_FLAGS?= +# this is arguments for 'make install' ONLY +FAKE_FLAGS?= +ALL_TARGET?= all +INSTALL_TARGET?= install +MAKE_ENV+= PATH='${TARGET_PATH}' \ + ${HOST_CONFIGURE_OPTS} \ + WRKDIR='${WRKDIR}' WRKDIST='${WRKDIST}' \ + WRKSRC='${WRKSRC}' WRKBUILD='${WRKBUILD}' \ + PKG_CONFIG_PATH='${STAGING_DIR}/usr/lib/pkgconfig' \ + PKG_CONFIG_LIBDIR=/dev/null \ + CC='${TARGET_CC}' CXX='${TARGET_CXX}' \ + AR='${TARGET_CROSS}ar' RANLIB='${TARGET_CROSS}ranlib' \ + NM='${TARGET_CROSS}nm' \ + CFLAGS='$(strip ${TCFLAGS})' \ + CXXFLAGS='$(strip ${TCXXFLAGS})' \ + CPPFLAGS='$(strip ${TCPPFLAGS})' \ + LDFLAGS='$(strip ${TLDFLAGS})' +MAKE_FLAGS+= ${XAKE_FLAGS} +FAKE_FLAGS+= ${XAKE_FLAGS} + +ifeq ($(strip ${WRKDIR_BSD}),) +WRKDIR_BASE:= ${BUILD_DIR} +else +WRKDIR_BASE:= $(shell pwd) +endif + +_EXTRACT_COOKIE= ${WRKDIST}/.extract_done +_PATCH_COOKIE= ${WRKDIST}/.prepared +_CONFIGURE_COOKIE= ${WRKBUILD}/.configure_done +_BUILD_COOKIE= ${WRKBUILD}/.build_done +_FAKE_COOKIE= ${WRKINST}/.fake_done +_IPKGS_COOKIE= ${PACKAGE_DIR}/.stamps/${PKG_NAME}${PKG_VERSION}-${PKG_RELEASE} + +_IN_PACKAGE:= 1 +include ${TOPDIR}/mk/buildhlp.mk +-include info.mk + +# defined in buildhlp.mk ('extract' can fail, use 'patch' then) +extract: ${_EXTRACT_COOKIE} +patch: ${_PATCH_COOKIE} + +# defined below (will be moved to pkg-bottom.mk!) +configure: ${_CONFIGURE_COOKIE} +build: ${_BUILD_COOKIE} +fake: ${_FAKE_COOKIE} + +# our recursive build entry point +build-all-ipkgs: ${_IPKGS_COOKIE} + +define PKG_template +IPKG_$(1)= $(PACKAGE_DIR)/$(2)_$(3)_$(4).ipk +IDIR_$(1)= $(WRKDIR)/fake-${ARCH}/ipkg-$(2) +ifneq (${ADK_PACKAGE_$(1)}${DEVELOPER},) +ALL_IPKGS+= $$(IPKG_$(1)) +ALL_IDIRS+= $${IDIR_$(1)} +endif +INFO_$(1)= $(IPKG_STATE_DIR)/info/$(2).list + +ifeq ($(ADK_PACKAGE_$(1)),y) +install-targets: $$(INFO_$(1)) +endif + +IDEPEND_$(1):= $$(strip $(5)) + +_ALL_CONTROLS+= $$(IDIR_$(1))/CONTROL/control +ICONTROL_$(1)?= ipkg/$(2).control +$$(IDIR_$(1))/CONTROL/control: ${_PATCH_COOKIE} + ${BASH} ${SCRIPT_DIR}/make-ipkg-dir.sh $${IDIR_$(1)} $${ICONTROL_$(1)} $(3) $(4) + @adeps='$$(strip $${IDEPEND_$(1)})'; if [[ -n $$$$adeps ]]; then \ + comma=; \ + deps=; \ + last=; \ + for dep in $$$$adeps; do \ + if [[ $$$$last = kernel && $$$$dep = \(* ]]; then \ + deps="$$$$deps $$$$dep"; \ + else \ + deps="$$$$deps$$$$comma$$$$dep"; \ + fi; \ + comma=", "; \ + last=$$$$dep; \ + done; \ + echo "Depends: $$$$deps" >>$${IDIR_$(1)}/CONTROL/control; \ + fi + for file in conffiles preinst postinst prerm postrm; do \ + [ ! -f ./ipkg/$(2).$$$$file ] || cp ./ipkg/$(2).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file; \ + done +ifneq ($(strip $${ICONTROL_ADDON_$(1)}),) + echo $${ICONTROL_ADDON_$(1)} >> $${IDIR_$(1)}/CONTROL/control +endif + +$$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $${_FAKE_COOKIE} +ifneq ($(DEBUG),1) + $${RSTRIP} $${IDIR_$(1)} $(MAKE_TRACE) +endif + cd $${IDIR_$(1)}; for script in etc/init.d/*; do \ + [[ -e $$$$script ]] || continue; \ + chmod 0755 "$$$$script"; \ + done + @mkdir -p $${PACKAGE_DIR} '$${STAGING_PARENT}/pkg' \ + '$${STAGING_DIR}/scripts' + @if test -s '$${STAGING_PARENT}/pkg/$(1)'; then \ + cd '$${STAGING_DIR}'; \ + while read fn; do \ + rm -f "$$$$fn"; \ + done <'$${STAGING_PARENT}/pkg/$(1)'; \ + fi + @rm -f '$${STAGING_PARENT}/pkg/$(1)' + @cd $${IDIR_$(1)}; \ + x=$$$$(find tmp var -mindepth 1 2>/dev/null); if [[ -n $$$$x ]]; then \ + echo 'WARNING: $${IPKG_$(1)} installs files into a' \ + 'ramdisk location:' >&2; \ + echo "$$$$x" | sed 's/^/- /' >&2; \ + fi; \ + if [ "${PKG_NAME}" != "uClibc" -a "${PKG_NAME}" != "glibc" -a "${PKG_NAME}" != "libpthread" -a "${PKG_NAME}" != "libstdcxx" -a "${PKG_NAME}" != "libthread-db" ];then \ + find lib \( -name lib\*.so\* -o -name lib\*.a \) \ + -exec echo 'WARNING: $${IPKG_$(1)} installs files in /lib -' \ + ' fix this!' >&2 \; -quit 2>/dev/null; fi; \ + find usr ! -type d 2>/dev/null | \ + grep -v -e '^usr/share' -e '^usr/man' -e '^usr/info' | \ + tee '$${STAGING_PARENT}/pkg/$(1)' | \ + cpio -apdlmu --quiet '$${STAGING_DIR}' + @cd '$${STAGING_DIR}'; grep 'usr/lib/.*\.la$$$$' \ + '$${STAGING_PARENT}/pkg/$(1)' | while read fn; do \ + chmod u+w $$$$fn; \ + printf '%s\nwq\n' '/^libdir='\''*/s##&${STAGING_DIR}#' | \ + ed -s $$$$fn; \ + done; grep 'usr/s*bin/' '$${STAGING_PARENT}/pkg/$(1)' | \ + while read fn; do \ + b="$$$$(dd if="$$$$fn" bs=2 count=1 2>/dev/null)"; \ + [[ $$$$b = '#!' ]] || continue; \ + cp "$$$$fn" scripts/; \ + echo "scripts/$$$$(basename "$$$$fn")" \ + >>'$${STAGING_PARENT}/pkg/$(1)'; \ + done + $${IPKG_BUILD} $${IDIR_$(1)} $${PACKAGE_DIR} $(MAKE_TRACE) + +clean-targets: clean-dev-$(1) + +clean-dev-$(1): + @if test -s '$${STAGING_PARENT}/pkg/$(1)'; then \ + cd '$${STAGING_DIR}'; \ + while read fn; do \ + rm -f "$$$$fn"; \ + done <'$${STAGING_PARENT}/pkg/$(1)'; \ + fi + @rm -f '$${STAGING_PARENT}/pkg/$(1)' + +$$(INFO_$(1)): $$(IPKG_$(1)) + $(IPKG) install $$(IPKG_$(1)) +endef + +install-targets: +install: + @$(CMD_TRACE) "installing... " + @$(MAKE) install-targets $(MAKE_TRACE) + +clean-targets: +clean: + @$(CMD_TRACE) "cleaning... " + @$(MAKE) clean-targets $(MAKE_TRACE) + rm -rf ${WRKDIR} ${ALL_IPKGS} ${PACKAGE_DIR}/.stamps/${PKG_NAME}* + +distclean: clean + rm -f ${FULLDISTFILES} + +.PHONY: all refetch extract patch configure \ + build fake package install clean build-all-ipkgs diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk new file mode 100644 index 000000000..c5ac91df3 --- /dev/null +++ b/mk/pkg-bottom.mk @@ -0,0 +1,212 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. +#- +# Comments: +# * pre/do/post-foo are always defined here, but empty. This is so +# that we can call it (BSD make has .if target(foo) but GNU not) +# and it won't error out. +# * ${_foo_COOKIE} are the actual targets +# * default is "manual" -> define a do-foo: target in the Makefile +# * if you have a style -> define a pre-foo: and post-foo: if they +# are required, but the do-foo: magic is done here +# * we want to use styles (configure:gnu, build/install:auto), for +# making the Makefiles of the packages more clear + +#--- configure +pre-configure: +do-configure: +post-configure: +${_CONFIGURE_COOKIE}: ${_PATCH_COOKIE} + mkdir -p ${WRKBUILD} + @${MAKE} pre-configure $(MAKE_TRACE) + +ifneq ($(filter autotool,${CONFIGURE_STYLE}),) + cd ${WRKBUILD}; \ + autoreconf -vif $(MAKE_TRACE) +endif +ifneq ($(filter autoconf,${CONFIGURE_STYLE}),) + cd ${WRKBUILD}; \ + autoconf $(MAKE_TRACE) +endif +ifneq ($(filter gnu,${CONFIGURE_STYLE}),) + @$(CMD_TRACE) "configuring... " + @cd ${WRKBUILD}; \ + for i in $$(find . -name config.sub);do \ + if [ -f $$i ]; then \ + ${CP} $$i $$i.bak; \ + ${CP} ${SCRIPT_DIR}/config.sub $$i; \ + fi; \ + done; \ + for i in $$(find . -name config.guess);do \ + if [ -f $$i ]; then \ + ${CP} $$i $$i.bak; \ + ${CP} ${SCRIPT_DIR}/config.guess $$i; \ + fi; \ + done; + cd ${WRKBUILD}; rm -f config.{cache,status}; \ + env ${CONFIGURE_ENV} \ + ${BASH} ${WRKSRC}/configure \ + --build=${GNU_HOST_NAME} \ + --host=${GNU_TARGET_NAME} \ + --target=${GNU_TARGET_NAME} \ + --program-prefix= \ + --program-suffix= \ + --prefix=/usr \ + --datadir=/usr/share \ + --mandir=/usr/share/man \ + --libexecdir=/usr/sbin \ + --localstatedir=/var \ + --sysconfdir=/etc \ + --disable-nls \ + --enable-shared \ + --enable-static \ + --disable-dependency-tracking \ + --disable-libtool-lock \ + ${CONFIGURE_ARGS} $(MAKE_TRACE) +else ifeq ($(filter-out manual,${CONFIGURE_STYLE}),) + env ${CONFIGURE_ENV} ${MAKE} do-configure $(MAKE_TRACE) +else + @echo "Invalid CONFIGURE_STYLE '${CONFIGURE_STYLE}'" >&2 + @exit 1 +endif + @${MAKE} post-configure $(MAKE_TRACE) + touch $@ + +#--- build +pre-build: +do-build: +post-build: +${_BUILD_COOKIE}: ${_CONFIGURE_COOKIE} + @env ${MAKE_ENV} ${MAKE} pre-build $(MAKE_TRACE) + @$(CMD_TRACE) "compiling... " +ifneq ($(filter auto,${BUILD_STYLE}),) + cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ + ${MAKEJOBS} ${MAKE_FLAGS} ${ALL_TARGET} $(MAKE_TRACE) +else ifneq ($(filter manual,${BUILD_STYLE}),) + env ${MAKE_ENV} ${MAKE} do-build $(MAKE_TRACE) +else ifeq ($(strip ${BUILD_STYLE}),) + env ${MAKE_ENV} ${MAKE} do-build $(MAKE_TRACE) +else + @echo "Invalid BUILD_STYLE '${BUILD_STYLE}'" >&2 + @exit 1 +endif + @env ${MAKE_ENV} ${MAKE} post-build $(MAKE_TRACE) + touch $@ + +#--- fake +pre-install: +do-install: +post-install: +${_FAKE_COOKIE}: ${_BUILD_COOKIE} + -rm -f ${_ALL_CONTROLS} + @mkdir -p '${STAGING_PARENT}/pkg' ${WRKINST} '${STAGING_DIR}/scripts' + @${MAKE} ${_ALL_CONTROLS} $(MAKE_TRACE) + @env ${MAKE_ENV} ${MAKE} pre-install $(MAKE_TRACE) +ifneq ($(filter auto,${INSTALL_STYLE}),) + cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ + DESTDIR='${WRKINST}' ${FAKE_FLAGS} ${INSTALL_TARGET} $(MAKE_TRACE) +else ifneq ($(filter manual,${INSTALL_STYLE}),) + env ${MAKE_ENV} ${MAKE} do-install $(MAKE_TRACE) +else ifeq ($(strip ${INSTALL_STYLE}),) + env ${MAKE_ENV} ${MAKE} do-install $(MAKE_TRACE) +else + @echo "Invalid INSTALL_STYLE '${INSTALL_STYLE}'" >&2 + @exit 1 +endif +ifneq ($(filter confprog,${INSTALL_STYLE}),) + for a in ${WRKINST}/usr/{bin/*-config,lib/pkgconfig/*.pc}; do \ + [[ -e $$a ]] || continue; \ + $(SED) "s,^prefix=.*,prefix=${STAGING_DIR}/usr," $$a; \ + done +endif + @env ${MAKE_ENV} ${MAKE} post-install $(MAKE_TRACE) + @if test -s '${STAGING_PARENT}/pkg/${PKG_NAME}'; then \ + cd '${STAGING_DIR}'; \ + while read fn; do \ + rm -f "$$fn"; \ + done <'${STAGING_PARENT}/pkg/${PKG_NAME}'; \ + fi + @rm -f '${STAGING_PARENT}/pkg/${PKG_NAME}' + @cd ${WRKINST}; \ + if [ "${PKG_NAME}" != "uClibc" -a "${PKG_NAME}" != "glibc" -a "${PKG_NAME}" != "libpthread" -a "${PKG_NAME}" != "libstdcxx" -a "${PKG_NAME}" != "libthread-db" ];then \ + find lib \( -name lib\*.so\* -o -name lib\*.a \) \ + -exec echo 'WARNING: ${PKG_NAME} installs files in /lib -' \ + ' fix this!' >&2 \; -quit 2>/dev/null; fi;\ + find usr ! -type d 2>/dev/null | \ + grep -v -e '^usr/share' -e '^usr/man' -e '^usr/info' | \ + tee '${STAGING_PARENT}/pkg/${PKG_NAME}' | \ + cpio -apdlmu --quiet '${STAGING_DIR}' + @cd '${STAGING_DIR}'; grep 'usr/lib/.*\.la$$' \ + '${STAGING_PARENT}/pkg/${PKG_NAME}' | while read fn; do \ + chmod u+w $$fn; \ + $(SED) "s,\(^libdir='\| \|-L\|^dependency_libs='\)/usr/lib,\1$(STAGING_DIR)/usr/lib,g" $$fn; \ + done; grep 'usr/s*bin/' '${STAGING_PARENT}/pkg/${PKG_NAME}' | \ + while read fn; do \ + b="$$(dd if="$$fn" bs=2 count=1 2>/dev/null)"; \ + [[ $$b = '#!' ]] || continue; \ + cp "$$fn" scripts/; \ + echo "scripts/$$(basename "$$fn")" \ + >>'${STAGING_PARENT}/pkg/${PKG_NAME}'; \ + done + touch $@ + +#--- package +${_IPKGS_COOKIE}: + @clean=0; \ + for f in ${ALL_IPKGS}; do \ + [[ -e $$f ]] && clean=1; \ + done; \ + [[ $$clean = 0 ]] || ${MAKE} clean + exec ${MAKE} package + +package: ${ALL_IPKGS} + @cd ${WRKDIR}/fake-${ARCH} || exit 1; \ + y=; sp=; for x in ${ALL_IDIRS}; do \ + y="$$y$$sp$${x#$(WRKDIR)/fake-${ARCH}/}"; \ + sp=' '; \ + done; ls=; ln=; x=1; [[ -z $$y ]] || \ + md5sum $$(find $$y -type f) | sed -e "s/*//" | \ + while read sum name; do \ + inode=$$(ls -i "$$name"); \ + echo "$$sum $${inode%% *} $$name"; \ + done | sort | while read sum inode name; do \ + if [[ $$sum = $$ls ]]; then \ + [[ $$li = $$inode ]] && continue; \ + case $$x in \ + 1) echo 'WARNING: duplicate files found in' \ + 'package "${PKG_NAME}"! Fix them.' >&2; \ + echo -n "> $$ln "; \ + ;; \ + 2) echo -n "> $$ln "; \ + ;; \ + 3) echo -n ' '; \ + ;; \ + esac; \ + echo -n "$$name"; \ + x=3; \ + else \ + case $$x in \ + 3) echo; \ + x=2; \ + ;; \ + esac; \ + fi; \ + ls=$$sum; \ + ln=$$name; \ + li=$$inode; \ + done + touch ${_IPKGS_COOKIE} + +#--- clean +clean-targets: clean-dev-generic + +clean-dev-generic: + @if test -s '${STAGING_PARENT}/pkg/${PKG_NAME}'; then \ + cd '${STAGING_DIR}'; \ + while read fn; do \ + rm -f "$$fn"; \ + done <'${STAGING_PARENT}/pkg/${PKG_NAME}'; \ + fi + @rm -f '${STAGING_PARENT}/pkg/${PKG_NAME}' diff --git a/mk/rootfs.mk b/mk/rootfs.mk new file mode 100644 index 000000000..e23769979 --- /dev/null +++ b/mk/rootfs.mk @@ -0,0 +1,21 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +define rootfs_template +ifeq ($(ADK_TARGET_ROOTFS_$(2)),y) +FS:=$(1) +FS_CMDLINE:=$(3) +endif +endef + +$(eval $(call rootfs_template,ext2-cf,EXT2_CF)) +$(eval $(call rootfs_template,ext2-mmc,EXT2_MMC)) +$(eval $(call rootfs_template,ext2,EXT2)) +$(eval $(call rootfs_template,initramfs,INITRAMFS)) +$(eval $(call rootfs_template,squashfs,SQUASHFS)) +$(eval $(call rootfs_template,yaffs,YAFFS)) +$(eval $(call rootfs_template,nfsroot,NFSROOT,root=/dev/nfs ip=dhcp)) + +export FS diff --git a/mk/split-cfg.mk b/mk/split-cfg.mk new file mode 100644 index 000000000..0aa5acba1 --- /dev/null +++ b/mk/split-cfg.mk @@ -0,0 +1,10 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. +#- +# must work with both BSD and GNU make + +${TOPDIR}/.cfg/ADK_HAVE_DOT_CONFIG: ${TOPDIR}/.config \ + ${TOPDIR}/mk/split-cfg.mk ${TOPDIR}/scripts/split-cfg.sh + ${BASH} ${TOPDIR}/scripts/split-cfg.sh '${TOPDIR}' diff --git a/mk/toolchain.mk b/mk/toolchain.mk new file mode 100644 index 000000000..2701736ca --- /dev/null +++ b/mk/toolchain.mk @@ -0,0 +1,6 @@ +prepare: ${WRKDIST}/.prepared $(WRKBUILD)/.headers +configure: ${WRKBUILD}/.configure_done +compile: $(WRKBUILD)/.compiled +install: $(WRKBUILD)/.installed +clean: + rm -rf $(WRKDIR) diff --git a/mk/tools.mk b/mk/tools.mk new file mode 100644 index 000000000..429e741c2 --- /dev/null +++ b/mk/tools.mk @@ -0,0 +1,6 @@ +prepare: ${WRKDIST}/.prepared +configure: ${WRKBUILD}/.configure_done +compile: $(WRKBUILD)/.compiled +install: $(WRKBUILD)/.installed +clean: + rm -rf $(WRKDIR) diff --git a/mk/vars.mk b/mk/vars.mk new file mode 100644 index 000000000..93f40be23 --- /dev/null +++ b/mk/vars.mk @@ -0,0 +1,120 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +CP= cp -fpR +INSTALL_DIR= install -d -m0755 +INSTALL_DATA= install -m0644 +INSTALL_BIN= install -m0755 +INSTALL_SCRIPT= install -m0755 +MAKEFLAGS= $(EXTRA_MAKEFLAGS) +BUILD_USER= $(shell id -un) +BUILD_GROUP= $(shell id -gn) +ifeq ($(DEBUG),1) +TARGET_DEBUGGING:= -g -O0 -fno-omit-frame-pointer +else +TARGET_DEBUGGING:= -fomit-frame-pointer +endif +ifeq ($(ADK_SSP),y) +TARGET_SSP:= -fstack-protector-all +endif +TARGET_CFLAGS:= $(TARGET_OPTIMIZATION) $(TARGET_CFLAGS_ARCH) $(TARGET_DEBUGGING) $(TARGET_SSP) + +BASE_DIR:= $(TOPDIR) +DISTDIR?= ${BASE_DIR}/dl +BUILD_DIR:= ${BASE_DIR}/build_${CPU_ARCH} +BUILD_DIR_PFX:= $(BASE_DIR)/build_* +STAGING_PARENT:= ${BASE_DIR}/cross_${CPU_ARCH} +STAGING_PARENT_PFX:= ${BASE_DIR}/cross_* +STAGING_TOOLS:= ${STAGING_PARENT}/host +STAGING_DIR:= ${STAGING_PARENT}/target +TOOLCHAIN_BUILD_DIR= $(BASE_DIR)/toolchain_build_${CPU_ARCH} +TOOLCHAIN_BUILD_DIR_PFX=$(BASE_DIR)/toolchain_build_* +TOOLS_BUILD_DIR= $(BASE_DIR)/tools_build +SCRIPT_DIR:= $(BASE_DIR)/scripts +BIN_DIR:= $(BASE_DIR)/bin_${DEVICE} +BIN_DIR_PFX:= $(BASE_DIR)/bin_* +PACKAGE_DIR:= $(BIN_DIR)/packages +TARGET_DIR:= $(BASE_DIR)/root_${DEVICE} +TARGET_DIR_PFX:= $(BASE_DIR)/root_* +TARGET_PATH= ${SCRIPT_DIR}:${STAGING_TOOLS}/bin:${STAGING_DIR}/scripts:${_PATH} +ifeq ($(ADK_TARGET_LIB_GLIBC),y) +REAL_GNU_TARGET_NAME= $(CPU_ARCH)-linux-gnu +GNU_TARGET_NAME= $(CPU_ARCH)-linux +KERNEL_CROSS:= $(STAGING_TOOLS)/bin/$(CPU_ARCH)-linux-gnu- +TARGET_CROSS:= $(STAGING_TOOLS)/bin/$(CPU_ARCH)-linux-gnu- +else +REAL_GNU_TARGET_NAME= $(CPU_ARCH)-linux-uclibc +GNU_TARGET_NAME= $(CPU_ARCH)-linux +KERNEL_CROSS:= $(STAGING_TOOLS)/bin/$(CPU_ARCH)-linux-uclibc- +TARGET_CROSS:= $(STAGING_TOOLS)/bin/$(CPU_ARCH)-linux-uclibc- +endif +TOOLCHAIN_SYSROOT:= $(TOOLCHAIN_BUILD_DIR)/libc_dev +TARGET_COMPILER_PREFIX?=${TARGET_CROSS} +TARGET_CC:= ${TARGET_COMPILER_PREFIX}gcc +TARGET_CXX:= ${TARGET_COMPILER_PREFIX}g++ +TARGET_CPPFLAGS+= -I${STAGING_DIR}/usr/include +TARGET_LDFLAGS+= -Wl,-O2 +PATCH= ${BASH} $(SCRIPT_DIR)/patch.sh +SED:= sed -i -e +LINUX_DIR:= $(BUILD_DIR)/linux + +TARGET_CONFIGURE_OPTS= PATH='${TARGET_PATH}' \ + AR=$(TARGET_CROSS)ar \ + AS=$(TARGET_CROSS)as \ + LD=$(TARGET_CROSS)ld \ + NM=$(TARGET_CROSS)nm \ + CC="$(TARGET_CC)" \ + GCC="$(TARGET_CC)" \ + CXX="$(TARGET_CXX)" \ + RANLIB=$(TARGET_CROSS)ranlib +HOST_CONFIGURE_OPTS= CC_FOR_BUILD='${HOSTCC}' \ + CFLAGS_FOR_BUILD='${HOSTCFLAGS}' \ + CPPFLAGS_FOR_BUILD='${HOSTCPPFLAGS}' \ + LDFLAGS_FOR_BUILD='${HOSTLDFLAGS}' + +# invoke ipkg-build with some default options +IPKG_BUILD:= PATH='${TARGET_PATH}' ${BASH} \ + ${TOPDIR}/scripts/ipkg-build -c -o 0 -g 0 +# where to build (and put) .ipk packages +IPKG_TARGET_DIR:= $(PACKAGE_DIR) +IPKG:= IPKG_TMP=$(BUILD_DIR)/tmp \ + IPKG_INSTROOT=$(TARGET_DIR) \ + IPKG_CONF_DIR=$(STAGING_DIR)/etc \ + IPKG_OFFLINE_ROOT=$(TARGET_DIR) \ + ${BASH} ${SCRIPT_DIR}/ipkg -force-defaults -force-depends +IPKG_STATE_DIR:= $(TARGET_DIR)/usr/lib/ipkg + +RSTRIP:= prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh + +EXTRACT_CMD= mkdir -p ${WRKDIR}; \ + cd ${WRKDIR} && \ + for file in ${FULLDISTFILES}; do case $$file in \ + *.cpio) \ + cat $$file | cpio -i -d --quiet ;; \ + *.tar) \ + tar -xf $$file ;; \ + *.cpio.Z | *.cpio.gz | *.cgz | *.mcz) \ + gzip -dc $$file | cpio -i -d --quiet ;; \ + *.tar.Z | *.tar.gz | *.taz | *.tgz) \ + gzip -dc $$file | tar -xf - ;; \ + *.cpio.bz2 | *.cbz) \ + bzip2 -dc $$file | cpio -i -d --quiet ;; \ + *.tar.bz2 | *.tbz | *.tbz2) \ + bzip2 -dc $$file | tar -xf - ;; \ + *.zip) \ + unzip -d ${WRKDIR} $$file ;; \ + *) \ + echo "Cannot extract '$$file'" >&2; \ + false ;; \ + esac; done + +ifeq ($(VERBOSE),1) +QUIET:= +else +QUIET:= --quiet +endif +FETCH_CMD?= wget -t1 --timeout=30 $(QUIET) + +include $(TOPDIR)/mk/mirrors.mk diff --git a/package/6tunnel/Config.in b/package/6tunnel/Config.in new file mode 100644 index 000000000..53b69c2d5 --- /dev/null +++ b/package/6tunnel/Config.in @@ -0,0 +1,13 @@ +config ADK_PACKAGE_6TUNNEL + prompt "6tunnel........................... IPv4 / IPv6 tunnel proxy" + depends on ADK_IPV6 + tristate + default n + select ADK_KPACKAGE_KMOD_IPV6 + help + 6tunnel allows you to use services provided by IPv6 hosts with IPv4-only + applications and vice-versa. It can bind to any of your IPv4 (default) + or IPv6 addresses and forward all data to IPv4 or IPv6 (default) host. + + http://toxygen.net/6tunnel/ + diff --git a/package/6tunnel/Makefile b/package/6tunnel/Makefile new file mode 100644 index 000000000..d66c2bd95 --- /dev/null +++ b/package/6tunnel/Makefile @@ -0,0 +1,29 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= 6tunnel +PKG_VERSION:= 0.11rc1 +PKG_RELEASE:= 1 +PKG_MD5SUM:= b325fa9d238e32195fbb3fc3646b0d28 +MASTER_SITES:= http://toxygen.net/6tunnel/ +WRKDIST= ${WRKDIR}/$(PKG_NAME)-0.11 + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,6TUNNEL,6tunnel,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) + +CONFIGURE_STYLE= gnu +CONFIGURE_ENV+= ac_cv_path_STRIP=$(STRIP) \ + ac_cv_func_vsnprintf=yes +ALL_TARGET= default +BUILD_STYLE= auto + +post-install: + $(INSTALL_DIR) $(IDIR_6TUNNEL)/usr/sbin + $(INSTALL_BIN) $(WRKBUILD)/6tunnel $(IDIR_6TUNNEL)/usr/sbin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/6tunnel/ipkg/6tunnel.control b/package/6tunnel/ipkg/6tunnel.control new file mode 100644 index 000000000..ea4978572 --- /dev/null +++ b/package/6tunnel/ipkg/6tunnel.control @@ -0,0 +1,4 @@ +Package: 6tunnel +Priority: optional +Section: net +Description: An IPv4/IPv6 tunnel proxy diff --git a/package/Config.in b/package/Config.in new file mode 100644 index 000000000..2f2dad1ec --- /dev/null +++ b/package/Config.in @@ -0,0 +1,489 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +menu "Package selection" + +comment "Package categories" + + +menu "Applications" + +menu "Basesystem" +source "package/base-files/Config.in" +source "package/busybox/Config.in" +source "package/uclibc/Config.in" +source "package/cfgfs/Config.in" +source "package/glibc/Config.in" +endmenu + +menu "Bluetooth" +source "package/bluez-firmware/Config.in" +source "package/bluez/Config.in" +source "package/miax/Config.in" +source "package/obexftp/Config.in" +source "package/openobex/Config.in" +source "package/ussp-push/Config.in" +endmenu + +menu "Browser" +source "package/links/Config.in" +source "package/elinks/Config.in" +source "package/lynx/Config.in" +endmenu + +menu "Debugging / Analyzing" +source "package/exmap/Config.in" +source "package/gdb/Config.in" +source "package/gdbserver/Config.in" +source "package/oprofile/Config.in" +source "package/strace/Config.in" +source "package/valgrind/Config.in" +endmenu + +menu "Editors / Pager" +source "package/less/Config.in" +source "package/nano/Config.in" +source "package/vim/Config.in" +endmenu + +menu "Filesystem utilities" +source "package/device-mapper/Config.in" +source "package/dosfstools/Config.in" +source "package/e2fsprogs/Config.in" +source "package/fuse/Config.in" +source "package/lvm/Config.in" +source "package/util-linux/Config.in" +source "package/wdfs/Config.in" +source "package/xfsprogs/Config.in" +endmenu + + +menu "Mail" +source "package/bogofilter/Config.in" +source "package/dovecot/Config.in" +source "package/fetchmail/Config.in" +source "package/mini_sendmail/Config.in" +source "package/mutt/Config.in" +source "package/procmail/Config.in" +source "package/ssmtp/Config.in" +source "package/vilistextum/Config.in" +endmenu + +menu "Misc" +source "package/collectd/Config.in" +source "package/deco/Config.in" +source "package/digitemp/Config.in" +source "package/gpm/Config.in" +source "package/gpsd/Config.in" +source "package/logrotate/Config.in" +source "package/mc/Config.in" +source "package/mgetty/Config.in" +source "package/monit/Config.in" +source "package/motion/Config.in" +source "package/mysql/Config.in" +source "package/osiris/Config.in" +source "package/rrdtool/Config.in" +source "package/rrdcollect/Config.in" +source "package/sane-backends/Config.in" +source "package/screen/Config.in" +source "package/scsi-spin/Config.in" +source "package/ser2net/Config.in" +source "package/syslog-ng/Config.in" +source "package/tar/Config.in" +endmenu + +menu "Multimedia" +source "package/alsa-utils/Config.in" +source "package/esound/Config.in" +source "package/ffmpeg/Config.in" +source "package/gmediaserver/Config.in" +source "package/icecast/Config.in" +source "package/lame/Config.in" +source "package/madplay/Config.in" +source "package/moc/Config.in" +source "package/mpd/Config.in" +source "package/mplayer/Config.in" +source "package/mt-daapd/Config.in" +source "package/palantir/Config.in" +source "package/setpwc/Config.in" +endmenu + +menu "Shells" +source "package/bash/Config.in" +source "package/mksh/Config.in" +source "package/zsh/Config.in" +endmenu + +menu "Security" +source "package/cryptsetup/Config.in" +source "package/gpg/Config.in" +source "package/heimdal/Config.in" +source "package/krb5/Config.in" +source "package/openct/Config.in" +source "package/opensc/Config.in" +source "package/openssl/Config.in" # libopenssl +source "package/openssl-pkcs11/Config.in" +endmenu + +menu "Serial communications & terminal emulation" +source "package/heyu/Config.in" +source "package/lrzsz/Config.in" +source "package/picocom/Config.in" +source "package/serdisplib/Config.in" +source "package/setserial/Config.in" +endmenu + +menu "Telephony" +source "package/asterisk/Config.in" +source "package/opensips/Config.in" +endmenu + +menu "Utilities" +source "package/bc/Config.in" +source "package/comgt/Config.in" +source "package/fbset/Config.in" +source "package/file/Config.in" +source "package/hdparm/Config.in" +source "package/usbutils/Config.in" # lsusb +source "package/pciutils/Config.in" +source "package/procps/Config.in" +source "package/sispmctl/Config.in" +source "package/stress/Config.in" +source "package/sysstat/Config.in" +source "package/udev/Config.in" +source "package/watchdog/Config.in" +endmenu + + +endmenu + +menu "Networking" + +menu "Analyze / Debugging / Monitoring" +source "package/bwm/Config.in" +source "package/dsniff/Config.in" +source "package/ethtool/Config.in" +source "package/fping/Config.in" +source "package/fprobe/Config.in" +source "package/fprobe-ulog/Config.in" +source "package/httping/Config.in" +source "package/iftop/Config.in" +source "package/ipcad/Config.in" +source "package/iperf/Config.in" +source "package/iptraf/Config.in" +source "package/mtr/Config.in" +source "package/netperf/Config.in" +source "package/nmap/Config.in" +source "package/sipsak/Config.in" +source "package/slurm/Config.in" +source "package/tcpdump/Config.in" +#source "package/trafshow/Config.in" +source "package/ttcp/Config.in" +endmenu + +menu "DNS / DHCP" +source "package/atftp/Config.in" +source "package/avahi/Config.in" +source "package/bind/Config.in" +source "package/dhcp/Config.in" +source "package/dhcp-forwarder/Config.in" +source "package/dnsmasq/Config.in" +source "package/ez-ipupdate/Config.in" +source "package/maradns/Config.in" +source "package/updatedd/Config.in" +endmenu + +menu "HTTP / FTP" +source "package/gatling/Config.in" +source "package/lighttpd/Config.in" +source "package/mini_httpd/Config.in" +source "package/tntnet/Config.in" +source "package/vsftpd/Config.in" +source "package/wput/Config.in" +endmenu + +menu "IPv6" +depends ADK_IPV6 +source "package/6tunnel/Config.in" +source "package/aiccu/Config.in" +source "package/dhcp6/Config.in" +source "package/miredo/Config.in" +source "package/mrd6/Config.in" +source "package/ndisc/Config.in" +source "package/radvd/Config.in" +endmenu + + +menu "IRC / ICQ / JABBER" +source "package/bitlbee/Config.in" +source "package/irssi/Config.in" +source "package/miau/Config.in" +source "package/reaim/Config.in" +source "package/tmsnc/Config.in" +endmenu + + +menu "Firewall / Routing / Bridging" +source "package/arpd/Config.in" +source "package/bridge-utils/Config.in" +source "package/cutter/Config.in" +source "package/ether-wake/Config.in" +source "package/iproute2/Config.in" +source "package/ipset/Config.in" +source "package/iptables/Config.in" +source "package/iptables-snmp/Config.in" +source "package/knock/Config.in" +source "package/linux-atm/Config.in" +source "package/macchanger/Config.in" +source "package/netstat-nat/Config.in" +source "package/quagga/Config.in" +source "package/ulogd/Config.in" +source "package/shorewall-common/Config.in" +source "package/shorewall-shell/Config.in" +source "package/wol/Config.in" +source "package/wondershaper/Config.in" +source "package/vrrpd/Config.in" +endmenu + +menu "Misc" +source "package/cups/Config.in" +source "package/fakeidentd/Config.in" +source "package/gkrellmd/Config.in" +source "package/net-snmp/Config.in" +source "package/nut/Config.in" +source "package/openldap/Config.in" +source "package/p910nd/Config.in" +source "package/pipacs/Config.in" +#source "package/pmacct/Config.in" +source "package/portmap/Config.in" +source "package/rarpd/Config.in" +source "package/rrs/Config.in" +source "package/rsync/Config.in" +source "package/scdp/Config.in" +source "package/shat/Config.in" +source "package/socat/Config.in" +source "package/subversion/Config.in" +source "package/swconfig/Config.in" +source "package/udp-broadcast-relay/Config.in" +source "package/vgp/Config.in" +source "package/vnstat/Config.in" +source "package/vtun/Config.in" +source "package/wccpd/Config.in" +source "package/xinetd/Config.in" +endmenu + +menu "Network Filesystems" +source "package/davfs2/Config.in" +source "package/nfs-utils/Config.in" +source "package/samba/Config.in" +endmenu + +menu "NTP" +source "package/htpdate/Config.in" +source "package/ntpclient/Config.in" +source "package/openntpd/Config.in" +source "package/rdate/Config.in" +endmenu + +menu "P2P" +source "package/cbtt/Config.in" +source "package/ctorrent/Config.in" +source "package/rtorrent/Config.in" +endmenu + +menu "PPP / PPTP / RADIUS" +source "package/freeradius/Config.in" +source "package/ppp/Config.in" +source "package/pptp/Config.in" +source "package/pptpd/Config.in" +source "package/rp-pppoe/Config.in" +source "package/raddump/Config.in" +endmenu + +menu "Proxy" +source "package/igmpproxy/Config.in" +source "package/frickin/Config.in" +source "package/parprouted/Config.in" +source "package/privoxy/Config.in" +source "package/siproxd/Config.in" +source "package/squid/Config.in" +source "package/srelay/Config.in" +source "package/tinyproxy/Config.in" +source "package/tor/Config.in" +source "package/vnc-reflector/Config.in" +endmenu + +menu "Security" +source "package/arpwatch/Config.in" +source "package/autossh/Config.in" +source "package/axtls/Config.in" +source "package/dropbear/Config.in" +source "package/httptunnel/Config.in" +source "package/ipsec-tools/Config.in" +source "package/l2tpns/Config.in" +source "package/openssh/Config.in" +source "package/openswan/Config.in" +source "package/openvpn/Config.in" +source "package/portsentry/Config.in" +source "package/ptunnel/Config.in" +source "package/scanlogd/Config.in" +source "package/snort/Config.in" +source "package/ssltunnel/Config.in" +source "package/tinc/Config.in" +source "package/vpnc/Config.in" +endmenu + +menu "Wireless" +source "package/aircrack-ng/Config.in" +source "package/chillispot/Config.in" +source "package/hostapd/Config.in" +source "package/iw/Config.in" +source "package/kismet/Config.in" +source "package/nocatsplash/Config.in" +source "package/olsrd/Config.in" +source "package/snort-wireless/Config.in" +source "package/wifidog/Config.in" +source "package/wireless-firmware/Config.in" +source "package/wireless-tools/Config.in" +source "package/wpa_supplicant/Config.in" +endmenu + +endmenu + +menu "Programming" +source "package/binutils/Config.in" +source "package/cxxtools/Config.in" +#source "package/gcc/Config.in" +source "package/haserl/Config.in" +source "package/jamvm/Config.in" +source "package/lua/Config.in" +source "package/microperl/Config.in" +source "package/php/Config.in" +source "package/ruby/Config.in" +source "package/libffi/Config.in" +source "package/tcl/Config.in" +endmenu + + + +menu "Libraries" +source "package/alsa-lib/Config.in" +source "package/apr/Config.in" +source "package/apr-util/Config.in" +source "package/avahi/Config.in.lib" +source "package/axtls/Config.in.lib" +source "package/cgilib/Config.in" +source "package/dbus/Config.in" +source "package/gettext/Config.in" +source "package/glib/Config.in" +source "package/glib2/Config.in" +source "package/id3lib/Config.in" +source "package/libao/Config.in" +source "package/libaudiofile/Config.in" +source "package/libart/Config.in" +source "package/libcli/Config.in" +source "package/curl/Config.in" # libcurl +source "package/libdaemon/Config.in" +source "package/libdb/Config.in" +source "package/libdnet/Config.in" +source "package/libelf/Config.in" +source "package/libevent/Config.in" +source "package/expat/Config.in" # libexpat +source "package/faad2/Config.in" # libfaad2 +source "package/flac/Config.in" # libflac +source "package/freetype/Config.in" # libfreetype +source "package/libgcrypt/Config.in" +source "package/libgd/Config.in" +source "package/libgdbm/Config.in" +source "package/libgssglue/Config.in" +source "package/gmp/Config.in" # libgmp +source "package/gnutls/Config.in" ## libgnutls +source "package/libgpg-error/Config.in" +source "package/gsm/Config.in" # libgsm +source "package/libiconv/Config.in" +source "package/libid3tag/Config.in" +source "package/jpeg/Config.in" # libjpeg +source "package/lame/Config.in.lib" # libltdl +source "package/mpfr/Config.in" +source "package/libtool/Config.in" # libltdl +source "package/openldap/Config.in.lib" +source "package/liblzo/Config.in" +source "package/libmad/Config.in" +source "package/ncurses/Config.in" # libncurses +source "package/neon/Config.in" +source "package/libnet/Config.in" +source "package/libnfsidmap/Config.in" +source "package/libnids/Config.in" +source "package/libnl/Config.in" +source "package/libogg/Config.in" +source "package/libol/Config.in" +source "package/opencdk/Config.in" # libopencdk +source "package/libosip2/Config.in" +source "package/libowfat/Config.in" +source "package/libp11/Config.in" +source "package/libpcap/Config.in" +source "package/libpri/Config.in" +source "package/pcre/Config.in" # libpcre +source "package/libpng/Config.in" +source "package/popt/Config.in" # libpopt +source "package/postgresql/Config.in" # libpq +source "package/libpthread/Config.in" +source "package/libthread_db/Config.in" +source "package/radiusclient-ng/Config.in" #libradiusclient-ng +source "package/readline/Config.in" # libreadline +source "package/cyrus-sasl/Config.in" # libsasl2 +source "package/speex/Config.in" # libspeex +source "package/sqlite/Config.in" # libsqlite +source "package/librpcsecgss/Config.in" +source "package/libshout/Config.in" +source "package/libsigc++/Config.in" +source "package/libstdcxx/Config.in" +source "package/libtasn1/Config.in" +source "package/libtiff/Config.in" +source "package/libtirpc/Config.in" +source "package/libtorrent/Config.in" +source "package/libupnp/Config.in" +source "package/libusb/Config.in" +source "package/libvorbis/Config.in" +source "package/libvorbisidec/Config.in" +source "package/tcp_wrappers/Config.in" +source "package/libxml2/Config.in" +source "package/libxslt/Config.in" +source "package/uclibc++/Config.in" +source "package/ustl/Config.in" +source "package/zlib/Config.in" +endmenu + +menu "X" +depends ADK_XORG +source "package/xorg-server/Config.in" + +menu "X Libraries" +source "package/libICE/Config.in" +source "package/libSM/Config.in" +source "package/libX11/Config.in" +source "package/libXdmcp/Config.in" +source "package/libXext/Config.in" +source "package/libXfont/Config.in" +source "package/libfontenc/Config.in" +source "package/libpciaccess/Config.in" +source "package/libxkbfile/Config.in" +source "package/libXau/Config.in" +source "package/libXaw/Config.in" +source "package/libXmu/Config.in" +source "package/libXpm/Config.in" +source "package/libXt/Config.in" +source "package/pixman/Config.in" +source "package/xf86dga/Config.in" +source "package/xproto/Config.in" +endmenu +endmenu + +endmenu + +menu "Kernel configuration" +source "target/linux/Config.in" +endmenu + diff --git a/package/Depends.mk b/package/Depends.mk new file mode 100644 index 000000000..70650cccc --- /dev/null +++ b/package/Depends.mk @@ -0,0 +1,391 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +aircrack-ng-compile: openssl-compile libpcap-compile +apr-util-compile: expat-compile apr-compile +arpd-compile: libpcap-compile libdnet-compile libevent-compile +arpwatch-compile: libpcap-compile +atftp-compile: readline-compile ncurses-compile +avahi-compile: libdaemon-compile expat-compile libgdbm-compile +bind-compile: openssl-compile +bitlbee-compile: libiconv-compile openssl-compile glib2-compile +bluez-compile: libusb-compile dbus-compile +bogofilter-compile: libiconv-compile libdb-compile +ifeq (${ADK_COMPILE_CBTT_WITH_UCLIBCXX},y) +cbtt-compile: uclibc++-compile +endif +cbtt-compile: mysql-compile zlib-compile +collectd-compile: libpthread-compile +cryptsetup-compile: libgcrypt-compile popt-compile e2fsprogs-compile device-mapper-compile +ifeq (${ADK_COMPILE_CTORRENT_WITH_UCLIBCXX},y) +ctorrent-compile: uclibc++-compile +endif +ctorrent-compile: openssl-compile +cups-compile: zlib-compile +curl-compile: openssl-compile zlib-compile +cxxtools-compile: libiconv-compile +ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y) +cxxtools-compile: uclibc++-compile +endif +cyrus-sasl-compile: openssl-compile +ifneq (${ADK_PACKAGE_DAVFS2_FUSE}${ADK_PACKAGE_DAVFS2_BOTH},) +davfs2-compile: fuse-compile +endif +davfs2-compile: libiconv-compile neon-compile +dbus-compile: expat-compile +deco-compile: ncurses-compile +dhcp6-compile: ncurses-compile +digitemp-compile: libusb-compile +dsniff-compile: libnids-compile openssl-compile libgdbm-compile +elinks-compile: openssl-compile +esound-compile: libaudiofile-compile +ettercap-compile: pcap-compile libnet-compile +exmap-compile: glib2-compile readline-compile +fprobe-compile: libpcap-compile +freetype-compile: zlib-compile +gatling-compile: libowfat-compile libiconv-compile +gcc-compile: gmp-compile mpfr-compile +gdb-compile: ncurses-compile readline-compile +gettext-compile: libiconv-compile libpthread-compile +gkrellmd-compile: glib-compile +glib2-compile: gettext-compile libiconv-compile +gmediaserver-compile: id3lib-compile libupnp-compile +gnutls-compile: libgcrypt-compile liblzo-compile libtasn1-compile opencdk-compile zlib-compile +ifeq (${ADK_COMPILE_GPSD_WITH_UCLIBCXX},y) +gpsd-compile: uclibc++-compile +endif +gpsd-compile: ncurses-compile +ifeq (${ADK_COMPILE_HEIMDAL_WITH_DB_BDB},y) +heimdal-compile: libdb-compile +endif +ifeq (${ADK_COMPILE_HEIMDAL_WITH_DB_LDAP},y) +heimdal-compile: openldap-compile +endif +heimdal-compile: openssl-compile ncurses-compile +httping-compile: openssl-compile +icecast-compile: curl-compile libvorbis-compile libxml2-compile libxslt-compile +ifeq (${ADK_COMPILE_ID3LIB_WITH_UCLIBCXX},y) +id3lib-compile: uclibc++-compile +endif +id3lib-compile: zlib-compile libiconv-compile +iftop-compile: libpcap-compile libpthread-compile ncurses-compile +ipcad-compile: libpcap-compile +ifeq (${ADK_COMPILE_IPERF_WITH_UCLIBCXX},y) +iperf-compile: uclibc++-compile +endif +ipsec-tools-compile: openssl-compile +iptables-snmp-compile: net-snmp-compile +iptraf-compile: ncurses-compile +irssi-compile: glib2-compile ncurses-compile +iw-compile: libnl-compile +jamvm-compile: libffi-compile zlib-compile +ifeq (${ADK_COMPILE_KISMET_WITH_UCLIBCXX},y) +kismet-compile: uclibc++-compile +endif +kismet-compile: libpcap-compile ncurses-compile +knock-compile: libpcap-compile +krb5-compile: ncurses-compile +l2tpns-compile: libcli-compile +less-compile: ncurses-compile +libgcrypt-compile: libgpg-error-compile +libgd-compile: libpng-compile jpeg-compile +libid3tag-compile: zlib-compile +libnet-compile: libpcap-compile +libnids-compile: libnet-compile +libp11-compile: openssl-compile libtool-compile +libpng-compile: zlib-compile +libshout-compile: libvorbis-compile +libtorrent-compile: openssl-compile libsigc++-compile +libvorbis-compile: libogg-compile +libfontenc-compile: xproto-compile zlib-compile +libSM-compile: libICE-compile +libXt-compile: libSM-compile +libXmu-compile: libXt-compile +libXaw-compile: libXext-compile libXmu-compile libXpm-compile +libX11-compile: xproto-compile xextproto-compile xtrans-compile libXdmcp-compile \ + libXau-compile libXaw-compile xcmiscproto-compile bigreqsproto-compile kbproto-compile \ + inputproto-compile +libXfont-compile: freetype-compile fontcacheproto-compile fontsproto-compile libfontenc-compile +libxml2-compile: zlib-compile +libxslt-compile: libxml2-compile +ifeq (${ADK_COMPILE_LIGHTTPD_WITH_OPENSSL},y) +lighttpd-compile: openssl-compile +endif +lighttpd-compile: pcre-compile libxml2-compile sqlite-compile +links-compile: openssl-compile libpng-compile jpeg-compile gpm-compile +logrotate-compile: popt-compile +lynx-compile: ncurses-compile openssl-compile +madplay-compile: libid3tag-compile libmad-compile +maradns-compile: libpthread-compile +mc-compile: glib-compile ncurses-compile +miax-compile: bluez-compile +ifeq (${ADK_COMPILE_MIREDO_WITH_UCLIBCXX},y) +miredo-compile: uclibc++-compile +endif +moc-compile: libvorbis-compile curl-compile libmad-compile flac-compile ffmpeg-compile +monit-compile: openssl-compile +ifeq (${ADK_COMPILE_MRD6_WITH_UCLIBCXX},y) +mrd6-compile: uclibc++-compile +endif +mt-daapd-compile: libgdbm-compile libid3tag-compile +mtr-compile: ncurses-compile +mutt-compile: ncurses-compile openssl-compile +mysql-compile: ncurses-compile zlib-compile +nano-compile: ncurses-compile +neon-compile: libpthread-compile libxml2-compile openssl-compile zlib-compile +net-snmp-compile: libelf-compile +ifeq (${ADK_COMPILE_NFS_UTILS_WITH_KRB5},y) +nfs-utils-compile: libnfsidmap-compile krb5-compile libevent-compile libgssglue-compile librpcsecgss-compile +endif +ifeq (${ADK_COMPILE_NFS_UTILS_WITH_HEIMDAL},y) +nfs-utils-compile: libnfsidmap-compile heimdal-compile libevent-compile librpcsecgss-compile +endif +ifeq (${ADK_IPV6},y) +nfs-utils-compile: libtirpc-compile +endif +ifeq (${ADK_COMPILE_NMAP_WITH_UCLIBCXX},y) +nmap-compile: uclibc++-compile +endif +nmap-compile: pcre-compile libpcap-compile +nocatsplash-compile: glib-compile +obexftp-compile: openobex-compile libiconv-compile +opencdk-compile: libgcrypt-compile libgpg-error-compile zlib-compile +openct-compile: libtool-compile libusb-compile +openldap-compile: cyrus-sasl-compile openssl-compile libdb-compile +opensips-compile: openssl-compile +ifeq (${ADK_COMPILE_OPENSSH_WITH_KRB5},y) +openssh-compile: krb5-compile +endif +ifeq (${ADK_COMPILE_OPENSSH_WITH_HEIMDAL},y) +openssh-compile: heimdal-compile +endif +openssh-compile: zlib-compile openssl-compile +openssl-compile: zlib-compile +openssl-pkcs11-compile: libp11-compile +openswan-compile: gmp-compile +oprofile-compile: popt-compile +osiris-compile: openssl-compile +palantir-compile: jpeg-compile +pciutils-compile: zlib-compile +ifneq ($(strip ${ADK_PACKAGE_PORTMAP_LIBWRAP}),) +portmap-compile: tcp_wrappers-compile +endif +postgresql-compile: zlib-compile +privoxy-compile: pcre-compile +procps-compile: ncurses-compile +ptunnel-compile: libpcap-compile +quagga-compile: readline-compile ncurses-compile +raddump-compile: openssl-compile libpcap-compile +radiusclient-ng-compile: openssl-compile +rarpd-compile: libnet-compile +readline-compile: ncurses-compile +rrdcollect-compile: rrdtool-compile +rrdtool-compile: libxml2-compile cgilib-compile freetype-compile libart-compile libpng-compile +rsync-compile: popt-compile +rtorrent-compile: ncurses-compile libtorrent-compile curl-compile +sane-backends-compile: libpthread-compile libusb-compile +scanlogd-compile: libpcap-compile libnids-compile libnet-compile +scdp-compile: libnet-compile +screen-compile: ncurses-compile +serdisplib-compile: libgd-compile libusb-compile +siproxd-compile: libosip2-compile +sipsak-compile: openssl-compile +sispmctl-compile: libusb-compile +snort-compile: libnet-compile libpcap-compile pcre-compile +snort-wireless-compile: libnet-compile libpcap-compile pcre-compile +socat-compile: openssl-compile +sqlite-compile: ncurses-compile readline-compile +squid-compile: openssl-compile +ssltunnel-compile: openssl-compile ppp-compile +subversion-compile: apr-util-compile expat-compile apr-compile zlib-compile libiconv-compile +swconfig-compile: libnl-compile +syslog-ng-compile: libol-compile tcp_wrappers-compile +tcpdump-compile: libpcap-compile +tinc-compile: zlib-compile openssl-compile liblzo-compile +tntnet-compile: cxxtools-compile zlib-compile +ifneq (${ADK_COMPILE_TNTNET_WITH_OPENSSL},) +tntnet-compile: openssl-compile +else ifneq (${ADK_COMPILE_TNTNET_WITH_GNUTLS},) +tntnet-compile: gnutls-compile +endif +tor-compile: libevent-compile openssl-compile zlib-compile +trafshow: ncurses-compile libpcap-compile +usbutils-compile: libusb-compile +ussp-push-compile: openobex-compile +vilistextum-compile: libiconv-compile +vim-compile: ncurses-compile +vnc-reflector-compile: jpeg-compile zlib-compile +vpnc-compile: libgcrypt-compile libgpg-error-compile +vtun-compile: zlib-compile openssl-compile liblzo-compile +wdfs-compile: openssl-compile fuse-compile neon-compile glib2-compile +weechat-compile: ncurses-compile gnutls-compile lua-compile libiconv-compile +wknock-compile: libpcap-compile +ifeq (${ADK_COMPILE_WPA_SUPPLICANT_WITH_OPENSSL},y) +wpa_supplicant-compile: openssl-compile +endif +wx200d-compile: postgresql-compile +xfsprogs-compile: e2fsprogs-compile +libXxf86dga-compile: xf86dgaproto-compile +xf86dga-compile: libXxf86dga-compile +xorg-server-compile: libX11-compile randrproto-compile renderproto-compile fixesproto-compile \ + damageproto-compile scrnsaverproto-compile resourceproto-compile \ + fontsproto-compile videoproto-compile compositeproto-compile \ + evieext-compile libxkbfile-compile libXfont-compile pixman-compile \ + libpciaccess-compile openssl-compile xf86dga-compile + +ifeq ($(ADK_PACKAGE_APR_THREADING),y) +apr-compile: libpthread-compile +endif + +asterisk-compile: ncurses-compile openssl-compile zlib-compile curl-compile popt-compile +ifneq ($(ADK_PACKAGE_ASTERISK_CHAN_BLUETOOTH),) +asterisk-compile: bluez-compile +endif +ifneq ($(ADK_PACKAGE_ASTERISK_CODEC_SPEEX),) +asterisk-compile: speex-compile +endif +ifneq ($(ADK_PACKAGE_ASTERISK_PGSQL),) +asterisk-compile: postgresql-compile +endif +ifneq ($(ADK_PACKAGE_ASTERISK_MYSQL),) +asterisk-compile: mysql-compile +endif +ifneq ($(ADK_PACKAGE_ASTERISK_SQLITE),) +asterisk-compile: sqlite-compile +endif + + +freeradius-compile: libtool-compile openssl-compile +ifneq ($(ADK_PACKAGE_FREERADIUS_MOD_LDAP),) +freeradius-compile: openldap-compile +endif +ifneq ($(ADK_PACKAGE_FREERADIUS_MOD_SQL_MYSQL),) +freeradius-compile: mysql-compile +endif +ifneq ($(ADK_PACKAGE_FREERADIUS_MOD_SQL_PGSQL),) +freeradius-compile: postgresql-compile +endif + +hostapd-compile: libnl-compile openssl-compile + +ifneq ($(ADK_PACKAGE_MINI_HTTPD_OPENSSL),) +mini_httpd-compile: openssl-compile +endif + +ifneq ($(ADK_PACKAGE_MOTION),) +motion-compile: jpeg-compile +endif + +mplayer-compile: alsa-lib-compile libmad-compile libvorbis-compile faad2-compile ncurses-compile zlib-compile + +mpd-compile: alsa-lib-compile glib2-compile curl-compile +ifneq ($(ADK_PACKAGE_MPD_MP3),) +mpd-compile: libid3tag-compile libmad-compile +endif +ifneq ($(ADK_PACKAGE_MPD_MP4),) +mpd-compile: libfaad2 +endif +ifneq ($(ADK_COMPILE_MPD_WITH_OGG),) +mpd-compile: libvorbis-compile +endif +ifneq ($(ADK_COMPILE_MPD_WITH_TREMOR),) +mpd-compile: libvorbisidec-compile +endif +ifneq ($(ADK_PACKAGE_MPD_FLAC),) +mpd-compile: flac-compile +endif +ifneq ($(ADK_COMPILE_MPD_WITH_SHOUT),) +mpd-compile: lame-compile +endif + +ifneq (${ADK_PACKAGE_NUT_SSL},) +nut-compile: openssl-compile +endif +ifneq (${ADK_PACKAGE_NUT_USB},) +nut-compile: libusb-compile +endif +ifneq (${ADK_PACKAGE_NUT_SNMP},) +nut-compile: net-snmp-compile +endif + +ifeq ($(ADK_PACKAGE_LIBOPENSSL),y) +openvpn-compile: openssl-compile +endif +ifeq ($(ADK_PACKAGE_OPENVPN_LZO),y) +openvpn-compile: liblzo-compile +endif + +php-compile: openssl-compile zlib-compile +ifneq ($(ADK_PACKAGE_PHP_MOD_CURL),) +php-compile: curl-compile +endif +ifneq ($(ADK_PACKAGE_PHP_MOD_GD),) +php-compile: libgd-compile libpng-compile +endif +ifneq ($(ADK_PACKAGE_PHP_MOD_GMP),) +php-compile: gmp-compile +endif +ifneq ($(ADK_PACKAGE_PHP_MOD_LDAP),) +php-compile: openldap-compile +endif +ifneq ($(ADK_PACKAGE_PHP_MOD_MYSQL),) +php-compile: mysql-compile +endif +ifneq ($(ADK_PACKAGE_PHP_MOD_PCRE),) +php-compile: pcre-compile +endif +ifneq ($(ADK_PACKAGE_PHP_MOD_PGSQL),) +php-compile: postgresql-compile +endif +ifneq ($(ADK_PACKAGE_PHP_MOD_SQLITE),) +php-compile: sqlite-compile +endif +ifneq ($(ADK_PACKAGE_PHP_MOD_XML),) +php-compile: expat-compile +endif + +pmacct-compile: libpcap-compile +ifneq ($(ADK_COMPILE_PMACCT_MYSQL),) +pmacct-compile: mysql-compile +endif +ifneq ($(ADK_COMPILE_PMACCT_PGSQL),) +pmacct-compile: postgresql-compile +endif +ifneq ($(ADK_COMPILE_PMACCT_SQLITE),) +pmacct-compile: sqlite-compile +endif + +ifeq (${ADK_COMPILE_RRS_WITH_UCLIBCXX},y) +rrs-compile: uclibc++-compile +endif +rrs-compile: zlib-compile +ifneq ($(ADK_PACKAGE_RRS),) +rrs-compile: openssl-compile +endif + +ifneq ($(ADK_PACKAGE_SUBVERSION_NEON),) +subversion-compile: neon-compile +endif + +ulogd-compile: iptables-compile +ifneq ($(ADK_PACKAGE_ULOGD_MOD_MYSQL),) +ulogd-compile: mysql-compile +endif +ifneq ($(ADK_PACKAGE_ULOGD_MOD_PCAP),) +ulogd-compile: libpcap-compile +endif +ifneq ($(ADK_PACKAGE_ULOGD_MOD_PGSQL),) +ulogd-compile: postgresql-compile +endif +ifneq ($(ADK_PACKAGE_ULOGD_MOD_SQLITE),) +ulogd-compile: sqlite-compile +endif +ifeq (${ADK_PACKAGE_FETCHMAIL_SSL},y) +fetchmail-compile: openssl-compile +endif +ifeq (${ADK_PACKAGE_IRSSI_SSL},y) +irssi-compile: openssl-compile +endif + diff --git a/package/Makefile b/package/Makefile new file mode 100644 index 000000000..2cecd6d2d --- /dev/null +++ b/package/Makefile @@ -0,0 +1,450 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +# Main makefile for the packages + +include $(TOPDIR)/rules.mk +include $(TOPDIR)/package/Depends.mk + +ifneq (${ADK_PACKAGE_CGILIB},) +ADK_COMPILE_CGILIB=${ADK_PACKAGE_CGILIB} +else +ifneq (${ADK_COMPILE_RRDTOOL},) +ADK_COMPILE_CGILIB=m +else +ADK_COMPILE_CGILIB= +endif +endif + +package-$(ADK_PACKAGE_6TUNNEL) += 6tunnel +package-$(ADK_PACKAGE_AICCU) += aiccu +package-$(ADK_PACKAGE_AIRCRACK_NG) += aircrack-ng +package-$(ADK_PACKAGE_ALSA_LIB) += alsa-lib +package-$(ADK_PACKAGE_ALSA_UTILS) += alsa-utils +package-$(ADK_PACKAGE_APR) += apr +package-$(ADK_PACKAGE_APR_UTIL) += apr-util +package-$(ADK_PACKAGE_ARPD) += arpd +package-$(ADK_PACKAGE_ARPWATCH) += arpwatch +package-$(ADK_PACKAGE_ASTERISK) += asterisk +package-$(ADK_COMPILE_ATFTP) += atftp +package-$(ADK_PACKAGE_AUTOSSH) += autossh +package-$(ADK_COMPILE_AVAHI) += avahi +package-$(ADK_COMPILE_AXTLS) += axtls +package-$(ADK_PACKAGE_BASH) += bash +package-$(ADK_COMPILE_BC) += bc +package-$(ADK_PACKAGE_CFGFS) += cfgfs +package-$(ADK_PACKAGE_BIGREQSPROTO) += bigreqsproto +package-$(ADK_COMPILE_BIND) += bind +package-$(ADK_PACKAGE_BINUTILS) += binutils +package-$(ADK_PACKAGE_BITLBEE) += bitlbee +package-$(ADK_PACKAGE_BOGOFILTER) += bogofilter +package-$(ADK_PACKAGE_BLUEZ_FIRMWARE) += bluez-firmware +package-$(ADK_PACKAGE_BLUEZ) += bluez +package-$(ADK_PACKAGE_BRIDGE_UTILS) += bridge-utils +package-$(ADK_PACKAGE_BUSYBOX) += busybox +package-$(ADK_PACKAGE_BWM) += bwm +package-$(ADK_PACKAGE_CBTT) += cbtt +package-$(ADK_COMPILE_CGILIB) += cgilib +package-$(ADK_PACKAGE_CHILLISPOT) += chillispot +package-$(ADK_PACKAGE_CLICK) += click +package-$(ADK_PACKAGE_COLLECTD) += collectd +package-$(ADK_PACKAGE_COMGT) += comgt +package-$(ADK_PACKAGE_COMPOSITEPROTO) += compositeproto +package-$(ADK_PACKAGE_CTORRENT) += ctorrent +package-$(ADK_PACKAGE_CUPS) += cups +package-$(ADK_COMPILE_CURL) += curl +package-$(ADK_PACKAGE_CUTTER) += cutter +package-$(ADK_PACKAGE_CRYPTSETUP) += cryptsetup +package-$(ADK_COMPILE_CYRUS_SASL) += cyrus-sasl +package-$(ADK_PACKAGE_CXXTOOLS) += cxxtools +package-$(ADK_PACKAGE_DAMAGEPROTO) += damageproto +package-$(ADK_PACKAGE_DAVFS2) += davfs2 +package-$(ADK_PACKAGE_DBUS) += dbus +package-$(ADK_PACKAGE_DECO) += deco +package-$(ADK_PACKAGE_DEVICE_MAPPER) += device-mapper +package-$(ADK_COMPILE_DHCP) += dhcp +package-$(ADK_PACKAGE_DHCP_FORWARDER) += dhcp-forwarder +package-$(ADK_PACKAGE_DHCP6) += dhcp6 +package-$(ADK_PACKAGE_DIGITEMP) += digitemp +package-$(ADK_PACKAGE_DNSMASQ) += dnsmasq +package-$(ADK_PACKAGE_DOSFSTOOLS) += dosfstools +package-$(ADK_PACKAGE_DOVECOT) += dovecot +package-$(ADK_PACKAGE_DROPBEAR) += dropbear +package-$(ADK_PACKAGE_DSNIFF) += dsniff +package-$(ADK_PACKAGE_E2FSPROGS) += e2fsprogs +package-$(ADK_PACKAGE_LIBUUID) += e2fsprogs +package-$(ADK_PACKAGE_ELINKS) += elinks +package-$(ADK_PACKAGE_ESOUND) += esound +package-$(ADK_PACKAGE_ETHER_WAKE) += ether-wake +package-$(ADK_PACKAGE_ETHTOOL) += ethtool +package-$(ADK_PACKAGE_EVIEEXT) += evieext +package-$(ADK_COMPILE_EXPAT) += expat +package-$(ADK_COMPILE_EXMAP) += exmap +package-$(ADK_PACKAGE_EZIPUPDATE) += ez-ipupdate +package-$(ADK_COMPILE_FAAD2) += faad2 +package-$(ADK_PACKAGE_FAKEIDENTD) += fakeidentd +package-$(ADK_PACKAGE_FBSET) += fbset +package-$(ADK_PACKAGE_FETCHMAIL) += fetchmail +package-$(ADK_PACKAGE_FFMPEG) += ffmpeg +package-$(ADK_PACKAGE_FILE) += file +package-$(ADK_PACKAGE_FIXESPROTO) += fixesproto +package-$(ADK_COMPILE_FLAC) += flac +package-$(ADK_PACKAGE_FONTSPROTO) += fontsproto +package-$(ADK_PACKAGE_FONTCACHEPROTO) += fontcacheproto +package-$(ADK_PACKAGE_FPING) += fping +package-$(ADK_PACKAGE_FPROBE) += fprobe +package-$(ADK_PACKAGE_FPROBE_ULOG) += fprobe-ulog +package-$(ADK_PACKAGE_FREERADIUS) += freeradius +package-$(ADK_COMPILE_FREETYPE) += freetype +package-$(ADK_PACKAGE_FRICKIN) += frickin +package-$(ADK_COMPILE_FUSE) += fuse +package-$(ADK_PACKAGE_GATLING) += gatling +package-$(ADK_PACKAGE_GCC) += gcc +package-$(ADK_PACKAGE_GDB) += gdb +package-$(ADK_PACKAGE_GDBSERVER) += gdbserver +package-$(ADK_PACKAGE_GETTEXT) += gettext +package-$(ADK_PACKAGE_GKRELLMD) += gkrellmd +package-$(ADK_COMPILE_GLIB) += glib +package-$(ADK_PACKAGE_GLIB2) += glib2 +ifeq (${ADK_TARGET_LIB_GLIBC},y) +package-$(ADK_PACKAGE_GLIBC) += glibc +endif +package-$(ADK_PACKAGE_GMEDIASERVER) += gmediaserver +package-$(ADK_COMPILE_GMP) += gmp +package-$(ADK_COMPILE_GNUTLS) += gnutls +package-$(ADK_PACKAGE_GPG) += gpg +package-$(ADK_PACKAGE_GPM) += gpm +package-$(ADK_PACKAGE_GPSD) += gpsd +package-$(ADK_COMPILE_GSM) += gsm +package-$(ADK_PACKAGE_HASERL) += haserl +package-$(ADK_PACKAGE_HDPARM) += hdparm +package-$(ADK_COMPILE_HEIMDAL) += heimdal +package-$(ADK_PACKAGE_HEYU) += heyu +package-$(ADK_COMPILE_HOSTAPD) += hostapd +package-$(ADK_PACKAGE_HTPDATE) += htpdate +package-$(ADK_PACKAGE_HTTPING) += httping +package-$(ADK_PACKAGE_HTTPTUNNEL) += httptunnel +package-$(ADK_PACKAGE_ICECAST) += icecast +package-$(ADK_PACKAGE_ID3LIB) += id3lib +package-$(ADK_PACKAGE_IFTOP) += iftop +package-$(ADK_PACKAGE_IGMPPROXY) += igmpproxy +package-$(ADK_PACKAGE_INPUTPROTO) += inputproto +package-$(ADK_PACKAGE_IPCAD) += ipcad +package-$(ADK_PACKAGE_IPERF) += iperf +package-$(ADK_COMPILE_IPROUTE2) += iproute2 +package-$(ADK_PACKAGE_IPSEC_TOOLS) += ipsec-tools +package-$(ADK_PACKAGE_IPSET) += ipset +package-$(ADK_COMPILE_IPTABLES) += iptables +package-$(ADK_PACKAGE_IPTABLES_SNMP) += iptables-snmp +package-$(ADK_PACKAGE_IPTRAF) += iptraf +package-$(ADK_PACKAGE_IRSSI) += irssi +package-$(ADK_PACKAGE_IW) += iw +package-$(ADK_PACKAGE_JAMVM) += jamvm +package-$(ADK_COMPILE_JPEG) += jpeg +package-$(ADK_PACKAGE_KBPROTO) += kbproto +package-$(ADK_COMPILE_KISMET) += kismet +package-$(ADK_COMPILE_KNOCK) += knock +package-$(ADK_COMPILE_KRB5) += krb5 +package-$(ADK_PACKAGE_L2TPNS) += l2tpns +package-$(ADK_COMPILE_LAME) += lame +package-$(ADK_PACKAGE_LESS) += less +package-$(ADK_PACKAGE_LIBAO) += libao +package-$(ADK_PACKAGE_LIBART) += libart +package-$(ADK_PACKAGE_LIBAUDIOFILE) += libaudiofile +package-$(ADK_PACKAGE_LIBCLI) += libcli +package-$(ADK_PACKAGE_LIBDAEMON) += libdaemon +package-$(ADK_COMPILE_DB) += libdb +package-$(ADK_PACKAGE_LIBDNET) += libdnet +package-$(ADK_PACKAGE_LIBELF) += libelf +package-$(ADK_PACKAGE_LIBEVENT) += libevent +package-$(ADK_PACKAGE_LIBFFI) += libffi +package-$(ADK_PACKAGE_LIBFONTENC) += libfontenc +package-$(ADK_PACKAGE_LIBGCRYPT) += libgcrypt +package-$(ADK_PACKAGE_LIBGD) += libgd +package-$(ADK_PACKAGE_LIBGDBM) += libgdbm +package-$(ADK_PACKAGE_LIBGPG_ERROR) += libgpg-error +package-$(ADK_PACKAGE_LIBGSSGLUE) += libgssglue +package-$(ADK_PACKAGE_LIBICONV) += libiconv +package-$(ADK_PACKAGE_LIBID3TAG) += libid3tag +package-$(ADK_PACKAGE_LIBLZO) += liblzo +package-$(ADK_PACKAGE_LIBMAD) += libmad +package-$(ADK_PACKAGE_LIBNET) += libnet +package-$(ADK_PACKAGE_LIBNFSIDMAP) += libnfsidmap +package-$(ADK_PACKAGE_LIBNIDS) += libnids +package-$(ADK_PACKAGE_LIBNL) += libnl +package-$(ADK_PACKAGE_LIBOGG) += libogg +package-$(ADK_PACAKGE_LIBOL) += libol +package-$(ADK_PACKAGE_LIBOSIP2) += libosip2 +package-$(ADK_COMPILE_LIBOWFAT) += libowfat +package-$(ADK_PACKAGE_LIBP11) += libp11 +package-$(ADK_PACKAGE_LIBPCAP) += libpcap +package-$(ADK_PACKAGE_LIBPCIACCESS) += libpciaccess +package-$(ADK_PACKAGE_LIBPNG) += libpng +package-$(ADK_PACKAGE_LIBPRI) += libpri +package-$(ADK_PACKAGE_LIBPTHREAD) += libpthread +package-$(ADK_COMPILE_LIBSHOUT) += libshout +package-$(ADK_PACKAGE_LIBSIGCXX) += libsigc++ +package-$(ADK_PACKAGE_LIBSTDCXX) += libstdcxx +package-$(ADK_PACKAGE_LIBRPCSECGSS) += librpcsecgss +package-$(ADK_PACKAGE_LIBTASN1) += libtasn1 +package-$(ADK_PACKAGE_LIBTHREAD_DB) += libthread_db +package-$(ADK_PACKAGE_LIBTIFF) += libtiff +package-$(ADK_PACKAGE_LIBTIRPC) += libtirpc +package-$(ADK_PACKAGE_LIBTORRENT) += libtorrent +package-$(ADK_COMPILE_LIBTOOL) += libtool +package-$(ADK_PACKAGE_LIBUPNP) += libupnp +package-$(ADK_PACKAGE_LIBUSB) += libusb +package-$(ADK_PACKAGE_LIBVORBIS) += libvorbis +package-$(ADK_PACKAGE_LIBVORBISIDEC) += libvorbisidec +package-$(ADK_PACKAGE_LIBICE) += libICE +package-$(ADK_PACKAGE_LIBSM) += libSM +package-$(ADK_PACKAGE_LIBX11) += libX11 +package-$(ADK_PACKAGE_LIBXAU) += libXau +package-$(ADK_PACKAGE_LIBXAW) += libXaw +package-$(ADK_PACKAGE_LIBXPM) += libXpm +package-$(ADK_PACKAGE_LIBXDMCP) += libXdmcp +package-$(ADK_PACKAGE_LIBXEXT) += libXext +package-$(ADK_PACKAGE_LIBXFONT) += libXfont +package-$(ADK_PACKAGE_LIBXKBFILE) += libxkbfile +package-$(ADK_PACKAGE_LIBXML2) += libxml2 +package-$(ADK_PACKAGE_LIBXMU) += libXmu +package-$(ADK_PACKAGE_LIBXSLT) += libxslt +package-$(ADK_PACKAGE_LIBXT) += libXt +package-$(ADK_PACKAGE_LIGHTTPD) += lighttpd +package-$(ADK_PACKAGE_LINKS) += links +package-$(ADK_PACKAGE_LINUX_ATM) += linux-atm +package-$(ADK_PACKAGE_LOGROTATE) += logrotate +package-$(ADK_PACKAGE_LRZSZ) += lrzsz +package-${ADK_PACKAGE_LYNX} += lynx +package-$(ADK_COMPILE_LUA) += lua +package-$(ADK_PACKAGE_LVM) += lvm +package-$(ADK_PACKAGE_MACCHANGER) += macchanger +package-$(ADK_PACKAGE_MADPLAY) += madplay +package-$(ADK_PACKAGE_MARADNS) += maradns +package-$(ADK_PACKAGE_MGETTY) += mgetty +package-$(ADK_PACKAGE_MC) += mc +package-$(ADK_PACKAGE_MIAU) += miau +package-$(ADK_PACKAGE_MIAX) += miax +package-$(ADK_PACKAGE_MICROPERL) += microperl +package-$(ADK_COMPILE_MINI_HTTPD) += mini_httpd +package-$(ADK_PACKAGE_MINI_SENDMAIL) += mini_sendmail +package-$(ADK_COMPILE_MIREDO) += miredo +package-$(ADK_PACKAGE_MKSH) += mksh +package-$(ADK_PACKAGE_MOC) += moc +package-$(ADK_PACKAGE_MONIT) += monit +package-$(ADK_PACKAGE_MOTION) += motion +package-$(ADK_PACKAGE_MPD) += mpd +package-$(ADK_PACKAGE_MPFR) += mpfr +package-$(ADK_PACKAGE_MPLAYER) += mplayer +package-$(ADK_PACKAGE_MRD6) += mrd6 +package-$(ADK_PACKAGE_MT_DAAPD) += mt-daapd +package-$(ADK_PACKAGE_MTD) += mtd +package-$(ADK_PACKAGE_MTR) += mtr +package-$(ADK_PACKAGE_MUTT) += mutt +package-$(ADK_COMPILE_MYSQL) += mysql +package-$(ADK_PACKAGE_NANO) += nano +package-$(ADK_COMPILE_NCURSES) += ncurses +package-$(ADK_PACKAGE_NUT) += nut +package-$(ADK_PACKAGE_LIBNCURSES) += ncurses +package-$(ADK_COMPILE_NDISC6) += ndisc +package-$(ADK_PACKAGE_NEON) += neon +package-$(ADK_COMPILE_NET_SNMP) += net-snmp +package-$(ADK_PACKAGE_NETPERF) += netperf +package-$(ADK_PACKAGE_NETSTAT_NAT) += netstat-nat +package-$(ADK_PACKAGE_NFS_UTILS) += nfs-utils +package-$(ADK_PACKAGE_NFS_KERNEL_NFSD) += nfs-utils +package-$(ADK_PACKAGE_NMAP) += nmap +package-$(ADK_PACKAGE_NOCATSPLASH) += nocatsplash +package-$(ADK_PACKAGE_NTPCLIENT) += ntpclient +package-$(ADK_PACKAGE_OBEXFTP) += obexftp +package-$(ADK_PACKAGE_OLSRD) += olsrd +package-$(ADK_COMPILE_OPENCDK) += opencdk +package-$(ADK_PACKAGE_OPENCT) += openct +package-$(ADK_PACKAGE_OPENOBEX) += openobex +package-$(ADK_COMPILE_OPENLDAP) += openldap +package-$(ADK_PACKAGE_OPENNTPD) += openntpd +package-$(ADK_PACKAGE_OPENSC) += opensc +package-$(ADK_PACKAGE_OPENSIPS) += opensips +package-$(ADK_COMPILE_OPENSSH) += openssh +package-$(ADK_COMPILE_OPENSSL) += openssl +package-$(ADK_PACKAGE_OPENSSL_PKCS11) += openssl-pkcs11 +package-$(ADK_PACKAGE_OPENSWAN) += openswan +package-$(ADK_PACKAGE_OPENVPN) += openvpn +package-$(ADK_PACKAGE_OPROFILE) += oprofile +package-$(ADK_COMPILE_OSIRIS) += osiris +package-$(ADK_PACKAGE_OWFS) += owfs +package-$(ADK_PACKAGE_P910ND) += p910nd +package-$(ADK_PACKAGE_PALANTIR) += palantir +package-$(ADK_PACKAGE_PARPROUTED) += parprouted +package-$(ADK_PACKAGE_PCIUTILS) += pciutils +package-$(ADK_COMPILE_PCRE) += pcre +package-$(ADK_COMPILE_PHP) += php +package-$(ADK_PACKAGE_PICOCOM) += picocom +package-$(ADK_PACKAGE_PIPACS) += pipacs +package-$(ADK_PACKAGE_PIXMAN) += pixman +package-$(ADK_COMPILE_PMACCT) += pmacct +package-$(ADK_COMPILE_POPT) += popt +package-$(ADK_PACKAGE_PORTMAP) += portmap +package-$(ADK_PACKAGE_PORTSENTRY) += portsentry +package-$(ADK_COMPILE_POSTGRESQL) += postgresql +package-$(ADK_PACKAGE_PPP) += ppp +package-$(ADK_PACKAGE_PPTP) += pptp +package-$(ADK_PACKAGE_PPTPD) += pptpd +package-$(ADK_PACKAGE_PRIVOXY) += privoxy +package-$(ADK_PACKAGE_PROCMAIL) += procmail +package-$(ADK_PACKAGE_PROCPS) += procps +package-$(ADK_PACKAGE_PTUNNEL) += ptunnel +package-$(ADK_PACKAGE_QUAGGA) += quagga +package-$(ADK_COMPILE_RADIUSCLIENT_NG) += radiusclient-ng +package-$(ADK_PACKAGE_RADDUMP) += raddump +package-$(ADK_PACKAGE_RADVD) += radvd +package-$(ADK_PACKAGE_RANDRPROTO) += randrproto +package-$(ADK_PACKAGE_RARPD) += rarpd +package-$(ADK_PACKAGE_RDATE) += rdate +package-$(ADK_COMPILE_READLINE) += readline +package-$(ADK_PACKAGE_REAIM) += reaim +package-$(ADK_PACKAGE_RENDERPROTO) += renderproto +package-$(ADK_PACKAGE_RESOURCEPROTO) += resourceproto +package-$(ADK_COMPILE_RP_PPPOE) += rp-pppoe +package-$(ADK_PACKAGE_RRDCOLLECT) += rrdcollect +package-$(ADK_COMPILE_RRDTOOL) += rrdtool +package-$(ADK_PACKAGE_RUBY) += ruby +package-$(ADK_COMPILE_RRS) += rrs +package-$(ADK_PACKAGE_RSYNC) += rsync +package-$(ADK_PACKAGE_RTORRENT) += rtorrent +package-$(ADK_COMPILE_SAMBA) += samba +package-$(ADK_PACKAGE_SANE_BACKENDS) += sane-backends +package-$(ADK_PACKAGE_SCANLOGD) += scanlogd +package-$(ADK_PACKAGE_SCDP) += scdp +package-$(ADK_PACKAGE_SCREEN) += screen +package-$(ADK_PACKAGE_SCRNSAVERPROTO) += scrnsaverproto +package-$(ADK_PACKAGE_SCSI_SPIN) += scsi-spin +package-$(ADK_PACKAGE_SER2NET) += ser2net +package-$(ADK_PACKAGE_SERDISPLIB) += serdisplib +package-$(ADK_PACKAGE_SETPWC) += setpwc +package-$(ADK_PACKAGE_SETSERIAL) += setserial +package-$(ADK_PACKAGE_SHAT) += shat +package-$(ADK_PACKAGE_SHOREWALL) += shorewall-common +package-${ADK_PACKAGE_SHOREWALL_SHELL} += shorewall-shell +package-$(ADK_PACKAGE_SIPROXD) += siproxd +package-$(ADK_PACKAGE_SIPSAK) += sipsak +package-$(ADK_PACKAGE_SISPMCTL) += sispmctl +package-$(ADK_PACKAGE_SLURM) += slurm +package-$(ADK_COMPILE_SNORT) += snort +package-$(ADK_COMPILE_SNORT_WIRELESS) += snort-wireless +package-$(ADK_PACKAGE_SOCAT) += socat +package-$(ADK_COMPILE_SPEEX) += speex +package-$(ADK_COMPILE_SQLITE) += sqlite +package-$(ADK_PACKAGE_SQUID) += squid +package-$(ADK_PACKAGE_SRELAY) += srelay +package-$(ADK_PACKAGE_SSLTUNNEL) += ssltunnel +package-$(ADK_PACKAGE_SSMTP) += ssmtp +package-$(ADK_PACKAGE_STRACE) += strace +package-$(ADK_PACKAGE_STRESS) += stress +package-$(ADK_PACKAGE_STRONGSWAN) += strongswan +package-$(ADK_PACKAGE_SUBVERSION) += subversion +package-$(ADK_PACKAGE_SWCONFIG) += swconfig +package-$(ADK_PACKAGE_SYSLOG_NG) += syslog-ng +package-$(ADK_PACKAGE_SYSSTAT) += sysstat +package-${ADK_PACKAGE_TCL} += tcl +package-$(ADK_PACKAGE_LIBWRAP) += tcp_wrappers +package-$(ADK_PACKAGE_TAR) += tar +package-$(ADK_PACKAGE_TCPDUMP) += tcpdump +package-$(ADK_PACKAGE_TINC) += tinc +package-$(ADK_PACKAGE_TINYPROXY) += tinyproxy +package-$(ADK_PACKAGE_TMSNC) += tmsnc +package-$(ADK_PACKAGE_TNTNET) += tntnet +package-$(ADK_PACKAGE_TOR) += tor +package-$(ADK_PACKAGE_TRAFSHOW) += trafshow +package-$(ADK_PACKAGE_TTCP) += ttcp +ifneq (${ADK_TARGET_LIB_GLIBC},y) +package-$(ADK_PACKAGE_UCLIBC) += uclibc +package-$(ADK_PACKAGE_UCLIBCXX) += uclibc++ +endif +package-$(ADK_PACKAGE_UDEV) += udev +package-$(ADK_PACKAGE_UDP_BROADCAST_RELAY) += udp-broadcast-relay +package-$(ADK_PACKAGE_ULOGD) += ulogd +package-$(ADK_PACKAGE_UPDATEDD) += updatedd +package-$(ADK_COMPILE_USBUTILS) += usbutils +package-$(ADK_PACKAGE_USSP_PUSH) += ussp-push +package-$(ADK_PACKAGE_USTL) += ustl +package-$(ADK_COMPILE_UTIL_LINUX) += util-linux +package-$(ADK_PACKAGE_VALGRIND) += valgrind +package-$(ADK_PACKAGE_VGP) += vgp +package-$(ADK_PACKAGE_VIDEOPROTO) += videoproto +package-$(ADK_PACKAGE_VILISTEXTUM) += vilistextum +package-$(ADK_PACKAGE_VIM) += vim +package-$(ADK_PACKAGE_VNC_REFLECTOR) += vnc-reflector +package-$(ADK_PACKAGE_VNSTAT) += vnstat +package-$(ADK_PACKAGE_VPNC) += vpnc +package-$(ADK_PACKAGE_VRRPD) += vrrpd +package-$(ADK_PACKAGE_VSFTPD) += vsftpd +package-$(ADK_PACKAGE_VTUN) += vtun +package-$(ADK_PACKAGE_WATCHDOG) += watchdog +package-$(ADK_PACKAGE_WCCPD) += wccpd +package-$(ADK_PACKAGE_WDFS) += wdfs +package-$(ADK_PACKAGE_WEECHAT) += weechat +package-$(ADK_PACKAGE_WIFIDOG) += wifidog +package-$(ADK_DOWNLOAD_WIRELESS_FIRMWARE) += wireless-firmware +package-$(ADK_PACKAGE_WIRELESS_TOOLS) += wireless-tools +package-$(ADK_PACKAGE_WOL) += wol +package-$(ADK_PACKAGE_WONDERSHAPER) += wondershaper +package-$(ADK_PACKAGE_WPA_SUPPLICANT) += wpa_supplicant +package-$(ADK_PACKAGE_WPUT) += wput +package-$(ADK_PACKAGE_XFSPROGS) += xfsprogs +package-$(ADK_PACKAGE_XINETD) += xinetd +package-$(ADK_PACKAGE_XCMISCPROTO) += xcmiscproto +package-$(ADK_PACKAGE_XEXTPROTO) += xextproto +package-$(ADK_PACKAGE_XF86DGA) += xf86dga +package-$(ADK_PACKAGE_XF86DGAPROTO) += xf86dgaproto +package-$(ADK_PACKAGE_XPROTO) += xproto +package-$(ADK_PACKAGE_XORG_SERVER) += xorg-server +package-$(ADK_PACKAGE_XTRANS) += xtrans +package-$(ADK_PACKAGE_ZLIB) += zlib +package-$(ADK_PACKAGE_ZSH) += zsh +# kernel addon packages +package-$(ADK_PACKAGE_KMOD_EM28XX) += em28xx +package-$(ADK_PACKAGE_KMOD_MAC80211) += mac80211 +package-$(ADK_PACKAGE_KMOD_FS_NTFS_3G) += ntfs-3g + +DOWNLOAD:=$(patsubst %,%-download,$(package-y) $(package-m)) +COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m)) +INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y)) + +all: compile +clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m) base-files) +compile: base-files-compile $(COMPILE_PACKAGES) +install: base-files-install $(INSTALL_PACKAGES) +download: $(DOWNLOAD) + +$(COMPILE_PACKAGES): base-files-compile +$(INSTALL_PACKAGES): base-files-install + +$(TARGET_DIR): + mkdir -p $(TARGET_DIR) + +%-download: + $(START_TRACE) "package/$(patsubst %-download,%,$@)-download: " + $(MAKE) -C $(patsubst %-download,%,$@) fetch + $(CMD_TRACE) " done" + $(END_TRACE) + +%-compile: + $(START_TRACE) "package/$(patsubst %-compile,%,$@)-compile: " + $(MAKE) -C $(patsubst %-compile,%,$@) fake build-all-ipkgs + $(CMD_TRACE) " done" + $(END_TRACE) + +%-install: %-compile + @$(START_TRACE) "package/$(patsubst %-install,%,$@)-install: " + @$(MAKE) -C $(patsubst %-install,%,$@) install + @$(CMD_TRACE) " done" + @$(END_TRACE) + +%-clean: + @$(START_TRACE) "package/$(patsubst %-clean,%,$@)-clean: " + @$(MAKE) -C $(patsubst %-clean,%,$@) clean + @$(CMD_TRACE) " done" + @$(END_TRACE) diff --git a/package/aiccu/Config.in b/package/aiccu/Config.in new file mode 100644 index 000000000..202d3c1c6 --- /dev/null +++ b/package/aiccu/Config.in @@ -0,0 +1,12 @@ +config ADK_PACKAGE_AICCU + prompt "aiccu............................. SixXS Automatic IPv6 Connectivity Client Utility" + depends on ADK_IPV6 + tristate + default n + select ADK_KPACKAGE_KMOD_IPV6 + select ADK_PACKAGE_LIBPTHREAD + help + SixXS Automatic IPv6 Connectivity Client Utility + + For more information about SixXS check http://www.sixxs.net/ + diff --git a/package/aiccu/Makefile b/package/aiccu/Makefile new file mode 100644 index 000000000..948f8eab2 --- /dev/null +++ b/package/aiccu/Makefile @@ -0,0 +1,36 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= aiccu +PKG_VERSION:= 20070115 +PKG_RELEASE:= 7 +PKG_MD5SUM:= c9bcc83644ed788e22a7c3f3d4021350 + +MASTER_SITES:= http://www.sixxs.net/archive/sixxs/aiccu/unix/ +DISTFILES:= $(PKG_NAME)_$(PKG_VERSION).tar.gz + +WRKDIST= ${WRKDIR}/$(PKG_NAME) + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,AICCU,aiccu,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) + +TCFLAGS+= -D_REENTRANT -D_GNU_SOURCE -DAICCU_CONSOLE \ + -D_LINUX -DHAS_IFHEAD -DAICCU_TYPE=\"linux\" +TLDFLAGS+= -lpthread -lresolv +BUILD_STYLE= auto +MAKE_FLAGS+= CC='${TARGET_CC}' CFLAGS='${TCFLAGS}' LDFLAGS='${TLDFLAGS}' + +do-install: + $(INSTALL_DIR) $(IDIR_AICCU)/usr/sbin + $(INSTALL_DIR) $(IDIR_AICCU)/etc/init.d + $(INSTALL_BIN) $(WRKBUILD)/unix-console/aiccu $(IDIR_AICCU)/usr/sbin/ + $(INSTALL_BIN) ./files/aiccu.init \ + $(IDIR_AICCU)/etc/init.d/aiccu + $(INSTALL_DATA) $(WRKBUILD)/doc/aiccu.conf $(IDIR_AICCU)/etc/aiccu.conf + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/aiccu/extra/common/dn_skipname.c b/package/aiccu/extra/common/dn_skipname.c new file mode 100644 index 000000000..f2219f335 --- /dev/null +++ b/package/aiccu/extra/common/dn_skipname.c @@ -0,0 +1,51 @@ +#include +#include + +/* Ripped from glibc 2.4 sources. */ + +/* + * ns_name_skip(ptrptr, eom) + * Advance *ptrptr to skip over the compressed name it points at. + * return: + * 0 on success, -1 (with errno set) on failure. + */ +int ns_name_skip(const u_char **ptrptr, const u_char *eom) +{ + const u_char *cp; + u_int n; + + cp = *ptrptr; + while (cp < eom && (n = *cp++) != 0) + { + /* Check for indirection. */ + switch (n & NS_CMPRSFLGS) { + case 0: /* normal case, n == len */ + cp += n; + continue; + case NS_CMPRSFLGS: /* indirection */ + cp++; + break; + default: /* illegal type */ + errno = EMSGSIZE; + return (-1); + } + break; + } + if (cp > eom) + { + errno = EMSGSIZE; + return (-1); + } + *ptrptr = cp; + return (0); +} + +int dn_skipname(const u_char *ptr, const u_char *eom) +{ + const u_char *saveptr = ptr; + + if(ns_name_skip(&ptr, eom) == -1) + return (-1); + return (ptr - saveptr); +} + diff --git a/package/aiccu/files/aiccu.init b/package/aiccu/files/aiccu.init new file mode 100644 index 000000000..e678664bf --- /dev/null +++ b/package/aiccu/files/aiccu.init @@ -0,0 +1,27 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${aiccu:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + aiccu start + ;; +stop) + aiccu stop + ;; + +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/aiccu/ipkg/aiccu.conffiles b/package/aiccu/ipkg/aiccu.conffiles new file mode 100644 index 000000000..79c42f998 --- /dev/null +++ b/package/aiccu/ipkg/aiccu.conffiles @@ -0,0 +1 @@ +/etc/aiccu.conf diff --git a/package/aiccu/ipkg/aiccu.control b/package/aiccu/ipkg/aiccu.control new file mode 100644 index 000000000..98bc6f1ba --- /dev/null +++ b/package/aiccu/ipkg/aiccu.control @@ -0,0 +1,5 @@ +Package: aiccu +Priority: optional +Section: net +Depends: kmod-ipv6, libpthread +Description: SixXS Automatic IPv6 Connectivity Client Utility diff --git a/package/aiccu/ipkg/aiccu.postinst b/package/aiccu/ipkg/aiccu.postinst new file mode 100644 index 000000000..e6d0f0d9a --- /dev/null +++ b/package/aiccu/ipkg/aiccu.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf aiccu aiccu NO diff --git a/package/aiccu/patches/patch-common_resolver_c b/package/aiccu/patches/patch-common_resolver_c new file mode 100644 index 000000000..b0ec0d99c --- /dev/null +++ b/package/aiccu/patches/patch-common_resolver_c @@ -0,0 +1,30 @@ +$Id$ +--- aiccu.orig/common/resolver.c Sun Jul 23 14:54:51 2006 ++++ aiccu/common/resolver.c Mon Jun 25 13:18:22 2007 +@@ -26,7 +26,7 @@ + + int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int type, const char *record)) + { +-#ifdef _LINUX ++#if defined(_LINUX) && !defined(__UCLIBC__) + struct __res_state res; + #endif + unsigned char answer[8192]; +@@ -38,7 +38,7 @@ int getrrs(const char *label, int rrtype + uint16_t type = 0, class = 0; + uint32_t ttl = 0; + +-#ifdef _LINUX ++#if defined(_LINUX) && !defined(__UCLIBC__) + memset(&res, 0, sizeof(res)); + res.options = RES_DEBUG; + res_ninit(&res); +@@ -47,7 +47,7 @@ int getrrs(const char *label, int rrtype + #endif + + memset(answer, 0, sizeof(answer)); +-#ifdef _LINUX ++#if defined(_LINUX) && !defined(__UCLIBC__) + ret = res_nquery(&res, label, C_IN, rrtype, answer, sizeof(answer)); + #else + ret = res_query(label, C_IN, rrtype, answer, sizeof(answer)); diff --git a/package/aiccu/patches/patch-unix-console_Makefile b/package/aiccu/patches/patch-unix-console_Makefile new file mode 100644 index 000000000..fe7f87f20 --- /dev/null +++ b/package/aiccu/patches/patch-unix-console_Makefile @@ -0,0 +1,27 @@ +$Id$ +--- aiccu.orig/unix-console/Makefile Mon Jan 15 11:04:04 2007 ++++ aiccu/unix-console/Makefile Mon Jun 25 13:19:42 2007 +@@ -10,9 +10,9 @@ + # $Date: 2007-01-15 11:04:27 $ + # **********************************************************/ + +-SRCS = main.c ../common/tun.c ../common/aiccu.c ../common/hash_md5.c ../common/hash_sha1.c ../common/common.c ../common/heartbeat.c ../common/tic.c ../common/ayiya.c ../common/aiccu_test.c ../common/resolver.c ++SRCS = main.c ../common/tun.c ../common/aiccu.c ../common/hash_md5.c ../common/hash_sha1.c ../common/common.c ../common/heartbeat.c ../common/tic.c ../common/ayiya.c ../common/aiccu_test.c ../common/resolver.c ../common/dn_skipname.c + INCS = ../common/tun.h ../common/aiccu.h ../common/hash_md5.h ../common/hash_sha1.h ../common/common.h ../common/heartbeat.h ../common/tic.h ../common/ayiya.h ../common/resolver.h +-OBJS = main.o ../common/tun.o ../common/aiccu.o ../common/hash_md5.o ../common/hash_sha1.o ../common/common.o ../common/heartbeat.o ../common/tic.o ../common/ayiya.o ../common/aiccu_test.o ../common/resolver.o ++OBJS = main.o ../common/tun.o ../common/aiccu.o ../common/hash_md5.o ../common/hash_sha1.o ../common/common.o ../common/heartbeat.o ../common/tic.o ../common/ayiya.o ../common/aiccu_test.o ../common/resolver.o ../common/dn_skipname.o + + # New features not fully implemented and thus disabled for now + #CFLAGS += -D NEWSTUFF_TSP -D NEWSTUFF_TEEPEE +@@ -145,11 +145,6 @@ all: aiccu + + aiccu: $(OBJS) ${SRCS} ${INCS} + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) +-ifeq ($(shell echo $(CFLAGS) | grep -c "DEBUG"),0) +-ifeq ($(shell echo "$(RPM_OPT_FLAGS)" | wc -c),1) +- strip $@ +-endif +-endif + + clean: + $(RM) -f $(OBJS) aiccu diff --git a/package/aircrack-ng/Config.in b/package/aircrack-ng/Config.in new file mode 100644 index 000000000..81c8425f3 --- /dev/null +++ b/package/aircrack-ng/Config.in @@ -0,0 +1,16 @@ +config ADK_PACKAGE_AIRCRACK_NG + prompt "aircrack-ng....................... A set of tools for auditing wireless networks" + tristate + default n + select ADK_PACKAGE_LIBPTHREAD + select ADK_PACKAGE_LIBPCAP + select ADK_PACKAGE_LIBOPENSSL + help + aircrack-ng is a set of tools for auditing wireless networks: + + * aircrack-ng: a program that cracks WEP and WPA (bruteforce) keys + * airdecap-ng: decrypts WEP or WPA encrypted capture files with known key + * airmon-ng: responsible for placing different cards in monitor mode + * aireplay-ng: responsible for packet injection + * airodump-ng: places all air traffic into .cap file and shows information on networks + http://www.aircrack-ng.org diff --git a/package/aircrack-ng/Makefile b/package/aircrack-ng/Makefile new file mode 100644 index 000000000..8245d5a52 --- /dev/null +++ b/package/aircrack-ng/Makefile @@ -0,0 +1,35 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= aircrack-ng +PKG_VERSION:= 1.0-rc3 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 37884de939af82eab60d3e7d165b40ad +MASTER_SITES:= http://download.aircrack-ng.org/ + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,AIRCRACK_NG,aircrack-ng,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) + +BUILD_STYLE= auto +INSTALL_STYLE= auto +XAKE_FLAGS+= CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -Wall" \ + CROSS="$(TARGET_CROSS)" OSNAME="Linux" \ + prefix="/usr" + +post-install: + $(INSTALL_DIR) $(IDIR_AIRCRACK_NG)/usr/bin + $(INSTALL_DIR) $(IDIR_AIRCRACK_NG)/usr/sbin + $(INSTALL_BIN) $(WRKINST)/usr/bin/aircrack-ng $(IDIR_AIRCRACK_NG)/usr/bin/ + $(INSTALL_BIN) $(WRKINST)/usr/bin/airdecap-ng $(IDIR_AIRCRACK_NG)/usr/bin/ + $(INSTALL_BIN) $(WRKINST)/usr/bin/packetforge-ng $(IDIR_AIRCRACK_NG)/usr/bin/ + $(INSTALL_BIN) $(WRKINST)/usr/sbin/aireplay-ng $(IDIR_AIRCRACK_NG)/usr/sbin/ + $(INSTALL_BIN) $(WRKINST)/usr/sbin/airodump-ng $(IDIR_AIRCRACK_NG)/usr/sbin/ + $(INSTALL_BIN) $(WRKINST)/usr/sbin/airtun-ng $(IDIR_AIRCRACK_NG)/usr/sbin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/aircrack-ng/ipkg/aircrack-ng.control b/package/aircrack-ng/ipkg/aircrack-ng.control new file mode 100644 index 000000000..4e0ed40e7 --- /dev/null +++ b/package/aircrack-ng/ipkg/aircrack-ng.control @@ -0,0 +1,5 @@ +Package: aircrack-ng +Priority: optional +Section: net +Depends: libpthread, libopenssl, libpcap +Description: A set of tools for auditing wireless networks diff --git a/package/aircrack-ng/patches/patch-src_airbase-ng_c b/package/aircrack-ng/patches/patch-src_airbase-ng_c new file mode 100644 index 000000000..87aa03985 --- /dev/null +++ b/package/aircrack-ng/patches/patch-src_airbase-ng_c @@ -0,0 +1,189 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- aircrack-ng-1.0-rc3.orig/src/airbase-ng.c 2009-03-26 22:01:02.000000000 +0100 ++++ aircrack-ng-1.0-rc3/src/airbase-ng.c 2009-05-01 15:54:30.000000000 +0200 +@@ -627,7 +627,7 @@ int addFrag(unsigned char* packet, unsig + if(rFragment == NULL) + return -1; + +- bzero(frame, 4096); ++ memset(frame, 0, 4096); + memcpy(frame, packet, len); + + z = ( ( frame[1] & 3 ) != 3 ) ? 24 : 30; +@@ -1683,7 +1683,7 @@ int intercept(uchar* packet, int length) + uchar K[128]; + int z=0; + +- bzero(buf, 4096); ++ memset(buf, 0, 4096); + + z = ( ( packet[1] & 3 ) != 3 ) ? 24 : 30; + +@@ -1784,7 +1784,7 @@ int packet_xmit(uchar* packet, int lengt + + if((opt.external & EXT_OUT)) + { +- bzero(buf, 4096); ++ memset(buf, 0, 4096); + memcpy(buf+14, h80211, length2); + //mark it as outgoing packet + buf[12] = 0xFF; +@@ -1823,7 +1823,7 @@ int packet_xmit_external(uchar* packet, + if(length < 40 || length > 3000) + return 1; + +- bzero(buf, 4096); ++ memset(buf, 0, 4096); + if(memcmp(packet, buf, 11) != 0) + { + // printf("wrong header...\n"); +@@ -2099,13 +2099,13 @@ int addCF(uchar* packet, int length) + if(opt.cf_count >= 100) + return 1; + +- bzero(clear, 4096); +- bzero(final, 4096); +- bzero(flip, 4096); +- bzero(frag1, 128); +- bzero(frag2, 128); +- bzero(frag3, 128); +- bzero(keystream, 128); ++ memset(clear, 0, 4096); ++ memset(final, 0, 4096); ++ memset(flip, 0, 4096); ++ memset(frag1, 0, 128); ++ memset(frag2, 0, 128); ++ memset(frag3, 0, 128); ++ memset(keystream, 0, 128); + + switch( packet[1] & 3 ) + { +@@ -2364,7 +2364,7 @@ int addarp(uchar* packet, int length) + if(opt.nb_arp >= opt.ringbuffer) + return -1; + +- bzero(flip, 4096); ++ memset(flip, 0, 4096); + + flip[49-z-4] ^= ((rand() % 255)+1); //flip random bits in last byte of sender MAC + flip[53-z-4] ^= ((rand() % 255)+1); //flip random bits in last byte of sender IP +@@ -2519,7 +2519,7 @@ int packet_recv(uchar* packet, int lengt + struct ST_info *st_prv = NULL; + + reasso = 0; fixed = 0; +- bzero(essid, 256); ++ memset(essid, 0, 256); + + pthread_mutex_lock( &mx_cap ); + if(opt.record_data) +@@ -2643,7 +2643,7 @@ int packet_recv(uchar* packet, int lengt + st_cur->ssid_length[i] = 0; + } + +- bzero(st_cur->essid, 256); ++ memset(st_cur->essid, 0, 256); + st_cur->essid_length = 0; + + st_cur->wpatype = 0; +@@ -2769,7 +2769,7 @@ int packet_recv(uchar* packet, int lengt + len += 8; + + //eapol +- bzero(h80211+len, 99); ++ memset(h80211+len, 0, 99); + h80211[len] = 0x01;//version + h80211[len+1] = 0x03;//type + h80211[len+2] = 0x00; +@@ -2818,7 +2818,7 @@ int packet_recv(uchar* packet, int lengt + h80211[len+7] = 0x00; + h80211[len+8] = 0x20; //keylen + +- bzero(h80211+len+9, 90); ++ memset(h80211+len+9, 0, 90); + memcpy(h80211+len+17, st_cur->wpa.anonce, 32); + + len+=99; +@@ -2944,7 +2944,7 @@ int packet_recv(uchar* packet, int lengt + if(length < 60) + { + trailer = 60 - length; +- bzero(h80211 + length, trailer); ++ memset(h80211 + length, 0, trailer); + length += trailer; + } + +@@ -2961,7 +2961,7 @@ int packet_recv(uchar* packet, int lengt + { + if( opt.promiscuous || !opt.f_essid || gotESSID((char*)tag, len) == 1) + { +- bzero(essid, 256); ++ memset(essid, 0, 256); + memcpy(essid, tag, len); + + /* store probes */ +@@ -3355,11 +3355,11 @@ skip_probe: + printf("\n"); + } + +- bzero(st_cur->essid, 256); ++ memset(st_cur->essid, 0, 256); + memcpy(st_cur->essid, essid, 255); + st_cur->essid_length = strlen(essid); + +- bzero(essid, 256); ++ memset(essid, 0, 256); + + /* either specified or determined */ + if( (opt.sendeapol && ( opt.wpa1type || opt.wpa2type ) ) || (st_cur->wpatype && st_cur->wpahash) ) +@@ -3391,7 +3391,7 @@ skip_probe: + len += 8; + + //eapol +- bzero(h80211+len, 99); ++ memset(h80211+len, 0, 99); + h80211[len] = 0x01;//version + h80211[len+1] = 0x03;//type + h80211[len+2] = 0x00; +@@ -3440,7 +3440,7 @@ skip_probe: + h80211[len+7] = 0x00; + h80211[len+8] = 0x20; //keylen + +- bzero(h80211+len+9, 90); ++ memset(h80211+len+9, 0, 90); + memcpy(h80211+len+17, st_cur->wpa.anonce, 32); + + len+=99; +@@ -3729,7 +3729,7 @@ int cfrag_fuzz(unsigned char *packet, in + else + smac = packet + 24; + +- bzero(overlay, 4096); ++ memset(overlay, 0, 4096); + + smac[4] ^= rnd[0]; + smac[5] ^= rnd[1]; +@@ -3902,19 +3902,19 @@ int main( int argc, char *argv[] ) + memset( &apc, 0, sizeof( struct AP_conf )); + + rESSID = (pESSID_t) malloc(sizeof(struct ESSID_list)); +- bzero(rESSID, sizeof(struct ESSID_list)); ++ memset(rESSID, 0, sizeof(struct ESSID_list)); + + rFragment = (pFrag_t) malloc(sizeof(struct Fragment_list)); +- bzero(rFragment, sizeof(struct Fragment_list)); ++ memset(rFragment, 0, sizeof(struct Fragment_list)); + + rClient = (pMAC_t) malloc(sizeof(struct MAC_list)); +- bzero(rClient, sizeof(struct MAC_list)); ++ memset(rClient, 0, sizeof(struct MAC_list)); + + rBSSID = (pMAC_t) malloc(sizeof(struct MAC_list)); +- bzero(rBSSID, sizeof(struct MAC_list)); ++ memset(rBSSID, 0, sizeof(struct MAC_list)); + + rCF = (pCF_t) malloc(sizeof(struct CF_packet)); +- bzero(rCF, sizeof(struct CF_packet)); ++ memset(rCF, 0, sizeof(struct CF_packet)); + + pthread_mutex_init( &mx_cf, NULL ); + pthread_mutex_init( &mx_cap, NULL ); diff --git a/package/aircrack-ng/patches/patch-src_aircrack-ng_c b/package/aircrack-ng/patches/patch-src_aircrack-ng_c new file mode 100644 index 000000000..a852fd762 --- /dev/null +++ b/package/aircrack-ng/patches/patch-src_aircrack-ng_c @@ -0,0 +1,41 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- aircrack-ng-1.0-rc3.orig/src/aircrack-ng.c 2009-03-26 22:01:02.000000000 +0100 ++++ aircrack-ng-1.0-rc3/src/aircrack-ng.c 2009-05-01 15:53:30.000000000 +0200 +@@ -245,7 +245,7 @@ void clean_exit(int ret) + int child_pid; + + char tmpbuf[128]; +- bzero(tmpbuf, 128); ++ memset(tmpbuf, 0, 128); + + if(ret && !opt.is_quiet) + { +@@ -738,7 +738,7 @@ void read_thread( void *arg ) + memset( &rb, 0, sizeof( rb ) ); + ap_cur = NULL; + +- bzero(&pfh, sizeof(struct pcap_file_header)); ++ memset(&pfh, 0, sizeof(struct pcap_file_header)); + + if( ( buffer = (uchar *) malloc( 65536 ) ) == NULL ) + { +@@ -1401,8 +1401,8 @@ void read_thread( void *arg ) + dlen -=6; + } + +- bzero(weight, sizeof(weight)); +- bzero(clear, sizeof(clear)); ++ memset(weight, 0, sizeof(weight)); ++ memset(clear, 0, sizeof(clear)); + + /* calculate keystream */ + k = known_clear(clear, &clearsize, weight, h80211, dlen); +@@ -4525,7 +4525,7 @@ int main( int argc, char *argv[] ) + + /* + all_ivs = malloc( (256*256*256) * sizeof(used_iv)); +- bzero(all_ivs, (256*256*256)*sizeof(used_iv)); ++ memset(all_ivs, 0, (256*256*256)*sizeof(used_iv)); + */ + + forceptw = 0; diff --git a/package/aircrack-ng/patches/patch-src_aircrack-ptw-lib_c b/package/aircrack-ng/patches/patch-src_aircrack-ptw-lib_c new file mode 100644 index 000000000..a6f2505af --- /dev/null +++ b/package/aircrack-ng/patches/patch-src_aircrack-ptw-lib_c @@ -0,0 +1,21 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- aircrack-ng-1.0-rc3.orig/src/aircrack-ptw-lib.c 2009-03-26 22:01:02.000000000 +0100 ++++ aircrack-ng-1.0-rc3/src/aircrack-ptw-lib.c 2009-05-01 15:52:04.000000000 +0200 +@@ -454,7 +454,7 @@ int PTW_computeKey(PTW_attackstate * sta + { + // Try the original klein attack first + for (i = 0; i < keylen; i++) { +- bzero(&table[i][0], sizeof(PTW_tableentry) * n); ++ memset(&table[i][0], 0, sizeof(PTW_tableentry) * n); + for (j = 0; j < n; j++) { + table[i][j].b = j; + } +@@ -602,7 +602,7 @@ PTW_attackstate * PTW_newattackstate() { + if (state == NULL) { + return NULL; + } +- bzero(state, sizeof(PTW_attackstate)); ++ memset(state, 0, sizeof(PTW_attackstate)); + for (i = 0; i < PTW_KEYHSBYTES; i++) { + for (k = 0; k < n; k++) { + state->table[i][k].b = k; diff --git a/package/aircrack-ng/patches/patch-src_aireplay-ng_c b/package/aircrack-ng/patches/patch-src_aireplay-ng_c new file mode 100644 index 000000000..66a92b0cc --- /dev/null +++ b/package/aircrack-ng/patches/patch-src_aireplay-ng_c @@ -0,0 +1,42 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- aircrack-ng-1.0-rc3.orig/src/aireplay-ng.c 2009-03-26 22:01:02.000000000 +0100 ++++ aircrack-ng-1.0-rc3/src/aireplay-ng.c 2009-05-01 15:52:04.000000000 +0200 +@@ -2908,7 +2908,7 @@ add_arp: + return( 1 ); + } + +- bzero(flip, 4096); ++ memset(flip, 0, 4096); + + // flip[49-24-4] ^= ((rand() % 255)+1); //flip random bits in last byte of sender MAC + // flip[53-24-4] ^= ((rand() % 255)+1); //flip random bits in last byte of sender IP +@@ -3086,13 +3086,13 @@ read_packets: + break; + } + +- bzero(clear, 4096); +- bzero(final, 4096); +- bzero(flip, 4096); +- bzero(frag1, 128); +- bzero(frag2, 128); +- bzero(frag3, 128); +- bzero(keystream, 128); ++ memset(clear, 0, 4096); ++ memset(final, 0, 4096); ++ memset(flip, 0, 4096); ++ memset(frag1, 0, 128); ++ memset(frag2, 0, 128); ++ memset(frag3, 0, 128); ++ memset(keystream, 0, 128); + + /* check if it's a potential ARP request */ + +@@ -3378,7 +3378,7 @@ int do_attack_chopchop( void ) + if( opt.r_smac_set == 1 ) + { + //handle picky APs (send one valid packet before all the invalid ones) +- bzero(packet, sizeof(packet)); ++ memset(packet, 0, sizeof(packet)); + + memcpy( packet, NULL_DATA, 24 ); + memcpy( packet + 4, "\xFF\xFF\xFF\xFF\xFF\xFF", 6 ); diff --git a/package/aircrack-ng/patches/patch-src_airodump-ng_c b/package/aircrack-ng/patches/patch-src_airodump-ng_c new file mode 100644 index 000000000..989f0274d --- /dev/null +++ b/package/aircrack-ng/patches/patch-src_airodump-ng_c @@ -0,0 +1,21 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- aircrack-ng-1.0-rc3.orig/src/airodump-ng.c 2009-03-26 22:01:02.000000000 +0100 ++++ aircrack-ng-1.0-rc3/src/airodump-ng.c 2009-05-01 15:52:04.000000000 +0200 +@@ -4325,7 +4325,7 @@ int detect_frequencies(struct wif *wi) + printf("Checking available frequencies, this could take few seconds.\n"); + + frequencies = (int*) malloc((max_freq_num+1) * sizeof(int)); //field for frequencies supported +- bzero(frequencies, (max_freq_num+1) * sizeof(int)); ++ memset(frequencies, 0, (max_freq_num+1) * sizeof(int)); + for(freq=start_freq; freq<=end_freq; freq+=5) + { + if(wi_set_freq(wi, freq) == 0) +@@ -4388,7 +4388,7 @@ int rearrange_frequencies() + pos = 0; + + freqs = malloc(sizeof(int) * (count + 1)); +- bzero(freqs, sizeof(int) * (count + 1)); ++ memset(freqs, 0, sizeof(int) * (count + 1)); + round_done = 0; + + while(left > 0) diff --git a/package/aircrack-ng/patches/patch-src_airtun-ng_c b/package/aircrack-ng/patches/patch-src_airtun-ng_c new file mode 100644 index 000000000..4723eaf1a --- /dev/null +++ b/package/aircrack-ng/patches/patch-src_airtun-ng_c @@ -0,0 +1,21 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- aircrack-ng-1.0-rc3.orig/src/airtun-ng.c 2009-03-26 22:01:02.000000000 +0100 ++++ aircrack-ng-1.0-rc3/src/airtun-ng.c 2009-05-01 15:52:04.000000000 +0200 +@@ -222,7 +222,7 @@ int addFrag(unsigned char* packet, unsig + if(rFragment == NULL) + return -1; + +- bzero(frame, 4096); ++ memset(frame, 0, 4096); + memcpy(frame, packet, len); + + z = ( ( frame[1] & 3 ) != 3 ) ? 24 : 30; +@@ -1029,7 +1029,7 @@ int main( int argc, char *argv[] ) + memset( &dev, 0, sizeof( dev ) ); + + rFragment = (pFrag_t) malloc(sizeof(struct Fragment_list)); +- bzero(rFragment, sizeof(struct Fragment_list)); ++ memset(rFragment, 0, sizeof(struct Fragment_list)); + + opt.r_nbpps = 100; + opt.tods = 0; diff --git a/package/aircrack-ng/patches/patch-src_osdep_linux_c b/package/aircrack-ng/patches/patch-src_osdep_linux_c new file mode 100644 index 000000000..691af6d9f --- /dev/null +++ b/package/aircrack-ng/patches/patch-src_osdep_linux_c @@ -0,0 +1,17 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- aircrack-ng-1.0-rc3.orig/src/osdep/linux.c 2009-03-26 22:01:02.000000000 +0100 ++++ aircrack-ng-1.0-rc3/src/osdep/linux.c 2009-05-01 15:52:04.000000000 +0200 +@@ -1639,11 +1639,11 @@ static int do_linux_open(struct wif *wi, + + //use name in buf as new iface and set original iface as main iface + dev->main_if = (char*) malloc(strlen(iface)+1); +- bzero(dev->main_if, strlen(iface)+1); ++ memset(dev->main_if, 0, strlen(iface)+1); + strncpy(dev->main_if, iface, strlen(iface)); + + iface=(char*)malloc(strlen(buf)+1); +- bzero(iface, strlen(buf)+1); ++ memset(iface, 0, strlen(buf)+1); + strncpy(iface, buf, strlen(buf)); + } + diff --git a/package/aircrack-ng/patches/patch-src_version_h b/package/aircrack-ng/patches/patch-src_version_h new file mode 100644 index 000000000..fca57354b --- /dev/null +++ b/package/aircrack-ng/patches/patch-src_version_h @@ -0,0 +1,11 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- aircrack-ng-1.0-rc3.orig/src/version.h 2009-03-26 22:01:02.000000000 +0100 ++++ aircrack-ng-1.0-rc3/src/version.h 2009-05-01 15:56:37.000000000 +0200 +@@ -1,6 +1,7 @@ + #define _MAJ 1 + #define _MIN 0 + #define _SUB_MIN 0 ++#define _REVISION 1 + #define _BETA 0 + #define _RC 3 + #define WEBSITE "http://www.aircrack-ng.org" diff --git a/package/alsa-lib/Config.in b/package/alsa-lib/Config.in new file mode 100644 index 000000000..6276ba489 --- /dev/null +++ b/package/alsa-lib/Config.in @@ -0,0 +1,7 @@ +config ADK_PACKAGE_ALSA_LIB + prompt "alsa-lib............................ alsa library" + tristate + default n + help + + http://www.alsa-project.org/ diff --git a/package/alsa-lib/Makefile b/package/alsa-lib/Makefile new file mode 100644 index 000000000..74c857a10 --- /dev/null +++ b/package/alsa-lib/Makefile @@ -0,0 +1,31 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= alsa-lib +PKG_VERSION:= 1.0.19 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 73db3666c211e5fb023bb77450cf430d +MASTER_SITES:= ftp://ftp.task.gda.pl/pub/linux/misc/alsa/lib/ \ + ftp://ftp.alsa-project.org/pub/lib/ +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,ALSA_LIB,alsa-lib,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS+= --disable-python +BUILD_STYLE= auto +INSTALL_STYLE= auto confprog + +post-install: + ${INSTALL_DIR} ${IDIR_ALSA_LIB}/usr/lib + ${INSTALL_DIR} ${IDIR_ALSA_LIB}/usr/share/alsa + ${CP} ${WRKINST}/usr/lib/libasound.so.* ${IDIR_ALSA_LIB}/usr/lib/ + ${CP} ${WRKINST}/usr/share/alsa/* ${IDIR_ALSA_LIB}/usr/share/alsa/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/alsa-lib/ipkg/alsa-lib.control b/package/alsa-lib/ipkg/alsa-lib.control new file mode 100644 index 000000000..480bb0dae --- /dev/null +++ b/package/alsa-lib/ipkg/alsa-lib.control @@ -0,0 +1,4 @@ +Package: alsa-lib +Priority: optional +Section: libs +Description: ALSA sound library diff --git a/package/alsa-lib/ipkg/alsa-lib.postinst b/package/alsa-lib/ipkg/alsa-lib.postinst new file mode 100644 index 000000000..848959231 --- /dev/null +++ b/package/alsa-lib/ipkg/alsa-lib.postinst @@ -0,0 +1,4 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +gid=$(get_next_gid) +add_group audio $gid diff --git a/package/alsa-utils/Config.in b/package/alsa-utils/Config.in new file mode 100644 index 000000000..64fc5ab94 --- /dev/null +++ b/package/alsa-utils/Config.in @@ -0,0 +1,7 @@ +config ADK_PACKAGE_ALSA_UTILS + prompt "alsa-utils........................ ALSA utilities / mixer" + tristate + default n + help + + http://www.alsa-project.org/ diff --git a/package/alsa-utils/Makefile b/package/alsa-utils/Makefile new file mode 100644 index 000000000..6359b9ea0 --- /dev/null +++ b/package/alsa-utils/Makefile @@ -0,0 +1,31 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= alsa-utils +PKG_VERSION:= 1.0.19 +PKG_RELEASE:= 2 +PKG_MD5SUM:= 5ff0379c707c1a29083233edc9ab4e06 +MASTER_SITES:= ftp://ftp.task.gda.pl/pub/linux/misc/alsa/utils/ \ + ftp://ftp.alsa-project.org/pub/utils/ +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,ALSA_UTILS,alsa-utils,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS+= --disable-alsamixer +BUILD_STYLE= auto +INSTALL_STYLE= auto + +post-install: + ${INSTALL_DIR} ${IDIR_ALSA_UTILS}/etc/init.d + ${INSTALL_BIN} ./files/amixer.init ${IDIR_ALSA_UTILS}/etc/init.d/amixer + ${INSTALL_DIR} ${IDIR_ALSA_UTILS}/usr/bin + ${CP} ${WRKINST}/usr/bin/amixer ${IDIR_ALSA_UTILS}/usr/bin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/alsa-utils/files/amixer.init b/package/alsa-utils/files/amixer.init new file mode 100644 index 000000000..5d5aa6e2b --- /dev/null +++ b/package/alsa-utils/files/amixer.init @@ -0,0 +1,30 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${amixer:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + amixer set Master on + amixer set PCM on + amixer set Master 75% + amixer set PCM 75% + ;; +stop) + amixer set Master off + amixer set PCM off + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/alsa-utils/ipkg/alsa-utils.control b/package/alsa-utils/ipkg/alsa-utils.control new file mode 100644 index 000000000..88e38c96c --- /dev/null +++ b/package/alsa-utils/ipkg/alsa-utils.control @@ -0,0 +1,4 @@ +Package: alsa-utils +Priority: optional +Section: libs +Description: ALSA utilities diff --git a/package/alsa-utils/ipkg/alsa-utils.postinst b/package/alsa-utils/ipkg/alsa-utils.postinst new file mode 100644 index 000000000..f18dbf62a --- /dev/null +++ b/package/alsa-utils/ipkg/alsa-utils.postinst @@ -0,0 +1,4 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf amixer + diff --git a/package/alsa-utils/patches/patch-alsactl_init_parse_c b/package/alsa-utils/patches/patch-alsactl_init_parse_c new file mode 100644 index 000000000..fca7eedd9 --- /dev/null +++ b/package/alsa-utils/patches/patch-alsactl_init_parse_c @@ -0,0 +1,21 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- alsa-utils-1.0.19.orig/alsactl/init_parse.c 2009-01-19 12:17:19.000000000 +0100 ++++ alsa-utils-1.0.19/alsactl/init_parse.c 2009-05-09 04:56:45.000000000 +0200 +@@ -381,7 +381,7 @@ static int set_ctl_value(struct space *s + snd_ctl_elem_value_set_integer(space->ctl_value, idx, val); + } else if (items > 2 && value[items-2] == 'd' && value[items-1] == 'B') { + val = strtol(value, NULL, 0) * 100; +- if ((pos2 = index(value, '.')) != NULL) { ++ if ((pos2 = strchr(value, '.')) != NULL) { + if (isdigit(*(pos2-1)) && isdigit(*(pos2-2))) { + if (val < 0) + val -= strtol(pos2 + 1, NULL, 0); +@@ -1253,7 +1253,7 @@ static char *new_root_dir(const char *fi + + res = strdup(filename); + if (res) { +- tmp = rindex(res, '/'); ++ tmp = strrchr(res, '/'); + if (tmp) + *tmp = '\0'; + } diff --git a/package/apr-util/Config.in b/package/apr-util/Config.in new file mode 100644 index 000000000..c691fe035 --- /dev/null +++ b/package/apr-util/Config.in @@ -0,0 +1,12 @@ +config ADK_PACKAGE_APR_UTIL + prompt "apr-util.......................... Apache Portable Runtime (utils)" + tristate + default n + select ADK_PACKAGE_LIBEXPAT + select ADK_PACKAGE_APR + help + Apache Portable Runtime + + http://apr.apache.org + + diff --git a/package/apr-util/Makefile b/package/apr-util/Makefile new file mode 100644 index 000000000..64c7c33a3 --- /dev/null +++ b/package/apr-util/Makefile @@ -0,0 +1,31 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= apr-util +PKG_VERSION:= 0.9.15 +PKG_RELEASE:= 1 +PKG_MD5SUM:= dc772ae295f49ddb8ee8e69a9716c53b +MASTER_SITES:= http://apache.mirror.clusters.cc/apr/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,APR_UTIL,$(PKG_NAME),${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE:= gnu +CONFIGURE_ARGS+= --without-berkeley-db +CONFIGURE_ARGS+= --with-apr=${STAGING_DIR}/usr +CONFIGURE_ARGS+= --with-expat=${STAGING_DIR}/usr +BUILD_STYLE:= auto +INSTALL_STYLE:= auto +XAKE_FLAGS+= apr_builddir=${STAGING_DIR}/usr/share/build \ + apr_builders=${STAGING_DIR}/usr/share/build + +post-install: + ${INSTALL_DIR} ${IDIR_APR_UTIL}/usr/lib + ${CP} ${WRKINST}/usr/lib/libaprutil-0.so* ${IDIR_APR_UTIL}/usr/lib/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/apr-util/ipkg/apr-util.control b/package/apr-util/ipkg/apr-util.control new file mode 100644 index 000000000..45af346d3 --- /dev/null +++ b/package/apr-util/ipkg/apr-util.control @@ -0,0 +1,5 @@ +Package: apr-util +Priority: optional +Section: lib +Description: Apache Portable Runtime +Depends: libexpat, apr diff --git a/package/apr-util/patches/patch-uri_Makefile_in b/package/apr-util/patches/patch-uri_Makefile_in new file mode 100644 index 000000000..670623ad0 --- /dev/null +++ b/package/apr-util/patches/patch-uri_Makefile_in @@ -0,0 +1,19 @@ +$Id$ +--- apr-util-0.9.13.orig/uri/Makefile.in 2004-11-25 00:45:40.000000000 +0100 ++++ apr-util-0.9.13/uri/Makefile.in 2007-02-07 12:55:37.000000000 +0100 +@@ -3,7 +3,7 @@ VPATH = @srcdir@ + INCLUDES = @APRUTIL_PRIV_INCLUDES@ @APR_INCLUDES@ @APRUTIL_INCLUDES@ -I. + + TARGETS = uri_delims.h apr_uri.lo +-CLEAN_TARGETS = gen_uri_delims uri_delims.h ++CLEAN_TARGETS = gen_uri_delims + + # bring in rules.mk for standard functionality + @INCLUDE_RULES@ +@@ -13,6 +13,3 @@ gen_uri_delims: $(gen_uri_delims_OBJECTS + $(LINK) $(EXTRA_LDFLAGS) $(gen_uri_delims_OBJECTS) $(EXTRA_LIBS) + + apr_uri.lo: uri_delims.h apr_uri.c +- +-uri_delims.h: gen_uri_delims +- ./gen_uri_delims > uri_delims.h diff --git a/package/apr-util/patches/uri_delim.patch b/package/apr-util/patches/uri_delim.patch new file mode 100644 index 000000000..04ca4e1d8 --- /dev/null +++ b/package/apr-util/patches/uri_delim.patch @@ -0,0 +1,21 @@ +diff -Nur apr-util-0.9.13/uri/uri_delims.h build_mipsel/w-apr-util-0.9.13-1/apr-util-0.9.13/uri/uri_delims.h +--- apr-util-0.9.13/uri/uri_delims.h 1970-01-01 01:00:00.000000000 +0100 ++++ build_mipsel/w-apr-util-0.9.13-1/apr-util-0.9.13/uri/uri_delims.h 2007-02-07 13:06:56.000000000 +0100 +@@ -0,0 +1,16 @@ ++/* this file is automatically generated by gen_uri_delims, do not edit */ ++static const unsigned char uri_delims[256] = { ++ T_NUL,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ++ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,T_HASH,0,0,0,0, ++ 0,0,0,0,0,0,0,T_SLASH,0,0,0,0,0,0,0,0,0,0,T_COLON,0, ++ 0,0,0,T_QUESTION,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ++ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ++ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ++ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ++ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ++ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ++ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ++ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ++ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ++ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ++}; + diff --git a/package/apr/Config.in b/package/apr/Config.in new file mode 100644 index 000000000..0cee1afbc --- /dev/null +++ b/package/apr/Config.in @@ -0,0 +1,16 @@ +config ADK_PACKAGE_APR + prompt "apr............................... Apache Portable Runtime" + tristate + default n + help + Apache Portable Runtime + + http://apr.apache.org + +config ADK_PACKAGE_APR_THREADING + prompt " Enable threading support" + bool + default n + depends ADK_PACKAGE_APR + help + Enable threading support in APR. diff --git a/package/apr/Makefile b/package/apr/Makefile new file mode 100644 index 000000000..7903f4cf8 --- /dev/null +++ b/package/apr/Makefile @@ -0,0 +1,54 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= apr +PKG_VERSION:= 0.9.17 +PKG_RELEASE:= 1 +PKG_MD5SUM:= ca1e22d98081a03a33c2a0b8684eb192 +MASTER_SITES:= http://gd.tuwien.ac.at/infosys/servers/http/apache/dist/${PKG_NAME}/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,APR,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE:= gnu +CONFIGURE_ENV+= ac_cv_func_setpgrp_void=no +CONFIGURE_ENV+= ac_cv_sizeof_size_t=4 +CONFIGURE_ENV+= ac_cv_sizeof_ssize_t=4 +CONFIGURE_ENV+= ac_cv_file__dev_zero=yes +CONFIGURE_ENV+= apr_cv_process_shared_works=no +CONFIGURE_ARGS+= --with-devrandom=/dev/urandom + +ifeq (${ADK_PACKAGE_APR_THREADING},y) +CONFIGURE_ARGS+= --enable-threads +else +CONFIGURE_ARGS+= --disable-threads +endif + +BUILD_STYLE:= auto +INSTALL_STYLE:= auto + +post-install: + ${INSTALL_DIR} ${IDIR_APR}/usr/lib + ${CP} ${WRKINST}/usr/lib/libapr-0.so* ${IDIR_APR}/usr/lib/ + + ${INSTALL_DIR} ${STAGING_DIR}/usr/share/build + ${CP} ${WRKINST}/usr/share/build/* ${STAGING_DIR}/usr/share/build/ + + # we need to patch paths to get apr-util compiling + printf '%s\n%s\n%s\n%s\n%s\nwq\n' \ + '/^installbuilddir="/s##&${STAGING_DIR}/#' \ + '/^libdir="/s##&${STAGING_DIR}/#' \ + '/^datadir="/s##&${STAGING_DIR}/#' \ + '/^includedir="/s##&${STAGING_DIR}/#' \ + '/^bindir="/s##&${STAGING_DIR}/#' | \ + ed -s ${WRKINST}/usr/bin/apr-config +ifeq (${ADK_PACKAGE_APR_THREADING},y) + echo 'Depends: libpthread' >> ${IDIR_APR}/CONTROL/control +endif + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/apr/ipkg/apr.control b/package/apr/ipkg/apr.control new file mode 100644 index 000000000..8ea0e5e73 --- /dev/null +++ b/package/apr/ipkg/apr.control @@ -0,0 +1,4 @@ +Package: apr +Priority: optional +Section: lib +Description: Apache Portable Runtime diff --git a/package/arpd/Config.in b/package/arpd/Config.in new file mode 100644 index 000000000..3f1068ca3 --- /dev/null +++ b/package/arpd/Config.in @@ -0,0 +1,11 @@ +config ADK_PACKAGE_ARPD + prompt "arpd.............................. A daemon to fake ARP replies" + tristate + default n + select ADK_PACKAGE_LIBPCAP + select ADK_PACKAGE_LIBDNET + select ADK_PACKAGE_LIBEVENT + help + Generates ARP responses for (locally unused) IP addresses + + http://www.honeyd.org/tools.php diff --git a/package/arpd/Makefile b/package/arpd/Makefile new file mode 100644 index 000000000..7ac0c03f7 --- /dev/null +++ b/package/arpd/Makefile @@ -0,0 +1,32 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= arpd +PKG_VERSION:= 0.2 +PKG_RELEASE:= 1 +PKG_MD5SUM:= e2911fa9de1b92ef50deda1489ae944d +MASTER_SITES:= http://niels.xtdnet.nl/honeyd/ +WRKDIST= ${WRKDIR}/${PKG_NAME} + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,ARPD,arpd,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS+= --with-libdnet=${STAGING_DIR}/usr \ + --with-libevent=${STAGING_DIR}/usr \ + --with-libpcap=${STAGING_DIR}/usr +BUILD_STYLE= auto +MAKE_FLAGS+= CCOPT="${TARGET_CFLAGS}" \ + INCLS="-I. -I${STAGING_DIR}/usr/include" \ + LIBS="-L${STAGING_DIR}/usr/lib -lpcap -ldnet -levent" + +post-install: + ${INSTALL_DIR} ${IDIR_ARPD}/usr/sbin + ${INSTALL_BIN} ${WRKBUILD}/arpd ${IDIR_ARPD}/usr/sbin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/arpd/ipkg/arpd.control b/package/arpd/ipkg/arpd.control new file mode 100644 index 000000000..249263e12 --- /dev/null +++ b/package/arpd/ipkg/arpd.control @@ -0,0 +1,5 @@ +Package: arpd +Priority: optional +Section: net +Depends: libpcap, libdnet, libevent +Description: Generates ARP responses for IP address ranges diff --git a/package/arpd/patches/patch-Makefile_in b/package/arpd/patches/patch-Makefile_in new file mode 100644 index 000000000..e8ea3031a --- /dev/null +++ b/package/arpd/patches/patch-Makefile_in @@ -0,0 +1,12 @@ +$Id$ +--- arpd.orig/Makefile.in 2003-02-09 19:31:27.000000000 +0100 ++++ arpd/Makefile.in 2007-01-22 21:28:27.000000000 +0100 +@@ -154,7 +154,7 @@ $(srcdir)/config.h.in: $(srcdir)/stamp-h + $(MAKE) $(srcdir)/stamp-h.in; \ + else :; fi + $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h +- cd $(top_srcdir) && $(AUTOHEADER) ++ #cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null + + mostlyclean-hdr: diff --git a/package/arpd/patches/patch-arpd_c b/package/arpd/patches/patch-arpd_c new file mode 100644 index 000000000..5ac57ebeb --- /dev/null +++ b/package/arpd/patches/patch-arpd_c @@ -0,0 +1,116 @@ +$Id$ +--- arpd.orig/arpd.c 2003-02-09 05:20:40.000000000 +0100 ++++ arpd/arpd.c 2007-01-21 00:39:05.000000000 +0100 +@@ -70,7 +70,7 @@ static int arpd_sig; + static void + usage(void) + { +- fprintf(stderr, "Usage: arpd [-d] [-i interface] [net]\n"); ++ fprintf(stderr, "Usage: arpd [-d] [-i interface] [-a 'pcap_expr'] [{host|net|range} ...]\n"); + exit(1); + } + +@@ -182,7 +182,7 @@ arpd_expandips(int naddresses, char **ad + } + + static void +-arpd_init(char *dev, int naddresses, char **addresses) ++arpd_init(char *dev, char *and_pcap_exp, int naddresses, char **addresses) + { + struct bpf_program fcode; + char filter[1024], ebuf[PCAP_ERRBUF_SIZE], *dst; +@@ -214,9 +214,13 @@ arpd_init(char *dev, int naddresses, cha + errx(1, "bad interface configuration: not IP or Ethernet"); + arpd_ifent.intf_addr.addr_bits = IP_ADDR_BITS; + +- snprintf(filter, sizeof(filter), "arp %s%s%s and not ether src %s", ++ snprintf(filter, sizeof(filter), "arp %s%s%s and not ether src %s%s%s%s", + dst ? "and (" : "", dst ? dst : "", dst ? ")" : "", +- addr_ntoa(&arpd_ifent.intf_link_addr)); ++ addr_ntoa(&arpd_ifent.intf_link_addr), ++ and_pcap_exp ? " and (" : "", ++ and_pcap_exp ? and_pcap_exp : "", ++ and_pcap_exp ? ")" : "" ++ ); + + if ((arpd_pcap = pcap_open_live(dev, 128, 0, 500, ebuf)) == NULL) + errx(1, "pcap_open_live: %s", ebuf); +@@ -265,7 +269,7 @@ arpd_send(eth_t *eth, int op, + spa->addr_ip, tha->addr_eth, tpa->addr_ip); + + if (op == ARP_OP_REQUEST) { +- syslog(LOG_DEBUG, __FUNCTION__ ": who-has %s tell %s", ++ syslog(LOG_DEBUG, "%s: who-has %s tell %s", __FUNCTION__, + addr_ntoa(tpa), addr_ntoa(spa)); + } else if (op == ARP_OP_REPLY) { + syslog(LOG_INFO, "arp reply %s is-at %s", +@@ -282,7 +286,7 @@ arpd_lookup(struct addr *addr) + int error; + + if (addr_cmp(addr, &arpd_ifent.intf_addr) == 0) { +- syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s", ++ syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__, + addr_ntoa(addr), addr_ntoa(&arpd_ifent.intf_link_addr)); + return (0); + } +@@ -291,10 +295,10 @@ arpd_lookup(struct addr *addr) + error = arp_get(arpd_arp, &arpent); + + if (error == -1) { +- syslog(LOG_DEBUG, __FUNCTION__ ": no entry for %s", ++ syslog(LOG_DEBUG, "%s: no entry for %s", __FUNCTION__, + addr_ntoa(addr)); + } else { +- syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s", ++ syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__, + addr_ntoa(addr), addr_ntoa(&arpent.arp_ha)); + } + return (error); +@@ -423,7 +427,7 @@ arpd_recv_cb(u_char *u, const struct pca + if ((req = SPLAY_FIND(tree, &arpd_reqs, &tmp)) != NULL) { + addr_pack(&src.arp_ha, ADDR_TYPE_ETH, ETH_ADDR_BITS, + ethip->ar_sha, ETH_ADDR_LEN); +- syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s", ++ syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__, + addr_ntoa(&req->pa), addr_ntoa(&src.arp_ha)); + + /* This address is claimed */ +@@ -465,14 +469,14 @@ main(int argc, char *argv[]) + { + struct event recv_ev; + extern int (*event_sigcb)(void); +- char *dev; ++ char *dev, *and_pcap_exp; + int c, debug; + FILE *fp; + + dev = NULL; + debug = 0; + +- while ((c = getopt(argc, argv, "di:h?")) != -1) { ++ while ((c = getopt(argc, argv, "a:di:h?")) != -1) { + switch (c) { + case 'd': + debug = 1; +@@ -480,6 +484,9 @@ main(int argc, char *argv[]) + case 'i': + dev = optarg; + break; ++ case 'a': ++ and_pcap_exp = optarg; ++ break; + default: + usage(); + break; +@@ -489,9 +496,9 @@ main(int argc, char *argv[]) + argv += optind; + + if (argc == 0) +- arpd_init(dev, 0, NULL); ++ arpd_init(dev, and_pcap_exp, 0, NULL); + else +- arpd_init(dev, argc, argv); ++ arpd_init(dev, and_pcap_exp, argc, argv); + + if ((fp = fopen(PIDFILE, "w")) == NULL) + err(1, "fopen"); diff --git a/package/arpd/patches/patch-configure b/package/arpd/patches/patch-configure new file mode 100644 index 000000000..8e2dd6e82 --- /dev/null +++ b/package/arpd/patches/patch-configure @@ -0,0 +1,28 @@ +$Id$ +--- arpd.orig/configure 2003-02-09 19:31:28.000000000 +0100 ++++ arpd/configure 2007-01-21 00:51:54.000000000 +0100 +@@ -2205,12 +2205,12 @@ echo "${ECHO_T}no" >&6 + *) + echo "$as_me:2206: result: $withval" >&5 + echo "${ECHO_T}$withval" >&6 +- if test -f $withval/include/event.h -a -f $withval/lib/libevent.a; then ++ if test -f $withval/include/event.h; then + owd=`pwd` + if cd $withval; then withval=`pwd`; cd $owd; fi + EVENTINC="-I$withval/include" + EVENTLIB="-L$withval/lib -levent" +- elif test -f $withval/event.h -a -f $withval/libevent.a; then ++ elif test -f $withval/event.h; then + owd=`pwd` + if cd $withval; then withval=`pwd`; cd $owd; fi + EVENTINC="-I$withval" +@@ -2258,8 +2258,7 @@ echo "${ECHO_T}$withval" >&6 + if cd $withval; then withval=`pwd`; cd $owd; fi + PCAPINC="-I$withval -I$withval/bpf" + PCAPLIB="-L$withval -lpcap" +- elif test -f $withval/include/pcap.h -a \ +- -f $withval/include/net/bpf.h; then ++ elif test -f $withval/include/pcap.h; then + owd=`pwd` + if cd $withval; then withval=`pwd`; cd $owd; fi + PCAPINC="-I$withval/include" diff --git a/package/arpwatch/Config.in b/package/arpwatch/Config.in new file mode 100644 index 000000000..96cd0b3e4 --- /dev/null +++ b/package/arpwatch/Config.in @@ -0,0 +1,7 @@ +config ADK_PACKAGE_ARPWATCH + prompt "arpwatch.......................... Ethernet station activity monitor" + tristate + default n + help + Ethernet monitor program for keeping track of ethernet/ip address pairings + diff --git a/package/arpwatch/Makefile b/package/arpwatch/Makefile new file mode 100644 index 000000000..a32974cbc --- /dev/null +++ b/package/arpwatch/Makefile @@ -0,0 +1,32 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= arpwatch +PKG_VERSION:= 2.1a15 +PKG_RELEASE:= 1 +PKG_MD5SUM:= cebfeb99c4a7c2a6cee2564770415fe7 +MASTER_SITES:= ftp://ftp.ee.lbl.gov/ + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,ARPWATCH,arpwatch,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) + +CONFIGURE_STYLE= gnu +BUILD_STYLE= auto +MAKE_FLAGS+= ARPDIR=/etc/arpwatch \ + CCOPT="$(TARGET_CFLAGS)" \ + INCLS="-I. -I$(STAGING_DIR)/usr/include" \ + LIBS="-L$(STAGING_DIR)/usr/lib -lpcap" + +do-install: + $(INSTALL_DIR) $(IDIR_ARPWATCH)/usr/sbin + $(INSTALL_DIR) $(IDIR_ARPWATCH)/etc/arpwatch + $(INSTALL_BIN) $(WRKBUILD)/arpwatch $(IDIR_ARPWATCH)/usr/sbin/ + $(INSTALL_BIN) $(WRKBUILD)/arpsnmp $(IDIR_ARPWATCH)/usr/sbin/ + $(INSTALL_DATA) $(WRKBUILD)/arp.dat $(IDIR_ARPWATCH)/etc/arpwatch/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/arpwatch/ipkg/arpwatch.conffiles b/package/arpwatch/ipkg/arpwatch.conffiles new file mode 100644 index 000000000..9b9d8b3f6 --- /dev/null +++ b/package/arpwatch/ipkg/arpwatch.conffiles @@ -0,0 +1 @@ +/etc/arpwatch/arp.dat diff --git a/package/arpwatch/ipkg/arpwatch.control b/package/arpwatch/ipkg/arpwatch.control new file mode 100644 index 000000000..a72088153 --- /dev/null +++ b/package/arpwatch/ipkg/arpwatch.control @@ -0,0 +1,5 @@ +Package: arpwatch +Priority: optional +Section: net +Description: Ethernet monitor program for keeping track of ethernet/ip address pairings +Depends: libpcap diff --git a/package/asterisk/Config.in b/package/asterisk/Config.in new file mode 100644 index 000000000..70c88064f --- /dev/null +++ b/package/asterisk/Config.in @@ -0,0 +1,96 @@ +config ADK_PACKAGE_ASTERISK + bool "asterisk................... Telephony server" + select ADK_PACKAGE_LIBCURL + select ADK_PACKAGE_LIBNCURSES + select ADK_PACKAGE_LIBPTHREAD + default n + +menu "asterisk-modules.................. Additional modules for Asterisk" +depends on ADK_PACKAGE_ASTERISK + +config ADK_PACKAGE_ASTERISK_CHAN_MGCP + prompt "asterisk-chan-mgcp.............. Media Gateway Control Protocol implementation" + tristate + default n + depends ADK_PACKAGE_ASTERISK + help + Media Gateway Control Protocol implementation for Asterisk + +config ADK_PACKAGE_ASTERISK_CHAN_SKINNY + prompt "asterisk-chan-skinny............ Skinny Client Control Protocol implementation" + tristate + default n + depends ADK_PACKAGE_ASTERISK + help + Skinny Client Control Protocol implementation for Asterisk + +config ADK_PACKAGE_ASTERISK_CHAN_IAX2 + prompt "asterisk-chan-iax2.............. Support for the Inter Asterisk Protocol" + tristate + default n + depends ADK_PACKAGE_ASTERISK + help + IAX2 allows trunking communication channels together. + + Contains: + * chan_iax2.so + +config ADK_PACKAGE_ASTERISK_CODEC_SPEEX + prompt "asterisk-codec-speex............ Speex/PCM16 Codec Translator" + tristate + default n + depends ADK_PACKAGE_ASTERISK + select ADK_PACKAGE_LIBSPEEX + help + The Speex speech compression codec for Asterisk + +config ADK_PACKAGE_ASTERISK_CODEC_GSM + prompt "asterisk-codec-gsm.............. GSM Codec" + tristate + default n + depends ADK_PACKAGE_ASTERISK + help + The GSM codec for Asterisk + +config ADK_PACKAGE_ASTERISK_PBX_DUNDI + prompt "asterisk-pbx-dundi.............. Distributed Universal Number Discovery (DUNDi) support" + tristate + default n + depends ADK_PACKAGE_ASTERISK + help + Distributed Universal Number Discovery (DUNDi) support for Asterisk + +config ADK_PACKAGE_ASTERISK_RES_AGI + prompt "asterisk-res-agi................ Asterisk Gateway Interface module" + tristate + default n + depends ADK_PACKAGE_ASTERISK + help + Asterisk Gateway Interface module + +config ADK_PACKAGE_ASTERISK_PGSQL + prompt "asterisk-pgsql.................. PostgreSQL modules" + tristate + default n + depends ADK_PACKAGE_ASTERISK + select ADK_PACKAGE_LIBPQ + help + PostgreSQL modules for Asterisk + +config ADK_PACKAGE_ASTERISK_SOUNDS + prompt "asterisk-sounds................. Sound files" + tristate + default n + depends ADK_PACKAGE_ASTERISK + help + Sound files for Asterisk + +config ADK_PACKAGE_ASTERISK_VOICEMAIL + prompt "asterisk-voicemail.............. Voicemail support" + tristate + default n + depends ADK_PACKAGE_ASTERISK + help + Voicemail related modules for Asterisk + +endmenu diff --git a/package/asterisk/Makefile b/package/asterisk/Makefile new file mode 100644 index 000000000..87e187380 --- /dev/null +++ b/package/asterisk/Makefile @@ -0,0 +1,237 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= asterisk +PKG_VERSION:= 1.4.24.1 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 2b74744350f420b3a94d5323c489426f +MASTER_SITES:= http://downloads.digium.com/pub/telephony/asterisk/releases/ + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,ASTERISK,asterisk,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,ASTERISK_PGSQL,asterisk-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,ASTERISK_VOICEMAIL,asterisk-voicemail,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,ASTERISK_SOUNDS,asterisk-sounds,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,ASTERISK_CHAN_MGCP,asterisk-chan-mgcp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,ASTERISK_CHAN_SKINNY,asterisk-chan-skinny,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,ASTERISK_CHAN_IAX2,asterisk-chan-iax2,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,ASTERISK_CODEC_SPEEX,asterisk-codec-speex,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,ASTERISK_CODEC_GSM,asterisk-codec-gsm,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,ASTERISK_PBX_DUNDI,asterisk-pbx-dundi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,ASTERISK_RES_AGI,asterisk-res-agi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) + +SUB_INSTALLS-y:= +SUB_INSTALLS-m:= +SUB_INSTALLS-${ADK_PACKAGE_ASTERISK_PGSQL}+= asterisk-pgsql-install +SUB_INSTALLS-${ADK_PACKAGE_ASTERISK_VOICEMAIL}+= asterisk-voicemail-install +SUB_INSTALLS-${ADK_PACKAGE_ASTERISK_SOUNDS}+= asterisk-sounds-install +SUB_INSTALLS-${ADK_PACKAGE_ASTERISK_CHAN_MGCP}+= asterisk-chan-mgcp-install +SUB_INSTALLS-${ADK_PACKAGE_ASTERISK_CHAN_SKINNY}+= asterisk-chan-skinny-install +SUB_INSTALLS-${ADK_PACKAGE_ASTERISK_CHAN_IAX2}+= asterisk-chan-iax2-install +SUB_INSTALLS-${ADK_PACKAGE_ASTERISK_CODEC_SPEEX}+= asterisk-codec-speex-install +SUB_INSTALLS-${ADK_PACKAGE_ASTERISK_CODEC_GSM}+= asterisk-codec-gsm-install +SUB_INSTALLS-${ADK_PACKAGE_ASTERISK_PBX_DUNDI}+= asterisk-pbx-dundi-install +SUB_INSTALLS-${ADK_PACKAGE_ASTERISK_RES_AGI}+= asterisk-res-agi-install + +CONFIGURE_ARGS= --with-z=${STAGING_DIR}/usr \ + --with-ncurses=${STAGING_DIR}/usr \ + --with-ssl=${STAGING_DIR}/usr \ + --without-zaptel \ + --without-tonezone \ + --without-asound \ + --without-curses \ + --without-gnutls \ + --without-h323 \ + --without-iksemel \ + --without-imap \ + --without-kde \ + --without-nbs \ + --without-netsnmp \ + --without-newt \ + --without-odbc \ + --without-osptk \ + --without-oss \ + --without-pri \ + --without-pwlib \ + --without-qt \ + --without-tds \ + --without-termcap \ + --without-tinfo \ + --without-vpb +ifneq (${ADK_PACKAGE_ASTERISK_CODEC_GSM},) +CONFIGURE_ARGS+= --with-gsm=internal +else +CONFIGURE_ARGS+= --without-gsm +endif +ifneq (${ADK_PACKAGE_ASTERISK_CODEC_SPEEX},) +CONFIGURE_ARGS+= --with-speex=${STAGING_DIR}/usr +EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/speex +endif +ifneq (${ADK_PACKAGE_ASTERISK_FORMAT_VORBIS},) +CONFIGURE_ARGS+= --with-ogg=${STAGING_DIR}/usr \ + --with-vorbis=${STAGING_DIR}/usr +TLDFLAGS+= -logg +endif +ifneq (${ADK_PACKAGE_ASTERISK_RADIUS},) +CONFIGURE_ARGS+= --with-radius=${STAGING_DIR}/usr +endif +ifneq (${ADK_PACKAGE_ASTERISK_GNUTLS},) +CONFIGURE_ARGS+= --with-gnutls=${STAGING_DIR}/usr +endif +ifneq (${ADK_PACKAGE_ASTERISK_CURL},) +CONFIGURE_ARGS+= --with-curl=${STAGING_DIR}/usr +else +CONFIGURE_ARGS+= --without-curl +endif +ifneq (${ADK_PACKAGE_ASTERISK_PGSQL},) +CONFIGURE_ARGS+= --with-postgres=${STAGING_DIR}/usr +else +CONFIGURE_ARGS+= --without-postgres +endif +ifneq (${ADK_PACKAGE_LIBPOPT},) +CONFIGURE_ARGS+= --with-popt=${STAGING_DIR}/usr +else +CONFIGURE_ARGS+= --without-popt +endif +CONFIGURE_ARGS+= --without-misdn \ + --without-isdnnet \ + --without-suppserv + +CONFIGURE_STYLE:= gnu +CONFIGURE_ENV+= STRIP=${STRIP} +BUILD_STYLE:= auto +MAKE_ENV= ASTCFLAGS="${TCPPFLAGS} ${TCFLAGS}" \ + ASTLDFLAGS="${TLDFLAGS}" +MAKE_FLAGS+= DESTDIR="$(WRKINST)" \ + OPTIMIZE="${TARGET_OPTIMIZATION}" \ + CXX="${TARGET_CC}" \ + STRIP="${TARGET_CROSS}strip" \ + NOISY_BUILD=1 +ALL_TARGET:= all install samples + +pre-configure: + rm ${WRKBUILD}/apps/app_followme.c + cd "$(WRKBUILD)/menuselect"; ./configure + +post-build: + cd ${WRKBUILD}/sounds ; \ + tar xzf asterisk-core-sounds-en-gsm-1.4.14.tar.gz ; \ + rm asterisk-core-sounds-en-gsm-1.4.9.tar.gz ; \ + tar xzf asterisk-moh-freeplay-wav.tar.gz ; \ + rm asterisk-moh-freeplay-wav.tar.gz + @echo + @echo "---------------> have to install ${SUB_INSTALLS-m} ${SUB_INSTALLS-y} <-------------------------" + @echo + +do-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y} + $(CP) $(WRKINST)/* $(IDIR_ASTERISK) + rm -rf $(IDIR_ASTERISK)/usr/sbin/astgenkey + rm -rf $(IDIR_ASTERISK)/usr/bin + rm -rf $(IDIR_ASTERISK)/usr/share + rm -rf $(IDIR_ASTERISK)/usr/include + rm -rf $(IDIR_ASTERISK)/var + (cd $(IDIR_ASTERISK)/usr/lib/asterisk; \ + rm -rf agi-bin; \ + rm -rf images; \ + rm -rf keys/*; \ + rm -rf mohmp3/*.mp3; \ + rm -rf sounds/*; \ + cd modules; \ + rm -rf *adsi* *festival* *modem* *meetme* *oss* *phone* *intercom* \ + *mp3* *nbscat* *mysql* *postgres* *pgsql* *voicemail* *speex* \ + *zapateller* *jpeg*; \ + rm -f chan_bluetooth.so ; \ + rm -f chan_h323.so ; \ + rm -f chan_mgcp.so ; \ + rm -f chan_skinny.so ; \ + rm -f {codec,format}_ilbc.so ; \ + rm -f codec_gsm.so ; \ + rm -f codec_lpc10.so ; \ + rm -f pbx_dundi.so ; \ + rm -f res_agi.so ; \ + ) + (cd $(IDIR_ASTERISK)/etc/asterisk; \ + rm -f *odbc* *mysql* *postgres* *pgsql* *voicemail* *adsi* *oss* *alsa* \ + *festival* *modem* *meetme* *phone* *tds* *vofr* *rpt* *vpb* \ + *zapata*; \ + rm -f bluetooth.conf ; \ + rm -f mgcp.conf ; \ + rm -f skinny.conf ; \ + rm -f dundi.conf ; \ + ) + ${INSTALL_DATA} ./files/modules.conf $(IDIR_ASTERISK)/etc/asterisk/ + $(SED) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(WRKINST)/etc/asterisk/musiconhold.conf + ${INSTALL_DIR} $(IDIR_ASTERISK)/etc/init.d + ${INSTALL_BIN} ./files/asterisk.init $(IDIR_ASTERISK)/etc/init.d/asterisk + +asterisk-pgsql-install: + ${INSTALL_DIR} $(IDIR_ASTERISK_PGSQL)/etc/asterisk + ${INSTALL_DATA} $(WRKBUILD)/configs/cdr_pgsql.conf.sample $(IDIR_ASTERISK_PGSQL)/etc/asterisk/cdr_pgsql.conf + ${INSTALL_DIR} $(IDIR_ASTERISK_PGSQL)/usr/lib/asterisk/modules + ${INSTALL_BIN} $(WRKBUILD)/cdr/cdr_pgsql.so $(IDIR_ASTERISK_PGSQL)/usr/lib/asterisk/modules/ + +asterisk-sounds-install: + ${INSTALL_DIR} $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds + $(CP) $(WRKBUILD)/sounds/* $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds/ + rm -f $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds/*.mp3 + rm -f $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds/vm-* + +asterisk-voicemail-install: + ${INSTALL_DIR} $(IDIR_ASTERISK_VOICEMAIL)/etc/asterisk + ${INSTALL_DIR} $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/modules + ${INSTALL_DATA} $(WRKBUILD)/configs/voicemail.conf.sample $(IDIR_ASTERISK_VOICEMAIL)/etc/asterisk/voicemail.conf + ${CP} $(WRKBUILD)/apps/*voicemail.so $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/modules/ + ${INSTALL_BIN} $(WRKBUILD)/res/res_adsi.so $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/modules/ + install -d -m0755 $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/sounds + $(CP) $(WRKBUILD)/sounds/vm-*.gsm $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/sounds/ + +asterisk-chan-mgcp-install: + ${INSTALL_DIR} $(IDIR_ASTERISK_CHAN_MGCP)/etc/asterisk + ${INSTALL_DATA} $(WRKBUILD)/configs/mgcp.conf.sample $(IDIR_ASTERISK_CHAN_MGCP)/etc/asterisk/mgcp.conf + ${INSTALL_DIR} $(IDIR_ASTERISK_CHAN_MGCP)/usr/lib/asterisk/modules + ${INSTALL_BIN} $(WRKBUILD)/channels/chan_mgcp.so $(IDIR_ASTERISK_CHAN_MGCP)/usr/lib/asterisk/modules/ + +asterisk-chan-skinny-install: + ${INSTALL_DIR} $(IDIR_ASTERISK_CHAN_SKINNY)/etc/asterisk + ${INSTALL_DATA} $(WRKBUILD)/configs/skinny.conf.sample $(IDIR_ASTERISK_CHAN_SKINNY)/etc/asterisk/skinny.conf + ${INSTALL_DIR} $(IDIR_ASTERISK_CHAN_SKINNY)/usr/lib/asterisk/modules + ${INSTALL_BIN} $(WRKBUILD)/channels/chan_skinny.so $(IDIR_ASTERISK_CHAN_SKINNY)/usr/lib/asterisk/modules/ + +asterisk-chan-iax2-install: + ${INSTALL_DIR} $(IDIR_ASTERISK_CHAN_IAX2)/etc/asterisk + ${INSTALL_DIR} $(IDIR_ASTERISK_CHAN_IAX2)/usr/lib/asterisk/modules + ${INSTALL_DATA} $(WRKBUILD)/configs/iax.conf.sample $(IDIR_ASTERISK_CHAN_IAX2)/etc/asterisk/iax.conf + ${INSTALL_DATA} $(WRKBUILD)/configs/iaxprov.conf.sample $(IDIR_ASTERISK_CHAN_IAX2)/etc/asterisk/iaxprov.conf + ${INSTALL_BIN} $(WRKBUILD)/channels/chan_iax2.so $(IDIR_ASTERISK_CHAN_IAX2)/usr/lib/asterisk/modules/ + +asterisk-codec-speex-install: + ${INSTALL_DIR} $(IDIR_ASTERISK_CODEC_SPEEX)/usr/lib/asterisk/modules + install -m0755 $(WRKBUILD)/codecs/codec_speex.so $(IDIR_ASTERISK_CODEC_SPEEX)/usr/lib/asterisk/modules/ + +asterisk-codec-gsm-install: + ${INSTALL_DIR} $(IDIR_ASTERISK_CODEC_GSM)/usr/lib/asterisk/modules/ + ${INSTALL_BIN} $(WRKBUILD)/codecs/codec_gsm.so $(IDIR_ASTERISK_CODEC_GSM)/usr/lib/asterisk/modules/ + +asterisk-pbx-dundi-install: + ${INSTALL_DIR} $(IDIR_ASTERISK_PBX_DUNDI)/etc/asterisk + ${INSTALL_DATA} $(WRKBUILD)/configs/dundi.conf.sample $(IDIR_ASTERISK_PBX_DUNDI)/etc/asterisk/dundi.conf + ${INSTALL_DIR} $(IDIR_ASTERISK_PBX_DUNDI)/usr/lib/asterisk/modules + ${INSTALL_BIN} $(WRKBUILD)/pbx/pbx_dundi.so $(IDIR_ASTERISK_PBX_DUNDI)/usr/lib/asterisk/modules/ + +asterisk-res-agi-install: + ${INSTALL_DIR} $(IDIR_ASTERISK_RES_AGI)/usr/lib/asterisk/agi-bin + ${INSTALL_DIR} $(IDIR_ASTERISK_RES_AGI)/usr/lib/asterisk/modules + ${INSTALL_BIN} $(WRKBUILD)/res/res_agi.so $(IDIR_ASTERISK_RES_AGI)/usr/lib/asterisk/modules/ + +asterisk-meetme-install: + ${INSTALL_DIR} ${IDIR_ASTERISK_MEETME}/etc/asterisk/ + ${INSTALL_DIR} ${IDIR_ASTERISK_MEETME}/usr/lib/asterisk/modules + ${INSTALL_DATA} ${WRKBUILD}/configs/meetme.conf.sample ${IDIR_ASTERISK_MEETME}/etc/asterisk/meetme.conf + ${INSTALL_BIN} ${WRKBUILD}/apps/app_meetme.so ${IDIR_ASTERISK_MEETME}/usr/lib/asterisk/modules + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/asterisk/files/asterisk.init b/package/asterisk/files/asterisk.init new file mode 100644 index 000000000..fcbb52612 --- /dev/null +++ b/package/asterisk/files/asterisk.init @@ -0,0 +1,29 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${asterisk:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + [ -d /var/run ] || mkdir -p /var/run + [ -d /var/log/asterisk ] || mkdir -p /var/log/asterisk + [ -d /var/spool/asterisk ] || mkdir -p /var/spool/asterisk + /usr/sbin/asterisk + ;; +stop) + [ -f /var/run/asterisk.pid ] && kill $(cat /var/run/asterisk.pid) >/dev/null 2>&1 + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/asterisk/files/modules.conf b/package/asterisk/files/modules.conf new file mode 100644 index 000000000..1d6f35400 --- /dev/null +++ b/package/asterisk/files/modules.conf @@ -0,0 +1,138 @@ +; +; Asterisk configuration file +; +; Module Loader configuration file +; + +[modules] +autoload=yes +; +; Any modules that need to be loaded before the Asterisk core has been +; initialized (just after the logger has been initialized) can be loaded +; using 'preload'. This will frequently be needed if you wish to map all +; module configuration files into Realtime storage, since the Realtime +; driver will need to be loaded before the modules using those configuration +; files are initialized. +; +; An example of loading ODBC support would be: +;preload => res_odbc.so +;preload => res_config_odbc.so +; +noload => res_config_mysql.so ; +; +; load => res_features.so ; Call Parking Resource +noload => res_indications.so ; Indications Configuration +noload => res_monitor.so ; Call Monitoring Resource +; load => res_musiconhold.so ; Music On Hold Resource +noload => cdr_csv.so ; Comma Separated Values CDR Backend +noload => cdr_custom.so ; Customizable Comma Separated Values CDR Backend +noload => cdr_manager.so ; Asterisk Call Manager CDR Backend +noload => cdr_mysql.so ; MySQL CDR Backend +noload => cdr_pgsql.so ; PostgreSQL CDR Backend +noload => cdr_sqlite.so ; SQLite CDR Backend +noload => chan_agent.so ; Agent Proxy Channel +; load => chan_iax2.so ; Inter Asterisk eXchange (Ver 2) +; load => chan_local.so ; Local Proxy Channel +; load => chan_sip.so ; Session Initiation Protocol (SIP) +noload => codec_a_mu.so ; A-law and Mulaw direct Coder/Decoder +noload => codec_adpcm.so ; Adaptive Differential PCM Coder/Decoder +noload => codec_alaw.so ; A-law Coder/Decoder +noload => codec_g726.so ; ITU G.726-32kbps G726 Transcoder +; load => codec_gsm.so ; GSM/PCM16 (signed linear) Codec Translation +; load => codec_ulaw.so ; Mu-law Coder/Decoder +noload => codec_speex.so ; Speex/PCM16 (signed linear) Codec Translator +noload => format_au.so ; Sun Microsystems AU format (signed linear) +noload => format_g723.so ; G.723.1 Simple Timestamp File Format +noload => format_g726.so ; Raw G.726 (16/24/32/40kbps) data +noload => format_g729.so ; Raw G729 data +; load => format_gsm.so ; Raw GSM data +noload => format_h263.so ; Raw h263 data +noload => format_jpeg.so ; JPEG (Joint Picture Experts Group) Image +; load => format_pcm.so ; Raw uLaw 8khz Audio support (PCM) +noload => format_pcm_alaw.so ; Raw aLaw 8khz PCM Audio support +noload => format_sln.so ; Raw Signed Linear Audio support (SLN) +noload => format_vox.so ; Dialogic VOX (ADPCM) File Format +; load => format_wav.so ; Microsoft WAV format (8000hz Signed Line +; load => format_wav_gsm.so ; Microsoft WAV format (Proprietary GSM) +noload => app_alarmreceiver.so ; Alarm Receiver Application +noload => app_authenticate.so ; Authentication Application +noload => app_cdr.so ; Make sure asterisk doesn't save CDR +noload => app_chanisavail.so ; Check if channel is available +noload => app_chanspy.so ; Listen in on any channel +noload => app_controlplayback.so ; Control Playback Application +noload => app_cut.so ; Cuts up variables +noload => app_db.so ; Database access functions +; load => app_dial.so ; Dialing Application +noload => app_dictate.so ; Virtual Dictation Machine Application +noload => app_directory.so ; Extension Directory +noload => app_directed_pickup.so ; Directed Call Pickup Support +noload => app_disa.so ; DISA (Direct Inward System Access) Application +noload => app_dumpchan.so ; Dump channel variables Application +; load => app_echo.so ; Simple Echo Application +noload => app_enumlookup.so ; ENUM Lookup +noload => app_eval.so ; Reevaluates strings +noload => app_exec.so ; Executes applications +noload => app_externalivr.so ; External IVR application interface +noload => app_forkcdr.so ; Fork The CDR into 2 seperate entities +noload => app_getcpeid.so ; Get ADSI CPE ID +noload => app_groupcount.so ; Group Management Routines +noload => app_ices.so ; Encode and Stream via icecast and ices +noload => app_image.so ; Image Transmission Application +noload => app_lookupblacklist.so ; Look up Caller*ID name/number from black +noload => app_lookupcidname.so ; Look up CallerID Name from local databas +; load => app_macro.so ; Extension Macros +noload => app_math.so ; A simple math Application +noload => app_md5.so ; MD5 checksum Application +; load => app_milliwatt.so ; Digital Milliwatt (mu-law) Test Application +noload => app_mixmonitor.so ; Record a call and mix the audio during the recording +noload => app_parkandannounce.so ; Call Parking and Announce Application +; load => app_playback.so ; Trivial Playback Application +noload => app_privacy.so ; Require phone number to be entered, if n +noload => app_queue.so ; True Call Queueing +noload => app_random.so ; Random goto +noload => app_read.so ; Read Variable Application +noload => app_readfile.so ; Read in a file +noload => app_realtime.so ; Realtime Data Lookup/Rewrite +noload => app_record.so ; Trivial Record Application +; load => app_sayunixtime.so ; Say time +noload => app_senddtmf.so ; Send DTMF digits Application +noload => app_sendtext.so ; Send Text Applications +noload => app_setcallerid.so ; Set CallerID Application +noload => app_setcdruserfield.so ; CDR user field apps +noload => app_setcidname.so ; Set CallerID Name +noload => app_setcidnum.so ; Set CallerID Number +noload => app_setrndis.so ; Set RDNIS Number +noload => app_settransfercapability.so ; Set ISDN Transfer Capability +noload => app_sms.so ; SMS/PSTN handler +noload => app_softhangup.so ; Hangs up the requested channel +noload => app_sql_mysql.so ; Simple MySQL Interface +noload => app_sql_postgres.so ; Simple PostgreSQL Interface +noload => app_stack.so ; Stack Routines +noload => app_system.so ; Generic System() application +noload => app_talkdetect.so ; Playback with Talk Detection +noload => app_test.so ; Interface Test Application +noload => app_transfer.so ; Transfer +noload => app_txtcidname.so ; TXTCIDName +noload => app_url.so ; Send URL Applications +noload => app_userevent.so ; Custom User Event Application +; load => app_verbose.so ; Send verbose output +noload => app_waitforring.so ; Waits until first ring after time +noload => app_waitforsilence.so ; Wait For Silence Application +noload => app_while.so ; While Loops and Conditional Execution +noload => pbx_ael.so ; Asterisk Extension Language Compiler +; load => pbx_config.so ; Text Extension Configuration +noload => pbx_functions.so ; Builtin dialplan functions +noload => pbx_loopback.so ; Loopback Switch +noload => pbx_realtime.so ; Realtime Switch +noload => pbx_spool.so ; Outgoing Spool Support +noload => pbx_wilcalu.so ; Wil Cal U (Auto Dialer) +noload => func_callerid.so ; Caller ID related dialplan functions +noload => func_enum.so ; ENUM Functions +noload => func_uri.so ; URI encoding / decoding functions + +; +; Module names listed in "global" section will have symbols globally +; exported to modules loaded after them. +; +[global] +chan_modem.so=no diff --git a/package/asterisk/ipkg/asterisk-chan-bluetooth.conffiles b/package/asterisk/ipkg/asterisk-chan-bluetooth.conffiles new file mode 100644 index 000000000..40a085235 --- /dev/null +++ b/package/asterisk/ipkg/asterisk-chan-bluetooth.conffiles @@ -0,0 +1 @@ +/etc/asterisk/bluetooth.conf diff --git a/package/asterisk/ipkg/asterisk-chan-bluetooth.control b/package/asterisk/ipkg/asterisk-chan-bluetooth.control new file mode 100644 index 000000000..c79d038bb --- /dev/null +++ b/package/asterisk/ipkg/asterisk-chan-bluetooth.control @@ -0,0 +1,5 @@ +Package: asterisk-chan-bluetooth +Priority: optional +Section: net +Description: Bluetooth HandsFreeProfile support for Asterisk +Depends: asterisk, bluez-libs diff --git a/package/asterisk/ipkg/asterisk-chan-h323.conffiles b/package/asterisk/ipkg/asterisk-chan-h323.conffiles new file mode 100644 index 000000000..fc0858a61 --- /dev/null +++ b/package/asterisk/ipkg/asterisk-chan-h323.conffiles @@ -0,0 +1 @@ +/etc/asterisk/h323.conf diff --git a/package/asterisk/ipkg/asterisk-chan-h323.control b/package/asterisk/ipkg/asterisk-chan-h323.control new file mode 100644 index 000000000..f3a18ba99 --- /dev/null +++ b/package/asterisk/ipkg/asterisk-chan-h323.control @@ -0,0 +1,5 @@ +Package: asterisk-chan-h323 +Priority: optional +Section: net +Description: H.323 support for Asterisk +Depends: asterisk, libpthread, uclibc++ diff --git a/package/asterisk/ipkg/asterisk-chan-iax2.conffiles b/package/asterisk/ipkg/asterisk-chan-iax2.conffiles new file mode 100644 index 000000000..f46a87327 --- /dev/null +++ b/package/asterisk/ipkg/asterisk-chan-iax2.conffiles @@ -0,0 +1,2 @@ +/etc/asterisk/iax.conf +/etc/asterisk/iaxprov.conf diff --git a/package/asterisk/ipkg/asterisk-chan-iax2.control b/package/asterisk/ipkg/asterisk-chan-iax2.control new file mode 100644 index 000000000..55f71f446 --- /dev/null +++ b/package/asterisk/ipkg/asterisk-chan-iax2.control @@ -0,0 +1,5 @@ +Package: asterisk-chan-iax2 +Priority: optional +Section: net +Description: Asterisk Channel for the Inter Asterisk Protocol +Depends: asterisk diff --git a/package/asterisk/ipkg/asterisk-chan-mgcp.conffiles b/package/asterisk/ipkg/asterisk-chan-mgcp.conffiles new file mode 100644 index 000000000..40a81df8e --- /dev/null +++ b/package/asterisk/ipkg/asterisk-chan-mgcp.conffiles @@ -0,0 +1 @@ +/etc/asterisk/mgcp.conf diff --git a/package/asterisk/ipkg/asterisk-chan-mgcp.control b/package/asterisk/ipkg/asterisk-chan-mgcp.control new file mode 100644 index 000000000..78ea3b649 --- /dev/null +++ b/package/asterisk/ipkg/asterisk-chan-mgcp.control @@ -0,0 +1,5 @@ +Package: asterisk-chan-mgcp +Priority: optional +Section: net +Description: a Media Gateway Control Protocol implementation for Asterisk +Depends: asterisk diff --git a/package/asterisk/ipkg/asterisk-chan-misdn.control b/package/asterisk/ipkg/asterisk-chan-misdn.control new file mode 100644 index 000000000..bcc7f384e --- /dev/null +++ b/package/asterisk/ipkg/asterisk-chan-misdn.control @@ -0,0 +1,5 @@ +Package: asterisk-chan-misdn +Priority: optional +Section: net +Depends: asterisk +Description: Asterisk Channel for the mISDN ISDN systems diff --git a/package/asterisk/ipkg/asterisk-chan-skinny.conffiles b/package/asterisk/ipkg/asterisk-chan-skinny.conffiles new file mode 100644 index 000000000..eaf9b6def --- /dev/null +++ b/package/asterisk/ipkg/asterisk-chan-skinny.conffiles @@ -0,0 +1 @@ +/etc/asterisk/skinny.conf diff --git a/package/asterisk/ipkg/asterisk-chan-skinny.control b/package/asterisk/ipkg/asterisk-chan-skinny.control new file mode 100644 index 000000000..3933e33db --- /dev/null +++ b/package/asterisk/ipkg/asterisk-chan-skinny.control @@ -0,0 +1,5 @@ +Package: asterisk-chan-skinny +Priority: optional +Section: net +Description: a Skinny Client Control Protocol implementation for Asterisk +Depends: asterisk diff --git a/package/asterisk/ipkg/asterisk-codec-gsm.control b/package/asterisk/ipkg/asterisk-codec-gsm.control new file mode 100644 index 000000000..f26044d2b --- /dev/null +++ b/package/asterisk/ipkg/asterisk-codec-gsm.control @@ -0,0 +1,5 @@ +Package: asterisk-codec-gsm +Priority: optional +Section: net +Description: a GSM Codec Translator for Asterisk +Depends: asterisk diff --git a/package/asterisk/ipkg/asterisk-codec-speex.control b/package/asterisk/ipkg/asterisk-codec-speex.control new file mode 100644 index 000000000..61eb088f7 --- /dev/null +++ b/package/asterisk/ipkg/asterisk-codec-speex.control @@ -0,0 +1,5 @@ +Package: asterisk-codec-speex +Priority: optional +Section: net +Description: a Speex/PCM16 Codec Translator for Asterisk +Depends: asterisk, libspeex diff --git a/package/asterisk/ipkg/asterisk-meetme.conffiles b/package/asterisk/ipkg/asterisk-meetme.conffiles new file mode 100644 index 000000000..1caab1d4d --- /dev/null +++ b/package/asterisk/ipkg/asterisk-meetme.conffiles @@ -0,0 +1 @@ +/etc/asterisk/meetme.conf diff --git a/package/asterisk/ipkg/asterisk-meetme.control b/package/asterisk/ipkg/asterisk-meetme.control new file mode 100644 index 000000000..8b031d210 --- /dev/null +++ b/package/asterisk/ipkg/asterisk-meetme.control @@ -0,0 +1,5 @@ +Package: asterisk-meetme +Priority: optional +Section: net +Description: MeetMe support files for asterisk +Depends: asterisk diff --git a/package/asterisk/ipkg/asterisk-pbx-dundi.conffiles b/package/asterisk/ipkg/asterisk-pbx-dundi.conffiles new file mode 100644 index 000000000..ab116b5d1 --- /dev/null +++ b/package/asterisk/ipkg/asterisk-pbx-dundi.conffiles @@ -0,0 +1 @@ +/etc/asterisk/dundi.conf diff --git a/package/asterisk/ipkg/asterisk-pbx-dundi.control b/package/asterisk/ipkg/asterisk-pbx-dundi.control new file mode 100644 index 000000000..6579e2594 --- /dev/null +++ b/package/asterisk/ipkg/asterisk-pbx-dundi.control @@ -0,0 +1,5 @@ +Package: asterisk-pbx-dundi +Priority: optional +Section: net +Description: Distributed Universal Number Discovery (DUNDi) support for Asterisk +Depends: asterisk diff --git a/package/asterisk/ipkg/asterisk-pgsql.conffiles b/package/asterisk/ipkg/asterisk-pgsql.conffiles new file mode 100644 index 000000000..8b5cffe40 --- /dev/null +++ b/package/asterisk/ipkg/asterisk-pgsql.conffiles @@ -0,0 +1 @@ +/etc/asterisk/cdr_pgsql.conf diff --git a/package/asterisk/ipkg/asterisk-pgsql.control b/package/asterisk/ipkg/asterisk-pgsql.control new file mode 100644 index 000000000..beece08a5 --- /dev/null +++ b/package/asterisk/ipkg/asterisk-pgsql.control @@ -0,0 +1,5 @@ +Package: asterisk-pgsql +Priority: optional +Section: net +Description: PostgreSQL modules for Asterisk +Depends: asterisk, libpq, zlib diff --git a/package/asterisk/ipkg/asterisk-res-agi.control b/package/asterisk/ipkg/asterisk-res-agi.control new file mode 100644 index 000000000..44f7170aa --- /dev/null +++ b/package/asterisk/ipkg/asterisk-res-agi.control @@ -0,0 +1,5 @@ +Package: asterisk-res-agi +Priority: optional +Section: net +Description: Asterisk Gateway Interface module +Depends: asterisk diff --git a/package/asterisk/ipkg/asterisk-sounds.control b/package/asterisk/ipkg/asterisk-sounds.control new file mode 100644 index 000000000..a63bbef10 --- /dev/null +++ b/package/asterisk/ipkg/asterisk-sounds.control @@ -0,0 +1,5 @@ +Package: asterisk-sounds +Priority: optional +Section: net +Description: a sounds collection for Asterisk +Depends: asterisk diff --git a/package/asterisk/ipkg/asterisk-sqlite.control b/package/asterisk/ipkg/asterisk-sqlite.control new file mode 100644 index 000000000..3968dd19d --- /dev/null +++ b/package/asterisk/ipkg/asterisk-sqlite.control @@ -0,0 +1,5 @@ +Package: asterisk-sqlite +Priority: optional +Section: net +Description: SQLite modules for Asterisk +Depends: asterisk, libsqlite diff --git a/package/asterisk/ipkg/asterisk-voicemail.conffiles b/package/asterisk/ipkg/asterisk-voicemail.conffiles new file mode 100644 index 000000000..1c80f057a --- /dev/null +++ b/package/asterisk/ipkg/asterisk-voicemail.conffiles @@ -0,0 +1 @@ +/etc/asterisk/voicemail.conf diff --git a/package/asterisk/ipkg/asterisk-voicemail.control b/package/asterisk/ipkg/asterisk-voicemail.control new file mode 100644 index 000000000..c7b51311c --- /dev/null +++ b/package/asterisk/ipkg/asterisk-voicemail.control @@ -0,0 +1,5 @@ +Package: asterisk-voicemail +Priority: optional +Section: net +Description: VoiceMail related modules for Asterisk +Depends: asterisk diff --git a/package/asterisk/ipkg/asterisk.conffiles b/package/asterisk/ipkg/asterisk.conffiles new file mode 100644 index 000000000..5f805dedb --- /dev/null +++ b/package/asterisk/ipkg/asterisk.conffiles @@ -0,0 +1,21 @@ +/etc/asterisk/asterisk.conf +/etc/asterisk/agents.conf +/etc/asterisk/alarmreceiver.conf +/etc/asterisk/cdr_manager.conf +/etc/asterisk/codecs.conf +/etc/asterisk/enum.conf +/etc/asterisk/extconfig.conf +/etc/asterisk/extensions.conf +/etc/asterisk/features.conf +/etc/asterisk/iax.conf +/etc/asterisk/iaxprov.conf +/etc/asterisk/indications.conf +/etc/asterisk/logger.conf +/etc/asterisk/manager.conf +/etc/asterisk/modules.conf +/etc/asterisk/musiconhold.conf +/etc/asterisk/osp.conf +/etc/asterisk/privacy.conf +/etc/asterisk/queues.conf +/etc/asterisk/rtp.conf +/etc/asterisk/sip.conf diff --git a/package/asterisk/ipkg/asterisk.control b/package/asterisk/ipkg/asterisk.control new file mode 100644 index 000000000..13075d791 --- /dev/null +++ b/package/asterisk/ipkg/asterisk.control @@ -0,0 +1,5 @@ +Package: asterisk +Priority: optional +Section: net +Depends: libncurses, libpthread +Description: An open source PBX diff --git a/package/asterisk/ipkg/asterisk.postinst b/package/asterisk/ipkg/asterisk.postinst new file mode 100644 index 000000000..1186b2645 --- /dev/null +++ b/package/asterisk/ipkg/asterisk.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf asterisk asterisk NO diff --git a/package/asterisk/patches/patch-apps__moduleinfo b/package/asterisk/patches/patch-apps__moduleinfo new file mode 100644 index 000000000..efbdcae4a --- /dev/null +++ b/package/asterisk/patches/patch-apps__moduleinfo @@ -0,0 +1,13 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- asterisk-1.4.24.1.orig/apps/.moduleinfo 2009-04-02 19:44:22.000000000 +0200 ++++ asterisk-1.4.24.1/apps/.moduleinfo 2009-05-12 16:07:52.000000000 +0200 +@@ -56,9 +56,6 @@ + + dahdi + +- +- chan_local +- + + + diff --git a/package/asterisk/patches/patch-menuselect-tree b/package/asterisk/patches/patch-menuselect-tree new file mode 100644 index 000000000..98c18ec08 --- /dev/null +++ b/package/asterisk/patches/patch-menuselect-tree @@ -0,0 +1,13 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- asterisk-1.4.24.1.orig/menuselect-tree 2009-04-02 19:44:31.000000000 +0200 ++++ asterisk-1.4.24.1/menuselect-tree 2009-05-12 16:07:12.000000000 +0200 +@@ -59,9 +59,6 @@ + + dahdi + +- +- chan_local +- + + + diff --git a/package/asterisk/patches/patch-menuselect_example_menuselect-tree b/package/asterisk/patches/patch-menuselect_example_menuselect-tree new file mode 100644 index 000000000..6c58cc33d --- /dev/null +++ b/package/asterisk/patches/patch-menuselect_example_menuselect-tree @@ -0,0 +1,12 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- asterisk-1.4.24.1.orig/menuselect/example_menuselect-tree 2006-08-19 22:55:53.000000000 +0200 ++++ asterisk-1.4.24.1/menuselect/example_menuselect-tree 2009-05-12 16:07:32.000000000 +0200 +@@ -45,8 +45,6 @@ + + zaptel + +- +- + + + diff --git a/package/atftp/Config.in b/package/atftp/Config.in new file mode 100644 index 000000000..11e1c02b2 --- /dev/null +++ b/package/atftp/Config.in @@ -0,0 +1,25 @@ +#menu "atftp............................. TFTP implementation" + +config ADK_COMPILE_ATFTP + tristate + default n + depends ADK_PACKAGE_ATFTP || ADK_PACKAGE_ATFTPD + select ADK_PACKAGE_LIBREADLINE + +config ADK_PACKAGE_ATFTP + prompt "atftp............................. TFTP client" + tristate + default n + select ADK_COMPILE_ATFTP + help + TFTP client + +config ADK_PACKAGE_ATFTPD + prompt "atftpd............................ TFTP server" + tristate + default n + select ADK_COMPILE_ATFTP + help + TFTP server + +#endmenu diff --git a/package/atftp/Makefile b/package/atftp/Makefile new file mode 100644 index 000000000..ac49f0794 --- /dev/null +++ b/package/atftp/Makefile @@ -0,0 +1,32 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= atftp +PKG_VERSION:= 0.7 +PKG_RELEASE:= 2 +PKG_MD5SUM:= 3b27365772d918050b2251d98a9c7c82 +MASTER_SITES:= ftp://ftp.mamalinux.com/pub/atftp/ + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,ATFTP,atftp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,ATFTPD,atftpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) + +MAKE_FLAGS+= CFLAGS="${TCFLAGS} -Wall -D_REENTRANT -fno-inline" +CONFIGURE_STYLE= gnu +BUILD_STYLE= auto +INSTALL_STYLE= auto + +post-install: + # atftp client + $(INSTALL_DIR) $(IDIR_ATFTP)/usr/bin + $(INSTALL_BIN) $(WRKBUILD)/atftp $(IDIR_ATFTP)/usr/bin + # atftp server + $(INSTALL_DIR) $(IDIR_ATFTPD)/usr/sbin + $(INSTALL_BIN) $(WRKBUILD)/atftpd $(IDIR_ATFTPD)/usr/sbin + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/atftp/ipkg/atftp.control b/package/atftp/ipkg/atftp.control new file mode 100644 index 000000000..83b1858c4 --- /dev/null +++ b/package/atftp/ipkg/atftp.control @@ -0,0 +1,5 @@ +Package: atftp +Priority: optional +Section: net +Description: tftp client +Depends: libreadline, libncurses diff --git a/package/atftp/ipkg/atftpd.control b/package/atftp/ipkg/atftpd.control new file mode 100644 index 000000000..94f49f3f7 --- /dev/null +++ b/package/atftp/ipkg/atftpd.control @@ -0,0 +1,5 @@ +Package: atftpd +Priority: optional +Section: net +Description: tftp server +Depends: libreadline, libpcre diff --git a/package/atftp/ipkg/files/postinst b/package/atftp/ipkg/files/postinst new file mode 100755 index 000000000..35a2c3b36 --- /dev/null +++ b/package/atftp/ipkg/files/postinst @@ -0,0 +1,8 @@ +#!/usr/bin/env mksh +grep -q '^tftp[[:space:]]*69/tcp' ${IPKG_INSTROOT}/etc/services 2>/dev/null +if [ $? -ne 0 ]; then + echo "tftp 69/tcp" >>${IPKG_INSTROOT}/etc/services + echo "tftp 69/udp" >>${IPKG_INSTROOT}/etc/services + echo "tftp-mcast 1758/tcp" >>${IPKG_INSTROOT}/etc/services + echo "tftp-mcast 1758/udp" >>${IPKG_INSTROOT}/etc/services +fi diff --git a/package/atftp/patches/patch-stats_c b/package/atftp/patches/patch-stats_c new file mode 100644 index 000000000..290b53292 --- /dev/null +++ b/package/atftp/patches/patch-stats_c @@ -0,0 +1,14 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- atftp-0.7.orig/stats.c 2002-03-27 04:02:12.000000000 +0100 ++++ atftp-0.7/stats.c 2008-10-09 12:08:47.000000000 +0200 +@@ -157,8 +157,8 @@ void stats_print(void) + + logger(LOG_INFO, " Load measurements:"); + logger(LOG_INFO, " User: %8.3fs Sys:%8.3fs", +- (double)(s_stats.tms.tms_utime) / CLK_TCK, +- (double)(s_stats.tms.tms_stime) / CLK_TCK); ++ (double)(s_stats.tms.tms_utime) / CLOCKS_PER_SEC, ++ (double)(s_stats.tms.tms_stime) / CLOCKS_PER_SEC); + logger(LOG_INFO, " Total:%8.3fs CPU:%8.3f%%", + (double)(tmp.tv_sec + tmp.tv_usec * 1e-6), + (double)(s_stats.tms.tms_utime + s_stats.tms.tms_stime) / diff --git a/package/atftp/patches/patch-test_Makefile b/package/atftp/patches/patch-test_Makefile new file mode 100644 index 000000000..097b3a5e3 --- /dev/null +++ b/package/atftp/patches/patch-test_Makefile @@ -0,0 +1,152 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- atftp-0.7.orig/test/Makefile 2004-03-16 02:53:37.000000000 +0100 ++++ atftp-0.7/test/Makefile 2008-10-09 11:58:55.000000000 +0200 +@@ -13,9 +13,9 @@ + # PARTICULAR PURPOSE. + + +-srcdir = . +-top_srcdir = .. +- ++srcdir = /home/wbrodkorb/adk-glibc/build_x86/w-atftp-0.7-2/atftp-0.7/test ++top_srcdir = /home/wbrodkorb/adk-glibc/build_x86/w-atftp-0.7-2/atftp-0.7 ++VPATH = /home/wbrodkorb/adk-glibc/build_x86/w-atftp-0.7-2/atftp-0.7/test + pkgdatadir = $(datadir)/atftp + pkglibdir = $(libdir)/atftp + pkgincludedir = $(includedir)/atftp +@@ -33,7 +33,7 @@ POST_INSTALL = : + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : +-host_triplet = i686-pc-linux-gnu ++host_triplet = i586-pc-linux-gnu + subdir = test + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +@@ -46,24 +46,24 @@ CONFIG_CLEAN_FILES = + SOURCES = + DIST_SOURCES = + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +-ACLOCAL = ${SHELL} /home/jp/projets/sources/atftp/atftp-0.7/atftp/missing --run aclocal-1.8 +-AMDEP_FALSE = # +-AMDEP_TRUE = +-AMTAR = ${SHELL} /home/jp/projets/sources/atftp/atftp-0.7/atftp/missing --run tar +-AUTOCONF = ${SHELL} /home/jp/projets/sources/atftp/atftp-0.7/atftp/missing --run autoconf +-AUTOHEADER = ${SHELL} /home/jp/projets/sources/atftp/atftp-0.7/atftp/missing --run autoheader +-AUTOMAKE = ${SHELL} /home/jp/projets/sources/atftp/atftp-0.7/atftp/missing --run automake-1.8 ++ACLOCAL = ${SHELL} /home/wbrodkorb/adk-glibc/build_x86/w-atftp-0.7-2/atftp-0.7/missing --run aclocal-1.8 ++AMDEP_FALSE = ++AMDEP_TRUE = # ++AMTAR = ${SHELL} /home/wbrodkorb/adk-glibc/build_x86/w-atftp-0.7-2/atftp-0.7/missing --run tar ++AUTOCONF = ${SHELL} /home/wbrodkorb/adk-glibc/build_x86/w-atftp-0.7-2/atftp-0.7/missing --run autoconf ++AUTOHEADER = ${SHELL} /home/wbrodkorb/adk-glibc/build_x86/w-atftp-0.7-2/atftp-0.7/missing --run autoheader ++AUTOMAKE = ${SHELL} /home/wbrodkorb/adk-glibc/build_x86/w-atftp-0.7-2/atftp-0.7/missing --run automake-1.8 + AWK = gawk +-CC = gcc +-CCDEPMODE = depmode=gcc3 ++CC = /home/wbrodkorb/adk-glibc/cross_x86/host/bin/i586-linux-gnu-gcc ++CCDEPMODE = depmode=none + CFLAGS = -g -Wall -D_REENTRANT -O2 +-CPP = gcc -E +-CPPFLAGS = ++CPP = /home/wbrodkorb/adk-glibc/cross_x86/host/bin/i586-linux-gnu-gcc -E ++CPPFLAGS = -isystem /home/wbrodkorb/adk-glibc/cross_x86/target/include -isystem /home/wbrodkorb/adk-glibc/cross_x86/target/usr/include -DNDEBUG + CYGPATH_W = echo + DEFS = -DHAVE_CONFIG_H + DEPDIR = .deps +-ECHO_C = +-ECHO_N = -n ++ECHO_C = \c ++ECHO_N = + ECHO_T = + EGREP = grep -E + EXEEXT = +@@ -71,17 +71,17 @@ INSTALL_DATA = ${INSTALL} -m 644 + INSTALL_PROGRAM = ${INSTALL} + INSTALL_SCRIPT = ${INSTALL} + INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s +-ISODATE = 2004-03-15 +-LDFLAGS = ++ISODATE = 2008-10-09 ++LDFLAGS = -Wl,-O2 -Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/home/wbrodkorb/adk-glibc/cross_x86/target/usr/lib -L/home/wbrodkorb/adk-glibc/cross_x86/target/lib -L/home/wbrodkorb/adk-glibc/cross_x86/target/usr/lib + LIBOBJS = +-LIBPCRE = -lpcre ++LIBPCRE = + LIBPTHREAD = -lpthread + LIBREADLINE = -lreadline + LIBS = +-LIBTERMCAP = +-LIBWRAP = -lnsl -lwrap ++LIBTERMCAP = -lncurses ++LIBWRAP = + LTLIBOBJS = +-MAKEINFO = ${SHELL} /home/jp/projets/sources/atftp/atftp-0.7/atftp/missing --run makeinfo ++MAKEINFO = ${SHELL} /home/wbrodkorb/adk-glibc/build_x86/w-atftp-0.7-2/atftp-0.7/missing --run makeinfo + OBJEXT = o + PACKAGE = atftp + PACKAGE_BUGREPORT = +@@ -90,46 +90,46 @@ PACKAGE_STRING = + PACKAGE_TARNAME = + PACKAGE_VERSION = + PATH_SEPARATOR = : +-PLATFORM = pc-i686-linux-gnu ++PLATFORM = pc-i586-linux-gnu + SET_MAKE = + SHELL = /bin/sh +-STRIP = ++STRIP = i586-linux-strip + VERSION = 0.7 +-ac_ct_CC = gcc ++ac_ct_CC = + ac_ct_STRIP = +-am__fastdepCC_FALSE = # +-am__fastdepCC_TRUE = ++am__fastdepCC_FALSE = ++am__fastdepCC_TRUE = # + am__include = include + am__leading_dot = . + am__quote = + bindir = ${exec_prefix}/bin + build = i686-pc-linux-gnu +-build_alias = ++build_alias = i686-linux-gnu + build_cpu = i686 + build_os = linux-gnu + build_vendor = pc +-datadir = ${prefix}/share ++datadir = /usr/share + exec_prefix = ${prefix} +-host = i686-pc-linux-gnu +-host_alias = +-host_cpu = i686 ++host = i586-pc-linux-gnu ++host_alias = i586-linux ++host_cpu = i586 + host_os = linux-gnu + host_vendor = pc + includedir = ${prefix}/include + infodir = ${prefix}/info +-install_sh = /home/jp/projets/sources/atftp/atftp-0.7/atftp/install-sh ++install_sh = /home/wbrodkorb/adk-glibc/build_x86/w-atftp-0.7-2/atftp-0.7/install-sh + libdir = ${exec_prefix}/lib +-libexecdir = ${exec_prefix}/libexec +-localstatedir = ${prefix}/var +-mandir = ${prefix}/man ++libexecdir = /usr/lib ++localstatedir = /var ++mandir = /usr/share/man + mkdir_p = mkdir -p -- . + oldincludedir = /usr/include +-prefix = /usr/local +-program_transform_name = s,x,x, ++prefix = /usr ++program_transform_name = s,$$,,;s,^,, + sbindir = ${exec_prefix}/sbin + sharedstatedir = ${prefix}/com +-sysconfdir = ${prefix}/etc +-target_alias = ++sysconfdir = /etc ++target_alias = i586-linux + TESTS = test.sh + CLEANFILES = *~ + all: all-am diff --git a/package/atftp/patches/patch-tftp_c b/package/atftp/patches/patch-tftp_c new file mode 100644 index 000000000..392302bd7 --- /dev/null +++ b/package/atftp/patches/patch-tftp_c @@ -0,0 +1,83 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- atftp-0.7.orig/tftp.c 2004-03-16 00:55:56.000000000 +0100 ++++ atftp-0.7/tftp.c 2008-10-09 11:58:48.000000000 +0200 +@@ -409,7 +409,7 @@ int process_cmd(int argc, char **argv) + int set_peer(int argc, char **argv) + { + struct hostent *host; /* for host name lookup */ +- struct servent *sp; /* server entry for tftp service */ ++ int port = htons(69); + + /* sanity check */ + if ((argc < 2) || (argc > 3)) +@@ -418,13 +418,6 @@ int set_peer(int argc, char **argv) + return ERR; + } + +- /* get the server entry */ +- sp = getservbyname("tftp", "udp"); +- if (sp == 0) { +- fprintf(stderr, "tftp: udp/tftp, unknown service.\n"); +- return ERR; +- } +- + /* look up the host */ + host = gethostbyname(argv[1]); + /* if valid, update s_inn structure */ +@@ -437,7 +430,7 @@ int set_peer(int argc, char **argv) + Strncpy(data.hostname, host->h_name, + sizeof(data.hostname)); + data.hostname[sizeof(data.hostname)-1] = 0; +- data.sa_peer.sin_port = sp->s_port; ++ data.sa_peer.sin_port = port; + } + else + { +@@ -448,17 +441,17 @@ int set_peer(int argc, char **argv) + /* get the server port */ + if (argc == 3) + { +- sp->s_port = htons(atoi(argv[2])); +- if (sp->s_port < 0) ++ port = htons(atoi(argv[2])); ++ if (port < 0) + { + fprintf(stderr, "%s: bad port number.\n", argv[2]); + data.connected = 0; + return ERR; + } +- data.sa_peer.sin_port = sp->s_port; ++ data.sa_peer.sin_port = port; + } + /* copy port number to data structure */ +- data.port = ntohs(sp->s_port); ++ data.port = ntohs(port); + + data.connected = 1; + return OK; +@@ -974,6 +967,7 @@ int tftp_cmd_line_options(int argc, char + { "tftp-timeout", 1, NULL, 'T'}, + { "mode", 1, NULL, 'M'}, + { "option", 1, NULL, 'O'}, ++ { "retry", 1, NULL, 'R'}, + #if 1 + { "timeout", 1, NULL, 't'}, + { "blksize", 1, NULL, 'b'}, +@@ -993,11 +987,16 @@ int tftp_cmd_line_options(int argc, char + }; + + /* Support old argument until 0.8 */ +- while ((c = getopt_long(argc, argv, /*"gpl:r:Vh"*/ "gpl:r:Vht:b:sm", ++ while ((c = getopt_long(argc, argv, /*"gpl:r:Vh"*/ "gpl:r:Vht:b:smR:", + options, &option_index)) != EOF) + { + switch (c) + { ++ case 'R': ++ snprintf(string, sizeof(string), "option retry %s", optarg); ++ make_arg(string, &ac, &av); ++ process_cmd(ac, av); ++ break; + case 'g': + interactive = 0; + if ((action == PUT) || (action == MGET)) diff --git a/package/atftp/patches/patch-tftp_def_c b/package/atftp/patches/patch-tftp_def_c new file mode 100644 index 000000000..dc94e8c10 --- /dev/null +++ b/package/atftp/patches/patch-tftp_def_c @@ -0,0 +1,11 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- atftp-0.7.orig/tftp_def.c 2004-02-13 04:16:09.000000000 +0100 ++++ atftp-0.7/tftp_def.c 2008-10-09 11:58:48.000000000 +0200 +@@ -37,6 +37,7 @@ struct tftp_opt tftp_default_options[OPT + { "timeout", "5", 0, 1 }, /* 2348, 2349, 2090. */ + { "blksize", "512", 0, 1 }, /* This is the default option */ + { "multicast", "", 0, 1 }, /* structure */ ++ { "retry", "5", 0, 1 }, + { "", "", 0, 0} + }; + diff --git a/package/atftp/patches/patch-tftp_def_h b/package/atftp/patches/patch-tftp_def_h new file mode 100644 index 000000000..cd602d978 --- /dev/null +++ b/package/atftp/patches/patch-tftp_def_h @@ -0,0 +1,13 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- atftp-0.7.orig/tftp_def.h 2004-02-13 04:16:09.000000000 +0100 ++++ atftp-0.7/tftp_def.h 2008-10-09 11:58:48.000000000 +0200 +@@ -40,7 +40,8 @@ + #define OPT_TIMEOUT 3 + #define OPT_BLKSIZE 4 + #define OPT_MULTICAST 5 +-#define OPT_NUMBER 7 ++#define OPT_RETRY 6 ++#define OPT_NUMBER 8 + + #define OPT_SIZE 12 + #define VAL_SIZE MAXLEN diff --git a/package/atftp/patches/patch-tftp_file_c b/package/atftp/patches/patch-tftp_file_c new file mode 100644 index 000000000..b071b1cf7 --- /dev/null +++ b/package/atftp/patches/patch-tftp_file_c @@ -0,0 +1,64 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- atftp-0.7.orig/tftp_file.c 2004-02-13 04:16:09.000000000 +0100 ++++ atftp-0.7/tftp_file.c 2008-10-09 11:58:48.000000000 +0200 +@@ -123,6 +123,7 @@ int tftp_receive_file(struct client_data + struct tftphdr *tftphdr = (struct tftphdr *)data->data_buffer; + FILE *fp = NULL; /* the local file pointer */ + int number_of_timeout = 0; ++ int num_retry = atoi(data->tftp_options[OPT_RETRY].value); + int convert = 0; /* if true, do netascii convertion */ + + int oacks = 0; /* count OACK for improved error checking */ +@@ -141,7 +142,7 @@ int tftp_receive_file(struct client_data + + int prev_block_number = 0; /* needed to support netascii convertion */ + int temp = 0; +- ++ + data->file_size = 0; + tftp_cancel = 0; + from.sin_addr.s_addr = 0; +@@ -288,7 +289,7 @@ int tftp_receive_file(struct client_data + case GET_TIMEOUT: + number_of_timeout++; + fprintf(stderr, "timeout: retrying...\n"); +- if (number_of_timeout > NB_OF_RETRY) ++ if ((num_retry > 0) && (number_of_timeout > num_retry)) + state = S_ABORT; + else + state = timeout_state; +@@ -325,7 +326,7 @@ int tftp_receive_file(struct client_data + number_of_timeout++; + fprintf(stderr, "tftp: packet discard <%s:%d>.\n", + inet_ntoa(from.sin_addr), ntohs(from.sin_port)); +- if (number_of_timeout > NB_OF_RETRY) ++ if ((num_retry > 0) && (number_of_timeout > num_retry)) + state = S_ABORT; + break; + case ERR: +@@ -614,6 +615,7 @@ int tftp_send_file(struct client_data *d + struct tftphdr *tftphdr = (struct tftphdr *)data->data_buffer; + FILE *fp; /* the local file pointer */ + int number_of_timeout = 0; ++ int num_retry = atoi(data->tftp_options[OPT_RETRY].value); + struct stat file_stat; + int convert = 0; /* if true, do netascii convertion */ + char string[MAXLEN]; +@@ -751,7 +753,7 @@ int tftp_send_file(struct client_data *d + case GET_TIMEOUT: + number_of_timeout++; + fprintf(stderr, "timeout: retrying...\n"); +- if (number_of_timeout > NB_OF_RETRY) ++ if ((num_retry > 0) && (number_of_timeout > num_retry)) + state = S_ABORT; + else + state = timeout_state; +@@ -797,7 +799,7 @@ int tftp_send_file(struct client_data *d + number_of_timeout++; + fprintf(stderr, "tftp: packet discard <%s:%d>.\n", + inet_ntoa(from.sin_addr), ntohs(from.sin_port)); +- if (number_of_timeout > NB_OF_RETRY) ++ if ((num_retry > 0) && (number_of_timeout > num_retry)) + state = S_ABORT; + break; + case ERR: diff --git a/package/atftp/patches/patch-tftpd_c b/package/atftp/patches/patch-tftpd_c new file mode 100644 index 000000000..93568d91a --- /dev/null +++ b/package/atftp/patches/patch-tftpd_c @@ -0,0 +1,20 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- atftp-0.7.orig/tftpd.c 2004-02-27 03:05:26.000000000 +0100 ++++ atftp-0.7/tftpd.c 2008-10-09 11:58:48.000000000 +0200 +@@ -230,14 +230,8 @@ int main(int argc, char **argv) + + /* find the port */ + if (tftpd_port == 0) +- { +- if ((serv = getservbyname("tftp", "udp")) == NULL) +- { +- logger(LOG_ERR, "atftpd: udp/tftp, unknown service"); +- exit(1); +- } +- tftpd_port = ntohs(serv->s_port); +- } ++ tftpd_port = htons(69); ++ + /* initialise sockaddr_in structure */ + memset(&sa, 0, sizeof(sa)); + sa.sin_family = AF_INET; diff --git a/package/autossh/Config.in b/package/autossh/Config.in new file mode 100644 index 000000000..5f72059f0 --- /dev/null +++ b/package/autossh/Config.in @@ -0,0 +1,9 @@ +config ADK_PACKAGE_AUTOSSH + prompt "autossh........................... Auto handle ssh tunnels" + tristate + default n + help + autossh is a program to start a copy of ssh and monitor it, + restarting it as necessary should it die or stop passing traffic. + + http://www.harding.motd.ca/autossh/ diff --git a/package/autossh/Makefile b/package/autossh/Makefile new file mode 100644 index 000000000..0363f8855 --- /dev/null +++ b/package/autossh/Makefile @@ -0,0 +1,32 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= autossh +PKG_VERSION:= 1.3 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 0e7ec62eeca5d1b197f3ef2d0f0d417f +MASTER_SITES:= http://www.harding.motd.ca/autossh/ +DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tgz + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,AUTOSSH,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) + +TCFLAGS+= -Wall -DSSH_PATH=\\\"/usr/bin/ssh\\\"\ \ + -DVER=\\\"$(PKG_VERSION)\\\"\" +MAKE_FLAGS+= CC="$(TARGET_CC)" BINDIR=/usr/bin MANDIR=/usr/man +BUILD_STYLE= auto + +do-configure: + cp $(WRKBUILD)/Makefile.linux $(WRKBUILD)/Makefile + +do-install: + echo $(CC) + $(INSTALL_DIR) $(IDIR_AUTOSSH)/usr/bin + $(INSTALL_BIN) $(WRKBUILD)/autossh $(IDIR_AUTOSSH)/usr/bin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/autossh/ipkg/autossh.control b/package/autossh/ipkg/autossh.control new file mode 100644 index 000000000..2916e3851 --- /dev/null +++ b/package/autossh/ipkg/autossh.control @@ -0,0 +1,5 @@ +Package: autossh +Priority: optional +Section: net +Depends: openssh-client +Description: Autossh client diff --git a/package/avahi/Config.in b/package/avahi/Config.in new file mode 100644 index 000000000..b64b0e33d --- /dev/null +++ b/package/avahi/Config.in @@ -0,0 +1,44 @@ +config ADK_COMPILE_AVAHI + tristate + default n + depends ADK_PACKAGE_AVAHI_DAEMON || ADK_PACKAGE_AVAHI_DNSCONFD || ADK_PACKAGE_LIBAVAHI + +config ADK_PACKAGE_AVAHI_DAEMON + prompt "avahi-daemon...................... An mDNS/DNS-SD (ZeroConf) implementation (daemon)" + tristate + default n + select ADK_COMPILE_AVAHI + select ADK_PACKAGE_LIBAVAHI + select ADK_PACKAGE_LIBDAEMON + help + Avahi is a system which facilitates service discovery on a local network -- + this means that you can plug your laptop or computer into a network and + instantly be able to view other people who you can chat with, find printers + to print to or find files being shared. This kind of technology is already + found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf') + and is very convenient. + + http://www.freedesktop.org/Software/Avahi + + This package contains an mDNS/DNS-SD daemon. + +config ADK_PACKAGE_AVAHI_DNSCONFD + prompt "avahi-dnsconfd.................. Unicast DNS server from mDNS/DNS-SD config daemon" + tristate + default n + select ADK_COMPILE_AVAHI + depends ADK_PACKAGE_AVAHI_DAEMON + help + Avahi is a system which facilitates service discovery on a local network -- + this means that you can plug your laptop or computer into a network and + instantly be able to view other people who you can chat with, find printers + to print to or find files being shared. This kind of technology is already + found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf') + and is very convenient. + + http://www.freedesktop.org/Software/Avahi + + This package contains an Unicast DNS server from mDNS/DNS-SD configuration + daemon, which may be used to configure conventional DNS servers using mDNS + in a DHCP-like fashion. Especially useful on IPv6. + diff --git a/package/avahi/Config.in.lib b/package/avahi/Config.in.lib new file mode 100644 index 000000000..abfbdc426 --- /dev/null +++ b/package/avahi/Config.in.lib @@ -0,0 +1,18 @@ +config ADK_PACKAGE_LIBAVAHI + prompt "libavahi.......................... An mDNS/DNS-SD (ZeroConf) implementation (library)" + tristate + default n + select ADK_COMPILE_AVAHI + help + Avahi is a system which facilitates service discovery on a local network -- + this means that you can plug your laptop or computer into a network and + instantly be able to view other people who you can chat with, find printers + to print to or find files being shared. This kind of technology is already + found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf') + and is very convenient. + + http://www.freedesktop.org/Software/Avahi + + This package contains the mDNS/DNS-SD shared libraries, used by other programs. + + diff --git a/package/avahi/Makefile b/package/avahi/Makefile new file mode 100644 index 000000000..f950db29b --- /dev/null +++ b/package/avahi/Makefile @@ -0,0 +1,83 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= avahi +PKG_VERSION:= 0.6.16 +PKG_RELEASE:= 6 +PKG_MD5SUM:= 3cbc460bbd55bae35f7b57443c063640 +MASTER_SITES:= http://avahi.org/download/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,AVAHI_DAEMON,avahi-daemon,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,AVAHI_DNSCONFD,avahi-dnsconfd,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,LIBAVAHI,libavahi,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +TCFLAGS+= -DNDEBUG +CONFIGURE_STYLE= gnu +CONFIGURE_ENV+= ac_cv_func_malloc_0_nonnull=yes \ + ac_cv_func_realloc_0_nonnull=yes \ + ac_cv_func_memcmp_working=yes +CONFIGURE_ARGS+= --disable-glib \ + --disable-qt3 \ + --disable-qt4 \ + --disable-gtk \ + --disable-dbus \ + --enable-expat \ + --enable-libdaemon \ + --disable-python \ + --disable-pygtk \ + --disable-python-dbus \ + --disable-mono \ + --disable-monodoc \ + --disable-doxygen-doc \ + --disable-doxygen-dot \ + --disable-doxygen-man \ + --disable-doxygen-rtf \ + --disable-doxygen-xml \ + --disable-doxygen-chm \ + --disable-doxygen-chi \ + --disable-doxygen-html \ + --disable-doxygen-ps \ + --disable-doxygen-pdf \ + --disable-xmltoman \ + --with-distro=none \ + --with-avahi-user=avahi \ + --with-avahi-group=avahi +BUILD_STYLE= auto +INSTALL_STYLE= auto +#XXX maybe unneeded? +#XAKE_FLAGS+= PKG_CONFIG_PATH=${STAGING_DIR}/usr/lib/pkgconfig + +post-install: + # avahi daemon + ${INSTALL_DIR} ${IDIR_AVAHI_DAEMON}/etc/avahi + ${INSTALL_DATA} ./files/avahi-daemon.conf ${IDIR_AVAHI_DAEMON}/etc/avahi/ + ${INSTALL_DIR} ${IDIR_AVAHI_DAEMON}/etc/avahi/services + ${INSTALL_DATA} ./files/service-http \ + ${IDIR_AVAHI_DAEMON}/etc/avahi/services/http.service + ${INSTALL_DATA} ./files/service-ssh \ + ${IDIR_AVAHI_DAEMON}/etc/avahi/services/ssh.service + ${INSTALL_DIR} ${IDIR_AVAHI_DAEMON}/etc/init.d + ${INSTALL_BIN} ./files/avahi-daemon.init \ + ${IDIR_AVAHI_DAEMON}/etc/init.d/avahi-daemon + ${INSTALL_DIR} ${IDIR_AVAHI_DAEMON}/usr/sbin + ${CP} ${WRKINST}/usr/sbin/avahi-daemon ${IDIR_AVAHI_DAEMON}/usr/sbin/ + # avahi dnsconfd + ${INSTALL_DIR} ${IDIR_AVAHI_DNSCONFD}/etc/avahi + ${CP} ${WRKINST}/etc/avahi/avahi-dnsconfd.action \ + ${IDIR_AVAHI_DNSCONFD}/etc/avahi/ + ${INSTALL_DIR} ${IDIR_AVAHI_DNSCONFD}/usr/sbin + ${CP} ${WRKINST}/usr/sbin/avahi-dnsconfd ${IDIR_AVAHI_DNSCONFD}/usr/sbin/ + # libavahi + ${INSTALL_DIR} ${IDIR_LIBAVAHI}/usr/lib + ${CP} ${WRKINST}/usr/lib/libavahi-common.so.* ${IDIR_LIBAVAHI}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libavahi-core.so.* ${IDIR_LIBAVAHI}/usr/lib/ + ${SED} 's,-I$$(includedir),,g' ${WRKINST}/usr/lib/pkgconfig/avahi-core.pc + ${SED} 's,-L$$(libdir),,g' ${WRKINST}/usr/lib/pkgconfig/avahi-core.pc + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/avahi/files/avahi-daemon.conf b/package/avahi/files/avahi-daemon.conf new file mode 100644 index 000000000..a5ff88619 --- /dev/null +++ b/package/avahi/files/avahi-daemon.conf @@ -0,0 +1,29 @@ +[server] +#host-name=foo +#domain-name=local +use-ipv4=yes +use-ipv6=no +check-response-ttl=no +use-iff-running=no +enable-dbus=no + +[publish] +publish-addresses=yes +publish-hinfo=yes +publish-workstation=no +publish-domain=yes +#publish-dns-servers=192.168.1.1 +#publish-resolv-conf-dns-servers=yes + +[reflector] +enable-reflector=no +reflect-ipv=no + +[rlimits] +#rlimit-as= +rlimit-core=0 +rlimit-data=4194304 +rlimit-fsize=0 +rlimit-nofile=30 +rlimit-stack=4194304 +rlimit-nproc=1 diff --git a/package/avahi/files/avahi-daemon.init b/package/avahi/files/avahi-daemon.init new file mode 100644 index 000000000..06d0863fc --- /dev/null +++ b/package/avahi/files/avahi-daemon.init @@ -0,0 +1,25 @@ +#!/bin/sh +#FWINIT 75 +. /etc/rc.conf + +case $1 in +autostop) ;; + autostart) + test x"${avahi:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; + start) + avahi-daemon -D + ;; + stop) + avahi-daemon -k + ;; + restart) + sh $0 stop + sh $0 start + ;; + *) + echo "usage: $0 { start | stop | reload }" + exit 1 +esac +exit $? diff --git a/package/avahi/files/service-http b/package/avahi/files/service-http new file mode 100644 index 000000000..8e0d3a513 --- /dev/null +++ b/package/avahi/files/service-http @@ -0,0 +1,10 @@ + + + + Web Server on %h + + _http._tcp + 80 + path=/index.html + + diff --git a/package/avahi/files/service-ssh b/package/avahi/files/service-ssh new file mode 100644 index 000000000..b41580378 --- /dev/null +++ b/package/avahi/files/service-ssh @@ -0,0 +1,9 @@ + + + + Secure Shell on %h + + _ssh._tcp + 22 + + diff --git a/package/avahi/ipkg/avahi-daemon.conffiles b/package/avahi/ipkg/avahi-daemon.conffiles new file mode 100644 index 000000000..46379ed96 --- /dev/null +++ b/package/avahi/ipkg/avahi-daemon.conffiles @@ -0,0 +1,3 @@ +/etc/avahi/avahi-daemon.conf +/etc/avahi/services/http.service +/etc/avahi/services/ssh.service diff --git a/package/avahi/ipkg/avahi-daemon.control b/package/avahi/ipkg/avahi-daemon.control new file mode 100644 index 000000000..f68a690fe --- /dev/null +++ b/package/avahi/ipkg/avahi-daemon.control @@ -0,0 +1,5 @@ +Package: avahi-daemon +Priority: optional +Section: net +Depends: libavahi, libdaemon, libexpat +Description: an mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (daemon) diff --git a/package/avahi/ipkg/avahi-daemon.postinst b/package/avahi/ipkg/avahi-daemon.postinst new file mode 100644 index 000000000..0e3e13912 --- /dev/null +++ b/package/avahi/ipkg/avahi-daemon.postinst @@ -0,0 +1,6 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +gid=$(get_next_gid) +add_group avahi $gid +add_user avahi $(get_next_uid) $gid /tmp +add_rcconf avahi avahi NO diff --git a/package/avahi/ipkg/avahi-dnsconfd.control b/package/avahi/ipkg/avahi-dnsconfd.control new file mode 100644 index 000000000..1213a0e7b --- /dev/null +++ b/package/avahi/ipkg/avahi-dnsconfd.control @@ -0,0 +1,5 @@ +Package: avahi-dnsconfd +Priority: optional +Section: net +Depends: libavahi, libdaemon, avahi-daemon +Description: an Unicast DNS server from mDNS/DNS-SD configuration daemon diff --git a/package/avahi/ipkg/libavahi.control b/package/avahi/ipkg/libavahi.control new file mode 100644 index 000000000..4912296bc --- /dev/null +++ b/package/avahi/ipkg/libavahi.control @@ -0,0 +1,4 @@ +Package: libavahi +Priority: optional +Section: libs +Description: an DNS-SD over mDNS (aka RendezVous/Bonjour/ZeroConf) implementation (library) diff --git a/package/axtls/Config.in b/package/axtls/Config.in new file mode 100644 index 000000000..5d1459da9 --- /dev/null +++ b/package/axtls/Config.in @@ -0,0 +1,17 @@ +config ADK_COMPILE_AXTLS + tristate + default n + depends ADK_PACKAGE_LIBAXTLS || ADK_PACKAGE_AXHTTPD + +config ADK_PACKAGE_AXHTTPD + prompt "axhttpd........................... small embedded webserver" + tristate + default n + select ADK_COMPILE_AXTLS + select ADK_PACKAGE_LIBAXTLS + help + axhttpd is a small embedded web server using the axTLS library. + + http://www.axtls.co.nr/ + + diff --git a/package/axtls/Config.in.lib b/package/axtls/Config.in.lib new file mode 100644 index 000000000..d7b64aa44 --- /dev/null +++ b/package/axtls/Config.in.lib @@ -0,0 +1,11 @@ +config ADK_PACKAGE_LIBAXTLS + prompt "libaxtls.......................... Embedded client/server TLSv1 SSL library" + tristate + default n + select ADK_COMPILE_AXTLS + help + Embedded client/server TLSv1 SSL library + + http://www.axtls.co.nr/ + + diff --git a/package/axtls/Makefile b/package/axtls/Makefile new file mode 100644 index 000000000..2ac2611a3 --- /dev/null +++ b/package/axtls/Makefile @@ -0,0 +1,43 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= axtls +PKG_VERSION:= 1.1.0 +PKG_RELEASE:= 8 +PKG_MD5SUM:= 4a834edc93f46fdca4f9c93ec665376e +DISTFILES:= axTLS-${PKG_VERSION}.tar.gz +MASTER_SITES:= ${MASTER_SITE_SOURCEFORGE:=axtls/} +WRKDIST= ${WRKDIR}/axTLS + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,LIBAXTLS,libaxtls,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,AXHTTPD,axhttpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) + +BUILD_STYLE= auto +XAKE_FLAGS+= STRIP='' \ + CC='${TARGET_CC}' \ + OPT_CFLAGS='${TARGET_CFLAGS}' \ + OPT_LDFLAGS="" + +do-configure: + ${CP} ./files/config ${WRKBUILD}/config/.config + ${MAKE} -C ${WRKBUILD} oldconfig + +do-install: + # axtls library + ${INSTALL_DIR} ${IDIR_LIBAXTLS}/usr/lib + $(CP) $(WRKBUILD)/_stage/libaxtls.so.* $(IDIR_LIBAXTLS)/usr/lib/ + # awhttpd server + ${INSTALL_DIR} ${IDIR_AXHTTPD}/etc/init.d + ${INSTALL_DIR} ${IDIR_AXHTTPD}/www + ${INSTALL_DIR} ${IDIR_AXHTTPD}/usr/sbin + ${INSTALL_BIN} $(WRKBUILD)/_stage/axhttpd $(IDIR_AXHTTPD)/usr/sbin/ + $(INSTALL_BIN) ./files/axhttpd.init \ + $(IDIR_AXHTTPD)/etc/init.d/axhttpd + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/axtls/files/axhttpd.init b/package/axtls/files/axhttpd.init new file mode 100644 index 000000000..70ccc48d5 --- /dev/null +++ b/package/axtls/files/axhttpd.init @@ -0,0 +1,30 @@ +#!/bin/sh +#FWINIT 80 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${axhttpd:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + if [ ! -d /www -a ! -h /www ]; then + echo "axhttpd not started. create /www first" + exit 0 + fi + /usr/sbin/axhttpd >>/var/log/axhttpd.access + ;; +stop) + killall axhttpd + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/axtls/files/config b/package/axtls/files/config new file mode 100644 index 000000000..caa5dc35a --- /dev/null +++ b/package/axtls/files/config @@ -0,0 +1,102 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y +CONFIG_PLATFORM_LINUX=y +# CONFIG_PLATFORM_CYGWIN is not set +# CONFIG_PLATFORM_SOLARIS is not set +# CONFIG_PLATFORM_WIN32 is not set + +# +# General Configuration +# +PREFIX="/usr" +CONFIG_DEBUG=y +# CONFIG_VISUAL_STUDIO_6_0 is not set +# CONFIG_VISUAL_STUDIO_7_0 is not set +# CONFIG_VISUAL_STUDIO_8_0 is not set +CONFIG_VISUAL_STUDIO_6_0_BASE="" +CONFIG_VISUAL_STUDIO_7_0_BASE="" +CONFIG_VISUAL_STUDIO_8_0_BASE="" +CONFIG_EXTRA_CFLAGS_OPTIONS="" +CONFIG_EXTRA_LDFLAGS_OPTIONS="" + +# +# SSL Library +# +# CONFIG_SSL_SERVER_ONLY is not set +# CONFIG_SSL_CERT_VERIFICATION is not set +CONFIG_SSL_ENABLE_CLIENT=y +# CONFIG_SSL_FULL_MODE is not set +# CONFIG_SSL_SKELETON_MODE is not set +# CONFIG_SSL_PROT_LOW is not set +CONFIG_SSL_PROT_MEDIUM=y +# CONFIG_SSL_PROT_HIGH is not set +CONFIG_SSL_USE_DEFAULT_KEY=y +CONFIG_SSL_ENABLE_V23_HANDSHAKE=y +CONFIG_SSL_HAS_PEM=y +CONFIG_SSL_USE_PKCS12=y +CONFIG_SSL_EXPIRY_TIME=24 +CONFIG_X509_MAX_CA_CERTS=4 +CONFIG_SSL_MAX_CERTS=2 +# CONFIG_SSLCTX_MUTEXING is not set +CONFIG_USE_DEV_URANDOM=y +# CONFIG_WIN32_USE_CRYPTO_LIB is not set +# CONFIG_PERFORMANCE_TESTING is not set +# CONFIG_SSL_TEST is not set +CONFIG_AXHTTPD=y + +# +# Axhttpd Configuration +# +# CONFIG_HTTP_STATIC_BUILD is not set +CONFIG_HTTP_HTTPS_PORT=443 +CONFIG_HTTP_SESSION_CACHE_SIZE=5 +CONFIG_HTTP_WEBROOT="/www" +CONFIG_HTTP_PORT=80 +CONFIG_HTTP_TIMEOUT=0 +CONFIG_HTTP_HAS_CGI=y +CONFIG_HTTP_CGI_EXTENSION=".cgi" +CONFIG_HTTP_DIRECTORIES=y +# CONFIG_HTTP_PERM_CHECK is not set +# CONFIG_HTTP_HAS_IPV6 is not set +CONFIG_HTTP_ALL_MIME_TYPES=y +CONFIG_HTTP_VERBOSE=y +CONFIG_HTTP_IS_DAEMON=y + +# +# Language Bindings +# +# CONFIG_BINDINGS is not set +# CONFIG_CSHARP_BINDINGS is not set +# CONFIG_VBNET_BINDINGS is not set +CONFIG_DOT_NET_FRAMEWORK_BASE="" +# CONFIG_JAVA_BINDINGS is not set +CONFIG_JAVA_HOME="" +# CONFIG_PERL_BINDINGS is not set +CONFIG_PERL_CORE="" +CONFIG_PERL_LIB="" + +# +# Samples +# +# CONFIG_SAMPLES is not set +# CONFIG_C_SAMPLES is not set +# CONFIG_CSHARP_SAMPLES is not set +# CONFIG_VBNET_SAMPLES is not set +# CONFIG_JAVA_SAMPLES is not set +# CONFIG_PERL_SAMPLES is not set + +# +# BigInt Options +# +# CONFIG_BIGINT_CLASSICAL is not set +# CONFIG_BIGINT_MONTGOMERY is not set +CONFIG_BIGINT_BARRETT=y +# CONFIG_BIGINT_CRT is not set +# CONFIG_BIGINT_KARATSUBA is not set +MUL_KARATSUBA_THRESH=0 +SQU_KARATSUBA_THRESH=0 +# CONFIG_BIGINT_SLIDING_WINDOW is not set +# CONFIG_BIGINT_SQUARE is not set +# CONFIG_BIGINT_CHECK_ON is not set diff --git a/package/axtls/ipkg/axhttpd.control b/package/axtls/ipkg/axhttpd.control new file mode 100644 index 000000000..e19f3fc4c --- /dev/null +++ b/package/axtls/ipkg/axhttpd.control @@ -0,0 +1,5 @@ +Package: axhttpd +Priority: optional +Section: net +Depends: libaxtls +Description: small embedded webserver diff --git a/package/axtls/ipkg/axhttpd.postinst b/package/axtls/ipkg/axhttpd.postinst new file mode 100644 index 000000000..d19a62e8a --- /dev/null +++ b/package/axtls/ipkg/axhttpd.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf axhttpd diff --git a/package/axtls/ipkg/libaxtls.control b/package/axtls/ipkg/libaxtls.control new file mode 100644 index 000000000..b9c9d4be4 --- /dev/null +++ b/package/axtls/ipkg/libaxtls.control @@ -0,0 +1,5 @@ +Package: libaxtls +Priority: optional +Section: libs +Description: an embedded client/server TLSv1 SSL implementation +Depends: diff --git a/package/axtls/patches/001-opt_flags.patch b/package/axtls/patches/001-opt_flags.patch new file mode 100644 index 000000000..a27b3a449 --- /dev/null +++ b/package/axtls/patches/001-opt_flags.patch @@ -0,0 +1,33 @@ +diff -ruN axTLS-0.95-old/config/makefile.conf axTLS-0.95-new/config/makefile.conf +--- axTLS-0.95-old/config/makefile.conf 2006-02-28 02:50:28.000000000 +0100 ++++ axTLS-0.95-new/config/makefile.conf 2006-05-18 22:24:02.000000000 +0200 +@@ -87,20 +87,23 @@ + endif + + ifdef CONFIG_DEBUG +-CFLAGS += -g ++OPT_CFLAGS = -g + else +-LDFLAGS += -s ++OPT_LDFLAGS = -s + ifdef CONFIG_PLATFORM_SOLARIS +-CFLAGS += -O ++OPT_CFLAGS = -O + else +-CFLAGS += -O3 ++OPT_CFLAGS = -O3 + endif + + endif # CONFIG_DEBUG + endif # WIN32 + +-CFLAGS+=$(subst ",, $(strip $(CONFIG_EXTRA_CFLAGS_OPTIONS))) +-LDFLAGS+=$(subst ",, $(strip $(CONFIG_EXTRA_LDFLAGS_OPTIONS))) ++EXTRA_CFLAGS=$(subst ",, $(strip $(CONFIG_EXTRA_CFLAGS_OPTIONS))) ++EXTRA_LDFLAGS=$(subst ",, $(strip $(CONFIG_EXTRA_LDFLAGS_OPTIONS))) ++ ++CFLAGS += $(OPT_CFLAGS) $(EXTRA_CFLAGS) ++LDFLAGS += $(OPT_LDFLAGS) $(EXTRA_LDFLAGS) + + endif # not 'clean' + diff --git a/package/axtls/patches/patch-httpd_main_c b/package/axtls/patches/patch-httpd_main_c new file mode 100644 index 000000000..b4017803e --- /dev/null +++ b/package/axtls/patches/patch-httpd_main_c @@ -0,0 +1,21 @@ +$Id$ +--- axTLS.orig/httpd/main.c 2007-01-31 22:35:53.000000000 +0100 ++++ axTLS/httpd/main.c 2007-02-10 12:15:20.000000000 +0100 +@@ -98,11 +98,12 @@ int main(int argc, char *argv[]) + WSADATA wsaData; + WSAStartup(wVersionRequested,&wsaData); + #else +- if (getuid() == 0) /* change our uid if we are root */ +- { +- setgid(32767); +- setuid(32767); +- } ++ /* we can't bind to port 80/443 if we are nobody ?! */ ++ //if (getuid() == 0) /* change our uid if we are root */ ++ //{ ++ // setgid(32767); ++ // setuid(32767); ++ //} + + signal(SIGQUIT, die); + signal(SIGPIPE, SIG_IGN); diff --git a/package/base-files/Config.in b/package/base-files/Config.in new file mode 100644 index 000000000..8312e2ee2 --- /dev/null +++ b/package/base-files/Config.in @@ -0,0 +1,16 @@ +config ADK_PACKAGE_BASE_FILES + prompt "base-files........................... basic filesystem layout" + bool + default y + help + Basic filesystem layout. + +config ADK_PACKAGE_CONFIG_IN_ETC + prompt ".config in /etc...................... include gzipped version of .config in image" + bool + default y + help + Copy the configuration file (.config) to the image. The + file will be found in /etc/adkconfig.gz. This takes about + 7kBytes of file system space. From this file you can always rebuild + the image from source. diff --git a/package/base-files/Makefile b/package/base-files/Makefile new file mode 100644 index 000000000..8d07473d7 --- /dev/null +++ b/package/base-files/Makefile @@ -0,0 +1,72 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk +include $(TOPDIR)/mk/rootfs.mk + +PKG_NAME:= base-files +PKG_VERSION:= 1.0 +PKG_RELEASE:= 5 +WRKDIST= ${WRKDIR}/base-files +NO_DISTFILES:= 1 +ifeq ($(CPU_ARCH),x86_64) +PKG_ID= x86-64-${FS} +else +PKG_ID= ${DEVICE}-${FS} +endif +WRKDIR= ${WRKDIR_BASE}/w-${PKG_NAME}-${PKG_VERSION}-${PKG_RELEASE}-${PKG_ID} +ICONTROL_BASE_FILES= ipkg/base-files.control +ICONTROL_ADDON_BASE_FILES= "Package: base-files-${PKG_ID}" + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,BASE_FILES,base-files-${PKG_ID},${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +do-install: + $(CP) ./files/* $(IDIR_BASE_FILES) + $(CP) $(TOPDIR)/target/$(DEVICE)/files/* $(IDIR_BASE_FILES) + typeset -i REV; \ + if fgrep xml .svn/entries >/dev/null 2>&1; then \ + let REV="$$(sed -n '/revision=/s/^.*"\([0-9]*\)".*$$/\1/p' \ + .svn/entries)"; \ + else \ + let REV="$$(head -n 4 .svn/entries | tail -1)"; \ + fi; ${SED} 's,$$R,'$$REV,g $(IDIR_BASE_FILES)/etc/banner + $(SED) 's,@TARGET@,$(DEVICE),g' $(IDIR_BASE_FILES)/etc/ipkg.conf + $(SED) 's,@VERSION@,$(ADK_VERSION),g' $(IDIR_BASE_FILES)/etc/ipkg.conf + echo /bin/sh >${IDIR_BASE_FILES}/etc/shells + echo /bin/ash >>${IDIR_BASE_FILES}/etc/shells +ifneq (${ADK_PACKAGE_BASH},) + echo /bin/bash >>${IDIR_BASE_FILES}/etc/shells +endif +ifneq (${ADK_PACKAGE_MKSH},) + echo /bin/mksh >>${IDIR_BASE_FILES}/etc/shells +endif +ifneq (${ADK_PACKAGE_ZSH},) + echo /bin/zsh >>${IDIR_BASE_FILES}/etc/shells +endif + mkdir -p $(IDIR_BASE_FILES)/dev + mkdir -p $(IDIR_BASE_FILES)/boot + mkdir -p $(IDIR_BASE_FILES)/root + mkdir -p $(IDIR_BASE_FILES)/sys + mkdir -p $(IDIR_BASE_FILES)/etc/crontabs + mkdir -p $(IDIR_BASE_FILES)/mnt + mkdir -p $(IDIR_BASE_FILES)/proc + mkdir -p $(IDIR_BASE_FILES)/tmp + mkdir -p $(IDIR_BASE_FILES)/usr/lib + mkdir -p $(IDIR_BASE_FILES)/usr/bin + chmod 755 $(IDIR_BASE_FILES)/lib/mdev/init + ln -sf ../tmp/resolv.conf $(IDIR_BASE_FILES)/etc/resolv.conf + ln -sf ../proc/mounts $(IDIR_BASE_FILES)/etc/mtab + rm -rf $(IDIR_BASE_FILES)/var + ln -sf tmp $(IDIR_BASE_FILES)/var + -find $(IDIR_BASE_FILES) -type d -name CVS | xargs rm -rf + -find $(IDIR_BASE_FILES) -type d -name .svn | xargs rm -rf + -find $(IDIR_BASE_FILES) -name '.#*' | xargs rm -f +ifneq (${ADK_PACKAGE_CONFIG_IN_ETC},) + gzip -9c ${TOPDIR}/.config >$(IDIR_BASE_FILES)/etc/adkconfig.gz +endif + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/base-files/files/etc/banner b/package/base-files/files/etc/banner new file mode 100644 index 000000000..bdee76e22 --- /dev/null +++ b/package/base-files/files/etc/banner @@ -0,0 +1,3 @@ + + Linux created with OpenADK + --- build from revision $R --- diff --git a/package/base-files/files/etc/functions.sh b/package/base-files/files/etc/functions.sh new file mode 100644 index 000000000..4d225b882 --- /dev/null +++ b/package/base-files/files/etc/functions.sh @@ -0,0 +1,79 @@ +# newline +N=" +" + +append() { + local var="$1" + local value="$2" + local sep="${3:- }" + + eval "export -- \"$var=\${$var:+\${$var}\${value:+\$sep}}\$value\"" +} + +load_modules() { + (sed "s,^[^#][^[:space:]]*,insmod /lib/modules/$(uname -r)/&.ko," $* | sh 2>&- || :) +} + +user_exists() { + grep -q "^$1:" $IPKG_INSTROOT/etc/passwd 2>&- +} + +group_exists() { + grep -q "^$1:" $IPKG_INSTROOT/etc/group 2>&- +} + +service_exists() { + grep -q "^$1[[:space:]]*$2" $IPKG_INSTROOT/etc/services 2>&- +} + +rcconf_exists() { + grep -q "^#*$1=" $IPKG_INSTROOT/etc/rc.conf 2>&- +} + +add_user() { + user_exists $1 || { + echo "adding user $1 to /etc/passwd" + echo "$1:x:$2:${3:-$2}:$1:${4:-/tmp}:${5:-/bin/false}" \ + >>$IPKG_INSTROOT/etc/passwd + } +} + +add_group() { + group_exists $1 || { + echo "adding group $1 to /etc/group" + echo "$1:x:$2:$3" >>$IPKG_INSTROOT/etc/group + } +} + +add_service() { + service_exists $1 $2 || { + echo "adding service $1 to /etc/services" + printf '%s\t%s\n' "$1" "$2" >>$IPKG_INSTROOT/etc/services + } +} + +add_rcconf() { + rcconf_exists ${2-$1} || { + echo "adding service ${2-$1} to /etc/rc.conf" + printf '%s\t\t# %s\n' "${2:-$1}=${3:-NO}" "$1" \ + >>$IPKG_INSTROOT/etc/rc.conf + } +} + +get_next_uid() { + uid=1 + while grep "^[^:]*:[^:]*:$uid:" $IPKG_INSTROOT/etc/passwd \ + >/dev/null 2>&1; do + let uid++ + done + echo $uid +} + +get_next_gid() { + gid=1 + while grep "^[^:]*:[^:]*:$gid:" $IPKG_INSTROOT/etc/group \ + >/dev/null 2>&1; do + let gid++ + done + echo $gid +} diff --git a/package/base-files/files/etc/group b/package/base-files/files/etc/group new file mode 100644 index 000000000..1f444a8bf --- /dev/null +++ b/package/base-files/files/etc/group @@ -0,0 +1,3 @@ +root:x:0: +admin:x:100: +nogroup:x:65534: diff --git a/package/base-files/files/etc/hosts b/package/base-files/files/etc/hosts new file mode 100644 index 000000000..87d837fc7 --- /dev/null +++ b/package/base-files/files/etc/hosts @@ -0,0 +1,2 @@ +::1 localhost +127.0.0.1 localhost diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot new file mode 100644 index 000000000..c81d7ea65 --- /dev/null +++ b/package/base-files/files/etc/init.d/boot @@ -0,0 +1,27 @@ +#!/bin/sh +#FWINIT 10 +[[ $1 = autostart ]] || exit 0 + +. /etc/functions.sh + +mkdir -p /var/log +mkdir -p /var/run +touch /var/log/lastlog +touch /var/log/wtmp +ln -s /var/tmp /tmp + +echo 0 > /proc/sys/kernel/printk + +HOSTNAME= +[[ -s /etc/hostname ]] && HOSTNAME=$(cat /etc/hostname) +HOSTNAME=${HOSTNAME%%.*} +echo ${HOSTNAME:=linux} >/proc/sys/kernel/hostname + +chown 0:0 /tmp; chmod 1777 /tmp + +load_modules /etc/modules +for f in /etc/modules.d/*; do + [[ -e $f ]] && load_modules /etc/modules.d/* + break +done +exit 0 diff --git a/package/base-files/files/etc/init.d/done b/package/base-files/files/etc/init.d/done new file mode 100644 index 000000000..018d52a43 --- /dev/null +++ b/package/base-files/files/etc/init.d/done @@ -0,0 +1,4 @@ +#!/bin/sh +#FWINIT 98 +[[ $1 = autostart ]] && sysctl -p >&- +exit 0 diff --git a/package/base-files/files/etc/init.d/rcK b/package/base-files/files/etc/init.d/rcK new file mode 100755 index 000000000..3cf210fa7 --- /dev/null +++ b/package/base-files/files/etc/init.d/rcK @@ -0,0 +1,21 @@ +#!/bin/sh +export PATH=/bin:/sbin:/usr/bin:/usr/sbin +busybox reboot -d 60 -f & # just in case… +{ + [[ -f /proc/diag/led/power ]] && echo f >/proc/diag/led/power + test -e /etc/rc.shutdown && (/bin/sh /etc/rc.shutdown) 2>&1 + grep '^#FWINIT ' /etc/init.d/* | \ + sort -rnk2 | \ + while read line; do + shebang=$(sed -n '1s/^#![ ]*//p' ${line%%:*}) + case $shebang in + *[\ \ ]*) shebang=\'$(echo X"$shebang" | sed \ + -e 's/^X//' -e "s/'/'\\\\''/g" \ + -e 's/^\([^ ][^ ]*\)[ ]*$/\1/' \ + -e 's/^\([^ ][^ ]*\)[ ][ ]*\(..*\)$/\1 \2/' \ + -e 's/^\([^ ][^ ]*\) /\1'\'' '\''/')\' ;; + esac + ${shebang:-/bin/sh} ${line%%:*} autostop 2>&1 + done + [[ -f /proc/diag/led/power ]] && echo 0 >/proc/diag/led/power +} | logger -s -p 6 -t '' diff --git a/package/base-files/files/etc/init.d/rcS b/package/base-files/files/etc/init.d/rcS new file mode 100755 index 000000000..f9c47e425 --- /dev/null +++ b/package/base-files/files/etc/init.d/rcS @@ -0,0 +1,10 @@ +#!/bin/sh +export PATH=/bin:/sbin:/usr/bin:/usr/sbin +{ + grep '^#FWINIT ' /etc/init.d/* | \ + sort -nk2 | \ + while read line; do + /bin/sh ${line%%:*} autostart 2>&1 + done + test -e /etc/init.d/boot.local && (/bin/sh /etc/init.d/boot.local) 2>&1 +} | logger -s -p 6 -t '' & diff --git a/package/base-files/files/etc/inittab b/package/base-files/files/etc/inittab new file mode 100644 index 000000000..960ea77d8 --- /dev/null +++ b/package/base-files/files/etc/inittab @@ -0,0 +1,4 @@ +::sysinit:/etc/init.d/rcS +::shutdown:/etc/init.d/rcK +ttyS0::respawn:/sbin/getty -i -L ttyS0 115200 vt100 + diff --git a/package/base-files/files/etc/ipkg.conf b/package/base-files/files/etc/ipkg.conf new file mode 100644 index 000000000..6f3a8be2d --- /dev/null +++ b/package/base-files/files/etc/ipkg.conf @@ -0,0 +1,3 @@ +src openadk http://waldemar-brodkorb.de/openadk/downloads/@TARGET@/packages +dest root / +dest ram /tmp diff --git a/package/base-files/files/etc/mdev.conf b/package/base-files/files/etc/mdev.conf new file mode 100644 index 000000000..61b818523 --- /dev/null +++ b/package/base-files/files/etc/mdev.conf @@ -0,0 +1,11 @@ +tun 0:0 660 >net/tun +null 0:0 777 +zero 0:0 666 +console 0:0 0600 +kmem 0:0 000 +mem 0:0 0640 +port 0:0 0640 +ptmx 0:0 666 +tty 0:0 0660 +ttyS* 0:0 640 +.* 0:0 644 @/lib/mdev/init diff --git a/package/base-files/files/etc/modules b/package/base-files/files/etc/modules new file mode 100644 index 000000000..014f40f2b --- /dev/null +++ b/package/base-files/files/etc/modules @@ -0,0 +1 @@ +# add modules to load on startup here diff --git a/package/base-files/files/etc/network/interfaces b/package/base-files/files/etc/network/interfaces new file mode 100644 index 000000000..f1bd92ed2 --- /dev/null +++ b/package/base-files/files/etc/network/interfaces @@ -0,0 +1,2 @@ +auto lo +iface lo inet loopback diff --git a/package/base-files/files/etc/passwd b/package/base-files/files/etc/passwd new file mode 100644 index 000000000..87eee84af --- /dev/null +++ b/package/base-files/files/etc/passwd @@ -0,0 +1,3 @@ +root:x:0:0:root:/root:/bin/sh +admin:x:100:100:admin:/tmp:/bin/sh +nobody:*:65534:65534:nobody:/var:/bin/false diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile new file mode 100644 index 000000000..55002b01f --- /dev/null +++ b/package/base-files/files/etc/profile @@ -0,0 +1,12 @@ +export PATH=/bin:/sbin:/usr/bin:/usr/sbin +if [[ $(id -u) = 0 ]]; then + export PS1='# ' +else + export PS1='$ ' +fi +export HOME=/tmp +cat /etc/banner 2>&- +[ -x /usr/bin/less ] || alias less=more +[ -x /usr/bin/vim ] || alias vim=vi +[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; } +[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 /lib/ld.so "$@"; } diff --git a/package/base-files/files/etc/protocols b/package/base-files/files/etc/protocols new file mode 100644 index 000000000..dfe58ed22 --- /dev/null +++ b/package/base-files/files/etc/protocols @@ -0,0 +1,45 @@ +ip 0 IP +icmp 1 ICMP +igmp 2 IGMP +ggp 3 GGP +ipencap 4 IP-ENCAP +st 5 ST +tcp 6 TCP +egp 8 EGP +igp 9 IGP +pup 12 PUP +udp 17 UDP +hmp 20 HMP +xns-idp 22 XNS-IDP +rdp 27 RDP +iso-tp4 29 ISO-TP4 +xtp 36 XTP +ddp 37 DDP +idpr-cmtp 38 IDPR-CMTP +ipv6 41 IPv6 +ipv6-route 43 IPv6-Route +ipv6-frag 44 IPv6-Frag +idrp 45 IDRP +rsvp 46 RSVP +gre 47 GRE +esp 50 IPSEC-ESP +ah 51 IPSEC-AH +skip 57 SKIP +ipv6-icmp 58 IPv6-ICMP +ipv6-nonxt 59 IPv6-NoNxt +ipv6-opts 60 IPv6-Opts +rspf 73 RSPF CPHB +vmtp 81 VMTP +eigrp 88 EIGRP +ospf 89 OSPFIGP +ax.25 93 AX.25 +ipip 94 IPIP +etherip 97 ETHERIP +encap 98 ENCAP +pim 103 PIM +ipcomp 108 IPCOMP +vrrp 112 VRRP +l2tp 115 L2TP +isis 124 ISIS +sctp 132 SCTP +fc 133 FC diff --git a/package/base-files/files/etc/rc.conf b/package/base-files/files/etc/rc.conf new file mode 100644 index 000000000..024007589 --- /dev/null +++ b/package/base-files/files/etc/rc.conf @@ -0,0 +1,3 @@ +# set variables service=YES|NO (YES to enable, NO to disable) +# set variables service_flags="X" (NO to disable the service) +# note: for flags, X can be empty diff --git a/package/base-files/files/etc/shadow b/package/base-files/files/etc/shadow new file mode 100644 index 000000000..3683d71ea --- /dev/null +++ b/package/base-files/files/etc/shadow @@ -0,0 +1,3 @@ +root:$1$8sJkb6fV$46vEIu5ntmbUuljmr55zY/:14191:0::::: +admin:$1$8sJkb6fV$46vEIu5ntmbUuljmr55zY/:14191:0::::: +nobody:*:9797:0::::: diff --git a/package/base-files/files/etc/sysctl.conf b/package/base-files/files/etc/sysctl.conf new file mode 100644 index 000000000..e69de29bb diff --git a/package/base-files/files/init b/package/base-files/files/init new file mode 100755 index 000000000..567993cbb --- /dev/null +++ b/package/base-files/files/init @@ -0,0 +1,18 @@ +#!/bin/sh +export PATH=/bin:/sbin:/usr/bin:/usr/sbin +mount -nt proc proc /proc +mount -o nosuid,nodev,noexec -t sysfs sysfs /sys +mount none /tmp -t tmpfs -o size=2M +mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 +mount -o nosuid,size=64k,mode=0755 -t tmpfs mdev /dev +mkdir /dev/pts /dev/shm +mount -o nosuid,noexec -t devpts devpts /dev/pts +exec 0<>/dev/console >&0 2>&0 +echo >/dev/mdev.seq +echo "/sbin/mdev" >/proc/sys/kernel/hotplug +mdev -s +mount -o remount,rw / +cat /etc/.rnd >/dev/urandom 2>&1 +[ -f /etc/fstab ] && mount -a +[ -x /sbin/cfgfs ] && { cfgfs setup; mount -o remount,ro /;} +exec /sbin/init diff --git a/package/base-files/files/lib/mdev/init b/package/base-files/files/lib/mdev/init new file mode 100644 index 000000000..d2ae13e9c --- /dev/null +++ b/package/base-files/files/lib/mdev/init @@ -0,0 +1,21 @@ +#!/bin/sh +if [ "$ACTION" == "add" ];then + if [ "$DEVPATH" == "/bus/usb" ];then + mount -t usbfs usbfs /proc/bus/usb + fi +fi +if [ "$SUBSYSTEM" == "firmware" ];then + logger "Firmware load for $FIRMWARE requested" + if [ "$ACTION" == "add" ];then + if [ -e "/lib/firmware/$FIRMWARE" ];then + logger "Firmware loading ..." + echo 1 > /sys$DEVPATH/loading + cat "/lib/firmware/$FIRMWARE" > /sys$DEVPATH/data + echo 0 > /sys$DEVPATH/loading + logger "finished." + else + logger "Firmware file $FIRMWARE not found" + echo -1 > /sys$DEVPATH/loading + fi + fi +fi diff --git a/package/base-files/files/usr/share/udhcpc/default.script b/package/base-files/files/usr/share/udhcpc/default.script new file mode 100755 index 000000000..02e4a7a3c --- /dev/null +++ b/package/base-files/files/usr/share/udhcpc/default.script @@ -0,0 +1,38 @@ +#!/bin/sh +if [[ -z $1 ]]; then + echo "Error: should be run by udhcpc" + exit 1 +fi + +RESOLV_CONF=/tmp/resolv.conf + +case $1 in +(deconfig) + ip addr flush $interface + ;; +(renew|bound) + ip addr add $ip/${mask:-24} brd + dev $interface + + if [[ -n $router ]]; then + echo "deleting routers" + while ip route del default >&- 2>&-; do :; done + + for i in $router; do + echo "adding router $i" + ip route add to default via $i + done + fi + + echo -n >$RESOLV_CONF + ${domain:+echo search $domain} >>$RESOLV_CONF + for i in $dns; do + echo "adding dns $i" + echo "nameserver $i" >>$RESOLV_CONF + done + + # user rules + [ -f /etc/udhcpc.user ] && . /etc/udhcpc.user +;; +esac + +exit $? diff --git a/package/base-files/ipkg/base-files.conffiles b/package/base-files/ipkg/base-files.conffiles new file mode 100644 index 000000000..2495e2ee4 --- /dev/null +++ b/package/base-files/ipkg/base-files.conffiles @@ -0,0 +1,13 @@ +/etc/banner +/etc/group +/etc/hosts +/etc/ipkg.conf +/etc/modules +/etc/passwd +/etc/profile +/etc/protocols +/etc/sysctl.conf +/etc/network/interfaces +/etc/rc.conf +/etc/sysctl.conf +/etc/shadow diff --git a/package/base-files/ipkg/base-files.control b/package/base-files/ipkg/base-files.control new file mode 100644 index 000000000..00e2d7746 --- /dev/null +++ b/package/base-files/ipkg/base-files.control @@ -0,0 +1,3 @@ +Priority: base +Section: base +Description: basic filesystem structure and scripts diff --git a/package/bash/Config.in b/package/bash/Config.in new file mode 100644 index 000000000..db966be01 --- /dev/null +++ b/package/bash/Config.in @@ -0,0 +1,8 @@ +config ADK_PACKAGE_BASH + prompt "bash.............................. GNU Bourne-Again SHell" + tristate + default n + help + GNU Bourne-Again SHell + + http://www.gnu.org/software/bash/ diff --git a/package/bash/Makefile b/package/bash/Makefile new file mode 100644 index 000000000..3b348d753 --- /dev/null +++ b/package/bash/Makefile @@ -0,0 +1,27 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= bash +PKG_VERSION:= 4.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= a90a1b5a6db4838483f05438e05e8eb9 +MASTER_SITES:= http://ftp.gnu.org/gnu/bash/ + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,BASH,bash,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) + +XAKE_FLAGS+= LIBS_FOR_BUILD='' +CONFIGURE_STYLE= gnu +BUILD_STYLE= auto +INSTALL_STYLE= auto + +post-install: + $(INSTALL_DIR) $(IDIR_BASH)/bin + $(INSTALL_BIN) $(WRKINST)/usr/bin/bash $(IDIR_BASH)/bin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/bash/ipkg/bash.control b/package/bash/ipkg/bash.control new file mode 100644 index 000000000..46acdcdbc --- /dev/null +++ b/package/bash/ipkg/bash.control @@ -0,0 +1,4 @@ +Package: bash +Priority: optional +Section: shells +Description: bash shell diff --git a/package/bc/Config.in b/package/bc/Config.in new file mode 100644 index 000000000..cae451a06 --- /dev/null +++ b/package/bc/Config.in @@ -0,0 +1,22 @@ +config ADK_COMPILE_BC + tristate + depends ADK_PACKAGE_BC || ADK_PACKAGE_DC + default n + +config ADK_PACKAGE_BC + prompt "bc................................ Arbitrary precision calculator language" + tristate + default n + select ADK_COMPILE_BC + help + bc is a language that supports arbitrary precision numbers with + interactive execution of statements. + +config ADK_PACKAGE_DC + prompt "dc................................ Arbitrary precision calculator" + tristate + default n + select ADK_COMPILE_BC + help + dc is a reverse-polish desk calculator which supports unlimited + precision arithmetic. diff --git a/package/bc/Makefile b/package/bc/Makefile new file mode 100644 index 000000000..f48912f7f --- /dev/null +++ b/package/bc/Makefile @@ -0,0 +1,31 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= bc +PKG_VERSION:= 1.06 +PKG_RELEASE:= 1 +PKG_MD5SUM:= d44b5dddebd8a7a7309aea6c36fda117 +MASTER_SITES:= http://ftp.gnu.org/pub/gnu/bc/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,BC,bc,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,DC,dc,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +BUILD_STYLE= auto +INSTALL_STYLE= auto + +post-install: + # bc + ${INSTALL_DIR} ${IDIR_BC}/usr/bin + ${INSTALL_BIN} ${WRKBUILD}/bc/bc ${IDIR_BC}/usr/bin/bc + # dc + ${INSTALL_DIR} ${IDIR_DC}/usr/bin + ${INSTALL_BIN} ${WRKBUILD}/dc/dc ${IDIR_DC}/usr/bin/dc + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/bc/ipkg/bc.control b/package/bc/ipkg/bc.control new file mode 100644 index 000000000..e22ed5b7c --- /dev/null +++ b/package/bc/ipkg/bc.control @@ -0,0 +1,4 @@ +Package: bc +Priority: optional +Section: util +Description: An arbitrary precision calculator language diff --git a/package/bc/ipkg/dc.control b/package/bc/ipkg/dc.control new file mode 100644 index 000000000..1ef852500 --- /dev/null +++ b/package/bc/ipkg/dc.control @@ -0,0 +1,4 @@ +Package: dc +Priority: optional +Section: util +Description: An arbitrary precision calculator diff --git a/package/bigreqsproto/Config.in b/package/bigreqsproto/Config.in new file mode 100644 index 000000000..2c061f882 --- /dev/null +++ b/package/bigreqsproto/Config.in @@ -0,0 +1,6 @@ +config ADK_PACKAGE_BIGREQSPROTO + prompt "bigreqsproto.......................... X protocol library" + tristate + default n + help + http://www.x.org diff --git a/package/bigreqsproto/Makefile b/package/bigreqsproto/Makefile new file mode 100644 index 000000000..6ee40f266 --- /dev/null +++ b/package/bigreqsproto/Makefile @@ -0,0 +1,20 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= bigreqsproto +PKG_VERSION:= 1.0.2 +PKG_RELEASE:= 1 +PKG_MD5SUM:= d43f7faa2aac2f0206ea19f031494af1 +MASTER_SITES:= ${MASTER_SITE_XORG} + +include $(TOPDIR)/mk/package.mk + +CONFIGURE_STYLE= gnu +BUILD_STYLE= auto +INSTALL_STYLE= auto confprog + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/bigreqsproto/ipkg/bigreqsproto.control b/package/bigreqsproto/ipkg/bigreqsproto.control new file mode 100644 index 000000000..f5fa1d66b --- /dev/null +++ b/package/bigreqsproto/ipkg/bigreqsproto.control @@ -0,0 +1,4 @@ +Package: bigreqsproto +Priority: optional +Section: x11 +Description: Xproto headers diff --git a/package/bind/Config.in b/package/bind/Config.in new file mode 100644 index 000000000..b9eef008a --- /dev/null +++ b/package/bind/Config.in @@ -0,0 +1,136 @@ +config ADK_COMPILE_BIND + tristate + default n + select ADK_PACKAGE_LIBOPENSSL + +config ADK_DUMMY_BIND + prompt "bind.............................. A DNS server implementation" + tristate + default n + +config ADK_PACKAGE_BIND_TOOLS + prompt "bind-tools........................ Bind administration tools" + tristate + default n + depends ADK_DUMMY_BIND + select ADK_COMPILE_BIND + select ADK_PACKAGE_LIBBIND + help + dig, host, nsupdate, dnssec-keygen, dnssec-signzone, named-checkconf, + named-checkzone, rndc, rndc-confgen + + http://www.isc.org/sw/bind/ + + Depends: libopenssl + +config ADK_PACKAGE_BIND_RNDC + prompt "bind-rndc......................... Bind administration tools (rndc & rndc-confgen only)" + tristate + default n + depends ADK_DUMMY_BIND + select ADK_COMPILE_BIND + select ADK_PACKAGE_LIBBIND + help + rndc, rndc-confgen + + http://www.isc.org/sw/bind/ + + Depends: libopenssl + +config ADK_PACKAGE_BIND_CHECK + prompt "bind-check........................ Bind administration tools (named-checkconf & named-checkzone only)" + tristate + default n + depends ADK_DUMMY_BIND + select ADK_COMPILE_BIND + select ADK_PACKAGE_LIBBIND + help + named-checkconf, named-checkzone + + http://www.isc.org/sw/bind/ + + Depends: libopenssl + +config ADK_PACKAGE_BIND_DNSSEC + prompt "bind-dnssec....................... Bind administration tools (dnssec-keygen & dnssec-signzone only)" + tristate + default n + depends ADK_DUMMY_BIND + select ADK_COMPILE_BIND + select ADK_PACKAGE_LIBBIND + help + dnssec-keygen, dnssec-signzone + + http://www.isc.org/sw/bind/ + + Depends: libopenssl + +config ADK_PACKAGE_BIND_HOST + prompt "bind-host......................... A simple DNS client" + tristate + default n + depends ADK_DUMMY_BIND + select ADK_COMPILE_BIND + select ADK_PACKAGE_LIBBIND + help + host + + http://www.isc.org/sw/bind/ + + Depends: libopenssl + +config ADK_PACKAGE_BIND_DIG + prompt "bind-dig.......................... A DNS client" + tristate + default n + depends ADK_DUMMY_BIND + select ADK_COMPILE_BIND + select ADK_PACKAGE_LIBBIND + help + dig + + http://www.isc.org/sw/bind/ + + Depends: libopenssl + + +config ADK_PACKAGE_BIND_CLIENT + prompt "bind-client....................... A dynamic DNS client" + tristate + default n + depends ADK_DUMMY_BIND + select ADK_COMPILE_BIND + select ADK_PACKAGE_LIBBIND + help + A DNS dynamic client (nsupdate) + + http://www.isc.org/sw/bind/ + + Depends: libopenssl + +config ADK_PACKAGE_BIND_SERVER + prompt "bind-server....................... A DNS server" + tristate + default n + depends ADK_DUMMY_BIND + select ADK_COMPILE_BIND + select ADK_PACKAGE_LIBBIND + help + A DNS server (named) + + http://www.isc.org/sw/bind/ + + Depends: libopenssl + + +config ADK_PACKAGE_LIBBIND + prompt "libbind........................... Support library for the bind tools and dns server/client." + tristate + default n + depends ADK_DUMMY_BIND + select ADK_COMPILE_BIND + help + http://www.isc.org/sw/bind/ + + Depends: libopenssl + diff --git a/package/bind/Makefile b/package/bind/Makefile new file mode 100644 index 000000000..e186966d3 --- /dev/null +++ b/package/bind/Makefile @@ -0,0 +1,92 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= bind +PKG_VERSION:= 9.4.1 +PKG_RELEASE:= 4 +PKG_MD5SUM:= 09b54d35036cb0423b2e618f21766285 +MASTER_SITES:= ftp://ftp.isc.org/isc/bind9/${PKG_VERSION}/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,BIND_SERVER,bind-server,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,BIND_CLIENT,bind-client,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,LIBBIND,libbind,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,BIND_TOOLS,bind-tools,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,BIND_RNDC,bind-rndc,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,BIND_CHECK,bind-check,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,BIND_DNSSEC,bind-dnssec,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,BIND_HOST,bind-host,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,BIND_DIG,bind-dig,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +CONFIGURE_ENV+= BUILD_CC="${TARGET_CC}" +CONFIGURE_ARGS+= --with-randomdev=/dev/urandom \ + --disable-threads \ + --with-openssl=${STAGING_DIR}/usr/ \ + --with-libtool +BUILD_STYLE= auto +INSTALL_STYLE= auto + +pre-build: + ${MAKE} -C ${WRKBUILD}/lib/dns \ + BUILD_CC="${HOSTCC}" \ + CC="${HOSTCC}" \ + CFLAGS='${HOSTCFLAGS}' \ + gen + +post-install: + # bind server + ${INSTALL_DIR} ${IDIR_BIND_SERVER}/usr/sbin + ${INSTALL_DIR} ${IDIR_BIND_SERVER}/etc/init.d + ${INSTALL_BIN} ${WRKINST}/usr/sbin/named ${IDIR_BIND_SERVER}/usr/sbin/ + ${CP} ./files/bind ${IDIR_BIND_SERVER}/etc + ${INSTALL_BIN} ./files/named.init \ + ${IDIR_BIND_SERVER}/etc/init.d/named + find ${IDIR_BIND_SERVER}/etc/bind -name ".svn" | xargs rm -rf + # nsupdate + ${INSTALL_DIR} ${IDIR_BIND_CLIENT}/usr/bin + ${INSTALL_BIN} ${WRKINST}/usr/bin/nsupdate ${IDIR_BIND_CLIENT}/usr/bin/ + # bind all tools + ${INSTALL_DIR} ${IDIR_BIND_TOOLS}/usr/bin + ${INSTALL_DIR} ${IDIR_BIND_TOOLS}/usr/sbin + ${INSTALL_BIN} ${WRKINST}/usr/bin/dig ${IDIR_BIND_TOOLS}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/host ${IDIR_BIND_TOOLS}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/dnssec-keygen ${IDIR_BIND_TOOLS}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/dnssec-signzone ${IDIR_BIND_TOOLS}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/named-checkconf ${IDIR_BIND_TOOLS}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/named-checkzone ${IDIR_BIND_TOOLS}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/rndc ${IDIR_BIND_TOOLS}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/rndc-confgen ${IDIR_BIND_TOOLS}/usr/sbin/ + # rndc + ${INSTALL_DIR} ${IDIR_BIND_RNDC}/usr/sbin + ${INSTALL_BIN} ${WRKINST}/usr/sbin/rndc ${IDIR_BIND_RNDC}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/rndc-confgen ${IDIR_BIND_RNDC}/usr/sbin/ + # bind check + ${INSTALL_DIR} ${IDIR_BIND_CHECK}/usr/sbin + ${INSTALL_BIN} ${WRKINST}/usr/sbin/named-checkconf ${IDIR_BIND_CHECK}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/named-checkzone ${IDIR_BIND_CHECK}/usr/sbin/ + # dnsec tools + ${INSTALL_DIR} ${IDIR_BIND_DNSSEC}/usr/sbin + ${INSTALL_BIN} ${WRKINST}/usr/sbin/dnssec-keygen ${IDIR_BIND_DNSSEC}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/dnssec-signzone ${IDIR_BIND_DNSSEC}/usr/sbin/ + # host + ${INSTALL_DIR} ${IDIR_BIND_HOST}/usr/bin + ${INSTALL_BIN} ${WRKINST}/usr/bin/host ${IDIR_BIND_HOST}/usr/bin/ + # dig + ${INSTALL_DIR} ${IDIR_BIND_DIG}/usr/bin + ${INSTALL_BIN} ${WRKINST}/usr/bin/dig ${IDIR_BIND_DIG}/usr/bin/ + # bind lib + ${INSTALL_DIR} ${IDIR_LIBBIND}/usr/lib + ${INSTALL_BIN} ${WRKINST}/usr/lib/libbind9.so.30 ${IDIR_LIBBIND}/usr/lib/ + ${INSTALL_BIN} ${WRKINST}/usr/lib/libdns.so.32 ${IDIR_LIBBIND}/usr/lib/ + ${INSTALL_BIN} ${WRKINST}/usr/lib/libisccc.so.30 ${IDIR_LIBBIND}/usr/lib/ + ${INSTALL_BIN} ${WRKINST}/usr/lib/libisccfg.so.30 ${IDIR_LIBBIND}/usr/lib/ + ${INSTALL_BIN} ${WRKINST}/usr/lib/libisc.so.32 ${IDIR_LIBBIND}/usr/lib/ + ${INSTALL_BIN} ${WRKINST}/usr/lib/liblwres.so.30 ${IDIR_LIBBIND}/usr/lib/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/bind/files/bind/db.0 b/package/bind/files/bind/db.0 new file mode 100644 index 000000000..e3aabdbee --- /dev/null +++ b/package/bind/files/bind/db.0 @@ -0,0 +1,12 @@ +; +; BIND reverse data file for broadcast zone +; +$TTL 604800 +@ IN SOA localhost. root.localhost. ( + 1 ; Serial + 604800 ; Refresh + 86400 ; Retry + 2419200 ; Expire + 604800 ) ; Negative Cache TTL +; +@ IN NS localhost. diff --git a/package/bind/files/bind/db.127 b/package/bind/files/bind/db.127 new file mode 100644 index 000000000..cd05bef14 --- /dev/null +++ b/package/bind/files/bind/db.127 @@ -0,0 +1,13 @@ +; +; BIND reverse data file for local loopback interface +; +$TTL 604800 +@ IN SOA localhost. root.localhost. ( + 1 ; Serial + 604800 ; Refresh + 86400 ; Retry + 2419200 ; Expire + 604800 ) ; Negative Cache TTL +; +@ IN NS localhost. +1.0.0 IN PTR localhost. diff --git a/package/bind/files/bind/db.255 b/package/bind/files/bind/db.255 new file mode 100644 index 000000000..e3aabdbee --- /dev/null +++ b/package/bind/files/bind/db.255 @@ -0,0 +1,12 @@ +; +; BIND reverse data file for broadcast zone +; +$TTL 604800 +@ IN SOA localhost. root.localhost. ( + 1 ; Serial + 604800 ; Refresh + 86400 ; Retry + 2419200 ; Expire + 604800 ) ; Negative Cache TTL +; +@ IN NS localhost. diff --git a/package/bind/files/bind/db.local b/package/bind/files/bind/db.local new file mode 100644 index 000000000..66b489235 --- /dev/null +++ b/package/bind/files/bind/db.local @@ -0,0 +1,13 @@ +; +; BIND data file for local loopback interface +; +$TTL 604800 +@ IN SOA localhost. root.localhost. ( + 1 ; Serial + 604800 ; Refresh + 86400 ; Retry + 2419200 ; Expire + 604800 ) ; Negative Cache TTL +; +@ IN NS localhost. +@ IN A 127.0.0.1 diff --git a/package/bind/files/bind/db.root b/package/bind/files/bind/db.root new file mode 100644 index 000000000..01c20f047 --- /dev/null +++ b/package/bind/files/bind/db.root @@ -0,0 +1,45 @@ + +; <<>> DiG 9.2.3 <<>> ns . @a.root-servers.net. +;; global options: printcmd +;; Got answer: +;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18944 +;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13 + +;; QUESTION SECTION: +;. IN NS + +;; ANSWER SECTION: +. 518400 IN NS A.ROOT-SERVERS.NET. +. 518400 IN NS B.ROOT-SERVERS.NET. +. 518400 IN NS C.ROOT-SERVERS.NET. +. 518400 IN NS D.ROOT-SERVERS.NET. +. 518400 IN NS E.ROOT-SERVERS.NET. +. 518400 IN NS F.ROOT-SERVERS.NET. +. 518400 IN NS G.ROOT-SERVERS.NET. +. 518400 IN NS H.ROOT-SERVERS.NET. +. 518400 IN NS I.ROOT-SERVERS.NET. +. 518400 IN NS J.ROOT-SERVERS.NET. +. 518400 IN NS K.ROOT-SERVERS.NET. +. 518400 IN NS L.ROOT-SERVERS.NET. +. 518400 IN NS M.ROOT-SERVERS.NET. + +;; ADDITIONAL SECTION: +A.ROOT-SERVERS.NET. 3600000 IN A 198.41.0.4 +B.ROOT-SERVERS.NET. 3600000 IN A 192.228.79.201 +C.ROOT-SERVERS.NET. 3600000 IN A 192.33.4.12 +D.ROOT-SERVERS.NET. 3600000 IN A 128.8.10.90 +E.ROOT-SERVERS.NET. 3600000 IN A 192.203.230.10 +F.ROOT-SERVERS.NET. 3600000 IN A 192.5.5.241 +G.ROOT-SERVERS.NET. 3600000 IN A 192.112.36.4 +H.ROOT-SERVERS.NET. 3600000 IN A 128.63.2.53 +I.ROOT-SERVERS.NET. 3600000 IN A 192.36.148.17 +J.ROOT-SERVERS.NET. 3600000 IN A 192.58.128.30 +K.ROOT-SERVERS.NET. 3600000 IN A 193.0.14.129 +L.ROOT-SERVERS.NET. 3600000 IN A 198.32.64.12 +M.ROOT-SERVERS.NET. 3600000 IN A 202.12.27.33 + +;; Query time: 81 msec +;; SERVER: 198.41.0.4#53(a.root-servers.net.) +;; WHEN: Sun Feb 1 11:27:14 2004 +;; MSG SIZE rcvd: 436 + diff --git a/package/bind/files/bind/named.conf.example b/package/bind/files/bind/named.conf.example new file mode 100644 index 000000000..162454955 --- /dev/null +++ b/package/bind/files/bind/named.conf.example @@ -0,0 +1,45 @@ +// This is the primary configuration file for the BIND DNS server named. + +options { + directory "/tmp"; + + // If your ISP provided one or more IP addresses for stable + // nameservers, you probably want to use them as forwarders. + // Uncomment the following block, and insert the addresses replacing + // the all-0's placeholder. + + // forwarders { + // 0.0.0.0; + // }; + + auth-nxdomain no; # conform to RFC1035 +}; + +// prime the server with knowledge of the root servers +zone "." { + type hint; + file "/etc/bind/db.root"; +}; + +// be authoritative for the localhost forward and reverse zones, and for +// broadcast zones as per RFC 1912 + +zone "localhost" { + type master; + file "/etc/bind/db.local"; +}; + +zone "127.in-addr.arpa" { + type master; + file "/etc/bind/db.127"; +}; + +zone "0.in-addr.arpa" { + type master; + file "/etc/bind/db.0"; +}; + +zone "255.in-addr.arpa" { + type master; + file "/etc/bind/db.255"; +}; diff --git a/package/bind/files/named.init b/package/bind/files/named.init new file mode 100644 index 000000000..1838eefee --- /dev/null +++ b/package/bind/files/named.init @@ -0,0 +1,27 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; + autostart) + test x"${named:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; + start) + if [ -f /etc/bind/named.conf ]; then + named -c /etc/bind/named.conf + fi + ;; + stop) + killall named + ;; + restart) + sh $0 stop + sh $0 start + ;; + *) + echo "usage: $0 {start | stop | restart}" + exit 1 +esac +exit $? diff --git a/package/bind/ipkg/bind-check.control b/package/bind/ipkg/bind-check.control new file mode 100644 index 000000000..ba90d8274 --- /dev/null +++ b/package/bind/ipkg/bind-check.control @@ -0,0 +1,5 @@ +Package: bind-check +Priority: optional +Section: net +Description: named-checkconf & named-checkzone utilities +Depends: libopenssl libbind diff --git a/package/bind/ipkg/bind-client.control b/package/bind/ipkg/bind-client.control new file mode 100644 index 000000000..fa20c18a3 --- /dev/null +++ b/package/bind/ipkg/bind-client.control @@ -0,0 +1,5 @@ +Package: bind-client +Priority: optional +Section: net +Description: dynamic dns client +Depends: libopenssl libbind diff --git a/package/bind/ipkg/bind-dig.control b/package/bind/ipkg/bind-dig.control new file mode 100644 index 000000000..e91e30066 --- /dev/null +++ b/package/bind/ipkg/bind-dig.control @@ -0,0 +1,5 @@ +Package: bind-dig +Priority: optional +Section: net +Description: dig utility +Depends: libopenssl libbind diff --git a/package/bind/ipkg/bind-dnssec.control b/package/bind/ipkg/bind-dnssec.control new file mode 100644 index 000000000..c7c213617 --- /dev/null +++ b/package/bind/ipkg/bind-dnssec.control @@ -0,0 +1,5 @@ +Package: bind-dnssec +Priority: optional +Section: net +Description: dnssec-keygen & dnssec-signzone utilities +Depends: libopenssl libbind diff --git a/package/bind/ipkg/bind-host.control b/package/bind/ipkg/bind-host.control new file mode 100644 index 000000000..20440381a --- /dev/null +++ b/package/bind/ipkg/bind-host.control @@ -0,0 +1,6 @@ +Package: bind-host +Priority: optional +Section: net +Description: host utility +Depends: libopenssl libbind + diff --git a/package/bind/ipkg/bind-rndc.control b/package/bind/ipkg/bind-rndc.control new file mode 100644 index 000000000..a0eee7ebb --- /dev/null +++ b/package/bind/ipkg/bind-rndc.control @@ -0,0 +1,5 @@ +Package: bind-rndc +Priority: optional +Section: net +Description: rndc & rndc-confgen utilities +Depends: libopenssl libbind diff --git a/package/bind/ipkg/bind-server.conffiles b/package/bind/ipkg/bind-server.conffiles new file mode 100644 index 000000000..c4cfe37d5 --- /dev/null +++ b/package/bind/ipkg/bind-server.conffiles @@ -0,0 +1,6 @@ +/etc/bind/named.conf.example +/etc/bind/db.0 +/etc/bind/db.127 +/etc/bind/db.255 +/etc/bind/db.local +/etc/bind/db.root diff --git a/package/bind/ipkg/bind-server.control b/package/bind/ipkg/bind-server.control new file mode 100644 index 000000000..73b10d2f2 --- /dev/null +++ b/package/bind/ipkg/bind-server.control @@ -0,0 +1,6 @@ +Package: bind-server +Priority: optional +Section: net +Description: popular dns server +Depends: libopenssl libbind +Conflicts: dnsmasq diff --git a/package/bind/ipkg/bind-server.postinst b/package/bind/ipkg/bind-server.postinst new file mode 100644 index 000000000..bca89fd22 --- /dev/null +++ b/package/bind/ipkg/bind-server.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf named named NO diff --git a/package/bind/ipkg/bind-tools.control b/package/bind/ipkg/bind-tools.control new file mode 100644 index 000000000..623d0a547 --- /dev/null +++ b/package/bind/ipkg/bind-tools.control @@ -0,0 +1,5 @@ +Package: bind-tools +Priority: optional +Section: net +Description: dig, host, nslookup, nsupdate, dnssec-keygen, dnssec-signzone, named-checkconf, named-checkzone, rndc, rndc-confgen +Depends: libopenssl libbind diff --git a/package/bind/ipkg/libbind.control b/package/bind/ipkg/libbind.control new file mode 100644 index 000000000..5b4e86674 --- /dev/null +++ b/package/bind/ipkg/libbind.control @@ -0,0 +1,4 @@ +Package: libbind +Priority: optional +Section: libs +Description: Support library for the bind tools and dns server/client. diff --git a/package/bind/patches/patch-lib_isc_unix_ifiter_ioctl_c b/package/bind/patches/patch-lib_isc_unix_ifiter_ioctl_c new file mode 100644 index 000000000..adb2aa906 --- /dev/null +++ b/package/bind/patches/patch-lib_isc_unix_ifiter_ioctl_c @@ -0,0 +1,14 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- bind-9.4.1.orig/lib/isc/unix/ifiter_ioctl.c 2006-02-04 00:51:38.000000000 +0100 ++++ bind-9.4.1/lib/isc/unix/ifiter_ioctl.c 2008-10-08 14:56:12.000000000 +0200 +@@ -479,8 +479,8 @@ linux_if_inet6_current(isc_interfaceiter + for (i = 0; i < 16; i++) { + unsigned char byte; + static const char hex[] = "0123456789abcdef"; +- byte = ((index(hex, address[i * 2]) - hex) << 4) | +- (index(hex, address[i * 2 + 1]) - hex); ++ byte = ((strchr(hex, address[i * 2]) - hex) << 4) | ++ (strchr(hex, address[i * 2 + 1]) - hex); + addr6.s6_addr[i] = byte; + } + iter->current.af = AF_INET6; diff --git a/package/binutils/Config.in b/package/binutils/Config.in new file mode 100644 index 000000000..a6f9fbf43 --- /dev/null +++ b/package/binutils/Config.in @@ -0,0 +1,8 @@ +config ADK_PACKAGE_BINUTILS + prompt "binutils.......................... binary utilities (assembler,strip,nm,..)" + tristate + default n + help + binary utilities + + http://www.gnu.org/binutils diff --git a/package/binutils/Makefile b/package/binutils/Makefile new file mode 100644 index 000000000..10f71c805 --- /dev/null +++ b/package/binutils/Makefile @@ -0,0 +1,36 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk +include ${TOPDIR}/toolchain/binutils/Makefile.inc +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,BINUTILS,binutils,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS+= --disable-werror +BUILD_STYLE= auto +INSTALL_STYLE= auto + +post-patch: + ${PREVENT_PATCH} ${PATCH} ${WRKDIST} \ + ${TOPDIR}/toolchain/binutils/${BINUTILS_VERSION} \*.patch + +post-install: + ${INSTALL_DIR} ${IDIR_BINUTILS}/usr/lib + $(CP) ${WRKINST}/usr/lib/*.so ${IDIR_BINUTILS}/usr/lib + ${INSTALL_DIR} ${IDIR_BINUTILS}/usr/bin + ${INSTALL_BIN} ${WRKINST}/usr/bin/nm ${IDIR_BINUTILS}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/size ${IDIR_BINUTILS}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/ar ${IDIR_BINUTILS}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/as ${IDIR_BINUTILS}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/ld ${IDIR_BINUTILS}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/strip ${IDIR_BINUTILS}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/objdump ${IDIR_BINUTILS}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/objcopy ${IDIR_BINUTILS}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/ranlib ${IDIR_BINUTILS}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/readelf ${IDIR_BINUTILS}/usr/bin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/binutils/ipkg/binutils.control b/package/binutils/ipkg/binutils.control new file mode 100644 index 000000000..bf98f2634 --- /dev/null +++ b/package/binutils/ipkg/binutils.control @@ -0,0 +1,4 @@ +Package: binutils +Priority: optional +Section: comp +Description: binary utilities diff --git a/package/bitlbee/Config.in b/package/bitlbee/Config.in new file mode 100644 index 000000000..086b6e800 --- /dev/null +++ b/package/bitlbee/Config.in @@ -0,0 +1,15 @@ +config ADK_PACKAGE_BITLBEE + prompt "bitlbee........................... IRC gateway to IM chat networks" + tristate + default n + select ADK_PACKAGE_LIBOPENSSL + select ADK_PACKAGE_GLIB2 + select ADK_PACKAGE_LIBICONV + help + + BitlBee is an IRC daemon that can talk to instant messaging + networks and acts as a gateway. Users can connect to the + server with any normal IRC client and see their 'buddy list' + in #bitlbee. + + http://www.bitlbee.org/ diff --git a/package/bitlbee/Makefile b/package/bitlbee/Makefile new file mode 100644 index 000000000..7e08a34a0 --- /dev/null +++ b/package/bitlbee/Makefile @@ -0,0 +1,68 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= bitlbee +PKG_VERSION:= 1.2.3 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 2b1674d98804970809de3da3edf0bed2 +MASTER_SITES:= http://get.bitlbee.org/src/ \ + http://get.bitlbee.be/src/ \ + http://get.us.bitlbee.org/src/ \ + http://ftp.snt.utwente.nl/pub/software/bitlbee/src/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,BITLBEE,bitlbee,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +ifeq ($(ADK_IPV6),y) +IPV6+= --ipv6=1 +else +IPV6+= --ipv6=0 +endif + +do-configure: + (cd $(WRKBUILD); \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ + STAGING_DIR="$(STAGING_DIR)" \ + STRIP="$(STRIP)" \ + ./configure \ + --prefix=/usr/ \ + --bindir=/usr/sbin/ \ + --etcdir=/etc/bitlbee/ \ + --datadir=/usr/share/bitlbee/ \ + --config=/var/lib/bitlbee/ \ + --arch=Linux \ + --cpu="${ARCH}" \ + --debug=0 \ + --strip=1 \ + --ssl=openssl \ + --target=${REAL_GNU_TARGET_NAME} \ + ${IPV6} \ + ); + +BUILD_STYLE= auto +INSTALL_STYLE= auto +INSTALL_TARGET= install-etc install-bin + +post-configure: + @echo 'CFLAGS+="-I${STAGING_DIR}/usr/include/iconv"' >> \ + ${WRKBUILD}/Makefile.settings + @echo 'LFLAGS+="-L${STAGING_DIR}/usr/lib/iconv"' >> \ + ${WRKBUILD}/Makefile.settings + +post-install: + ${INSTALL_DIR} ${IDIR_BITLBEE}/etc/bitlbee + ${INSTALL_DIR} ${IDIR_BITLBEE}/etc/init.d + ${INSTALL_DIR} ${IDIR_BITLBEE}/usr/sbin + ${INSTALL_DATA} ${WRKINST}/etc/bitlbee/* ${IDIR_BITLBEE}/etc/bitlbee + ${INSTALL_BIN} ${WRKINST}/usr/sbin/bitlbee ${IDIR_BITLBEE}/usr/sbin + ${INSTALL_BIN} ./files/bitlbee.init \ + ${IDIR_BITLBEE}/etc/init.d/bitlbee + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/bitlbee/files/bitlbee.init b/package/bitlbee/files/bitlbee.init new file mode 100644 index 000000000..3ff950a9c --- /dev/null +++ b/package/bitlbee/files/bitlbee.init @@ -0,0 +1,27 @@ +#!/bin/sh +#FWINIT 80 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${bitlbee:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + mkdir -p /var/lib/bitlbee + bitlbee -D + ;; +stop) + killall bitlbee + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/bitlbee/ipkg/bitlbee.conffiles b/package/bitlbee/ipkg/bitlbee.conffiles new file mode 100644 index 000000000..2ccc958d5 --- /dev/null +++ b/package/bitlbee/ipkg/bitlbee.conffiles @@ -0,0 +1,2 @@ +/etc/bitlbee/motd.txt +/etc/bitlbee/bitlbee.conf diff --git a/package/bitlbee/ipkg/bitlbee.control b/package/bitlbee/ipkg/bitlbee.control new file mode 100644 index 000000000..37ca895c8 --- /dev/null +++ b/package/bitlbee/ipkg/bitlbee.control @@ -0,0 +1,5 @@ +Package: bitlbee +Priority: optional +Section: net +Depends: glib2, libopenssl, libiconv +Description: IRC gateway to IM chat networks diff --git a/package/bitlbee/ipkg/bitlbee.postinst b/package/bitlbee/ipkg/bitlbee.postinst new file mode 100644 index 000000000..a8e3b2ec4 --- /dev/null +++ b/package/bitlbee/ipkg/bitlbee.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf bitlbee diff --git a/package/bitlbee/patches/patch-configure b/package/bitlbee/patches/patch-configure new file mode 100644 index 000000000..9f13c535c --- /dev/null +++ b/package/bitlbee/patches/patch-configure @@ -0,0 +1,40 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- bitlbee-1.2.3.orig/configure 2008-09-06 14:33:13.000000000 +0200 ++++ bitlbee-1.2.3/configure 2008-10-08 16:07:32.000000000 +0200 +@@ -19,7 +19,6 @@ libevent='/usr/' + pidfile='/var/run/bitlbee.pid' + ipcsocket='/var/run/bitlbee.sock' + pcdir='$prefix/lib/pkgconfig' +-systemlibdirs="/lib /usr/lib /usr/local/lib" + + msn=1 + jabber=1 +@@ -137,12 +136,8 @@ EOF + + + if [ -n "$target" ]; then +- PKG_CONFIG_LIBDIR=/usr/$target/lib/pkgconfig +- export PKG_CONFIG_LIBDIR +- PATH=/usr/$target/bin:$PATH +- CC=$target-cc ++ CC=$target-gcc + LD=$target-ld +- systemlibdirs="/usr/$target/lib" + fi + + +@@ -348,14 +343,6 @@ fi; + + echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings + +-for i in $systemlibdirs; do +- if [ -f $i/libresolv.a ]; then +- echo '#define HAVE_RESOLV_A' >> config.h +- echo 'EFLAGS+='$i'/libresolv.a' >> Makefile.settings +- break +- fi +-done +- + STORAGES="text xml" + + if [ "$ldap" = "auto" ]; then diff --git a/package/bluez-firmware/Config.in b/package/bluez-firmware/Config.in new file mode 100644 index 000000000..15aed3102 --- /dev/null +++ b/package/bluez-firmware/Config.in @@ -0,0 +1,10 @@ +config ADK_PACKAGE_BLUEZ_FIRMWARE + prompt "bluez-firmware.................... Bluetooth firmware files" + tristate + default n + select ADK_PACKAGE_BLUEZ + help + Bluez firmware files for BCM2033 USB adapters. + + http://www.bluez.org + diff --git a/package/bluez-firmware/Makefile b/package/bluez-firmware/Makefile new file mode 100644 index 000000000..1d0b5b5aa --- /dev/null +++ b/package/bluez-firmware/Makefile @@ -0,0 +1,28 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= bluez-firmware +PKG_VERSION:= 1.2 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 1cc3cefad872e937e05de5a0a2b390dd +MASTER_SITES:= http://bluez.sourceforge.net/download/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,BLUEZ_FIRMWARE,bluez-firmware,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS+= --libdir=/lib +BUILD_STYLE= auto +INSTALL_STYLE= auto + +post-install: + ${INSTALL_DIR} ${IDIR_BLUEZ_FIRMWARE}/lib/firmware + ${CP} ${WRKINST}/lib/firmware/BCM* \ + ${IDIR_BLUEZ_FIRMWARE}/lib/firmware + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/bluez-firmware/ipkg/bluez-firmware.control b/package/bluez-firmware/ipkg/bluez-firmware.control new file mode 100644 index 000000000..4b5a794ff --- /dev/null +++ b/package/bluez-firmware/ipkg/bluez-firmware.control @@ -0,0 +1,5 @@ +Package: bluez-firmware +Priority: optional +Section: bluetooth +Description: Bluez firmware for BCM2033 +Depends: kmod-bluetooth, bluez-libs, bluez-utils diff --git a/package/bluez/Config.in b/package/bluez/Config.in new file mode 100644 index 000000000..3bb4c4a37 --- /dev/null +++ b/package/bluez/Config.in @@ -0,0 +1,10 @@ +config ADK_PACKAGE_BLUEZ + prompt "bluez............................. Bluetooth library and tools" + tristate + default n + select ADK_KPACKAGE_KMOD_BT + help + Bluez libs and apps. + + http://bluez.org + diff --git a/package/bluez/Makefile b/package/bluez/Makefile new file mode 100644 index 000000000..7e9c4b89e --- /dev/null +++ b/package/bluez/Makefile @@ -0,0 +1,47 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= bluez +PKG_VERSION:= 4.12 +PKG_RELEASE:= 1 +PKG_MD5SUM:= e599d7f4ed7e022c85e485934f29a340 +MASTER_SITES:= ${MASTER_SITE_KERNEL:=bluetooth/} + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,BLUEZ,bluez,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE:= gnu +CONFIGURE_ARGS+= --enable-tools \ + --enable-alsa \ + --enable-usb \ + --enable-bccmd \ + --enable-hidd \ + --enable-pand \ + --enable-dund \ + --disable-cups +BUILD_STYLE:= auto +INSTALL_STYLE:= auto + +post-install: + ${INSTALL_DIR} ${IDIR_BLUEZ}/usr/lib + ${CP} ${WRKINST}/usr/lib/libbluetooth.so.* ${IDIR_BLUEZ}/usr/lib/ + ${INSTALL_DIR} $(IDIR_BLUEZ)/etc/dbus-1/system.d + ${INSTALL_DIR} ${IDIR_BLUEZ}/usr/bin + ${CP} ${WRKINST}/usr/bin/* ${IDIR_BLUEZ}/usr/bin/ + ${INSTALL_DIR} ${IDIR_BLUEZ}/usr/sbin + ${CP} ${WRKINST}/usr/sbin/* ${IDIR_BLUEZ}/usr/sbin/ + ${INSTALL_DIR} ${IDIR_BLUEZ}/etc/bluetooth + ${CP} ${WRKINST}/etc/bluetooth/rfcomm.conf \ + ${IDIR_BLUEZ}/etc/bluetooth/ + $(INSTALL_DATA) $(WRKINST)/etc/dbus-1/system.d/bluetooth.conf \ + $(IDIR_BLUEZ)/etc/dbus-1/system.d + ${INSTALL_DIR} ${IDIR_BLUEZ}/etc/init.d + ${INSTALL_BIN} ./files/bluez.init \ + ${IDIR_BLUEZ}/etc/init.d/bluez + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/bluez/files/bluez.init b/package/bluez/files/bluez.init new file mode 100644 index 000000000..20c128ad0 --- /dev/null +++ b/package/bluez/files/bluez.init @@ -0,0 +1,26 @@ +#!/bin/sh +#FWINIT 90 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${bluez:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + bluetoothd + ;; +stop) + killall bluetoothd + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/bluez/ipkg/bluez.control b/package/bluez/ipkg/bluez.control new file mode 100644 index 000000000..0b32376ad --- /dev/null +++ b/package/bluez/ipkg/bluez.control @@ -0,0 +1,5 @@ +Package: bluez +Priority: optional +Section: net +Description: Bluez libs and apps +Depends: kmod-bluetooth diff --git a/package/bluez/patches/patch-tools_hciattach_c b/package/bluez/patches/patch-tools_hciattach_c new file mode 100644 index 000000000..ae8f70f57 --- /dev/null +++ b/package/bluez/patches/patch-tools_hciattach_c @@ -0,0 +1,19 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- bluez-4.12.orig/tools/hciattach.c 2008-08-05 23:14:56.000000000 +0200 ++++ bluez-4.12/tools/hciattach.c 2009-05-12 18:14:29.000000000 +0200 +@@ -107,6 +107,7 @@ static int uart_speed(int s) + return B57600; + case 115200: + return B115200; ++#if 0 + case 230400: + return B230400; + case 460800: +@@ -125,6 +126,7 @@ static int uart_speed(int s) + return B1500000; + case 2000000: + return B2000000; ++#endif + #ifdef B2500000 + case 2500000: + return B2500000; diff --git a/package/bogofilter/Config.in b/package/bogofilter/Config.in new file mode 100644 index 000000000..1dfb7d2d5 --- /dev/null +++ b/package/bogofilter/Config.in @@ -0,0 +1,26 @@ +config ADK_PACKAGE_BOGOFILTER + prompt "bogofilter........................ Mail (spam) filter utility" + tristate + default n + depends on ADK_CXX + select ADK_PACKAGE_LIBDB + select ADK_PACKAGE_LIBICONV + help + Filters mail, must be trained. + + http://bogofilter.sourceforge.net + + +config ADK_PACKAGE_BOGOFILTER_BOGOUTIL + prompt " include bogoutil in firmware image and package file" + bool + default n + depends ADK_PACKAGE_BOGOFILTER + +config ADK_PACKAGE_BOGOFILTER_BOGOTUNE + prompt " include bogotune in firmware image and package file" + bool + default n + depends ADK_PACKAGE_BOGOFILTER + + diff --git a/package/bogofilter/Makefile b/package/bogofilter/Makefile new file mode 100644 index 000000000..d9f015ccc --- /dev/null +++ b/package/bogofilter/Makefile @@ -0,0 +1,47 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= bogofilter +PKG_VERSION:= 1.1.3 +PKG_RELEASE:= 1 +PKG_MD5SUM:= a816f509324ccb9946a4d89fefe525e1 +MASTER_SITES:= http://ftp.debian.org/debian/pool/main/b/bogofilter/ +DISTFILES:= ${PKG_NAME}_${PKG_VERSION}.orig.tar.gz + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,BOGOFILTER,bogofilter,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +CONFIGURE_ENV+= ac_cv_c_bigendian=no \ + ac_cv_sizeof_off_t=8 \ + ac_cv_sizeof_int=4 \ + ac_cv_sizeof_long=4 \ + LIBS="-liconv" +CONFIGURE_ARGS+= --without-libsqlite3-prefix \ + --without-libqdbm-prefix \ + --with-included-gsl \ + --with-libdb-prefix=${STAGING_DIR}/usr \ + --disable-transactions +# --without-libdb-prefix +BUILD_STYLE= auto +INSTALL_STYLE= auto + +PKG_DEPENDS:= libdb libiconv + +post-install: + echo 'Depends: ${PKG_DEPENDS}' >>${IDIR_BOGOFILTER}/CONTROL/control + ${INSTALL_DIR} ${IDIR_BOGOFILTER}/usr/bin + ${INSTALL_BIN} ${WRKINST}/usr/bin/${PKG_NAME} ${IDIR_BOGOFILTER}/usr/bin/ +ifeq (${ADK_PACKAGE_BOGOFILTER_BOGOUTIL},y) + ${INSTALL_BIN} ${WRKINST}/usr/bin/bogoutil ${IDIR_BOGOFILTER}/usr/bin/ +endif +ifeq (${ADK_PACKAGE_BOGOFILTER_BOGOTUNE},y) + ${INSTALL_BIN} ${WRKINST}/usr/bin/bogotune ${IDIR_BOGOFILTER}/usr/bin/ +endif + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/bogofilter/ipkg/bogofilter.control b/package/bogofilter/ipkg/bogofilter.control new file mode 100644 index 000000000..ef205f2d7 --- /dev/null +++ b/package/bogofilter/ipkg/bogofilter.control @@ -0,0 +1,4 @@ +Package: bogofilter +Priority: optional +Section: mail +Description: Mail filter diff --git a/package/bogofilter/patches/patch-config_in b/package/bogofilter/patches/patch-config_in new file mode 100644 index 000000000..11648db39 --- /dev/null +++ b/package/bogofilter/patches/patch-config_in @@ -0,0 +1,14 @@ +$Id$ +--- bogofilter-1.1.3.orig/config.in 2006-12-03 05:17:24.000000000 +0100 ++++ bogofilter-1.1.3/config.in 2007-03-29 19:28:01.000000000 +0200 +@@ -51,10 +51,6 @@ + /* Have suitable db.h header */ + #undef HAVE_DB_H + +-/* Define to 1 if you have the declaration of `db_create', and to 0 if you +- don't. */ +-#undef HAVE_DECL_DB_CREATE +- + /* Define to 1 if you have the declaration of `getopt', and to 0 if you don't. + */ + #undef HAVE_DECL_GETOPT diff --git a/package/bogofilter/patches/patch-configure b/package/bogofilter/patches/patch-configure new file mode 100644 index 000000000..165de8409 --- /dev/null +++ b/package/bogofilter/patches/patch-configure @@ -0,0 +1,281 @@ +$Id$ +--- bogofilter-1.1.3.orig/configure 2006-12-03 05:17:15.000000000 +0100 ++++ bogofilter-1.1.3/configure 2007-03-29 19:27:35.000000000 +0200 +@@ -13464,238 +13464,55 @@ echo "${ECHO_T}$LIBDB" >&6; } + + saveLIBS="$LIBS" + LIBS="$LIBS $LIBDB" +- { echo "$as_me:$LINENO: checking if a program can be linked against Berkeley DB and run" >&5 +-echo $ECHO_N "checking if a program can be linked against Berkeley DB and run... $ECHO_C" >&6; } +- if test "$cross_compiling" = yes; then +- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- ++# AC_MSG_CHECKING(if a program can be linked against Berkeley DB and run) ++# AC_RUN_IFELSE( ++# AC_LANG_PROGRAM([[ + #ifdef HAVE_INTTYPES_H + #include + #endif + #include ++# ]], [[ ++#return 0; ++# ]]),, ++# [AC_MSG_RESULT(no) ++# AC_MSG_ERROR([Cannot run a program linked against libdb. ++#Did you adjust your library search path to include your libdb?])],) ++# AC_MSG_RESULT(yes) + +-int +-main () +-{ +- +-return 0; +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : +-else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-{ echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } +- { { echo "$as_me:$LINENO: error: Cannot run a program linked against libdb. +-Did you adjust your library search path to include your libdb?" >&5 +-echo "$as_me: error: Cannot run a program linked against libdb. +-Did you adjust your library search path to include your libdb?" >&2;} +- { (exit 1); exit 1; }; } +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- { echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } +- +- { echo "$as_me:$LINENO: checking if Berkeley DB header and library versions match" >&5 +-echo $ECHO_N "checking if Berkeley DB header and library versions match... $ECHO_C" >&6; } +- rm -r -f bfadtestdir +- mkdir bfadtestdir +- if test "$cross_compiling" = yes; then +- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +- #include +- #include ++# dnl check if header and library of DB library match ++# dnl ignore if cross compiling ++# AC_MSG_CHECKING(if Berkeley DB header and library versions match) ++# rm -r -f bfadtestdir ++# mkdir bfadtestdir ++# AC_RUN_IFELSE( ++# AC_LANG_PROGRAM([[ ++# #include ++# #include + #ifdef HAVE_INTTYPES_H + #include + #endif +- #include +- +-int +-main () +-{ +- +- int maj, min; +- (void)db_version(&maj, &min, 0); +- (void)fprintf(stderr, "headers: %d.%d, library: %d.%d\n", +- DB_VERSION_MAJOR, DB_VERSION_MINOR, maj, min); +- if (maj != DB_VERSION_MAJOR) exit(1); +- if (min != DB_VERSION_MINOR) exit(1); +- exit(0); +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : +-else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-{ echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } +- { { echo "$as_me:$LINENO: error: db.h header file and db library version do not match." >&5 +-echo "$as_me: error: db.h header file and db library version do not match." >&2;} +- { (exit 1); exit 1; }; } +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- { echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } +- { echo "$as_me:$LINENO: checking whether db_create is declared" >&5 +-echo $ECHO_N "checking whether db_create is declared... $ECHO_C" >&6; } +-if test "${ac_cv_have_decl_db_create+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#ifdef HAVE_INTTYPES_H ++# #include ++# ]], [[ ++# int maj, min; ++# (void)db_version(&maj, &min, 0); ++# (void)fprintf(stderr, "headers: %d.%d, library: %d.%d\n", ++# DB_VERSION_MAJOR, DB_VERSION_MINOR, maj, min); ++# if (maj != DB_VERSION_MAJOR) exit(1); ++# if (min != DB_VERSION_MINOR) exit(1); ++# exit(0); ++# ]]),, ++# [AC_MSG_RESULT(no) ++# AC_MSG_ERROR(db.h header file and db library version do not match.)],) ++# AC_MSG_RESULT(yes) ++# AC_CHECK_DECLS(db_create,, ++# AC_MSG_ERROR([[Can not locate a suitable Berkeley DB db.h header file. ++#Use --with-libdb-prefix=PATH to specify the path to a v3+ install directory. ++#You can download Berkeley DB 4.3.x from http://www.sleepycat.com/]]), ++# [[#ifdef HAVE_INTTYPES_H + #include + #endif +-#include +- +- +-int +-main () +-{ +-#ifndef db_create +- (void) db_create; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_db_create=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_db_create=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_db_create" >&5 +-echo "${ECHO_T}$ac_cv_have_decl_db_create" >&6; } +-if test $ac_cv_have_decl_db_create = yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_DB_CREATE 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_DB_CREATE 0 +-_ACEOF +- +-{ { echo "$as_me:$LINENO: error: Can not locate a suitable Berkeley DB db.h header file. +-Use --with-libdb-prefix=PATH to specify the path to a v3+ install directory. +-You can download Berkeley DB 4.3.x from http://www.sleepycat.com/" >&5 +-echo "$as_me: error: Can not locate a suitable Berkeley DB db.h header file. +-Use --with-libdb-prefix=PATH to specify the path to a v3+ install directory. +-You can download Berkeley DB 4.3.x from http://www.sleepycat.com/" >&2;} +- { (exit 1); exit 1; }; } +-fi +- +- ++#include ]] ++# ) + { echo "$as_me:$LINENO: checking if Berkeley DB supports shared environments" >&5 + echo $ECHO_N "checking if Berkeley DB supports shared environments... $ECHO_C" >&6; } + if test "x$enable_dbshared_test" != xno && test "x$USE_TRANSACTIONS" != xNO ; then diff --git a/package/bridge-utils/Config.in b/package/bridge-utils/Config.in new file mode 100644 index 000000000..c09f338bd --- /dev/null +++ b/package/bridge-utils/Config.in @@ -0,0 +1,10 @@ +config ADK_PACKAGE_BRIDGE_UTILS + prompt "bridge-utils...................... Ethernet bridging configuration utility" + tristate + default n + select ADK_KPACKAGE_KMOD_BRIDGE + help + Manage ethernet bridging; a way to connect networks together to + form a larger network. + + http://bridge.sourceforge.net/ diff --git a/package/bridge-utils/Makefile b/package/bridge-utils/Makefile new file mode 100644 index 000000000..724d016aa --- /dev/null +++ b/package/bridge-utils/Makefile @@ -0,0 +1,27 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= bridge-utils +PKG_VERSION:= 1.0.6 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 9b7dc52656f5cbec846a7ba3299f73bd +MASTER_SITES:= ${MASTER_SITE_SOURCEFORGE:=bridge/} + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,BRIDGE_UTILS,bridge-utils,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS+= --with-linux-headers=${LINUX_DIR} +BUILD_STYLE= auto +INSTALL_STYLE= auto + +post-install: + ${INSTALL_DIR} ${IDIR_BRIDGE_UTILS}/usr/sbin + ${INSTALL_BIN} ${WRKINST}/usr/sbin/brctl ${IDIR_BRIDGE_UTILS}/usr/sbin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/bridge-utils/ipkg/bridge-utils.control b/package/bridge-utils/ipkg/bridge-utils.control new file mode 100644 index 000000000..da38f85e9 --- /dev/null +++ b/package/bridge-utils/ipkg/bridge-utils.control @@ -0,0 +1,4 @@ +Package: bridge-utils +Priority: optional +Section: net +Description: Ethernet bridging tools diff --git a/package/bridge-utils/patches/patch-libbridge_Makefile_in b/package/bridge-utils/patches/patch-libbridge_Makefile_in new file mode 100644 index 000000000..f44737750 --- /dev/null +++ b/package/bridge-utils/patches/patch-libbridge_Makefile_in @@ -0,0 +1,11 @@ +--- bridge-utils-0.9.6/libbridge/Makefile.in.dist 2004-03-01 20:55:52.000000000 -0600 ++++ bridge-utils-0.9.6/libbridge/Makefile.in 2004-03-01 20:56:23.000000000 -0600 +@@ -5,7 +5,7 @@ + RANLIB=@RANLIB@ + + CC=@CC@ +-CFLAGS = -Wall -g $(KERNEL_HEADERS) ++CFLAGS = -Wall -g @CFLAGS@ $(KERNEL_HEADERS) + + prefix=@prefix@ + exec_prefix=@exec_prefix@ diff --git a/package/busybox/Config.in b/package/busybox/Config.in new file mode 100644 index 000000000..15da6729a --- /dev/null +++ b/package/busybox/Config.in @@ -0,0 +1,15 @@ +config ADK_PACKAGE_BUSYBOX + prompt "busybox.............................. The Swiss Army Knife" + bool + default y + help + The Swiss Army Knife of embedded Linux. It slices, it dices, it + makes Julian Fries. + + http://busybox.net/ + + Most people will answer Y. + +menu "Busybox Configuration" +source "package/busybox/config/Config.in" +endmenu diff --git a/package/busybox/Makefile b/package/busybox/Makefile new file mode 100644 index 000000000..107009c1a --- /dev/null +++ b/package/busybox/Makefile @@ -0,0 +1,52 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= busybox +PKG_VERSION:= 1.13.4 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 6f86b4aa466f4b492c9468ba9500976a +MASTER_SITES:= http://www.busybox.net/downloads/ + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,BUSYBOX,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) + +#rebuild: +# @rm $(WRKBUILD)/.configure_done + +do-configure: + grep BUSYBOX_ $(TOPDIR)/.config|sed -e 's/BUSYBOX_/CONFIG_/' > \ + ${WRKBUILD}/.config + $(SED) 's@IDIR@${WRKINST}' ${WRKBUILD}/.config + yes '' | \ + $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ + EXTRA_CFLAGS="$(TARGET_CFLAGS)" IPKG_ARCH="$(ARCH)" \ + ARCH="$(ARCH)" -C $(WRKBUILD) oldconfig + +do-build: + $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ + IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) + +do-install: ${TOPDIR}/.config + $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ + IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) install +ifeq ($(DEBUG),1) + ${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \ + $(IDIR_BUSYBOX)/bin/busybox +endif + $(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/ + $(INSTALL_DIR) $(IDIR_BUSYBOX)/etc/init.d/ + $(INSTALL_BIN) ./files/syslog.init \ + $(IDIR_BUSYBOX)/etc/init.d/syslog + $(INSTALL_BIN) ./files/network.init \ + $(IDIR_BUSYBOX)/etc/init.d/network + $(INSTALL_BIN) ./files/crond.init \ + $(IDIR_BUSYBOX)/etc/init.d/crond + ${INSTALL_BIN} files/inetd.init \ + ${IDIR_BUSYBOX}/etc/init.d/inetd + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/busybox/config/Config.in b/package/busybox/config/Config.in new file mode 100644 index 000000000..b8894d4c5 --- /dev/null +++ b/package/busybox/config/Config.in @@ -0,0 +1,605 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +# mainmenu "BusyBox Configuration" + +config BUSYBOX_HAVE_DOT_CONFIG + bool + default y + +menu "Busybox Settings" + +menu "General Configuration" + +config BUSYBOX_DESKTOP + bool "Enable options for full-blown desktop systems" + default n + help + Enable options and features which are not essential. + Select this only if you plan to use busybox on full-blown + desktop machine with common Linux distro, not on an embedded box. + +config BUSYBOX_EXTRA_COMPAT + bool "Provide compatible behavior for rare corner cases (bigger code)" + default n + help + This option makes grep, sed etc handle rare corner cases + (embedded NUL bytes and such). This makes code bigger and uses + some GNU extensions in libc. You probably only need this option + if you plan to run busybox on desktop. + +config BUSYBOX_FEATURE_ASSUME_UNICODE + bool "Assume that 1:1 char/glyph correspondence is not true" + default n + help + This makes various applets aware that one byte is not + one character on screen. + + Busybox aims to eventually work correctly with Unicode displays. + Any older encodings are not guaranteed to work. + Probably by the time when busybox will be fully Unicode-clean, + other encodings will be mainly of historic interest. + +choice + prompt "Buffer allocation policy" + default FEATURE_BUFFERS_USE_MALLOC + help + There are 3 ways BusyBox can handle buffer allocations: + - Use malloc. This costs code size for the call to xmalloc. + - Put them on stack. For some very small machines with limited stack + space, this can be deadly. For most folks, this works just fine. + - Put them in BSS. This works beautifully for computers with a real + MMU (and OS support), but wastes runtime RAM for uCLinux. This + behavior was the only one available for BusyBox versions 0.48 and + earlier. + +config BUSYBOX_FEATURE_BUFFERS_USE_MALLOC + bool "Allocate with Malloc" + +config BUSYBOX_FEATURE_BUFFERS_GO_ON_STACK + bool "Allocate on the Stack" + +config BUSYBOX_FEATURE_BUFFERS_GO_IN_BSS + bool "Allocate in the .bss section" + +endchoice + +config BUSYBOX_SHOW_USAGE + bool "Show terse applet usage messages" + default y + help + All BusyBox applets will show help messages when invoked with + wrong arguments. You can turn off printing these terse usage + messages if you say no here. + This will save you up to 7k. + +config BUSYBOX_FEATURE_VERBOSE_USAGE + bool "Show verbose applet usage messages" + default y + select BUSYBOX_SHOW_USAGE + help + All BusyBox applets will show more verbose help messages when + busybox is invoked with --help. This will add a lot of text to the + busybox binary. In the default configuration, this will add about + 13k, but it can add much more depending on your configuration. + +config BUSYBOX_FEATURE_COMPRESS_USAGE + bool "Store applet usage messages in compressed form" + default y + depends on BUSYBOX_SHOW_USAGE + help + Store usage messages in compressed form, uncompress them on-the-fly + when --help is called. + + If you have a really tiny busybox with few applets enabled (and + bunzip2 isn't one of them), the overhead of the decompressor might + be noticeable. Also, if you run executables directly from ROM + and have very little memory, this might not be a win. Otherwise, + you probably want this. + +config BUSYBOX_FEATURE_INSTALLER + bool "Support --install [-s] to install applet links at runtime" + default n + help + Enable 'busybox --install [-s]' support. This will allow you to use + busybox at runtime to create hard links or symlinks for all the + applets that are compiled into busybox. + +config BUSYBOX_LOCALE_SUPPORT + bool "Enable locale support (system needs locale for this to work)" + default n + help + Enable this if your system has locale support and you would like + busybox to support locale settings. + +config BUSYBOX_GETOPT_LONG + bool "Support for --long-options" + default y + help + Enable this if you want busybox applets to use the gnu --long-option + style, in addition to single character -a -b -c style options. + +config BUSYBOX_FEATURE_DEVPTS + bool "Use the devpts filesystem for Unix98 PTYs" + default y + help + Enable if you want BusyBox to use Unix98 PTY support. If enabled, + busybox will use /dev/ptmx for the master side of the pseudoterminal + and /dev/pts/ for the slave side. Otherwise, BSD style + /dev/ttyp will be used. To use this option, you should have + devpts mounted. + +config BUSYBOX_FEATURE_CLEAN_UP + bool "Clean up all memory before exiting (usually not needed)" + default n + help + As a size optimization, busybox normally exits without explicitly + freeing dynamically allocated memory or closing files. This saves + space since the OS will clean up for us, but it can confuse debuggers + like valgrind, which report tons of memory and resource leaks. + + Don't enable this unless you have a really good reason to clean + things up manually. + +config BUSYBOX_FEATURE_PIDFILE + bool "Support writing pidfiles" + default n + help + This option makes some applets (e.g. crond, syslogd, inetd) write + a pidfile in /var/run. Some applications rely on them. + +config BUSYBOX_FEATURE_SUID + bool "Support for SUID/SGID handling" + default y + help + With this option you can install the busybox binary belonging + to root with the suid bit set, and it will automatically drop + priviledges for applets that don't need root access. + + If you are really paranoid and don't want to do this, build two + busybox binaries with different applets in them (and the appropriate + symlinks pointing to each binary), and only set the suid bit on the + one that needs it. The applets currently marked to need the suid bit + are: + + crontab, dnsd, findfs, ipcrm, ipcs, login, passwd, ping, su, + traceroute, vlock. + +config BUSYBOX_FEATURE_SUID_CONFIG + bool "Runtime SUID/SGID configuration via /etc/busybox.conf" + default n if FEATURE_SUID + depends on BUSYBOX_FEATURE_SUID + help + Allow the SUID / SGID state of an applet to be determined at runtime + by checking /etc/busybox.conf. (This is sort of a poor man's sudo.) + The format of this file is as follows: + + = [Ssx-][Ssx-][x-] (|).(|) + + An example might help: + + [SUID] + su = ssx root.0 # applet su can be run by anyone and runs with + # euid=0/egid=0 + su = ssx # exactly the same + + mount = sx- root.disk # applet mount can be run by root and members + # of group disk and runs with euid=0 + + cp = --- # disable applet cp for everyone + + The file has to be owned by user root, group root and has to be + writeable only by root: + (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf) + The busybox executable has to be owned by user root, group + root and has to be setuid root for this to work: + (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox) + + Robert 'sandman' Griebl has more information here: + . + +config BUSYBOX_FEATURE_SUID_CONFIG_QUIET + bool "Suppress warning message if /etc/busybox.conf is not readable" + default y + depends on BUSYBOX_FEATURE_SUID_CONFIG + help + /etc/busybox.conf should be readable by the user needing the SUID, + check this option to avoid users to be notified about missing + permissions. + +#config BUSYBOX_SELINUX +# bool "Support NSA Security Enhanced Linux" +# default n +# help +# Enable support for SELinux in applets ls, ps, and id. Also provide +# the option of compiling in SELinux applets. +# +# If you do not have a complete SELinux userland installed, this stuff +# will not compile. Go visit +# http://www.nsa.gov/selinux/index.html +# to download the necessary stuff to allow busybox to compile with +# this option enabled. Specifially, libselinux 1.28 or better is +# directly required by busybox. If the installation is located in a +# non-standard directory, provide it by invoking make as follows: +# CFLAGS=-I \ +# LDFLAGS=-L \ +# make +# +# Most people will leave this set to 'N'. + +config BUSYBOX_FEATURE_PREFER_APPLETS + bool "exec prefers applets" + default n + help + This is an experimental option which directs applets about to + call 'exec' to try and find an applicable busybox applet before + searching the PATH. This is typically done by exec'ing + /proc/self/exe. + This may affect shell, find -exec, xargs and similar applets. + They will use applets even if /bin/ -> busybox link + is missing (or is not a link to busybox). However, this causes + problems in chroot jails without mounted /proc and with ps/top + (command name can be shown as 'exe' for applets started this way). + +config BUSYBOX_BUSYBOX_EXEC_PATH + string "Path to BusyBox executable" + default "/proc/self/exe" + help + When Busybox applets need to run other busybox applets, BusyBox + sometimes needs to exec() itself. When the /proc filesystem is + mounted, /proc/self/exe always points to the currently running + executable. If you haven't got /proc, set this to wherever you + want to run BusyBox from. + +# These are auto-selected by other options + +config BUSYBOX_FEATURE_SYSLOG + bool #No description makes it a hidden option + default n + #help + # This option is auto-selected when you select any applet which may + # send its output to syslog. You do not need to select it manually. + +config BUSYBOX_FEATURE_HAVE_RPC + bool #No description makes it a hidden option + default n + #help + # This is automatically selected if any of enabled applets need it. + # You do not need to select it manually. + +endmenu + +menu 'Build Options' + +#config BUSYBOX_STATIC +# bool "Build BusyBox as a static binary (no shared libs)" +# default n +# help +# If you want to build a static BusyBox binary, which does not +# use or require any shared libraries, then enable this option. +# This can cause BusyBox to be considerably larger, so you should +# leave this option false unless you have a good reason (i.e. +# your target platform does not support shared libraries, or +# you are building an initrd which doesn't need anything but +# BusyBox, etc). +# +# Most people will leave this set to 'N'. +# +#config BUSYBOX_PIE +# bool "Build BusyBox as a position independent executable" +# default n +# depends on !BUSYBOX_STATIC +# help +# (TODO: what is it and why/when is it useful?) +# Most people will leave this set to 'N'. +# +#config BUSYBOX_NOMMU +# bool "Force NOMMU build" +# default n +# help +# Busybox tries to detect whether architecture it is being +# built against supports MMU or not. If this detection fails, +# or if you want to build NOMMU version of busybox for testing, +# you may force NOMMU build here. +# +# Most people will leave this set to 'N'. + +# PIE can be made to work with BUILD_LIBBUSYBOX, but currently +# build system does not support that +#config BUSYBOX_BUILD_LIBBUSYBOX +# bool "Build shared libbusybox" +# default n +# depends on !BUSYBOX_FEATURE_PREFER_APPLETS && !BUSYBOX_PIE && !BUSYBOX_STATIC +# help +# Build a shared library libbusybox.so.N.N.N which contains all +# busybox code. +# +# This feature allows every applet to be built as a tiny +# separate executable. Enabling it for "one big busybox binary" +# approach serves no purpose and increases code size. +# You should almost certainly say "no" to this. + +### config FEATURE_FULL_LIBBUSYBOX +### bool "Feature-complete libbusybox" +### default n if !FEATURE_SHARED_BUSYBOX +### depends on BUSYBOX_BUILD_LIBBUSYBOX +### help +### Build a libbusybox with the complete feature-set, disregarding +### the actually selected config. +### +### Normally, libbusybox will only contain the features which are +### used by busybox itself. If you plan to write a separate +### standalone application which uses libbusybox say 'Y'. +### +### Note: libbusybox is GPL, not LGPL, and exports no stable API that +### might act as a copyright barrier. We can and will modify the +### exported function set between releases (even minor version number +### changes), and happily break out-of-tree features. +### +### Say 'N' if in doubt. + +#config BUSYBOX_FEATURE_INDIVIDUAL +# bool "Produce a binary for each applet, linked against libbusybox" +# default y +# depends on BUSYBOX_BUILD_LIBBUSYBOX +# help +# If your CPU architecture doesn't allow for sharing text/rodata +# sections of running binaries, but allows for runtime dynamic +# libraries, this option will allow you to reduce memory footprint +# when you have many different applets running at once. +# +# If your CPU architecture allows for sharing text/rodata, +# having single binary is more optimal. +# +# Each applet will be a tiny program, dynamically linked +# against libbusybox.so.N.N.N. +# +# You need to have a working dynamic linker. + +#config BUSYBOX_FEATURE_SHARED_BUSYBOX +# bool "Produce additional busybox binary linked against libbusybox" +# default y +# depends on BUSYBOX_BUILD_LIBBUSYBOX +# help +# Build busybox, dynamically linked against libbusybox.so.N.N.N. +# +# You need to have a working dynamic linker. + +### config BUILD_AT_ONCE +### bool "Compile all sources at once" +### default n +### help +### Normally each source-file is compiled with one invocation of +### the compiler. +### If you set this option, all sources are compiled at once. +### This gives the compiler more opportunities to optimize which can +### result in smaller and/or faster binaries. +### +### Setting this option will consume alot of memory, e.g. if you +### enable all applets with all features, gcc uses more than 300MB +### RAM during compilation of busybox. +### +### This option is most likely only beneficial for newer compilers +### such as gcc-4.1 and above. +### +### Say 'N' unless you know what you are doing. + +config BUSYBOX_LFS + bool "Build with Large File Support (for accessing files > 2 GB)" + default y + select BUSYBOX_FDISK_SUPPORT_LARGE_DISKS + help + If you want to build BusyBox with large file support, then enable + this option. This will have no effect if your kernel or your C + library lacks large file support for large files. Some of the + programs that can benefit from large file support include dd, gzip, + cp, mount, tar, and many others. If you want to access files larger + than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'. + +config BUSYBOX_CROSS_COMPILER_PREFIX + string "Cross Compiler prefix" + default "" + help + If you want to build BusyBox with a cross compiler, then you + will need to set this to the cross-compiler prefix, for example, + "i386-uclibc-". + + Note that CROSS_COMPILE environment variable or + "make CROSS_COMPILE=xxx ..." will override this selection. + + Native builds leave this empty. + +endmenu + +menu 'Debugging Options' + +config BUSYBOX_DEBUG + bool "Build BusyBox with extra Debugging symbols" + default n + help + Say Y here if you wish to examine BusyBox internals while applets are + running. This increases the size of the binary considerably, and + should only be used when doing development. If you are doing + development and want to debug BusyBox, answer Y. + + Most people should answer N. + +config BUSYBOX_DEBUG_PESSIMIZE + bool "Disable compiler optimizations" + default n + depends on BUSYBOX_DEBUG + help + The compiler's optimization of source code can eliminate and reorder + code, resulting in an executable that's hard to understand when + stepping through it with a debugger. This switches it off, resulting + in a much bigger executable that more closely matches the source + code. + +# triggers problems on cris with __attribute__((packed)) +#config BUSYBOX_WERROR +# bool "Abort compilation on any warning" +# default n +# help +# Selecting this will add -Werror to gcc command line. +# +# Most people should answer N. + +choice + prompt "Additional debugging library" + default NO_DEBUG_LIB + help + Using an additional debugging library will make BusyBox become + considerable larger and will cause it to run more slowly. You + should always leave this option disabled for production use. + + dmalloc support: + ---------------- + This enables compiling with dmalloc ( http://dmalloc.com/ ) + which is an excellent public domain mem leak and malloc problem + detector. To enable dmalloc, before running busybox you will + want to properly set your environment, for example: + export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile + The 'debug=' value is generated using the following command + dmalloc -p log-stats -p log-non-free -p log-bad-space \ + -p log-elapsed-time -p check-fence -p check-heap \ + -p check-lists -p check-blank -p check-funcs -p realloc-copy \ + -p allow-free-null + + Electric-fence support: + ----------------------- + This enables compiling with Electric-fence support. Electric + fence is another very useful malloc debugging library which uses + your computer's virtual memory hardware to detect illegal memory + accesses. This support will make BusyBox be considerable larger + and run slower, so you should leave this option disabled unless + you are hunting a hard to find memory problem. + + +config BUSYBOX_NO_DEBUG_LIB + bool "None" + +config BUSYBOX_DMALLOC + bool "Dmalloc" + +config BUSYBOX_EFENCE + bool "Electric-fence" + +endchoice + +config BUSYBOX_INCLUDE_SUSv2 + bool "Enable obsolete features removed before SUSv3?" + default y + help + This option will enable backwards compatibility with SuSv2, + specifically, old-style numeric options ('command -1 ') + will be supported in head, tail, and fold. (Note: should + affect renice too.) + +### config PARSE +### bool "Uniform config file parser debugging applet: parse" + +endmenu + +menu 'Installation Options' + +config BUSYBOX_INSTALL_NO_USR + bool "Don't use /usr" + default n + help + Disable use of /usr. Don't activate this option if you don't know + that you really want this behaviour. + +choice + prompt "Applets links" + default INSTALL_APPLET_SYMLINKS + help + Choose how you install applets links. + +config BUSYBOX_INSTALL_APPLET_SYMLINKS + bool "as soft-links" + help + Install applets as soft-links to the busybox binary. This needs some + free inodes on the filesystem, but might help with filesystem + generators that can't cope with hard-links. + +config BUSYBOX_INSTALL_APPLET_HARDLINKS + bool "as hard-links" + help + Install applets as hard-links to the busybox binary. This might + count on a filesystem with few inodes. + +config BUSYBOX_INSTALL_APPLET_SCRIPT_WRAPPERS + bool "as script wrappers" + help + Install applets as script wrappers that call the busybox binary. + +config BUSYBOX_INSTALL_APPLET_DONT + bool "not installed" + depends on BUSYBOX_FEATURE_INSTALLER || BUSYBOX_FEATURE_SH_STANDALONE || BUSYBOX_FEATURE_PREFER_APPLETS + help + Do not install applet links. Useful when using the -install feature + or a standalone shell for rescue purposes. + +endchoice + +choice + prompt "/bin/sh applet link" + default INSTALL_SH_APPLET_SYMLINK + depends on BUSYBOX_INSTALL_APPLET_SCRIPT_WRAPPERS + help + Choose how you install /bin/sh applet link. + +config BUSYBOX_INSTALL_SH_APPLET_SYMLINK + bool "as soft-link" + help + Install /bin/sh applet as soft-link to the busybox binary. + +config BUSYBOX_INSTALL_SH_APPLET_HARDLINK + bool "as hard-link" + help + Install /bin/sh applet as hard-link to the busybox binary. + +config BUSYBOX_INSTALL_SH_APPLET_SCRIPT_WRAPPER + bool "as script wrapper" + help + Install /bin/sh applet as script wrapper that call the busybox + binary. + +endchoice + +config BUSYBOX_PREFIX + string "BusyBox installation prefix" + default "@IDIR@" + help + Define your directory to install BusyBox files/subdirs in. + +endmenu + +source package/busybox/config/libbb/Config.in + +endmenu + +comment "Applets" + +source package/busybox/config/archival/Config.in +source package/busybox/config/coreutils/Config.in +source package/busybox/config/console-tools/Config.in +source package/busybox/config/debianutils/Config.in +source package/busybox/config/editors/Config.in +source package/busybox/config/findutils/Config.in +source package/busybox/config/init/Config.in +source package/busybox/config/loginutils/Config.in +source package/busybox/config/e2fsprogs/Config.in +source package/busybox/config/modutils/Config.in +source package/busybox/config/util-linux/Config.in +source package/busybox/config/miscutils/Config.in +source package/busybox/config/networking/Config.in +source package/busybox/config/printutils/Config.in +source package/busybox/config/mailutils/Config.in +source package/busybox/config/procps/Config.in +source package/busybox/config/runit/Config.in +source package/busybox/config/selinux/Config.in +source package/busybox/config/shell/Config.in +source package/busybox/config/sysklogd/Config.in diff --git a/package/busybox/config/archival/Config.in b/package/busybox/config/archival/Config.in new file mode 100644 index 000000000..0242dea05 --- /dev/null +++ b/package/busybox/config/archival/Config.in @@ -0,0 +1,300 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Archival Utilities" + +config BUSYBOX_FEATURE_SEAMLESS_LZMA + bool "Make tar, rpm, modprobe etc understand .lzma data" + default n + help + Make tar, rpm, modprobe etc understand .lzma data. + +config BUSYBOX_FEATURE_SEAMLESS_BZ2 + bool "Make tar, rpm, modprobe etc understand .bz2 data" + default n + help + Make tar, rpm, modprobe etc understand .bz2 data. + +config BUSYBOX_FEATURE_SEAMLESS_GZ + bool "Make tar, rpm, modprobe etc understand .gz data" + default n + help + Make tar, rpm, modprobe etc understand .gz data. + +config BUSYBOX_FEATURE_SEAMLESS_Z + bool "Make tar and gunzip understand .Z data" + default n + help + Make tar and gunzip understand .Z data. + +config BUSYBOX_AR + bool "ar" + default n + help + ar is an archival utility program used to create, modify, and + extract contents from archives. An archive is a single file holding + a collection of other files in a structure that makes it possible to + retrieve the original individual files (called archive members). + The original files' contents, mode (permissions), timestamp, owner, + and group are preserved in the archive, and can be restored on + extraction. + + The stored filename is limited to 15 characters. (for more information + see long filename support). + ar has 60 bytes of overheads for every stored file. + + This implementation of ar can extract archives, it cannot create or + modify them. + On an x86 system, the ar applet adds about 1K. + + Unless you have a specific application which requires ar, you should + probably say N here. + +config BUSYBOX_FEATURE_AR_LONG_FILENAMES + bool "Support for long filenames (not need for debs)" + default n + depends on BUSYBOX_AR + help + By default the ar format can only store the first 15 characters of + the filename, this option removes that limitation. + It supports the GNU ar long filename method which moves multiple long + filenames into a the data section of a new ar entry. + +config BUSYBOX_BUNZIP2 + bool "bunzip2" + default y + help + bunzip2 is a compression utility using the Burrows-Wheeler block + sorting text compression algorithm, and Huffman coding. Compression + is generally considerably better than that achieved by more + conventional LZ77/LZ78-based compressors, and approaches the + performance of the PPM family of statistical compressors. + + Unless you have a specific application which requires bunzip2, you + should probably say N here. + +config BUSYBOX_BZIP2 + bool "bzip2" + default n + help + bzip2 is a compression utility using the Burrows-Wheeler block + sorting text compression algorithm, and Huffman coding. Compression + is generally considerably better than that achieved by more + conventional LZ77/LZ78-based compressors, and approaches the + performance of the PPM family of statistical compressors. + + Unless you have a specific application which requires bzip2, you + should probably say N here. + +config BUSYBOX_CPIO + bool "cpio" + default y + help + cpio is an archival utility program used to create, modify, and + extract contents from archives. + cpio has 110 bytes of overheads for every stored file. + + This implementation of cpio can extract cpio archives created in the + "newc" or "crc" format, it cannot create or modify them. + + Unless you have a specific application which requires cpio, you + should probably say N here. + +config BUSYBOX_FEATURE_CPIO_O + bool "Support for archive creation" + default n + depends on BUSYBOX_CPIO + help + This implementation of cpio can create cpio archives in the "newc" + format only. + +config BUSYBOX_DPKG + bool "dpkg" + default n + select BUSYBOX_FEATURE_SEAMLESS_GZ + help + dpkg is a medium-level tool to install, build, remove and manage + Debian packages. + + This implementation of dpkg has a number of limitations, + you should use the official dpkg if possible. + +config BUSYBOX_DPKG_DEB + bool "dpkg_deb" + default n + select BUSYBOX_FEATURE_SEAMLESS_GZ + help + dpkg-deb unpacks and provides information about Debian archives. + + This implementation of dpkg-deb cannot pack archives. + + Unless you have a specific application which requires dpkg-deb, + say N here. + +config BUSYBOX_FEATURE_DPKG_DEB_EXTRACT_ONLY + bool "Extract only (-x)" + default n + depends on BUSYBOX_DPKG_DEB + help + This reduces dpkg-deb to the equivalent of + "ar -p data.tar.gz | tar -zx". However it saves space as none + of the extra dpkg-deb, ar or tar options are needed, they are linked + to internally. + +config BUSYBOX_GUNZIP + bool "gunzip" + default y + help + gunzip is used to decompress archives created by gzip. + You can use the `-t' option to test the integrity of + an archive, without decompressing it. + +config BUSYBOX_GZIP + bool "gzip" + default y + help + gzip is used to compress files. + It's probably the most widely used UNIX compression program. + +config BUSYBOX_IPKG + bool "ipkg" + default y + select BUSYBOX_MD5SUM + select BUSYBOX_WGET + help + ipkg is the itsy package management system. + +config BUSYBOX_RPM2CPIO + bool "rpm2cpio" + default n + help + Converts an RPM file into a CPIO archive. + +config BUSYBOX_RPM + bool "rpm" + default n + help + Mini RPM applet - queries and extracts RPM packages. + +config BUSYBOX_TAR + bool "tar" + default y + help + tar is an archiving program. It's commonly used with gzip to + create compressed archives. It's probably the most widely used + UNIX archive program. + +if TAR + +config BUSYBOX_FEATURE_TAR_CREATE + bool "Enable archive creation" + default y + depends on BUSYBOX_TAR + help + If you enable this option you'll be able to create + tar archives using the `-c' option. + +config BUSYBOX_FEATURE_TAR_AUTODETECT + bool "Autodetect gz/bz2 compressed tarballs" + default n + depends on BUSYBOX_FEATURE_SEAMLESS_Z || BUSYBOX_FEATURE_SEAMLESS_GZ || BUSYBOX_FEATURE_SEAMLESS_BZ2 || BUSYBOX_FEATURE_SEAMLESS_LZMA + help + With this option tar can automatically detect gzip/bzip2 compressed + tarballs. Currently it works only on files (not pipes etc). + +config BUSYBOX_FEATURE_TAR_FROM + bool "Enable -X (exclude from) and -T (include from) options)" + default y + depends on BUSYBOX_TAR + help + If you enable this option you'll be able to specify + a list of files to include or exclude from an archive. + +config BUSYBOX_FEATURE_TAR_OLDGNU_COMPATIBILITY + bool "Support for old tar header format" + default N + depends on BUSYBOX_TAR + help + This option is required to unpack archives created in + the old GNU format; help to kill this old format by + repacking your ancient archives with the new format. + +config BUSYBOX_FEATURE_TAR_OLDSUN_COMPATIBILITY + bool "Enable untarring of tarballs with checksums produced by buggy Sun tar" + default N + depends on BUSYBOX_TAR + help + This option is required to unpack archives created by some old + version of Sun's tar (it was calculating checksum using signed + arithmetic). It is said to be fixed in newer Sun tar, but "old" + tarballs still exist. + +config BUSYBOX_FEATURE_TAR_GNU_EXTENSIONS + bool "Support for GNU tar extensions (long filenames)" + default y + depends on BUSYBOX_TAR + help + With this option busybox supports GNU long filenames and + linknames. + +config BUSYBOX_FEATURE_TAR_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_TAR && BUSYBOX_GETOPT_LONG + help + Enable use of long options, increases size by about 400 Bytes + +config BUSYBOX_FEATURE_TAR_UNAME_GNAME + bool "Enable use of user and group names" + default n + depends on BUSYBOX_TAR + help + Enables use of user and group names in tar. This affects contents + listings (-t) and preserving permissions when unpacking (-p). + +200 bytes. + +endif #tar + +config BUSYBOX_UNCOMPRESS + bool "uncompress" + default n + help + uncompress is used to decompress archives created by compress. + Not much used anymore, replaced by gzip/gunzip. + +config BUSYBOX_UNLZMA + bool "unlzma" + default n + help + unlzma is a compression utility using the Lempel-Ziv-Markov chain + compression algorithm, and range coding. Compression + is generally considerably better than that achieved by the bzip2 + compressors. + + The BusyBox unlzma applet is limited to de-compression only. + On an x86 system, this applet adds about 4K. + + Unless you have a specific application which requires unlzma, you + should probably say N here. + +config BUSYBOX_FEATURE_LZMA_FAST + bool "Optimize unlzma for speed" + default n + depends on BUSYBOX_UNLZMA + help + This option reduces decompression time by about 33% at the cost of + a 2K bigger binary. + +config BUSYBOX_UNZIP + bool "unzip" + default y + help + unzip will list or extract files from a ZIP archive, + commonly found on DOS/WIN systems. The default behavior + (with no options) is to extract the archive into the + current directory. Use the `-d' option to extract to a + directory of your choice. + +endmenu diff --git a/package/busybox/config/console-tools/Config.in b/package/busybox/config/console-tools/Config.in new file mode 100644 index 000000000..3f5a98c84 --- /dev/null +++ b/package/busybox/config/console-tools/Config.in @@ -0,0 +1,138 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Console Utilities" + +config BUSYBOX_CHVT + bool "chvt" + default n + help + This program is used to change to another terminal. + Example: chvt 4 (change to terminal /dev/tty4) + +config BUSYBOX_CLEAR + bool "clear" + default y + help + This program clears the terminal screen. + +config BUSYBOX_DEALLOCVT + bool "deallocvt" + default n + help + This program deallocates unused virtual consoles. + +config BUSYBOX_DUMPKMAP + bool "dumpkmap" + default n + help + This program dumps the kernel's keyboard translation table to + stdout, in binary format. You can then use loadkmap to load it. + +config BUSYBOX_KBD_MODE + bool "kbd_mode" + default n + help + This program reports and sets keyboard mode. + +config BUSYBOX_LOADFONT + bool "loadfont" + default n + help + This program loads a console font from standard input. + +config BUSYBOX_LOADKMAP + bool "loadkmap" + default n + help + This program loads a keyboard translation table from + standard input. + +config BUSYBOX_OPENVT + bool "openvt" + default n + help + This program is used to start a command on an unused + virtual terminal. + +config BUSYBOX_RESET + bool "reset" + default y + help + This program is used to reset the terminal screen, if it + gets messed up. + +config BUSYBOX_RESIZE + bool "resize" + default n + help + This program is used to (re)set the width and height of your current + terminal. + +config BUSYBOX_FEATURE_RESIZE_PRINT + bool "Print environment variables" + default n + depends on BUSYBOX_RESIZE + help + Prints the newly set size (number of columns and rows) of + the terminal. + E.g.: + COLUMNS=80;LINES=44;export COLUMNS LINES; + +config BUSYBOX_SETCONSOLE + bool "setconsole" + default n + help + This program redirects the system console to another device, + like the current tty while logged in via telnet. + +config BUSYBOX_FEATURE_SETCONSOLE_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_SETCONSOLE && BUSYBOX_GETOPT_LONG + help + Support long options for the setconsole applet. + +config BUSYBOX_SETFONT + bool "setfont" + default n + help + Allows to load console screen map. Useful for i18n. + +config BUSYBOX_FEATURE_SETFONT_TEXTUAL_MAP + bool "Support reading textual screen maps" + default n + depends on BUSYBOX_SETFONT + help + Support reading textual screen maps. + +config BUSYBOX_DEFAULT_SETFONT_DIR + string "Default directory for console-tools files" + default "" + depends on BUSYBOX_SETFONT + help + Directory to use if setfont's params are simple filenames + (not /path/to/file or ./file). Default is "" (no default directory). + +config BUSYBOX_SETKEYCODES + bool "setkeycodes" + default n + help + This program loads entries into the kernel's scancode-to-keycode + map, allowing unusual keyboards to generate usable keycodes. + +config BUSYBOX_SETLOGCONS + bool "setlogcons" + default n + help + This program redirects the output console of kernel messages. + +config BUSYBOX_SHOWKEY + bool "showkey" + default n + help + Shows keys pressed. + +endmenu diff --git a/package/busybox/config/coreutils/Config.in b/package/busybox/config/coreutils/Config.in new file mode 100644 index 000000000..cd7a14083 --- /dev/null +++ b/package/busybox/config/coreutils/Config.in @@ -0,0 +1,827 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Coreutils" + +config BUSYBOX_BASENAME + bool "basename" + default y + help + basename is used to strip the directory and suffix from filenames, + leaving just the filename itself. Enable this option if you wish + to enable the 'basename' utility. + +config BUSYBOX_CAL + bool "cal" + default n + help + cal is used to display a monthly calender. + +config BUSYBOX_CAT + bool "cat" + default y + help + cat is used to concatenate files and print them to the standard + output. Enable this option if you wish to enable the 'cat' utility. + +config BUSYBOX_CATV + bool "catv" + default n + help + Display nonprinting characters as escape sequences (like some + implementations' cat -v option). + +config BUSYBOX_CHGRP + bool "chgrp" + default y + help + chgrp is used to change the group ownership of files. + +config BUSYBOX_CHMOD + bool "chmod" + default y + help + chmod is used to change the access permission of files. + +config BUSYBOX_CHOWN + bool "chown" + default y + help + chown is used to change the user and/or group ownership + of files. + +config BUSYBOX_CHROOT + bool "chroot" + default y + help + chroot is used to change the root directory and run a command. + The default command is `/bin/sh'. + +config BUSYBOX_CKSUM + bool "cksum" + default y + help + cksum is used to calculate the CRC32 checksum of a file. + +config BUSYBOX_COMM + bool "comm" + default n + help + comm is used to compare two files line by line and return + a three-column output. + +config BUSYBOX_CP + bool "cp" + default y + help + cp is used to copy files and directories. + +config BUSYBOX_CUT + bool "cut" + default y + help + cut is used to print selected parts of lines from + each file to stdout. + +config BUSYBOX_DATE + bool "date" + default y + help + date is used to set the system date or display the + current time in the given format. + +config BUSYBOX_FEATURE_DATE_ISOFMT + bool "Enable ISO date format output (-I)" + default y + depends on BUSYBOX_DATE + help + Enable option (-I) to output an ISO-8601 compliant + date/time string. + +config BUSYBOX_DD + bool "dd" + default y + help + dd copies a file (from standard input to standard output, + by default) using specific input and output blocksizes, + while optionally performing conversions on it. + +config BUSYBOX_FEATURE_DD_SIGNAL_HANDLING + bool "Enable DD signal handling for status reporting" + default y + depends on BUSYBOX_DD + help + sending a SIGUSR1 signal to a running `dd' process makes it + print to standard error the number of records read and written + so far, then to resume copying. + + $ dd if=/dev/zero of=/dev/null& + $ pid=$! kill -USR1 $pid; sleep 1; kill $pid + 10899206+0 records in 10899206+0 records out + +config BUSYBOX_FEATURE_DD_IBS_OBS + bool "Enable ibs, obs and conv options" + default y + depends on BUSYBOX_DD + help + Enables support for writing a certain number of bytes in and out, + at a time, and performing conversions on the data stream. + +config BUSYBOX_DF + bool "df" + default y + help + df reports the amount of disk space used and available + on filesystems. + +config BUSYBOX_FEATURE_DF_FANCY + bool "Enable -a, -i, -B" + default y + depends on BUSYBOX_DF + help + This option enables -a, -i and -B. + +config BUSYBOX_DIRNAME + bool "dirname" + default y + help + dirname is used to strip a non-directory suffix from + a file name. + +config BUSYBOX_DOS2UNIX + bool "dos2unix/unix2dos" + default y + help + dos2unix is used to convert a text file from DOS format to + UNIX format, and vice versa. + +config BUSYBOX_UNIX2DOS + bool + default y + depends on BUSYBOX_DOS2UNIX + help + unix2dos is used to convert a text file from UNIX format to + DOS format, and vice versa. + +config BUSYBOX_DU + bool "du (default blocksize of 512 bytes)" + default y + help + du is used to report the amount of disk space used + for specified files. + +config BUSYBOX_FEATURE_DU_DEFAULT_BLOCKSIZE_1K + bool "Use a default blocksize of 1024 bytes (1K)" + default y + depends on BUSYBOX_DU + help + Use a blocksize of (1K) instead of the default 512b. + +config BUSYBOX_ECHO + bool "echo (basic SuSv3 version taking no options)" + default y + help + echo is used to print a specified string to stdout. + +# this entry also appears in shell/Config.in, next to the echo builtin +config BUSYBOX_FEATURE_FANCY_ECHO + bool "Enable echo options (-n and -e)" + default y + depends on BUSYBOX_ECHO || BUSYBOX_ASH_BUILTIN_ECHO + help + This adds options (-n and -e) to echo. + +config BUSYBOX_ENV + bool "env" + default y + help + env is used to set an environment variable and run + a command; without options it displays the current + environment. + +config BUSYBOX_FEATURE_ENV_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_ENV && BUSYBOX_GETOPT_LONG + help + Support long options for the env applet. + +config BUSYBOX_EXPAND + bool "expand" + default n + help + By default, convert all tabs to spaces. + +config BUSYBOX_FEATURE_EXPAND_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_EXPAND && BUSYBOX_GETOPT_LONG + help + Support long options for the expand applet. + +config BUSYBOX_EXPR + bool "expr" + default y + help + expr is used to calculate numbers and print the result + to standard output. + +config BUSYBOX_EXPR_MATH_SUPPORT_64 + bool "Extend Posix numbers support to 64 bit" + default n + depends on BUSYBOX_EXPR + help + Enable 64-bit math support in the expr applet. This will make + the applet slightly larger, but will allow computation with very + large numbers. + +config BUSYBOX_FALSE + bool "false" + default y + help + false returns an exit code of FALSE (1). + +config BUSYBOX_FOLD + bool "fold" + default n + help + Wrap text to fit a specific width. + +config BUSYBOX_HEAD + bool "head" + default y + help + head is used to print the first specified number of lines + from files. + +config BUSYBOX_FEATURE_FANCY_HEAD + bool "Enable head options (-c, -q, and -v)" + default y + depends on BUSYBOX_HEAD + help + This enables the head options (-c, -q, and -v). + +config BUSYBOX_HOSTID + bool "hostid" + default n + help + hostid prints the numeric identifier (in hexadecimal) for + the current host. + +config BUSYBOX_ID + bool "id" + default y + help + id displays the current user and group ID names. + +config BUSYBOX_INSTALL + bool "install" + default n + help + Copy files and set attributes. + +config BUSYBOX_FEATURE_INSTALL_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_INSTALL && BUSYBOX_GETOPT_LONG + help + Support long options for the install applet. + +config BUSYBOX_LENGTH + bool "length" + default n + help + length is used to print out the length of a specified string. + +config BUSYBOX_LN + bool "ln" + default y + help + ln is used to create hard or soft links between files. + +config BUSYBOX_LOGNAME + bool "logname" + default n + help + logname is used to print the current user's login name. + +config BUSYBOX_LS + bool "ls" + default y + help + ls is used to list the contents of directories. + +config BUSYBOX_FEATURE_LS_FILETYPES + bool "Enable filetyping options (-p and -F)" + default y + depends on BUSYBOX_LS + help + Enable the ls options (-p and -F). + +config BUSYBOX_FEATURE_LS_FOLLOWLINKS + bool "Enable symlinks dereferencing (-L)" + default y + depends on BUSYBOX_LS + help + Enable the ls option (-L). + +config BUSYBOX_FEATURE_LS_RECURSIVE + bool "Enable recursion (-R)" + default y + depends on BUSYBOX_LS + help + Enable the ls option (-R). + +config BUSYBOX_FEATURE_LS_SORTFILES + bool "Sort the file names" + default y + depends on BUSYBOX_LS + help + Allow ls to sort file names alphabetically. + +config BUSYBOX_FEATURE_LS_TIMESTAMPS + bool "Show file timestamps" + default y + depends on BUSYBOX_LS + help + Allow ls to display timestamps for files. + +config BUSYBOX_FEATURE_LS_USERNAME + bool "Show username/groupnames" + default y + depends on BUSYBOX_LS + help + Allow ls to display username/groupname for files. + +config BUSYBOX_FEATURE_LS_COLOR + bool "Allow use of color to identify file types" + default n + depends on BUSYBOX_LS && BUSYBOX_GETOPT_LONG + help + This enables the --color option to ls. + +config BUSYBOX_FEATURE_LS_COLOR_IS_DEFAULT + bool "Produce colored ls output by default" + default n + depends on BUSYBOX_FEATURE_LS_COLOR + help + Saying yes here will turn coloring on by default, + even if no "--color" option is given to the ls command. + This is not recommended, since the colors are not + configurable, and the output may not be legible on + many output screens. + +config BUSYBOX_MD5SUM + bool "md5sum" + default y + help + md5sum is used to print or check MD5 checksums. + +config BUSYBOX_MKDIR + bool "mkdir" + default y + help + mkdir is used to create directories with the specified names. + +config BUSYBOX_FEATURE_MKDIR_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_MKDIR && BUSYBOX_GETOPT_LONG + help + Support long options for the mkdir applet. + +config BUSYBOX_MKFIFO + bool "mkfifo" + default y + help + mkfifo is used to create FIFOs (named pipes). + The `mknod' program can also create FIFOs. + +config BUSYBOX_MKNOD + bool "mknod" + default y + help + mknod is used to create FIFOs or block/character special + files with the specified names. + +config BUSYBOX_MV + bool "mv" + default y + help + mv is used to move or rename files or directories. + +config BUSYBOX_FEATURE_MV_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_MV && BUSYBOX_GETOPT_LONG + help + Support long options for the mv applet. + +config BUSYBOX_NICE + bool "nice" + default y + help + nice runs a program with modified scheduling priority. + +config BUSYBOX_NOHUP + bool "nohup" + default y + help + run a command immune to hangups, with output to a non-tty. + +config BUSYBOX_OD + bool "od" + default n + help + od is used to dump binary files in octal and other formats. + +config BUSYBOX_PRINTENV + bool "printenv" + default n + help + printenv is used to print all or part of environment. + +config BUSYBOX_PRINTF + bool "printf" + default y + help + printf is used to format and print specified strings. + It's similar to `echo' except it has more options. + +config BUSYBOX_PWD + bool "pwd" + default y + help + pwd is used to print the current directory. + +config BUSYBOX_READLINK + bool "readlink" + default y + help + This program reads a symbolic link and returns the name + of the file it points to + +config BUSYBOX_FEATURE_READLINK_FOLLOW + bool "Enable canonicalization by following all symlinks (-f)" + default y + depends on BUSYBOX_READLINK + help + Enable the readlink option (-f). + +config BUSYBOX_REALPATH + bool "realpath" + default n + help + Return the canonicalized absolute pathname. + This isn't provided by GNU shellutils, but where else does it belong. + +config BUSYBOX_RM + bool "rm" + default y + help + rm is used to remove files or directories. + +config BUSYBOX_RMDIR + bool "rmdir" + default n + help + rmdir is used to remove empty directories. + +config BUSYBOX_FEATURE_RMDIR_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_RMDIR && BUSYBOX_GETOPT_LONG + help + Support long options for the rmdir applet, including + --ignore-fail-on-non-empty for compatibility with GNU rmdir. + +config BUSYBOX_SEQ + bool "seq" + default y + help + print a sequence of numbers + +config BUSYBOX_SHA1SUM + bool "sha1sum" + default y + help + Compute and check SHA1 message digest + +config BUSYBOX_SLEEP + bool "sleep" + default y + help + sleep is used to pause for a specified number of seconds. + It comes in 3 versions: + - small: takes one integer parameter + - fancy: takes multiple integer arguments with suffixes: + sleep 1d 2h 3m 15s + - fancy with fractional numbers: + sleep 2.3s 4.5h sleeps for 16202.3 seconds + Last one is "the most compatible" with coreutils sleep, + but it adds around 1k of code. + +config BUSYBOX_FEATURE_FANCY_SLEEP + bool "Enable multiple arguments and s/m/h/d suffixes" + default n + depends on BUSYBOX_SLEEP + help + Allow sleep to pause for specified minutes, hours, and days. + +config BUSYBOX_FEATURE_FLOAT_SLEEP + bool "Enable fractional arguments" + default n + depends on BUSYBOX_FEATURE_FANCY_SLEEP + help + Allow for fractional numeric parameters. + +config BUSYBOX_SORT + bool "sort" + default y + help + sort is used to sort lines of text in specified files. + +config BUSYBOX_FEATURE_SORT_BIG + bool "Full SuSv3 compliant sort (support -ktcsbdfiozgM)" + default n + depends on BUSYBOX_SORT + help + Without this, sort only supports -r, -u, and an integer version + of -n. Selecting this adds sort keys, floating point support, and + more. This adds a little over 3k to a nonstatic build on x86. + + The SuSv3 sort standard is available at: + http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html + +config BUSYBOX_SPLIT + bool "split" + default n + help + split a file into pieces. + +config BUSYBOX_FEATURE_SPLIT_FANCY + bool "Fancy extensions" + default n + depends on BUSYBOX_SPLIT + help + Add support for features not required by SUSv3. + Supports additional suffixes 'b' for 512 bytes, + 'g' for 1GiB for the -b option. + +config BUSYBOX_STAT + bool "stat" + default n + help + display file or filesystem status. + +config BUSYBOX_FEATURE_STAT_FORMAT + bool "Enable custom formats (-c)" + default n + depends on BUSYBOX_STAT + help + Without this, stat will not support the '-c format' option where + users can pass a custom format string for output. This adds about + 7k to a nonstatic build on amd64. + +config BUSYBOX_STTY + bool "stty" + default y + help + stty is used to change and print terminal line settings. + +config BUSYBOX_SUM + bool "sum" + default n + help + checksum and count the blocks in a file + +config BUSYBOX_SYNC + bool "sync" + default y + help + sync is used to flush filesystem buffers. + +config BUSYBOX_TAC + bool "tac" + default n + help + tac is used to concatenate and print files in reverse. + +config BUSYBOX_TAIL + bool "tail" + default y + help + tail is used to print the last specified number of lines + from files. + +config BUSYBOX_FEATURE_FANCY_TAIL + bool "Enable extra tail options (-q, -s, and -v)" + default n + depends on BUSYBOX_TAIL + help + The options (-q, -s, and -v) are provided by GNU tail, but + are not specific in the SUSv3 standard. + +config BUSYBOX_TEE + bool "tee" + default y + help + tee is used to read from standard input and write + to standard output and files. + +config BUSYBOX_FEATURE_TEE_USE_BLOCK_IO + bool "Enable block I/O (larger/faster) instead of byte I/O" + default n + depends on BUSYBOX_TEE + help + Enable this option for a faster tee, at expense of size. + +config BUSYBOX_TEST + bool "test" + default y + help + test is used to check file types and compare values, + returning an appropriate exit code. The bash shell + has test built in, ash can build it in optionally. + +config BUSYBOX_FEATURE_TEST_64 + bool "Extend test to 64 bit" + default n + depends on BUSYBOX_TEST || BUSYBOX_ASH_BUILTIN_TEST + help + Enable 64-bit support in test. + +config BUSYBOX_TOUCH + bool "touch" + default y + help + touch is used to create or change the access and/or + modification timestamp of specified files. + +config BUSYBOX_TR + bool "tr" + default y + help + tr is used to squeeze, and/or delete characters from standard + input, writing to standard output. + +config BUSYBOX_FEATURE_TR_CLASSES + bool "Enable character classes (such as [:upper:])" + default y + depends on BUSYBOX_TR + help + Enable character classes, enabling commands such as: + tr [:upper:] [:lower:] to convert input into lowercase. + +config BUSYBOX_FEATURE_TR_EQUIV + bool "Enable equivalence classes" + default n + depends on BUSYBOX_TR + help + Enable equivalence classes, which essentially add the enclosed + character to the current set. For instance, tr [=a=] xyz would + replace all instances of 'a' with 'xyz'. This option is mainly + useful for cases when no other way of expressing a character + is possible. + +config BUSYBOX_TRUE + bool "true" + default y + help + true returns an exit code of TRUE (0). + +config BUSYBOX_TTY + bool "tty" + default n + help + tty is used to print the name of the current terminal to + standard output. + +config BUSYBOX_UNAME + bool "uname" + default y + help + uname is used to print system information. + +config BUSYBOX_UNEXPAND + bool "unexpand" + default n + help + By default, convert only leading sequences of blanks to tabs. + +config BUSYBOX_FEATURE_UNEXPAND_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_UNEXPAND && BUSYBOX_GETOPT_LONG + help + Support long options for the unexpand applet. + +config BUSYBOX_UNIQ + bool "uniq" + default y + help + uniq is used to remove duplicate lines from a sorted file. + +config BUSYBOX_USLEEP + bool "usleep" + default n + help + usleep is used to pause for a specified number of microseconds. + +config BUSYBOX_UUDECODE + bool "uudecode" + default n + help + uudecode is used to decode a uuencoded file. + +config BUSYBOX_UUENCODE + bool "uuencode" + default n + help + uuencode is used to uuencode a file. + +config BUSYBOX_WC + bool "wc" + default y + help + wc is used to print the number of bytes, words, and lines, + in specified files. + +config BUSYBOX_FEATURE_WC_LARGE + bool "Support very large files in wc" + default n + depends on BUSYBOX_WC + help + Use "unsigned long long" in wc for count variables. + +config BUSYBOX_WHO + bool "who" + default y + select BUSYBOX_FEATURE_UTMP + help + who is used to show who is logged on. + +config BUSYBOX_WHOAMI + bool "whoami" + default n + help + whoami is used to print the username of the current + user id (same as id -un). + +config BUSYBOX_YES + bool "yes" + default y + help + yes is used to repeatedly output a specific string, or + the default string `y'. + +comment "Common options for cp and mv" + depends on BUSYBOX_CP || BUSYBOX_MV + +config BUSYBOX_FEATURE_PRESERVE_HARDLINKS + bool "Preserve hard links" + default y + depends on BUSYBOX_CP || BUSYBOX_MV + help + Allow cp and mv to preserve hard links. + +comment "Common options for ls, more and telnet" + depends on BUSYBOX_LS || BUSYBOX_MORE || BUSYBOX_TELNET + +config BUSYBOX_FEATURE_AUTOWIDTH + bool "Calculate terminal & column widths" + default y + depends on BUSYBOX_LS || BUSYBOX_MORE || BUSYBOX_TELNET + help + This option allows utilities such as 'ls', 'more' and 'telnet' + to determine the width of the screen, which can allow them to + display additional text or avoid wrapping text onto the next line. + If you leave this disabled, your utilities will be especially + primitive and will be unable to determine the current screen width. + +comment "Common options for df, du, ls" + depends on BUSYBOX_DF || BUSYBOX_DU || BUSYBOX_LS + +config BUSYBOX_FEATURE_HUMAN_READABLE + bool "Support for human readable output (example 13k, 23M, 235G)" + default y + depends on BUSYBOX_DF || BUSYBOX_DU || BUSYBOX_LS + help + Allow df, du, and ls to have human readable output. + +comment "Common options for md5sum, sha1sum" + depends on BUSYBOX_MD5SUM || BUSYBOX_SHA1SUM + +config BUSYBOX_FEATURE_MD5_SHA1_SUM_CHECK + bool "Enable -c, -s and -w options" + default y + depends on BUSYBOX_MD5SUM || BUSYBOX_SHA1SUM + help + Enabling the -c options allows files to be checked + against pre-calculated hash values. + + -s and -w are useful options when verifying checksums. + +endmenu diff --git a/package/busybox/config/debianutils/Config.in b/package/busybox/config/debianutils/Config.in new file mode 100644 index 000000000..218422312 --- /dev/null +++ b/package/busybox/config/debianutils/Config.in @@ -0,0 +1,84 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Debian Utilities" + +config BUSYBOX_MKTEMP + bool "mktemp" + default y + help + mktemp is used to create unique temporary files + +config BUSYBOX_PIPE_PROGRESS + bool "pipe_progress" + default n + help + Display a dot to indicate pipe activity. + +config BUSYBOX_RUN_PARTS + bool "run-parts" + default y + help + run-parts is a utility designed to run all the scripts in a directory. + + It is useful to set up a directory like cron.daily, where you need to + execute all the scripts in that directory. + + In this implementation of run-parts some features (such as report + mode) are not implemented. + + Unless you know that run-parts is used in some of your scripts + you can safely say N here. + +config BUSYBOX_FEATURE_RUN_PARTS_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_RUN_PARTS && BUSYBOX_GETOPT_LONG + help + Support long options for the run-parts applet. + +config BUSYBOX_FEATURE_RUN_PARTS_FANCY + bool "Support additional arguments" + default n + depends on BUSYBOX_RUN_PARTS + help + Support additional options: + -l --list print the names of the all matching files (not + limited to executables), but don't actually run them. + +config BUSYBOX_START_STOP_DAEMON + bool "start-stop-daemon" + default n + help + start-stop-daemon is used to control the creation and + termination of system-level processes, usually the ones + started during the startup of the system. + +config BUSYBOX_FEATURE_START_STOP_DAEMON_FANCY + bool "Support additional arguments" + default n + depends on BUSYBOX_START_STOP_DAEMON + help + Support additional arguments. + -o|--oknodo ignored since we exit with 0 anyway + -v|--verbose + -N|--nicelevel N + +config BUSYBOX_FEATURE_START_STOP_DAEMON_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_START_STOP_DAEMON && BUSYBOX_GETOPT_LONG + help + Support long options for the start-stop-daemon applet. + +config BUSYBOX_WHICH + bool "which" + default y + help + which is used to find programs in your PATH and + print out their pathnames. + +endmenu + diff --git a/package/busybox/config/e2fsprogs/Config.in b/package/busybox/config/e2fsprogs/Config.in new file mode 100644 index 000000000..ac3850e63 --- /dev/null +++ b/package/busybox/config/e2fsprogs/Config.in @@ -0,0 +1,68 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Linux Ext2 FS Progs" + +config BUSYBOX_CHATTR + bool "chattr" + default n + help + chattr changes the file attributes on a second extended file system. + +### config E2FSCK +### bool "e2fsck" +### default n +### help +### e2fsck is used to check Linux second extended file systems (ext2fs). +### e2fsck also supports ext2 filesystems countaining a journal (ext3). +### The normal compat symlinks 'fsck.ext2' and 'fsck.ext3' are also +### provided. + +config BUSYBOX_FSCK + bool "fsck" + default n + help + fsck is used to check and optionally repair one or more filesystems. + In actuality, fsck is simply a front-end for the various file system + checkers (fsck.fstype) available under Linux. + +config BUSYBOX_LSATTR + bool "lsattr" + default n + help + lsattr lists the file attributes on a second extended file system. + +### config MKE2FS +### bool "mke2fs" +### default n +### help +### mke2fs is used to create an ext2/ext3 filesystem. The normal compat +### symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided. + +### config TUNE2FS +### bool "tune2fs" +### default n +### help +### tune2fs allows the system administrator to adjust various tunable +### filesystem parameters on Linux ext2/ext3 filesystems. + +### config E2LABEL +### bool "e2label" +### default n +### depends on BUSYBOX_TUNE2FS +### help +### e2label will display or change the filesystem label on the ext2 +### filesystem located on device. + +### NB: this one is now provided by util-linux/volume_id/* +### config FINDFS +### bool "findfs" +### default n +### depends on BUSYBOX_TUNE2FS +### help +### findfs will search the disks in the system looking for a filesystem +### which has a label matching label or a UUID equal to uuid. + +endmenu diff --git a/package/busybox/config/e2fsprogs/old_e2fsprogs/Config.in b/package/busybox/config/e2fsprogs/old_e2fsprogs/Config.in new file mode 100644 index 000000000..f07b54c3d --- /dev/null +++ b/package/busybox/config/e2fsprogs/old_e2fsprogs/Config.in @@ -0,0 +1,67 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Linux Ext2 FS Progs" + +config BUSYBOX_CHATTR + bool "chattr" + default n + help + chattr changes the file attributes on a second extended file system. + +config BUSYBOX_E2FSCK + bool "e2fsck" + default n + help + e2fsck is used to check Linux second extended file systems (ext2fs). + e2fsck also supports ext2 filesystems countaining a journal (ext3). + The normal compat symlinks 'fsck.ext2' and 'fsck.ext3' are also + provided. + +config BUSYBOX_FSCK + bool "fsck" + default n + help + fsck is used to check and optionally repair one or more filesystems. + In actuality, fsck is simply a front-end for the various file system + checkers (fsck.fstype) available under Linux. + +config BUSYBOX_LSATTR + bool "lsattr" + default n + help + lsattr lists the file attributes on a second extended file system. + +config BUSYBOX_MKE2FS + bool "mke2fs" + default n + help + mke2fs is used to create an ext2/ext3 filesystem. The normal compat + symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided. + +config BUSYBOX_TUNE2FS + bool "tune2fs" + default n + help + tune2fs allows the system administrator to adjust various tunable + filesystem parameters on Linux ext2/ext3 filesystems. + +config BUSYBOX_E2LABEL + bool "e2label" + default n + depends on BUSYBOX_TUNE2FS + help + e2label will display or change the filesystem label on the ext2 + filesystem located on device. + +config BUSYBOX_FINDFS + bool "findfs" + default n + depends on BUSYBOX_TUNE2FS + help + findfs will search the disks in the system looking for a filesystem + which has a label matching label or a UUID equal to uuid. + +endmenu diff --git a/package/busybox/config/editors/Config.in b/package/busybox/config/editors/Config.in new file mode 100644 index 000000000..cce9675df --- /dev/null +++ b/package/busybox/config/editors/Config.in @@ -0,0 +1,196 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Editors" + +config BUSYBOX_AWK + bool "awk" + default y + help + Awk is used as a pattern scanning and processing language. This is + the BusyBox implementation of that programming language. + +config BUSYBOX_FEATURE_AWK_LIBM + bool "Enable math functions (requires libm)" + default y + depends on BUSYBOX_AWK + help + Enable math functions of the Awk programming language. + NOTE: This will require libm to be present for linking. + +config BUSYBOX_CMP + bool "cmp" + default n + help + cmp is used to compare two files and returns the result + to standard output. + +config BUSYBOX_DIFF + bool "diff" + default y + help + diff compares two files or directories and outputs the + differences between them in a form that can be given to + the patch command. + +config BUSYBOX_FEATURE_DIFF_BINARY + bool "Enable checks for binary files" + default y + depends on BUSYBOX_DIFF + help + This option enables support for checking for binary files + before a comparison is carried out. + +config BUSYBOX_FEATURE_DIFF_DIR + bool "Enable directory support" + default y + depends on BUSYBOX_DIFF + help + This option enables support for directory and subdirectory + comparison. + +config BUSYBOX_FEATURE_DIFF_MINIMAL + bool "Enable -d option to find smaller sets of changes" + default n + depends on BUSYBOX_DIFF + help + Enabling this option allows the use of -d to make diff + try hard to find the smallest possible set of changes. + +config BUSYBOX_ED + bool "ed" + default n + help + The original 1970's Unix text editor, from the days of teletypes. + Small, simple, evil. Part of SUSv3. If you're not already using + this, you don't need it. + +config BUSYBOX_PATCH + bool "patch" + default n + help + Apply a unified diff formatted patch. + +config BUSYBOX_SED + bool "sed" + default y + help + sed is used to perform text transformations on a file + or input from a pipeline. + +config BUSYBOX_VI + bool "vi" + default y + help + 'vi' is a text editor. More specifically, it is the One True + text editor . It does, however, have a rather steep + learning curve. If you are not already comfortable with 'vi' + you may wish to use something else. + +config BUSYBOX_FEATURE_VI_MAX_LEN + int "Maximum screen width in vi" + range 256 16384 + default 4096 + depends on BUSYBOX_VI + help + Contrary to what you may think, this is not eating much. + Make it smaller than 4k only if you are very limited on memory. + +config BUSYBOX_FEATURE_VI_8BIT + bool "Allow vi to display 8-bit chars (otherwise shows dots)" + default y + depends on BUSYBOX_VI + help + If your terminal can display characters with high bit set, + you may want to enable this. Note: vi is not Unicode-capable. + If your terminal combines several 8-bit bytes into one character + (as in Unicode mode), this will not work properly. + +config BUSYBOX_FEATURE_VI_COLON + bool "Enable \":\" colon commands (no \"ex\" mode)" + default y + depends on BUSYBOX_VI + help + Enable a limited set of colon commands for vi. This does not + provide an "ex" mode. + +config BUSYBOX_FEATURE_VI_YANKMARK + bool "Enable yank/put commands and mark cmds" + default y + depends on BUSYBOX_VI + help + This will enable you to use yank and put, as well as mark in + busybox vi. + +config BUSYBOX_FEATURE_VI_SEARCH + bool "Enable search and replace cmds" + default y + depends on BUSYBOX_VI + help + Select this if you wish to be able to do search and replace in + busybox vi. + +config BUSYBOX_FEATURE_VI_USE_SIGNALS + bool "Catch signals" + default y + depends on BUSYBOX_VI + help + Selecting this option will make busybox vi signal aware. This will + make busybox vi support SIGWINCH to deal with Window Changes, catch + Ctrl-Z and Ctrl-C and alarms. + +config BUSYBOX_FEATURE_VI_DOT_CMD + bool "Remember previous cmd and \".\" cmd" + default y + depends on BUSYBOX_VI + help + Make busybox vi remember the last command and be able to repeat it. + +config BUSYBOX_FEATURE_VI_READONLY + bool "Enable -R option and \"view\" mode" + default y + depends on BUSYBOX_VI + help + Enable the read-only command line option, which allows the user to + open a file in read-only mode. + +config BUSYBOX_FEATURE_VI_SETOPTS + bool "Enable set-able options, ai ic showmatch" + default y + depends on BUSYBOX_VI + help + Enable the editor to set some (ai, ic, showmatch) options. + +config BUSYBOX_FEATURE_VI_SET + bool "Support for :set" + default y + depends on BUSYBOX_VI + help + Support for ":set". + +config BUSYBOX_FEATURE_VI_WIN_RESIZE + bool "Handle window resize" + default y + depends on BUSYBOX_VI + help + Make busybox vi behave nicely with terminals that get resized. + +config BUSYBOX_FEATURE_VI_OPTIMIZE_CURSOR + bool "Optimize cursor movement" + default y + depends on BUSYBOX_VI + help + This will make the cursor movement faster, but requires more memory + and it makes the applet a tiny bit larger. + +config BUSYBOX_FEATURE_ALLOW_EXEC + bool "Allow vi and awk to execute shell commands" + default y + depends on BUSYBOX_VI || BUSYBOX_AWK + help + Enables vi and awk features which allows user to execute + shell commands (using system() C call). + +endmenu diff --git a/package/busybox/config/findutils/Config.in b/package/busybox/config/findutils/Config.in new file mode 100644 index 000000000..6e428c887 --- /dev/null +++ b/package/busybox/config/findutils/Config.in @@ -0,0 +1,255 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Finding Utilities" + +config BUSYBOX_FIND + bool "find" + default y + help + find is used to search your system to find specified files. + +config BUSYBOX_FEATURE_FIND_PRINT0 + bool "Enable -print0 option" + default y + depends on BUSYBOX_FIND + help + Causes output names to be separated by a null character + rather than a newline. This allows names that contain + newlines and other whitespace to be more easily + interpreted by other programs. + +config BUSYBOX_FEATURE_FIND_MTIME + bool "Enable modified time matching (-mtime option)" + default y + depends on BUSYBOX_FIND + help + Allow searching based on the modification time of + files, in days. + +config BUSYBOX_FEATURE_FIND_MMIN + bool "Enable modified time matching (-mmin option)" + default y + depends on BUSYBOX_FIND + help + Allow searching based on the modification time of + files, in minutes. + +config BUSYBOX_FEATURE_FIND_PERM + bool "Enable permissions matching (-perm option)" + default y + depends on BUSYBOX_FIND + help + Enable searching based on file permissions. + +config BUSYBOX_FEATURE_FIND_TYPE + bool "Enable filetype matching (-type option)" + default y + depends on BUSYBOX_FIND + help + Enable searching based on file type (file, + directory, socket, device, etc.). + +config BUSYBOX_FEATURE_FIND_XDEV + bool "Enable 'stay in filesystem' option (-xdev)" + default y + depends on BUSYBOX_FIND + help + This option allows find to restrict searches to a single filesystem. + +config BUSYBOX_FEATURE_FIND_MAXDEPTH + bool "Enable -maxdepth N option" + default y + depends on BUSYBOX_FIND + help + This option enables -maxdepth N option. + +config BUSYBOX_FEATURE_FIND_NEWER + bool "Enable -newer option for comparing file mtimes" + default y + depends on BUSYBOX_FIND + help + Support the 'find -newer' option for finding any files which have + a modified time that is more recent than the specified FILE. + +config BUSYBOX_FEATURE_FIND_INUM + bool "Enable inode number matching (-inum option)" + default y + depends on BUSYBOX_FIND + help + Support the 'find -inum' option for searching by inode number. + +config BUSYBOX_FEATURE_FIND_EXEC + bool "Enable -exec option allowing execution of commands" + default y + depends on BUSYBOX_FIND + help + Support the 'find -exec' option for executing commands based upon + the files matched. + +config BUSYBOX_FEATURE_FIND_USER + bool "Enable username/uid matching (-user option)" + default y + depends on BUSYBOX_FIND + help + Support the 'find -user' option for searching by username or uid. + +config BUSYBOX_FEATURE_FIND_GROUP + bool "Enable group/gid matching (-group option)" + default y + depends on BUSYBOX_FIND + help + Support the 'find -group' option for searching by group name or gid. + +config BUSYBOX_FEATURE_FIND_NOT + bool "Enable the 'not' (!) operator" + default y + depends on BUSYBOX_FIND + help + Support the '!' operator to invert the test results. + If 'Enable full-blown desktop' is enabled, then will also support + the non-POSIX notation '-not'. + +config BUSYBOX_FEATURE_FIND_DEPTH + bool "Enable the -depth option" + default y + depends on BUSYBOX_FIND + help + Process each directory's contents before the directory itself. + +config BUSYBOX_FEATURE_FIND_PAREN + bool "Enable parens in options" + default y + depends on BUSYBOX_FIND + help + Enable usage of parens '(' to specify logical order of arguments. + +config BUSYBOX_FEATURE_FIND_SIZE + bool "Enable -size option allowing matching for file size" + default y + depends on BUSYBOX_FIND + help + Support the 'find -size' option for searching by file size. + +config BUSYBOX_FEATURE_FIND_PRUNE + bool "Enable -prune option allowing to exclude subdirectories" + default y + depends on BUSYBOX_FIND + help + If the file is a directory, dont descend into it. Useful for + exclusion .svn and CVS directories. + +config BUSYBOX_FEATURE_FIND_EMPTY + bool "Enable -empty option matching empty files and directories" + default y + depends on BUSYBOX_FIND + help + Support the 'find -empty' option for searching empty files + and directories. + +config BUSYBOX_FEATURE_FIND_DELETE + bool "Enable -delete option allowing to delete files" + default y + depends on BUSYBOX_FIND && BUSYBOX_FEATURE_FIND_DEPTH + help + Support the 'find -delete' option for deleting files and directories. + WARNING: This option can do much harm if used wrong. Busybox will not + try to protect the user from doing stupid things. Use with care. + +config BUSYBOX_FEATURE_FIND_PATH + bool "Enable -path option allowing to match pathname patterns" + default y + depends on BUSYBOX_FIND + help + The -path option matches whole pathname instead of just filename. + +config BUSYBOX_FEATURE_FIND_REGEX + bool "Enable -regex: match pathname to regex" + default y + depends on BUSYBOX_FIND + help + The -regex option matches whole pathname against regular expression. + +config BUSYBOX_FEATURE_FIND_CONTEXT + bool "Enable -context option for matching security context" + default n + depends on BUSYBOX_FIND && BUSYBOX_SELINUX + help + Support the 'find -context' option for matching security context. + +config BUSYBOX_GREP + bool "grep" + default y + help + grep is used to search files for a specified pattern. + +config BUSYBOX_FEATURE_GREP_EGREP_ALIAS + bool "Support extended regular expressions (egrep & grep -E)" + default y + depends on BUSYBOX_GREP + help + Enabled support for extended regular expressions. Extended + regular expressions allow for alternation (foo|bar), grouping, + and various repetition operators. + +config BUSYBOX_FEATURE_GREP_FGREP_ALIAS + bool "Alias fgrep to grep -F" + default y + depends on BUSYBOX_GREP + help + fgrep sees the search pattern as a normal string rather than + regular expressions. + grep -F is always builtin, this just creates the fgrep alias. + +config BUSYBOX_FEATURE_GREP_CONTEXT + bool "Enable before and after context flags (-A, -B and -C)" + default y + depends on BUSYBOX_GREP + help + Print the specified number of leading (-B) and/or trailing (-A) + context surrounding our matching lines. + Print the specified number of context lines (-C). + +config BUSYBOX_XARGS + bool "xargs" + default y + help + xargs is used to execute a specified command on + every item from standard input. + +config BUSYBOX_FEATURE_XARGS_SUPPORT_CONFIRMATION + bool "Enable prompt and confirmation option -p" + default n + depends on BUSYBOX_XARGS + help + Support prompt the user about whether to run each command + line and read a line from the terminal. + +config BUSYBOX_FEATURE_XARGS_SUPPORT_QUOTES + bool "Enable support single and double quotes and backslash" + default n + depends on BUSYBOX_XARGS + help + Default xargs unsupport single and double quotes + and backslash for can use aruments with spaces. + +config BUSYBOX_FEATURE_XARGS_SUPPORT_TERMOPT + bool "Enable support options -x" + default n + depends on BUSYBOX_XARGS + help + Enable support exit if the size (see the -s or -n option) + is exceeded. + +config BUSYBOX_FEATURE_XARGS_SUPPORT_ZERO_TERM + bool "Enable null terminated option -0" + default n + depends on BUSYBOX_XARGS + help + Enable input filenames are terminated by a null character + instead of by whitespace, and the quotes and backslash + are not special. + +endmenu diff --git a/package/busybox/config/init/Config.in b/package/busybox/config/init/Config.in new file mode 100644 index 000000000..348509fb9 --- /dev/null +++ b/package/busybox/config/init/Config.in @@ -0,0 +1,102 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Init Utilities" + +config BUSYBOX_INIT + bool "init" + default y + select BUSYBOX_FEATURE_SYSLOG + help + init is the first program run when the system boots. + +config BUSYBOX_FEATURE_USE_INITTAB + bool "Support reading an inittab file" + default y + depends on BUSYBOX_INIT + help + Allow init to read an inittab file when the system boot. + +config BUSYBOX_FEATURE_KILL_REMOVED + bool "Support killing processes that have been removed from inittab" + default y + depends on BUSYBOX_FEATURE_USE_INITTAB + help + When respawn entries are removed from inittab and a SIGHUP is + sent to init, this feature will kill the processes that have + been removed. + +config BUSYBOX_FEATURE_KILL_DELAY + int "How long to wait between TERM and KILL (0 - send TERM only)" if FEATURE_KILL_REMOVED + range 0 1024 + default 0 + help + With nonzero setting, init sends TERM, forks, child waits N + seconds, sends KILL and exits. Setting it too high is unwise + (child will hang around for too long and can actually kill + wrong process!) + +config BUSYBOX_FEATURE_INIT_SCTTY + bool "Run commands with leading dash with controlling tty" + default n + depends on BUSYBOX_INIT + help + If this option is enabled, init will try to give a controlling + tty to any command which has leading hyphen (often it's "-/bin/sh"). + More precisely, init will do "ioctl(STDIN_FILENO, TIOCSCTTY, 0)". + If device attached to STDIN_FILENO can be a ctty but is not yet + a ctty for other session, it will become this process' ctty. + This is not the traditional init behavour, but is often what you want + in an embedded system where the console is only accessed during + development or for maintenance. + NB: using cttyhack applet may work better. + +config BUSYBOX_FEATURE_INIT_SYSLOG + bool "Enable init to write to syslog" + default y + depends on BUSYBOX_INIT + +config BUSYBOX_FEATURE_EXTRA_QUIET + bool "Be _extra_ quiet on boot" + default n + depends on BUSYBOX_INIT + help + Prevent init from logging some messages to the console during boot. + +config BUSYBOX_FEATURE_INIT_COREDUMPS + bool "Support dumping core for child processes (debugging only)" + default n + depends on BUSYBOX_INIT + help + If this option is enabled and the file /.init_enable_core + exists, then init will call setrlimit() to allow unlimited + core file sizes. If this option is disabled, processes + will not generate any core files. + +config BUSYBOX_FEATURE_INITRD + bool "Support running init from within an initrd (not initramfs)" + default n + depends on BUSYBOX_INIT + help + Legacy support for running init under the old-style initrd. Allows + the name linuxrc to act as init, and it doesn't assume init is PID 1. + + This does not apply to initramfs, which runs /init as PID 1 and + requires no special support. + +config BUSYBOX_HALT + bool "poweroff, halt, and reboot" + default y + help + Stop all processes and either halt, reboot, or power off the system. + +config BUSYBOX_MESG + bool "mesg" + default n + help + Mesg controls access to your terminal by others. It is typically + used to allow or disallow other users to write to your terminal + +endmenu diff --git a/package/busybox/config/libbb/Config.in b/package/busybox/config/libbb/Config.in new file mode 100644 index 000000000..db139538e --- /dev/null +++ b/package/busybox/config/libbb/Config.in @@ -0,0 +1,154 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Busybox Library Tuning" + +config BUSYBOX_PASSWORD_MINLEN + int "Minimum password length" + default 6 + range 5 32 + help + Minimum allowable password length. + +config BUSYBOX_MD5_SIZE_VS_SPEED + int "MD5: Trade Bytes for Speed" + default 2 + range 0 3 + help + Trade binary size versus speed for the md5sum algorithm. + Approximate values running uClibc and hashing + linux-2.4.4.tar.bz2 were: + user times (sec) text size (386) + 0 (fastest) 1.1 6144 + 1 1.4 5392 + 2 3.0 5088 + 3 (smallest) 5.1 4912 + +config BUSYBOX_FEATURE_FAST_TOP + bool "Faster /proc scanning code (+100 bytes)" + default n + help + This option makes top (and ps) ~20% faster (or 20% less CPU hungry), + but code size is slightly bigger. + +config BUSYBOX_FEATURE_ETC_NETWORKS + bool "Support for /etc/networks" + default n + help + Enable support for network names in /etc/networks. This is + a rarely used feature which allows you to use names + instead of IP/mask pairs in route command. + +config BUSYBOX_FEATURE_EDITING + bool "Command line editing" + default y + help + Enable line editing (mainly for shell command line). + +config BUSYBOX_FEATURE_EDITING_MAX_LEN + int "Maximum length of input" + range 128 8192 + default 1024 + depends on BUSYBOX_FEATURE_EDITING + help + Line editing code uses on-stack buffers for storage. + You may want to decrease this parameter if your target machine + benefits from smaller stack usage. + +config BUSYBOX_FEATURE_EDITING_VI + bool "vi-style line editing commands" + default n + depends on BUSYBOX_FEATURE_EDITING + help + Enable vi-style line editing. In shells, this mode can be + turned on and off with "set -o vi" and "set +o vi". + +config BUSYBOX_FEATURE_EDITING_HISTORY + int "History size" + range 0 99999 + default 15 + depends on BUSYBOX_FEATURE_EDITING + help + Specify command history size. + +config BUSYBOX_FEATURE_EDITING_SAVEHISTORY + bool "History saving" + default n + depends on BUSYBOX_ASH && BUSYBOX_FEATURE_EDITING + help + Enable history saving in ash shell. + +config BUSYBOX_FEATURE_TAB_COMPLETION + bool "Tab completion" + default y + depends on BUSYBOX_FEATURE_EDITING + help + Enable tab completion. + +config BUSYBOX_FEATURE_USERNAME_COMPLETION + bool "Username completion" + default n + depends on BUSYBOX_FEATURE_TAB_COMPLETION + help + Enable username completion. + +config BUSYBOX_FEATURE_EDITING_FANCY_PROMPT + bool "Fancy shell prompts" + default n + depends on BUSYBOX_FEATURE_EDITING + help + Setting this option allows for prompts to use things like \w and + \$ and escape codes. + +config BUSYBOX_FEATURE_VERBOSE_CP_MESSAGE + bool "Give more precise messages when copy fails (cp, mv etc)" + default n + help + Error messages with this feature enabled: + $ cp file /does_not_exist/file + cp: cannot create '/does_not_exist/file': Path does not exist + $ cp file /vmlinuz/file + cp: cannot stat '/vmlinuz/file': Path has non-directory component + If this feature is not enabled, they will be, respectively: + cp: cannot remove '/does_not_exist/file': No such file or directory + cp: cannot stat '/vmlinuz/file': Not a directory + respectively. + This will cost you ~60 bytes. + +config BUSYBOX_FEATURE_COPYBUF_KB + int "Copy buffer size, in kilobytes" + range 1 1024 + default 4 + help + Size of buffer used by cp, mv, install etc. + Buffers which are 4 kb or less will be allocated on stack. + Bigger buffers will be allocated with mmap, with fallback to 4 kb + stack buffer if mmap fails. + +config BUSYBOX_MONOTONIC_SYSCALL + bool "Use clock_gettime(CLOCK_MONOTONIC) syscall" + default y + help + Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring + time intervals (time, ping, traceroute etc need this). + Probably requires Linux 2.6+. If not selected, gettimeofday + will be used instead (which gives wrong results if date/time + is reset). + +config BUSYBOX_IOCTL_HEX2STR_ERROR + bool "Use ioctl names rather than hex values in error messages" + default y + help + Use ioctl names rather than hex values in error messages + (e.g. VT_DISALLOCATE rather than 0x5608). If disabled this + saves about 1400 bytes. + +config BUSYBOX_FEATURE_HWIB + bool "Support infiniband HW" + default n + help + Support for printing infiniband addresses in + network applets. +endmenu diff --git a/package/busybox/config/loginutils/Config.in b/package/busybox/config/loginutils/Config.in new file mode 100644 index 000000000..35f89670d --- /dev/null +++ b/package/busybox/config/loginutils/Config.in @@ -0,0 +1,283 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Login/Password Management Utilities" + +config BUSYBOX_FEATURE_SHADOWPASSWDS + bool "Support for shadow passwords" + default y + help + Build support for shadow password in /etc/shadow. This file is only + readable by root and thus the encrypted passwords are no longer + publicly readable. + +config BUSYBOX_USE_BB_PWD_GRP + bool "Use internal password and group functions rather than system functions" + default y + help + If you leave this disabled, busybox will use the system's password + and group functions. And if you are using the GNU C library + (glibc), you will then need to install the /etc/nsswitch.conf + configuration file and the required /lib/libnss_* libraries in + order for the password and group functions to work. This generally + makes your embedded system quite a bit larger. + + Enabling this option will cause busybox to directly access the + system's /etc/password, /etc/group files (and your system will be + smaller, and I will get fewer emails asking about how glibc NSS + works). When this option is enabled, you will not be able to use + PAM to access remote LDAP password servers and whatnot. And if you + want hostname resolution to work with glibc, you still need the + /lib/libnss_* libraries. + + If you need to use glibc's nsswitch.conf mechanism + (e.g. if user/group database is NOT stored in /etc/passwd etc), + you must NOT use this option. + + If you enable this option, it will add about 1.5k. + +config BUSYBOX_USE_BB_SHADOW + bool "Use internal shadow password functions" + default y + depends on BUSYBOX_USE_BB_PWD_GRP && BUSYBOX_FEATURE_SHADOWPASSWDS + help + If you leave this disabled, busybox will use the system's shadow + password handling functions. And if you are using the GNU C library + (glibc), you will then need to install the /etc/nsswitch.conf + configuration file and the required /lib/libnss_* libraries in + order for the shadow password functions to work. This generally + makes your embedded system quite a bit larger. + + Enabling this option will cause busybox to directly access the + system's /etc/shadow file when handling shadow passwords. This + makes your system smaller (and I will get fewer emails asking about + how glibc NSS works). When this option is enabled, you will not be + able to use PAM to access shadow passwords from remote LDAP + password servers and whatnot. + +config BUSYBOX_USE_BB_CRYPT + bool "Use internal DES and MD5 crypt functions" + default y + help + Busybox has internal DES and MD5 crypt functions. + They produce results which are identical to corresponding + standard C library functions. + + If you leave this disabled, busybox will use the system's + crypt functions. Most C libraries use large (~70k) + static buffers there, and also combine them with more general + DES encryption/decryption. + + For busybox, having large static buffers is undesirable, + especially on NOMMU machines. Busybox also doesn't need + DES encryption/decryption and can do with smaller code. + + If you enable this option, it will add about 4.8k of code + if you are building dynamically linked executable. + In static build, it makes code _smaller_ by about 1.2k, + and likely many kilobytes less of bss. + +config BUSYBOX_ADDGROUP + bool "addgroup" + default y + help + Utility for creating a new group account. + +config BUSYBOX_FEATURE_ADDUSER_TO_GROUP + bool "Support for adding users to groups" + default n + depends on BUSYBOX_ADDGROUP + help + If called with two non-option arguments, + addgroup will add an existing user to an + existing group. + +config BUSYBOX_DELGROUP + bool "delgroup" + default y + help + Utility for deleting a group account. + +config BUSYBOX_FEATURE_DEL_USER_FROM_GROUP + bool "Support for removing users from groups" + default n + depends on BUSYBOX_DELGROUP + help + If called with two non-option arguments, deluser + or delgroup will remove an user from a specified group. + +config BUSYBOX_FEATURE_CHECK_NAMES + bool "Enable sanity check on user/group names in adduser and addgroup" + default n + depends on BUSYBOX_ADDUSER || BUSYBOX_ADDGROUP + help + Enable sanity check on user and group names in adduser and addgroup. + To avoid problems, the user or group name should consist only of + letters, digits, underscores, periods, at signs and dashes, + and not start with a dash (as defined by IEEE Std 1003.1-2001). + For compatibility with Samba machine accounts "$" is also supported + at the end of the user or group name. + +config BUSYBOX_ADDUSER + bool "adduser" + default y + help + Utility for creating a new user account. + +config BUSYBOX_FEATURE_ADDUSER_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_ADDUSER && BUSYBOX_GETOPT_LONG + help + Support long options for the adduser applet. + +config BUSYBOX_DELUSER + bool "deluser" + default y + help + Utility for deleting a user account. + +config BUSYBOX_GETTY + bool "getty" + default y + select BUSYBOX_FEATURE_SYSLOG + help + getty lets you log in on a tty, it is normally invoked by init. + +config BUSYBOX_FEATURE_UTMP + bool "Support utmp file" + depends on BUSYBOX_GETTY || BUSYBOX_LOGIN || BUSYBOX_SU || BUSYBOX_WHO + default y + help + The file /var/run/utmp is used to track who is currently logged in. + +config BUSYBOX_FEATURE_WTMP + bool "Support wtmp file" + depends on BUSYBOX_GETTY || BUSYBOX_LOGIN || BUSYBOX_SU || BUSYBOX_LAST + default y + select BUSYBOX_FEATURE_UTMP + help + The file /var/run/wtmp is used to track when user's have logged into + and logged out of the system. + +config BUSYBOX_LOGIN + bool "login" + default y + select BUSYBOX_FEATURE_SUID + select BUSYBOX_FEATURE_SYSLOG + help + login is used when signing onto a system. + + Note that Busybox binary must be setuid root for this applet to + work properly. + +#config BUSYBOX_PAM +# bool "Support for PAM (Pluggable Authentication Modules)" +# default n +# depends on BUSYBOX_LOGIN +# help +# Use PAM in login(1) instead of direct access to password database. + +config BUSYBOX_LOGIN_SCRIPTS + bool "Support for login scripts" + depends on BUSYBOX_LOGIN + default n + help + Enable this if you want login to execute $LOGIN_PRE_SUID_SCRIPT + just prior to switching from root to logged-in user. + +config BUSYBOX_FEATURE_NOLOGIN + bool "Support for /etc/nologin" + default y + depends on BUSYBOX_LOGIN + help + The file /etc/nologin is used by (some versions of) login(1). + If it exists, non-root logins are prohibited. + +config BUSYBOX_FEATURE_SECURETTY + bool "Support for /etc/securetty" + default y + depends on BUSYBOX_LOGIN + help + The file /etc/securetty is used by (some versions of) login(1). + The file contains the device names of tty lines (one per line, + without leading /dev/) on which root is allowed to login. + +config BUSYBOX_PASSWD + bool "passwd" + default y + select BUSYBOX_FEATURE_SUID + select BUSYBOX_FEATURE_SYSLOG + help + passwd changes passwords for user and group accounts. A normal user + may only change the password for his/her own account, the super user + may change the password for any account. The administrator of a group + may change the password for the group. + + Note that Busybox binary must be setuid root for this applet to + work properly. + +config BUSYBOX_FEATURE_PASSWD_WEAK_CHECK + bool "Check new passwords for weakness" + default y + depends on BUSYBOX_PASSWD + help + With this option passwd will refuse new passwords which are "weak". + +config BUSYBOX_CRYPTPW + bool "cryptpw" + default n + help + Applet for crypting a string. + +config BUSYBOX_CHPASSWD + bool "chpasswd" + default n + help + chpasswd reads a file of user name and password pairs from + standard input and uses this information to update a group of + existing users. + +config BUSYBOX_SU + bool "su" + default y + select BUSYBOX_FEATURE_SUID + select BUSYBOX_FEATURE_SYSLOG + help + su is used to become another user during a login session. + Invoked without a username, su defaults to becoming the super user. + + Note that Busybox binary must be setuid root for this applet to + work properly. + +config BUSYBOX_FEATURE_SU_SYSLOG + bool "Enable su to write to syslog" + default y + depends on BUSYBOX_SU + +config BUSYBOX_FEATURE_SU_CHECKS_SHELLS + bool "Enable su to check user's shell to be listed in /etc/shells" + depends on BUSYBOX_SU + default y + +config BUSYBOX_SULOGIN + bool "sulogin" + default n + select BUSYBOX_FEATURE_SYSLOG + help + sulogin is invoked when the system goes into single user + mode (this is done through an entry in inittab). + +config BUSYBOX_VLOCK + bool "vlock" + default n + select BUSYBOX_FEATURE_SUID + help + Build the "vlock" applet which allows you to lock (virtual) terminals. + + Note that Busybox binary must be setuid root for this applet to + work properly. + +endmenu diff --git a/package/busybox/config/mailutils/Config.in b/package/busybox/config/mailutils/Config.in new file mode 100644 index 000000000..3dc52ed14 --- /dev/null +++ b/package/busybox/config/mailutils/Config.in @@ -0,0 +1,69 @@ +menu "Mail Utilities" + +config BUSYBOX_MAKEMIME + bool "makemime" + default n + help + Create MIME-formatted messages. + +config BUSYBOX_FEATURE_MIME_CHARSET + string "Default charset" + default "us-ascii" + depends on BUSYBOX_MAKEMIME || BUSYBOX_REFORMIME || BUSYBOX_SENDMAIL + help + Default charset of the message. + +config BUSYBOX_POPMAILDIR + bool "popmaildir" + default n + help + Simple yet powerful POP3 mail popper. Delivers content + of remote mailboxes to local Maildir. + +config BUSYBOX_FEATURE_POPMAILDIR_DELIVERY + bool "Allow message filters and custom delivery program" + default n + depends on BUSYBOX_POPMAILDIR + help + Allow to use a custom program to filter the content + of the message before actual delivery (-F "prog [args...]"). + Allow to use a custom program for message actual delivery + (-M "prog [args...]"). + +config BUSYBOX_REFORMIME + bool "reformime" + default n + help + Parse MIME-formatted messages. + +config BUSYBOX_FEATURE_REFORMIME_COMPAT + bool "Accept and ignore options other than -x and -X" + default y + depends on BUSYBOX_REFORMIME + help + Accept (for compatibility only) and ignore options + other than -x and -X. + +config BUSYBOX_SENDMAIL + bool "sendmail" + default n + help + Barebones sendmail. + +config BUSYBOX_FEATURE_SENDMAIL_MAILX + bool "Allow to specify subject, attachments, their charset etc" + default y + depends on BUSYBOX_SENDMAIL + help + Allow to specify subject, attachments and their charset. + Allow to use custom connection helper. + +config BUSYBOX_FEATURE_SENDMAIL_MAILXX + bool "Allow to specify Cc: addresses and some additional headers" + default n + depends on BUSYBOX_FEATURE_SENDMAIL_MAILX + help + Allow to specify Cc: addresses and some additional headers: + Errors-To: + +endmenu diff --git a/package/busybox/config/miscutils/Config.in b/package/busybox/config/miscutils/Config.in new file mode 100644 index 000000000..c7281edc5 --- /dev/null +++ b/package/busybox/config/miscutils/Config.in @@ -0,0 +1,552 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Miscellaneous Utilities" + +config BUSYBOX_ADJTIMEX + bool "adjtimex" + default n + help + Adjtimex reads and optionally sets adjustment parameters for + the Linux clock adjustment algorithm. + +config BUSYBOX_BBCONFIG + bool "bbconfig" + default n + help + The bbconfig applet will print the config file with which + busybox was built. + +config BUSYBOX_CHAT + bool "chat" + default n + help + Simple chat utility. + +config BUSYBOX_FEATURE_CHAT_NOFAIL + bool "Enable NOFAIL expect strings" + depends on BUSYBOX_CHAT + default y + help + When enabled expect strings which are started with a dash trigger + no-fail mode. That is when expectation is not met within timeout + the script is not terminated but sends next SEND string and waits + for next EXPECT string. This allows to compose far more flexible + scripts. + +config BUSYBOX_FEATURE_CHAT_TTY_HIFI + bool "Force STDIN to be a TTY" + depends on BUSYBOX_CHAT + default n + help + Original chat always treats STDIN as a TTY device and sets for it + so-called raw mode. This option turns on such behaviour. + +config BUSYBOX_FEATURE_CHAT_IMPLICIT_CR + bool "Enable implicit Carriage Return" + depends on BUSYBOX_CHAT + default y + help + When enabled make chat to terminate all SEND strings with a "\r" + unless "\c" is met anywhere in the string. + +config BUSYBOX_FEATURE_CHAT_SWALLOW_OPTS + bool "Swallow options" + depends on BUSYBOX_CHAT + default n + help + Busybox chat require no options. To make it not fail when used + in place of original chat (which has a bunch of options) turn + this on. + +config BUSYBOX_FEATURE_CHAT_SEND_ESCAPES + bool "Support weird SEND escapes" + depends on BUSYBOX_CHAT + default n + help + Original chat uses some escape sequences in SEND arguments which + are not sent to device but rather performs special actions. + E.g. "\K" means to send a break sequence to device. + "\d" delays execution for a second, "\p" -- for a 1/100 of second. + Before turning this option on think twice: do you really need them? + +config BUSYBOX_FEATURE_CHAT_VAR_ABORT_LEN + bool "Support variable-length ABORT conditions" + depends on BUSYBOX_CHAT + default n + help + Original chat uses fixed 50-bytes length ABORT conditions. Say N here. + +config BUSYBOX_FEATURE_CHAT_CLR_ABORT + bool "Support revoking of ABORT conditions" + depends on BUSYBOX_CHAT + default n + help + Support CLR_ABORT directive. + +config BUSYBOX_CHRT + bool "chrt" + default n + help + manipulate real-time attributes of a process. + This requires sched_{g,s}etparam support in your libc. + +config BUSYBOX_CROND + bool "crond" + default y + select BUSYBOX_FEATURE_SUID + select BUSYBOX_FEATURE_SYSLOG + help + Crond is a background daemon that parses individual crontab + files and executes commands on behalf of the users in question. + This is a port of dcron from slackware. It uses files of the + format /var/spool/cron/crontabs/ files, for example: + $ cat /var/spool/cron/crontabs/root + # Run daily cron jobs at 4:40 every day: + 40 4 * * * /etc/cron/daily > /dev/null 2>&1 + +config BUSYBOX_FEATURE_CROND_D + bool "Support option -d to redirect output to stderr" + depends on BUSYBOX_CROND + default n + help + -d sets loglevel to 0 (most verbose) and directs all output to stderr. + +config BUSYBOX_FEATURE_CROND_CALL_SENDMAIL + bool "Using /usr/sbin/sendmail?" + default n + depends on BUSYBOX_CROND + help + Support calling /usr/sbin/sendmail for send cmd outputs. + +config BUSYBOX_CRONTAB + bool "crontab" + default y + select BUSYBOX_FEATURE_SUID + help + Crontab manipulates the crontab for a particular user. Only + the superuser may specify a different user and/or crontab directory. + Note that Busybox binary must be setuid root for this applet to + work properly. + +config BUSYBOX_DC + bool "dc" + default n + help + Dc is a reverse-polish desk calculator which supports unlimited + precision arithmetic. + +config BUSYBOX_FEATURE_DC_LIBM + bool "Enable power and exp functions (requires libm)" + default n + depends on BUSYBOX_DC + help + Enable power and exp functions. + NOTE: This will require libm to be present for linking. + +config BUSYBOX_DEVFSD + bool "devfsd (obsolete)" + default n + select BUSYBOX_FEATURE_SYSLOG + help + This is deprecated, and will be removed at the end of 2008. + + Provides compatibility with old device names on a devfs systems. + You should set it to true if you have devfs enabled. + The following keywords in devsfd.conf are supported: + "CLEAR_CONFIG", "INCLUDE", "OPTIONAL_INCLUDE", "RESTORE", + "PERMISSIONS", "EXECUTE", "COPY", "IGNORE", + "MKOLDCOMPAT", "MKNEWCOMPAT","RMOLDCOMPAT", "RMNEWCOMPAT". + + But only if they are written UPPERCASE!!!!!!!! + +config BUSYBOX_DEVFSD_MODLOAD + bool "Adds support for MODLOAD keyword in devsfd.conf" + default n + depends on BUSYBOX_DEVFSD + help + This actually doesn't work with busybox modutils but needs + the external modutils. + +config BUSYBOX_DEVFSD_FG_NP + bool "Enables the -fg and -np options" + default n + depends on BUSYBOX_DEVFSD + help + -fg Run the daemon in the foreground. + -np Exit after parsing the configuration file. + Do not poll for events. + +config BUSYBOX_DEVFSD_VERBOSE + bool "Increases logging (and size)" + default n + depends on BUSYBOX_DEVFSD + help + Increases logging to stderr or syslog. + +config BUSYBOX_FEATURE_DEVFS + bool "Use devfs names for all devices (obsolete)" + default n + help + This is obsolete and will be going away at the end of 2008.. + + This tells busybox to look for names like /dev/loop/0 instead of + /dev/loop0. If your /dev directory has normal names instead of + devfs names, you don't want this. + +config BUSYBOX_DEVMEM + bool "devmem" + default n + help + devmem is a small program that reads and writes from physical + memory using /dev/mem. + +config BUSYBOX_EJECT + bool "eject" + default n + help + Used to eject cdroms. (defaults to /dev/cdrom) + +config BUSYBOX_FEATURE_EJECT_SCSI + bool "SCSI support" + default n + depends on BUSYBOX_EJECT + help + Add the -s option to eject, this allows to eject SCSI-Devices and + usb-storage devices. + +config BUSYBOX_FBSPLASH + bool "fbsplash" + default n + help + Shows splash image and progress bar on framebuffer device. + Can be used during boot phase of an embedded device. ~2kb. + Usage: + - use kernel option 'vga=xxx' or otherwise enable fb device. + - put somewhere fbsplash.cfg file and an image in .ppm format. + - $ setsid fbsplash [params] & + -c: hide cursor + -d /dev/fbN: framebuffer device (if not /dev/fb0) + -s path_to_image_file (can be "-" for stdin) + -i path_to_cfg_file (can be "-" for stdin) + -f path_to_fifo (can be "-" for stdin) + - if you want to run it only in presence of kernel parameter: + grep -q "fbsplash=on" = 2.6.13 + +config BUSYBOX_LAST + bool "last" + default n + select BUSYBOX_FEATURE_WTMP + help + 'last' displays a list of the last users that logged into the system. + +choice + prompt "Choose last implementation" + depends on BUSYBOX_LAST + default FEATURE_LAST_SMALL + +config BUSYBOX_FEATURE_LAST_SMALL + bool "small" + help + This is a small version of last with just the basic set of + features. + +config BUSYBOX_FEATURE_LAST_FANCY + bool "huge" + help + 'last' displays detailed information about the last users that + logged into the system (mimics sysvinit last). +900 bytes. +endchoice + +config BUSYBOX_LESS + bool "less" + default y + help + 'less' is a pager, meaning that it displays text files. It possesses + a wide array of features, and is an improvement over 'more'. + +config BUSYBOX_FEATURE_LESS_MAXLINES + int "Max number of input lines less will try to eat" + default 9999999 + depends on BUSYBOX_LESS + +config BUSYBOX_FEATURE_LESS_BRACKETS + bool "Enable bracket searching" + default n + depends on BUSYBOX_LESS + help + This option adds the capability to search for matching left and right + brackets, facilitating programming. + +config BUSYBOX_FEATURE_LESS_FLAGS + bool "Enable extra flags" + default n + depends on BUSYBOX_LESS + help + The extra flags provided do the following: + + The -M flag enables a more sophisticated status line. + The -m flag enables a simpler status line with a percentage. + +config BUSYBOX_FEATURE_LESS_DASHCMD + bool "Enable flag changes ('-' command)" + default n + depends on BUSYBOX_LESS + help + This enables the ability to change command-line flags within + less itself ('-' keyboard command). + +config BUSYBOX_FEATURE_LESS_MARKS + bool "Enable marks" + default n + depends on BUSYBOX_LESS + help + Marks enable positions in a file to be stored for easy reference. + +config BUSYBOX_FEATURE_LESS_REGEXP + bool "Enable regular expressions" + default n + depends on BUSYBOX_LESS + help + Enable regular expressions, allowing complex file searches. + +config BUSYBOX_FEATURE_LESS_LINENUMS + bool "Enable dynamic switching of line numbers" + default n + depends on BUSYBOX_FEATURE_LESS_DASHCMD + help + Enable "-N" command. + +config BUSYBOX_FEATURE_LESS_WINCH + bool "Enable automatic resizing on window size changes" + default y + depends on BUSYBOX_LESS + help + Makes less track window size changes. + +config BUSYBOX_HDPARM + bool "hdparm" + default n + help + Get/Set hard drive parameters. Primarily intended for ATA + drives. Adds about 13k (or around 30k if you enable the + FEATURE_HDPARM_GET_IDENTITY option).... + +config BUSYBOX_FEATURE_HDPARM_GET_IDENTITY + bool "Support obtaining detailed information directly from drives" + default y + depends on BUSYBOX_HDPARM + help + Enables the -I and -i options to obtain detailed information + directly from drives about their capabilities and supported ATA + feature set. If no device name is specified, hdparm will read + identify data from stdin. Enabling this option will add about 16k... + +config BUSYBOX_FEATURE_HDPARM_HDIO_SCAN_HWIF + bool "Register an IDE interface (DANGEROUS)" + default n + depends on BUSYBOX_HDPARM + help + Enables the 'hdparm -R' option to register an IDE interface. + This is dangerous stuff, so you should probably say N. + +config BUSYBOX_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF + bool "Un-register an IDE interface (DANGEROUS)" + default n + depends on BUSYBOX_HDPARM + help + Enables the 'hdparm -U' option to un-register an IDE interface. + This is dangerous stuff, so you should probably say N. + +config BUSYBOX_FEATURE_HDPARM_HDIO_DRIVE_RESET + bool "Perform device reset (DANGEROUS)" + default n + depends on BUSYBOX_HDPARM + help + Enables the 'hdparm -w' option to perform a device reset. + This is dangerous stuff, so you should probably say N. + +config BUSYBOX_FEATURE_HDPARM_HDIO_TRISTATE_HWIF + bool "Tristate device for hotswap (DANGEROUS)" + default n + depends on BUSYBOX_HDPARM + help + Enables the 'hdparm -x' option to tristate device for hotswap, + and the '-b' option to get/set bus state. This is dangerous + stuff, so you should probably say N. + +config BUSYBOX_FEATURE_HDPARM_HDIO_GETSET_DMA + bool "Get/set using_dma flag (DANGEROUS)" + default n + depends on BUSYBOX_HDPARM + help + Enables the 'hdparm -d' option to get/set using_dma flag. + This is dangerous stuff, so you should probably say N. + +config BUSYBOX_MAKEDEVS + bool "makedevs" + default n + help + 'makedevs' is a utility used to create a batch of devices with + one command. + . + There are two choices for command line behaviour, the interface + as used by LEAF/Linux Router Project, or a device table file. + . + 'leaf' is traditionally what busybox follows, it allows multiple + devices of a particluar type to be created per command. + e.g. /dev/hda[0-9] + Device properties are passed as command line arguments. + . + 'table' reads device properties from a file or stdin, allowing + a batch of unrelated devices to be made with one command. + User/group names are allowed as an alternative to uid/gid. + +choice + prompt "Choose makedevs behaviour" + depends on BUSYBOX_MAKEDEVS + default FEATURE_MAKEDEVS_TABLE + +config BUSYBOX_FEATURE_MAKEDEVS_LEAF + bool "leaf" + +config BUSYBOX_FEATURE_MAKEDEVS_TABLE + bool "table" + +endchoice + +config BUSYBOX_MAN + bool "man" + default n + help + Format and display manual pages. + +config BUSYBOX_MICROCOM + bool "microcom" + default n + help + The poor man's minicom utility for chatting with serial port devices. + +config BUSYBOX_MOUNTPOINT + bool "mountpoint" + default n + help + mountpoint checks if the directory is a mountpoint. + +config BUSYBOX_MT + bool "mt" + default n + help + mt is used to control tape devices. You can use the mt utility + to advance or rewind a tape past a specified number of archive + files on the tape. + +config BUSYBOX_RAIDAUTORUN + bool "raidautorun" + default n + help + raidautorun tells the kernel md driver to + search and start RAID arrays. + +config BUSYBOX_READAHEAD + bool "readahead" + default n + depends on BUSYBOX_LFS + help + Preload the files listed on the command line into RAM cache so that + subsequent reads on these files will not block on disk I/O. + + This applet just calls the readahead(2) system call on each file. + It is mainly useful in system startup scripts to preload files + or executables before they are used. When used at the right time + (in particular when a CPU bound process is running) it can + significantly speed up system startup. + + As readahead(2) blocks until each file has been read, it is best to + run this applet as a background job. + +config BUSYBOX_RUNLEVEL + bool "runlevel" + default n + help + find the current and previous system runlevel. + + This applet uses utmp but does not rely on busybox supporing + utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc. + +config BUSYBOX_RX + bool "rx" + default n + help + Receive files using the Xmodem protocol. + +config BUSYBOX_SETSID + bool "setsid" + default n + help + setsid runs a program in a new session + +config BUSYBOX_STRINGS + bool "strings" + default n + help + strings prints the printable character sequences for each file + specified. + +#config BUSYBOX_TASKSET +# bool "taskset" +# default n +# help +# Retrieve or set a processes's CPU affinity. +# This requires sched_{g,s}etaffinity support in your libc. + +#config BUSYBOX_FEATURE_TASKSET_FANCY +# bool "Fancy output" +# default y +# depends on BUSYBOX_TASKSET +# help +# Add code for fancy output. This merely silences a compiler-warning +# and adds about 135 Bytes. May be needed for machines with alot +# of CPUs. + +config BUSYBOX_TIME + bool "time" + default n + help + The time command runs the specified program with the given arguments. + When the command finishes, time writes a message to standard output + giving timing statistics about this program run. + +config BUSYBOX_TTYSIZE + bool "ttysize" + default n + help + A replacement for "stty size". Unlike stty, can report only width, + only height, or both, in any order. It also does not complain on + error, but returns default 80x24. + Usage in shell scripts: width=`ttysize w`. + +config BUSYBOX_WATCHDOG + bool "watchdog" + default n + help + The watchdog utility is used with hardware or software watchdog + device drivers. It opens the specified watchdog device special file + and periodically writes a magic character to the device. If the + watchdog applet ever fails to write the magic character within a + certain amount of time, the watchdog device assumes the system has + hung, and will cause the hardware to reboot. + +endmenu diff --git a/package/busybox/config/modutils/Config.in b/package/busybox/config/modutils/Config.in new file mode 100644 index 000000000..f168c7e30 --- /dev/null +++ b/package/busybox/config/modutils/Config.in @@ -0,0 +1,230 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Linux Module Utilities" + +config BUSYBOX_DEFAULT_MODULES_DIR + string "Default directory containing modules" + default "/lib/modules" + help + Directory that contains kernel modules. + Defaults to "/lib/modules" + +config BUSYBOX_DEFAULT_DEPMOD_FILE + string "Default name of modules.dep" + default "modules.dep" + help + Filename that contains kernel modules dependencies. + Defaults to "modules.dep" + +config BUSYBOX_MODPROBE_SMALL + bool "Simplified modutils" + default n + help + Simplified modutils. + + With this option modprobe does not require modules.dep file + and does not use /etc/modules.conf file. + It scans module files in /lib/modules/`uname -r` and + determines dependencies and module alias names on the fly. + This may make module loading slower, most notably + when one needs to load module by alias (this requires + scanning through module _bodies_). + + At the first attempt to load a module by alias modprobe + will try to generate modules.dep.bb file in order to speed up + future loads by alias. Failure to do so (read-only /lib/modules, + etc) is not reported, and future modprobes will be slow too. + + NB: modules.dep.bb file format is not compatible + with modules.dep file as created/used by standard module tools. + + Additional module parameters can be stored in + /etc/modules/$module_name files. + + Apart from modprobe, other utilities are also provided: + - insmod is an alias to modprobe + - rmmod is an alias to modprobe -r + - depmod generates modules.dep.bb + + As of 2008-07, this code is experimental. It is 14kb smaller + than "non-small" modutils. + +config BUSYBOX_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE + bool "Accept module options on modprobe command line" + default n + depends on BUSYBOX_MODPROBE_SMALL + help + Allow insmod and modprobe take module options from command line. + N.B. Very bloaty. + +config BUSYBOX_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED + bool "Skip loading of already loaded modules" + default n + depends on BUSYBOX_MODPROBE_SMALL + help + Check if the module is already loaded. + N.B. It's racy. + +config BUSYBOX_INSMOD + bool "insmod" + default y + depends on !BUSYBOX_MODPROBE_SMALL + help + insmod is used to load specified modules in the running kernel. + +config BUSYBOX_RMMOD + bool "rmmod" + default y + depends on !BUSYBOX_MODPROBE_SMALL + help + rmmod is used to unload specified modules from the kernel. + +config BUSYBOX_LSMOD + bool "lsmod" + default y + depends on !BUSYBOX_MODPROBE_SMALL + help + lsmod is used to display a list of loaded modules. + +config BUSYBOX_FEATURE_LSMOD_PRETTY_2_6_OUTPUT + bool "Pretty output" + default n + depends on BUSYBOX_LSMOD + help + This option makes output format of lsmod adjusted to + the format of module-init-tools for Linux kernel 2.6. + Increases size somewhat. + +config BUSYBOX_MODPROBE + bool "modprobe" + default n + depends on !BUSYBOX_MODPROBE_SMALL + help + Handle the loading of modules, and their dependencies on a high + level. + + Note that in the state, modprobe does not understand multiple + module options from the configuration file. See option below. + +config BUSYBOX_FEATURE_MODPROBE_BLACKLIST + bool + prompt "Blacklist support" + default n + depends on BUSYBOX_MODPROBE + help + Say 'y' here to enable support for the 'blacklist' command in + modprobe.conf. This prevents the alias resolver to resolve + blacklisted modules. This is useful if you want to prevent your + hardware autodetection scripts to load modules like evdev, frame + buffer drivers etc. + +config BUSYBOX_DEPMOD + bool "depmod" + default n + depends on !BUSYBOX_MODPROBE_SMALL + help + depmod generates modules.dep (and potentially modules.alias + and modules.symbols) that contain dependency information + for modprobe. + +comment "Options common to multiple modutils" + +config BUSYBOX_FEATURE_2_4_MODULES + bool "Support version 2.2/2.4 Linux kernels" + default n + depends on BUSYBOX_INSMOD || BUSYBOX_RMMOD || BUSYBOX_LSMOD + help + Support module loading for 2.2.x and 2.4.x Linux kernels. + This increases size considerably. Say N unless you plan + to run ancient kernels. + +config BUSYBOX_FEATURE_INSMOD_VERSION_CHECKING + bool "Enable module version checking" + default n + depends on BUSYBOX_FEATURE_2_4_MODULES && (BUSYBOX_INSMOD || BUSYBOX_MODPROBE) + help + Support checking of versions for modules. This is used to + ensure that the kernel and module are made for each other. + +config BUSYBOX_FEATURE_INSMOD_KSYMOOPS_SYMBOLS + bool "Add module symbols to kernel symbol table" + default n + depends on BUSYBOX_FEATURE_2_4_MODULES && (BUSYBOX_INSMOD || BUSYBOX_MODPROBE) + help + By adding module symbols to the kernel symbol table, Oops messages + occuring within kernel modules can be properly debugged. By enabling + this feature, module symbols will always be added to the kernel symbol + table for properly debugging support. If you are not interested in + Oops messages from kernel modules, say N. + +config BUSYBOX_FEATURE_INSMOD_LOADINKMEM + bool "In kernel memory optimization (uClinux only)" + default n + depends on BUSYBOX_FEATURE_2_4_MODULES && (BUSYBOX_INSMOD || BUSYBOX_MODPROBE) + help + This is a special uClinux only memory optimization that lets insmod + load the specified kernel module directly into kernel space, reducing + memory usage by preventing the need for two copies of the module + being loaded into memory. + +config BUSYBOX_FEATURE_INSMOD_LOAD_MAP + bool "Enable insmod load map (-m) option" + default n + depends on BUSYBOX_FEATURE_2_4_MODULES && BUSYBOX_INSMOD + help + Enabling this, one would be able to get a load map + output on stdout. This makes kernel module debugging + easier. + If you don't plan to debug kernel modules, you + don't need this option. + +config BUSYBOX_FEATURE_INSMOD_LOAD_MAP_FULL + bool "Symbols in load map" + default y + depends on BUSYBOX_FEATURE_INSMOD_LOAD_MAP && !BUSYBOX_MODPROBE_SMALL + help + Without this option, -m will only output section + load map. With this option, -m will also output + symbols load map. + +config BUSYBOX_FEATURE_CHECK_TAINTED_MODULE + bool "Support tainted module checking with new kernels" + default y + depends on !BUSYBOX_MODPROBE_SMALL + help + Support checking for tainted modules. These are usually binary + only modules that will make the linux-kernel list ignore your + support request. + This option is required to support GPLONLY modules. + +config BUSYBOX_FEATURE_MODUTILS_ALIAS + bool "Support for module.aliases file" + default y + depends on BUSYBOX_DEPMOD || BUSYBOX_MODPROBE + help + Generate and parse modules.alias containing aliases for bus + identifiers: + alias pcmcia:m*c*f03fn*pfn*pa*pb*pc*pd* parport_cs + + and aliases for logical modules names e.g.: + alias padlock_aes aes + alias aes_i586 aes + alias aes_generic aes + + Say Y if unsure. + +config BUSYBOX_FEATURE_MODUTILS_SYMBOLS + bool "Support for module.symbols file" + default y + depends on BUSYBOX_DEPMOD || BUSYBOX_MODPROBE + help + Generate and parse modules.symbols containing aliases for + symbol_request() kernel calls, such as: + alias symbol:usb_sg_init usbcore + + Say Y if unsure. + +endmenu diff --git a/package/busybox/config/networking/Config.in b/package/busybox/config/networking/Config.in new file mode 100644 index 000000000..3bd3e1e8f --- /dev/null +++ b/package/busybox/config/networking/Config.in @@ -0,0 +1,921 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Networking Utilities" + +config BUSYBOX_FEATURE_IPV6 + bool "Enable IPv6 support" + default n + help + Enable IPv6 support in busybox. + This adds IPv6 support in the networking applets. + +config BUSYBOX_FEATURE_PREFER_IPV4_ADDRESS + bool "Preferentially use IPv4 addresses from DNS queries" + default y + depends on BUSYBOX_FEATURE_IPV6 + help + Use IPv4 address of network host if it has one. + + If this option is off, the first returned address will be used. + This may cause problems when your DNS server is IPv6-capable and + is returning IPv6 host addresses too. If IPv6 address + precedes IPv4 one in DNS reply, busybox network applets + (e.g. wget) will use IPv6 address. On an IPv6-incapable host + or network applets will fail to connect to the host + using IPv6 address. + +config BUSYBOX_VERBOSE_RESOLUTION_ERRORS + bool "Verbose resolution errors" + default n + help + Enable if you are not satisfied with simplistic + "can't resolve 'hostname.com'" and want to know more. + This may increase size of your executable a bit. + +config BUSYBOX_ARP + bool "arp" + default y + help + Manipulate the system ARP cache. + +config BUSYBOX_ARPING + bool "arping" + default y + help + Ping hosts by ARP packets. + +config BUSYBOX_BRCTL + bool "brctl" + default n + help + Manage ethernet bridges. + Supports addbr/delbr and addif/delif. + +config BUSYBOX_FEATURE_BRCTL_FANCY + bool "Fancy options" + default n + depends on BUSYBOX_BRCTL + help + Add support for extended option like: + setageing, setfd, sethello, setmaxage, + setpathcost, setportprio, setbridgeprio, + stp + This adds about 600 bytes. + +config BUSYBOX_FEATURE_BRCTL_SHOW + bool "Support show, showmac and showstp" + default n + depends on BUSYBOX_BRCTL && BUSYBOX_FEATURE_BRCTL_FANCY + help + Add support for option which prints the current config: + showmacs, showstp, show + +config BUSYBOX_DNSD + bool "dnsd" + default n + help + Small and static DNS server daemon. + +config BUSYBOX_ETHER_WAKE + bool "ether-wake" + default n + help + Send a magic packet to wake up sleeping machines. + +config BUSYBOX_FAKEIDENTD + bool "fakeidentd" + default n + select BUSYBOX_FEATURE_SYSLOG + help + fakeidentd listens on the ident port and returns a predefined + fake value on any query. + +config BUSYBOX_FTPGET + bool "ftpget" + default n + help + Retrieve a remote file via FTP. + +config BUSYBOX_FTPPUT + bool "ftpput" + default n + help + Store a remote file via FTP. + +config BUSYBOX_FEATURE_FTPGETPUT_LONG_OPTIONS + bool "Enable long options in ftpget/ftpput" + default n + depends on BUSYBOX_GETOPT_LONG && (BUSYBOX_FTPGET || BUSYBOX_FTPPUT) + help + Support long options for the ftpget/ftpput applet. + +config BUSYBOX_HOSTNAME + bool "hostname" + default y + help + Show or set the system's host name. + +config BUSYBOX_HTTPD + bool "httpd" + default n + help + Serve web pages via an HTTP server. + +config BUSYBOX_FEATURE_HTTPD_RANGES + bool "Support 'Ranges:' header" + default n + depends on BUSYBOX_HTTPD + help + Makes httpd emit "Accept-Ranges: bytes" header and understand + "Range: bytes=NNN-[MMM]" header. Allows for resuming interrupted + downloads, seeking in multimedia players etc. + +config BUSYBOX_FEATURE_HTTPD_USE_SENDFILE + bool "Use sendfile system call" + default n + depends on BUSYBOX_HTTPD + help + When enabled, httpd will use the kernel sendfile() function + instead of read/write loop. + +config BUSYBOX_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP + bool "Support reloading of global config file on HUP signal" + default n + depends on BUSYBOX_HTTPD + help + This option enables processing of SIGHUP to reload cached + configuration settings. + +config BUSYBOX_FEATURE_HTTPD_SETUID + bool "Enable -u option" + default n + depends on BUSYBOX_HTTPD + help + This option allows the server to run as a specific user + rather than defaulting to the user that starts the server. + Use of this option requires special privileges to change to a + different user. + +config BUSYBOX_FEATURE_HTTPD_BASIC_AUTH + bool "Enable Basic http Authentication" + default y + depends on BUSYBOX_HTTPD + help + Utilizes password settings from /etc/httpd.conf for basic + authentication on a per url basis. + +config BUSYBOX_FEATURE_HTTPD_AUTH_MD5 + bool "Support MD5 crypted passwords for http Authentication" + default n + depends on BUSYBOX_FEATURE_HTTPD_BASIC_AUTH + help + Enables basic per URL authentication from /etc/httpd.conf + using md5 passwords. + +config BUSYBOX_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES + bool "Support loading additional MIME types at run-time" + default n + depends on BUSYBOX_HTTPD + help + This option enables support for additional MIME types at + run-time to be specified in the configuration file. + +config BUSYBOX_FEATURE_HTTPD_CGI + bool "Support Common Gateway Interface (CGI)" + default y + depends on BUSYBOX_HTTPD + help + This option allows scripts and executables to be invoked + when specific URLs are requested. + +config BUSYBOX_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR + bool "Support for running scripts through an interpreter" + default n + depends on BUSYBOX_FEATURE_HTTPD_CGI + help + This option enables support for running scripts through an + interpreter. Turn this on if you want PHP scripts to work + properly. You need to supply an additional line in your httpd + config file: + *.php:/path/to/your/php + +config BUSYBOX_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV + bool "Set REMOTE_PORT environment variable for CGI" + default n + depends on BUSYBOX_FEATURE_HTTPD_CGI + help + Use of this option can assist scripts in generating + references that contain a unique port number. + +config BUSYBOX_FEATURE_HTTPD_ENCODE_URL_STR + bool "Enable -e option (useful for CGIs written as shell scripts)" + default y + depends on BUSYBOX_HTTPD + help + This option allows html encoding of arbitrary strings for display + by the browser. Output goes to stdout. + For example, httpd -e "" produces + "<Hello World>". + +config BUSYBOX_FEATURE_HTTPD_ERROR_PAGES + bool "Support for custom error pages" + default n + depends on BUSYBOX_HTTPD + help + This option allows you to define custom error pages in + the configuration file instead of the default HTTP status + error pages. For instance, if you add the line: + E404:/path/e404.html + in the config file, the server will respond the specified + '/path/e404.html' file instead of the terse '404 NOT FOUND' + message. + +config BUSYBOX_FEATURE_HTTPD_PROXY + bool "Support for reverse proxy" + default n + depends on BUSYBOX_HTTPD + help + This option allows you to define URLs that will be forwarded + to another HTTP server. To setup add the following line to the + configuration file + P:/url/:http://hostname[:port]/new/path/ + Then a request to /url/myfile will be forwarded to + http://hostname[:port]/new/path/myfile. + +config BUSYBOX_IFCONFIG + bool "ifconfig" + default y + help + Ifconfig is used to configure the kernel-resident network interfaces. + +config BUSYBOX_FEATURE_IFCONFIG_STATUS + bool "Enable status reporting output (+7k)" + default y + depends on BUSYBOX_IFCONFIG + help + If ifconfig is called with no arguments it will display the status + of the currently active interfaces. + +config BUSYBOX_FEATURE_IFCONFIG_SLIP + bool "Enable slip-specific options \"keepalive\" and \"outfill\"" + default n + depends on BUSYBOX_IFCONFIG + help + Allow "keepalive" and "outfill" support for SLIP. If you're not + planning on using serial lines, leave this unchecked. + +config BUSYBOX_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ + bool "Enable options \"mem_start\", \"io_addr\", and \"irq\"" + default n + depends on BUSYBOX_IFCONFIG + help + Allow the start address for shared memory, start address for I/O, + and/or the interrupt line used by the specified device. + +config BUSYBOX_FEATURE_IFCONFIG_HW + bool "Enable option \"hw\" (ether only)" + default y + depends on BUSYBOX_IFCONFIG + help + Set the hardware address of this interface, if the device driver + supports this operation. Currently, we only support the 'ether' + class. + +config BUSYBOX_FEATURE_IFCONFIG_BROADCAST_PLUS + bool "Set the broadcast automatically" + default y + depends on BUSYBOX_IFCONFIG + help + Setting this will make ifconfig attempt to find the broadcast + automatically if the value '+' is used. + +config BUSYBOX_IFENSLAVE + bool "ifenslave" + default n + help + Userspace application to bind several interfaces + to a logical interface (use with kernel bonding driver). + +config BUSYBOX_IFUPDOWN + bool "ifupdown" + default y + help + Activate or deactivate the specified interfaces. This applet makes + use of either "ifconfig" and "route" or the "ip" command to actually + configure network interfaces. Therefore, you will probably also want + to enable either IFCONFIG and ROUTE, or enable + FEATURE_IFUPDOWN_IP and the various IP options. Of + course you could use non-busybox versions of these programs, so + against my better judgement (since this will surely result in plenty + of support questions on the mailing list), I do not force you to + enable these additional options. It is up to you to supply either + "ifconfig", "route" and "run-parts" or the "ip" command, either + via busybox or via standalone utilities. + +config BUSYBOX_IFUPDOWN_IFSTATE_PATH + string "Absolute path to ifstate file" + default "/var/run/ifstate" + depends on BUSYBOX_IFUPDOWN + help + ifupdown keeps state information in a file called ifstate. + Typically it is located in /var/run/ifstate, however + some distributions tend to put it in other places + (debian, for example, uses /etc/network/run/ifstate). + This config option defines location of ifstate. + +config BUSYBOX_FEATURE_IFUPDOWN_IP + bool "Use ip applet" + default y + depends on BUSYBOX_IFUPDOWN + help + Use the iproute "ip" command to implement "ifup" and "ifdown", rather + than the default of using the older 'ifconfig' and 'route' utilities. + +config BUSYBOX_FEATURE_IFUPDOWN_IP_BUILTIN + bool "Use busybox ip applet" + default y + depends on BUSYBOX_FEATURE_IFUPDOWN_IP + select BUSYBOX_IP + select BUSYBOX_FEATURE_IP_ADDRESS + select BUSYBOX_FEATURE_IP_LINK + select BUSYBOX_FEATURE_IP_ROUTE + help + Use the busybox iproute "ip" applet to implement "ifupdown". + + If left disabled, you must install the full-blown iproute2 + utility or the "ifup" and "ifdown" applets will not work. + +config BUSYBOX_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN + bool "Use busybox ifconfig and route applets" + default n + depends on BUSYBOX_IFUPDOWN && !BUSYBOX_FEATURE_IFUPDOWN_IP + select BUSYBOX_IFCONFIG + select BUSYBOX_ROUTE + help + Use the busybox iproute "ifconfig" and "route" applets to + implement the "ifup" and "ifdown" utilities. + + If left disabled, you must install the full-blown ifconfig + and route utilities, or the "ifup" and "ifdown" applets will not + work. + +config BUSYBOX_FEATURE_IFUPDOWN_IPV4 + bool "Support for IPv4" + default y + depends on BUSYBOX_IFUPDOWN + help + If you want ifup/ifdown to talk IPv4, leave this on. + +config BUSYBOX_FEATURE_IFUPDOWN_IPV6 + bool "Support for IPv6" + default n + depends on BUSYBOX_IFUPDOWN && BUSYBOX_FEATURE_IPV6 + help + If you need support for IPv6, turn this option on. + +### UNUSED +###config FEATURE_IFUPDOWN_IPX +### bool "Support for IPX" +### default n +### depends on BUSYBOX_IFUPDOWN +### help +### If this option is selected you can use busybox to work with IPX +### networks. + +config BUSYBOX_FEATURE_IFUPDOWN_MAPPING + bool "Enable mapping support" + default n + depends on BUSYBOX_IFUPDOWN + help + This enables support for the "mapping" stanza, unless you have + a weird network setup you don't need it. + +config BUSYBOX_FEATURE_IFUPDOWN_EXTERNAL_DHCP + bool "Support for external dhcp clients" + default n + depends on BUSYBOX_IFUPDOWN + help + This enables support for the external dhcp clients. Clients are + tried in the following order: dhcpcd, dhclient, pump and udhcpc. + Otherwise, if udhcpc applet is enabled, it is used. + Otherwise, ifup/ifdown will have no support for DHCP. + +config BUSYBOX_INETD + bool "inetd" + default n + select BUSYBOX_FEATURE_SYSLOG + help + Internet superserver daemon + +config BUSYBOX_FEATURE_INETD_SUPPORT_BUILTIN_ECHO + bool "Support echo service" + default y + depends on BUSYBOX_INETD + help + Echo received data internal inetd service + +config BUSYBOX_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD + bool "Support discard service" + default y + depends on BUSYBOX_INETD + help + Internet /dev/null internal inetd service + +config BUSYBOX_FEATURE_INETD_SUPPORT_BUILTIN_TIME + bool "Support time service" + default y + depends on BUSYBOX_INETD + help + Return 32 bit time since 1900 internal inetd service + +config BUSYBOX_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME + bool "Support daytime service" + default y + depends on BUSYBOX_INETD + help + Return human-readable time internal inetd service + +config BUSYBOX_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN + bool "Support chargen service" + default y + depends on BUSYBOX_INETD + help + Familiar character generator internal inetd service + +config BUSYBOX_FEATURE_INETD_RPC + bool "Support RPC services" + default n + depends on BUSYBOX_INETD + select BUSYBOX_FEATURE_HAVE_RPC + help + Support Sun-RPC based services + +config BUSYBOX_IP + bool "ip" + default y + help + The "ip" applet is a TCP/IP interface configuration and routing + utility. You generally don't need "ip" to use busybox with + TCP/IP. + +config BUSYBOX_FEATURE_IP_ADDRESS + bool "ip address" + default y + depends on BUSYBOX_IP + help + Address manipulation support for the "ip" applet. + +config BUSYBOX_FEATURE_IP_LINK + bool "ip link" + default y + depends on BUSYBOX_IP + help + Configure network devices with "ip". + +config BUSYBOX_FEATURE_IP_ROUTE + bool "ip route" + default y + depends on BUSYBOX_IP + help + Add support for routing table management to "ip". + +config BUSYBOX_FEATURE_IP_TUNNEL + bool "ip tunnel" + default n + depends on BUSYBOX_IP + help + Add support for tunneling commands to "ip". + +config BUSYBOX_FEATURE_IP_RULE + bool "ip rule" + default n + depends on BUSYBOX_IP + help + Add support for rule commands to "ip". + +config BUSYBOX_FEATURE_IP_SHORT_FORMS + bool "Support short forms of ip commands" + default n + depends on BUSYBOX_IP + help + Also support short-form of ip commands: + ip addr -> ipaddr + ip link -> iplink + ip route -> iproute + ip tunnel -> iptunnel + ip rule -> iprule + + Say N unless you desparately need the short form of the ip + object commands. + +config BUSYBOX_FEATURE_IP_RARE_PROTOCOLS + bool "Support displaying rarely used link types" + default n + depends on BUSYBOX_IP + help + If you are not going to use links of type "frad", "econet", + "bif" etc, you probably don't need to enable this. + Ethernet, wireless, infrared, ppp/slip, ip tunnelling + link types are supported without this option selected. + +config BUSYBOX_IPADDR + bool + default y + depends on BUSYBOX_FEATURE_IP_SHORT_FORMS && BUSYBOX_FEATURE_IP_ADDRESS + +config BUSYBOX_IPLINK + bool + default y + depends on BUSYBOX_FEATURE_IP_SHORT_FORMS && BUSYBOX_FEATURE_IP_LINK + +config BUSYBOX_IPROUTE + bool + default y + depends on BUSYBOX_FEATURE_IP_SHORT_FORMS && BUSYBOX_FEATURE_IP_ROUTE + +config BUSYBOX_IPTUNNEL + bool + default y + depends on BUSYBOX_FEATURE_IP_SHORT_FORMS && BUSYBOX_FEATURE_IP_TUNNEL + +config BUSYBOX_IPRULE + bool + default y + depends on BUSYBOX_FEATURE_IP_SHORT_FORMS && BUSYBOX_FEATURE_IP_RULE + +config BUSYBOX_IPCALC + bool "ipcalc" + default n + help + ipcalc takes an IP address and netmask and calculates the + resulting broadcast, network, and host range. + +config BUSYBOX_FEATURE_IPCALC_FANCY + bool "Fancy IPCALC, more options, adds 1 kbyte" + default y + depends on BUSYBOX_IPCALC + help + Adds the options hostname, prefix and silent to the output of + "ipcalc". + +config BUSYBOX_FEATURE_IPCALC_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_IPCALC && BUSYBOX_GETOPT_LONG + help + Support long options for the ipcalc applet. + +config BUSYBOX_NAMEIF + bool "nameif" + default n + select BUSYBOX_FEATURE_SYSLOG + help + nameif is used to rename network interface by its MAC address. + Renamed interfaces MUST be in the down state. + It is possible to use a file (default: /etc/mactab) + with list of new interface names and MACs. + Maximum interface name length: IFNAMSIZ = 16 + File fields are separated by space or tab. + File format: + # Comment + new_interface_name XX:XX:XX:XX:XX:XX + +config BUSYBOX_FEATURE_NAMEIF_EXTENDED + bool "Extended nameif" + default n + depends on BUSYBOX_NAMEIF + help + This extends the nameif syntax to support the bus_info and driver + checks. The syntax is compatible to the normal nameif. + File format: + new_interface_name driver=asix bus=usb-0000:00:08.2-3 + new_interface_name bus=usb-0000:00:08.2-3 00:80:C8:38:91:B5 + new_interface_name mac=00:80:C8:38:91:B5 + new_interface_name 00:80:C8:38:91:B5 + +config BUSYBOX_NC + bool "nc" + default y + help + A simple Unix utility which reads and writes data across network + connections. + +config BUSYBOX_NC_SERVER + bool "Netcat server options (-l)" + default y + depends on BUSYBOX_NC + help + Allow netcat to act as a server. + +config BUSYBOX_NC_EXTRA + bool "Netcat extensions (-eiw and filename)" + default n + depends on BUSYBOX_NC + help + Add -e (support for executing the rest of the command line after + making or receiving a successful connection), -i (delay interval for + lines sent), -w (timeout for initial connection). + +config BUSYBOX_NETSTAT + bool "netstat" + default y + help + netstat prints information about the Linux networking subsystem. + +config BUSYBOX_FEATURE_NETSTAT_WIDE + bool "Enable wide netstat output" + default n + depends on BUSYBOX_NETSTAT + help + Add support for wide columns. Useful when displaying IPv6 addresses + (-W option). + +config BUSYBOX_FEATURE_NETSTAT_PRG + bool "Enable PID/Program name output" + default y + depends on BUSYBOX_NETSTAT + help + Add support for -p flag to print out PID and program name. + +700 bytes of code. + +config BUSYBOX_NSLOOKUP + bool "nslookup" + default y + help + nslookup is a tool to query Internet name servers. + +config BUSYBOX_PING + bool "ping" + default y + help + ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to + elicit an ICMP ECHO_RESPONSE from a host or gateway. + +config BUSYBOX_PING6 + bool "ping6" + default n + depends on BUSYBOX_FEATURE_IPV6 && BUSYBOX_PING + help + This will give you a ping that can talk IPv6. + +config BUSYBOX_FEATURE_FANCY_PING + bool "Enable fancy ping output" + default y + depends on BUSYBOX_PING + help + Make the output from the ping applet include statistics, and at the + same time provide full support for ICMP packets. + +config BUSYBOX_PSCAN + bool "pscan" + default n + help + Simple network port scanner. + +config BUSYBOX_ROUTE + bool "route" + default y + help + Route displays or manipulates the kernel's IP routing tables. + +config BUSYBOX_SLATTACH + bool "slattach" + default n + help + slattach is a small utility to attach network interfaces to serial + lines. + +#config TC +# bool "tc" +# default n +# help +# show / manipulate traffic control settings +# +#config FEATURE_TC_INGRESS +# def_bool n +# depends on BUSYBOX_TC + +config BUSYBOX_TELNET + bool "telnet" + default y + help + Telnet is an interface to the TELNET protocol, but is also commonly + used to test other simple protocols. + +config BUSYBOX_FEATURE_TELNET_TTYPE + bool "Pass TERM type to remote host" + default y + depends on BUSYBOX_TELNET + help + Setting this option will forward the TERM environment variable to the + remote host you are connecting to. This is useful to make sure that + things like ANSI colors and other control sequences behave. + +config BUSYBOX_FEATURE_TELNET_AUTOLOGIN + bool "Pass USER type to remote host" + default y + depends on BUSYBOX_TELNET + help + Setting this option will forward the USER environment variable to the + remote host you are connecting to. This is useful when you need to + log into a machine without telling the username (autologin). This + option enables `-a' and `-l USER' arguments. + +config BUSYBOX_TELNETD + bool "telnetd" + default n + select BUSYBOX_FEATURE_SYSLOG + help + A daemon for the TELNET protocol, allowing you to log onto the host + running the daemon. Please keep in mind that the TELNET protocol + sends passwords in plain text. If you can't afford the space for an + SSH daemon and you trust your network, you may say 'y' here. As a + more secure alternative, you should seriously consider installing the + very small Dropbear SSH daemon instead: + http://matt.ucc.asn.au/dropbear/dropbear.html + + Note that for busybox telnetd to work you need several things: + First of all, your kernel needs: + UNIX98_PTYS=y + DEVPTS_FS=y + + Next, you need a /dev/pts directory on your root filesystem: + + $ ls -ld /dev/pts + drwxr-xr-x 2 root root 0 Sep 23 13:21 /dev/pts/ + + Next you need the pseudo terminal master multiplexer /dev/ptmx: + + $ ls -la /dev/ptmx + crw-rw-rw- 1 root tty 5, 2 Sep 23 13:55 /dev/ptmx + + Any /dev/ttyp[0-9]* files you may have can be removed. + Next, you need to mount the devpts filesystem on /dev/pts using: + + mount -t devpts devpts /dev/pts + + You need to be sure that Busybox has LOGIN and + FEATURE_SUID enabled. And finally, you should make + certain that Busybox has been installed setuid root: + + chown root.root /bin/busybox + chmod 4755 /bin/busybox + + with all that done, telnetd _should_ work.... + + +config BUSYBOX_FEATURE_TELNETD_STANDALONE + bool "Support standalone telnetd (not inetd only)" + default n + depends on BUSYBOX_TELNETD + help + Selecting this will make telnetd able to run standalone. + +config BUSYBOX_TFTP + bool "tftp" + default n + help + This enables the Trivial File Transfer Protocol client program. TFTP + is usually used for simple, small transfers such as a root image + for a network-enabled bootloader. + +config BUSYBOX_TFTPD + bool "tftpd" + default n + help + This enables the Trivial File Transfer Protocol server program. + It expects that stdin is a datagram socket and a packet + is already pending on it. It will exit after one transfer. + In other words: it should be run from inetd in nowait mode, + or from udpsvd. Example: "udpsvd -E 0 69 tftpd DIR" + +config BUSYBOX_FEATURE_TFTP_GET + bool "Enable \"get\" command" + default y + depends on BUSYBOX_TFTP || BUSYBOX_TFTPD + help + Add support for the GET command within the TFTP client. This allows + a client to retrieve a file from a TFTP server. + Also enable upload support in tftpd, if tftpd is selected. + +config BUSYBOX_FEATURE_TFTP_PUT + bool "Enable \"put\" command" + default y + depends on BUSYBOX_TFTP || BUSYBOX_TFTPD + help + Add support for the PUT command within the TFTP client. This allows + a client to transfer a file to a TFTP server. + Also enable download support in tftpd, if tftpd is selected. + +config BUSYBOX_FEATURE_TFTP_BLOCKSIZE + bool "Enable \"blksize\" protocol option" + default n + depends on BUSYBOX_TFTP || BUSYBOX_TFTPD + help + Allow tftp to specify block size, and tftpd to understand + "blksize" option. + +config BUSYBOX_TFTP_DEBUG + bool "Enable debug" + default n + depends on BUSYBOX_TFTP + help + Enable debug settings for tftp. This is useful if you're running + into problems with tftp as the protocol doesn't help you much when + you run into problems. + +config BUSYBOX_TRACEROUTE + bool "traceroute" + default y + help + Utility to trace the route of IP packets + +config BUSYBOX_FEATURE_TRACEROUTE_VERBOSE + bool "Enable verbose output" + default y + depends on BUSYBOX_TRACEROUTE + help + Add some verbosity to traceroute. This includes amongst other things + hostnames and ICMP response types. + +config BUSYBOX_FEATURE_TRACEROUTE_SOURCE_ROUTE + bool "Enable loose source route" + default n + depends on BUSYBOX_TRACEROUTE + help + Add option to specify a loose source route gateway + (8 maximum). + +config BUSYBOX_FEATURE_TRACEROUTE_USE_ICMP + bool "Use ICMP instead of UDP" + default y + depends on BUSYBOX_TRACEROUTE + help + Add feature to allow for ICMP ECHO instead of UDP datagrams. + +source package/busybox/config/networking/udhcp/Config.in + +config BUSYBOX_VCONFIG + bool "vconfig" + default n + help + Creates, removes, and configures VLAN interfaces + +config BUSYBOX_WGET + bool "wget" + default y + help + wget is a utility for non-interactive download of files from HTTP, + HTTPS, and FTP servers. + +config BUSYBOX_FEATURE_WGET_STATUSBAR + bool "Enable a nifty process meter (+2k)" + default n + depends on BUSYBOX_WGET + help + Enable the transfer progress bar for wget transfers. + +config BUSYBOX_FEATURE_WGET_AUTHENTICATION + bool "Enable HTTP authentication" + default y + depends on BUSYBOX_WGET + help + Support authenticated HTTP transfers. + +config BUSYBOX_FEATURE_WGET_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_WGET && BUSYBOX_GETOPT_LONG + help + Support long options for the wget applet. + +config BUSYBOX_ZCIP + bool "zcip" + default n + select BUSYBOX_FEATURE_SYSLOG + help + ZCIP provides ZeroConf IPv4 address selection, according to RFC 3927. + It's a daemon that allocates and defends a dynamically assigned + address on the 169.254/16 network, requiring no system administrator. + + See http://www.zeroconf.org for further details, and "zcip.script" + in the busybox examples. + +config BUSYBOX_TCPSVD + bool "tcpsvd" + default n + help + tcpsvd listens on a TCP port and runs a program for each new + connection. + +config BUSYBOX_UDPSVD + bool "udpsvd" + default n + help + udpsvd listens on an UDP port and runs a program for each new + connection. + +endmenu diff --git a/package/busybox/config/networking/udhcp/Config.in b/package/busybox/config/networking/udhcp/Config.in new file mode 100644 index 000000000..0e507ce75 --- /dev/null +++ b/package/busybox/config/networking/udhcp/Config.in @@ -0,0 +1,122 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +config BUSYBOX_APP_UDHCPD + bool "udhcp server (udhcpd)" + default n + help + udhcpd is a DHCP server geared primarily toward embedded systems, + while striving to be fully functional and RFC compliant. + +config BUSYBOX_APP_DHCPRELAY + bool "dhcprelay" + default n + depends on BUSYBOX_APP_UDHCPD + help + dhcprelay listens for dhcp requests on one or more interfaces + and forwards these requests to a different interface or dhcp + server. + +config BUSYBOX_APP_DUMPLEASES + bool "Lease display utility (dumpleases)" + default n + depends on BUSYBOX_APP_UDHCPD + help + dumpleases displays the leases written out by the udhcpd server. + Lease times are stored in the file by time remaining in lease, or + by the absolute time that it expires in seconds from epoch. + +config BUSYBOX_FEATURE_UDHCPD_WRITE_LEASES_EARLY + bool "Rewrite the lease file at every new acknowledge" + default n + depends on BUSYBOX_APP_UDHCPD + help + If selected, udhcpd will write a new file with leases every + time a new lease has been accepted, thus eliminating the need + to send SIGUSR1 for the initial writing or updating. Any timed + rewriting remains undisturbed + +config BUSYBOX_DHCPD_LEASES_FILE + string "Absolute path to lease file" + default "/var/lib/misc/udhcpd.leases" + depends on BUSYBOX_APP_UDHCPD + help + udhcpd stores addresses in a lease file. This is the absolute path + of the file. Normally it is safe to leave it untouched. + +config BUSYBOX_APP_UDHCPC + bool "udhcp client (udhcpc)" + default y + help + udhcpc is a DHCP client geared primarily toward embedded systems, + while striving to be fully functional and RFC compliant. + + The udhcp client negotiates a lease with the DHCP server and + runs a script when a lease is obtained or lost. + +config BUSYBOX_FEATURE_UDHCPC_ARPING + bool "Verify that the offered address is free, using ARP ping" + default y + depends on BUSYBOX_APP_UDHCPC + help + If selected, udhcpc will send ARP probes and make sure + the offered address is really not in use by anyone. The client + will DHCPDECLINE the offer if the address is in use, + and restart the discover process. + +config BUSYBOX_FEATURE_UDHCP_PORT + bool "Enable '-P port' option for udhcpd and udhcpc" + default n + depends on BUSYBOX_APP_UDHCPD || BUSYBOX_APP_UDHCPC + help + At the cost of ~300 bytes, enables -P port option. + This feature is typically not needed. + +config BUSYBOX_UDHCP_DEBUG + bool "Compile udhcp with noisy debugging messages" + default n + depends on BUSYBOX_APP_UDHCPD || BUSYBOX_APP_UDHCPC + help + If selected, udhcpd will output extra debugging output. + +config BUSYBOX_FEATURE_UDHCP_RFC3397 + bool "Support for RFC3397 domain search (experimental)" + default n + depends on BUSYBOX_APP_UDHCPD || BUSYBOX_APP_UDHCPC + help + If selected, both client and server will support passing of domain + search lists via option 119, specified in RFC3397. + +config BUSYBOX_UDHCPC_DEFAULT_SCRIPT + string "Absolute path to config script" + default "/usr/share/udhcpc/default.script" + depends on BUSYBOX_APP_UDHCPC + help + This script is called after udhcpc receives an answer. See + examples/udhcp for a working example. Normally it is safe + to leave this untouched. + +config BUSYBOX_UDHCPC_SLACK_FOR_BUGGY_SERVERS + int "DHCP options slack buffer size" + default 80 + range 0 924 + depends on BUSYBOX_APP_UDHCPD || BUSYBOX_APP_UDHCPC + help + Some buggy DHCP servers send DHCP offer packets with option + field larger than we expect (which might also be considered a + buffer overflow attempt). These packets are normally discarded. + If circumstances beyond your control force you to support such + servers, this may help. The upper limit (924) makes dhcpc accept + even 1500 byte packets (maximum-sized ethernet packets). + + This option does not make dhcp[cd] emit non-standard + sized packets. + + Known buggy DHCP servers: + 3Com OfficeConnect Remote 812 ADSL Router: + seems to confuse maximum allowed UDP packet size with + maximum size of entire IP packet, and sends packets which are + 28 bytes too large. + Seednet (ISP) VDSL: sends packets 2 bytes too large. diff --git a/package/busybox/config/printutils/Config.in b/package/busybox/config/printutils/Config.in new file mode 100644 index 000000000..41d0f9c2b --- /dev/null +++ b/package/busybox/config/printutils/Config.in @@ -0,0 +1,26 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Print Utilities" + +config BUSYBOX_LPD + bool "lpd" + default n + help + lpd is a print spooling daemon. + +config BUSYBOX_LPR + bool "lpr" + default n + help + lpr sends files (or standard input) to a print spooling daemon. + +config BUSYBOX_LPQ + bool "lpq" + default n + help + lpq is a print spool queue examination and manipulation program. + +endmenu diff --git a/package/busybox/config/procps/Config.in b/package/busybox/config/procps/Config.in new file mode 100644 index 000000000..1674c0cd7 --- /dev/null +++ b/package/busybox/config/procps/Config.in @@ -0,0 +1,200 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Process Utilities" + +config BUSYBOX_FREE + bool "free" + default y + help + free displays the total amount of free and used physical and swap + memory in the system, as well as the buffers used by the kernel. + The shared memory column should be ignored; it is obsolete. + +config BUSYBOX_FUSER + bool "fuser" + default y + help + fuser lists all PIDs (Process IDs) that currently have a given + file open. fuser can also list all PIDs that have a given network + (TCP or UDP) port open. + +config BUSYBOX_KILL + bool "kill" + default y + help + The command kill sends the specified signal to the specified + process or process group. If no signal is specified, the TERM + signal is sent. + +config BUSYBOX_KILLALL + bool "killall" + default y + depends on BUSYBOX_KILL + help + killall sends a signal to all processes running any of the + specified commands. If no signal name is specified, SIGTERM is + sent. + +config BUSYBOX_KILLALL5 + bool "killall5" + default n + depends on BUSYBOX_KILL + +config BUSYBOX_NMETER + bool "nmeter" + default n + help + Prints selected system stats continuously, one line per update. + +config BUSYBOX_PGREP + bool "pgrep" + default n + help + Look for processes by name. + +config BUSYBOX_PIDOF + bool "pidof" + default y + help + Pidof finds the process id's (pids) of the named programs. It prints + those id's on the standard output. + +config BUSYBOX_FEATURE_PIDOF_SINGLE + bool "Enable argument for single shot (-s)" + default n + depends on BUSYBOX_PIDOF + help + Support argument '-s' for returning only the first pid found. + +config BUSYBOX_FEATURE_PIDOF_OMIT + bool "Enable argument for omitting pids (-o)" + default y + depends on BUSYBOX_PIDOF + help + Support argument '-o' for omitting the given pids in output. + The special pid %PPID can be used to name the parent process + of the pidof, in other words the calling shell or shell script. + +config BUSYBOX_PKILL + bool "pkill" + default y + help + Send signals to processes by name. + +config BUSYBOX_PS + bool "ps" + default y + help + ps gives a snapshot of the current processes. + +config BUSYBOX_FEATURE_PS_WIDE + bool "Enable argument for wide output (-w)" + default n + depends on BUSYBOX_PS + help + Support argument 'w' for wide output. + If given once, 132 chars are printed and given more than + one, the length is unlimited. + +config BUSYBOX_FEATURE_PS_TIME + bool "Enable time and elapsed time output" + default n + depends on BUSYBOX_PS && BUSYBOX_DESKTOP + help + Support -o time and -o etime output specifiers. + +config BUSYBOX_FEATURE_PS_UNUSUAL_SYSTEMS + bool "Support Linux prior to 2.4.0 and non-ELF systems" + default n + depends on BUSYBOX_FEATURE_PS_TIME + help + Include support for measuring HZ on old kernels and non-ELF systems + (if you are on Linux 2.4.0+ and use ELF, you don't need this) + +config BUSYBOX_RENICE + bool "renice" + default n + help + Renice alters the scheduling priority of one or more running + processes. + +config BUSYBOX_BB_SYSCTL + bool "sysctl" + default y + help + Configure kernel parameters at runtime. + +config BUSYBOX_TOP + bool "top" + default y + help + The top program provides a dynamic real-time view of a running + system. + +config BUSYBOX_FEATURE_TOP_CPU_USAGE_PERCENTAGE + bool "Show CPU per-process usage percentage" + default y + depends on BUSYBOX_TOP + help + Make top display CPU usage for each process. + This adds about 2k. + +config BUSYBOX_FEATURE_TOP_CPU_GLOBAL_PERCENTS + bool "Show CPU global usage percentage" + default y + depends on BUSYBOX_FEATURE_TOP_CPU_USAGE_PERCENTAGE + help + Makes top display "CPU: NN% usr NN% sys..." line. + This adds about 0.5k. + +config BUSYBOX_FEATURE_TOP_SMP_CPU + bool "SMP CPU usage display ('c' key)" + default n + depends on BUSYBOX_FEATURE_TOP_CPU_GLOBAL_PERCENTS + help + Allow 'c' key to switch between individual/cumulative CPU stats + This adds about 0.5k. + +config BUSYBOX_FEATURE_TOP_DECIMALS + bool "Show 1/10th of a percent in CPU/mem statistics" + default n + depends on BUSYBOX_FEATURE_TOP_CPU_USAGE_PERCENTAGE + help + Show 1/10th of a percent in CPU/mem statistics. + This adds about 0.3k. + +config BUSYBOX_FEATURE_TOP_SMP_PROCESS + bool "Show CPU process runs on ('j' field)" + default n + depends on BUSYBOX_TOP + help + Show CPU where process was last found running on. + This is the 'j' field. + +config BUSYBOX_FEATURE_TOPMEM + bool "Topmem command ('s' key)" + default n + depends on BUSYBOX_TOP + help + Enable 's' in top (gives lots of memory info). + +config BUSYBOX_UPTIME + bool "uptime" + default y + help + uptime gives a one line display of the current time, how long + the system has been running, how many users are currently logged + on, and the system load averages for the past 1, 5, and 15 minutes. + +config BUSYBOX_WATCH + bool "watch" + default y + help + watch is used to execute a program periodically, showing + output to the screen. + + +endmenu diff --git a/package/busybox/config/runit/Config.in b/package/busybox/config/runit/Config.in new file mode 100644 index 000000000..d228df397 --- /dev/null +++ b/package/busybox/config/runit/Config.in @@ -0,0 +1,83 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Runit Utilities" + +config BUSYBOX_RUNSV + bool "runsv" + default n + help + runsv starts and monitors a service and optionally an appendant log + service. + +config BUSYBOX_RUNSVDIR + bool "runsvdir" + default n + help + runsvdir starts a runsv process for each subdirectory, or symlink to + a directory, in the services directory dir, up to a limit of 1000 + subdirectories, and restarts a runsv process if it terminates. + +config BUSYBOX_FEATURE_RUNSVDIR_LOG + bool "Enable scrolling argument log" + depends on BUSYBOX_RUNSVDIR + default n + help + Enable feature where second parameter of runsvdir holds last error + message (viewable via top/ps). Otherwise (feature is off + or no parameter), error messages go to stderr only. + +config BUSYBOX_SV + bool "sv" + default n + help + sv reports the current status and controls the state of services + monitored by the runsv supervisor. + +config BUSYBOX_SV_DEFAULT_SERVICE_DIR + string "Default directory for services" + default "/var/service" + depends on BUSYBOX_SV + help + Default directory for services. + Defaults to "/var/service" + +config BUSYBOX_SVLOGD + bool "svlogd" + default n + help + svlogd continuously reads log data from its standard input, optionally + filters log messages, and writes the data to one or more automatically + rotated logs. + +config BUSYBOX_CHPST + bool "chpst" + default n + help + chpst changes the process state according to the given options, and + execs specified program. + +config BUSYBOX_SETUIDGID + bool "setuidgid" + help + Sets soft resource limits as specified by options + +config BUSYBOX_ENVUIDGID + bool "envuidgid" + help + Sets $UID to account's uid and $GID to account's gid + +config BUSYBOX_ENVDIR + bool "envdir" + help + Sets various environment variables as specified by files + in the given directory + +config BUSYBOX_SOFTLIMIT + bool "softlimit" + help + Sets soft resource limits as specified by options + +endmenu diff --git a/package/busybox/config/selinux/Config.in b/package/busybox/config/selinux/Config.in new file mode 100644 index 000000000..ddb0247ba --- /dev/null +++ b/package/busybox/config/selinux/Config.in @@ -0,0 +1,123 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "SELinux Utilities" + depends on BUSYBOX_SELINUX + +config BUSYBOX_CHCON + bool "chcon" + default n + depends on BUSYBOX_SELINUX + help + Enable support to change the security context of file. + +config BUSYBOX_FEATURE_CHCON_LONG_OPTIONS + bool "Enable long options" + default y + depends on BUSYBOX_CHCON && BUSYBOX_GETOPT_LONG + help + Support long options for the chcon applet. + +config BUSYBOX_GETENFORCE + bool "getenforce" + default n + depends on BUSYBOX_SELINUX + help + Enable support to get the current mode of SELinux. + +config BUSYBOX_GETSEBOOL + bool "getsebool" + default n + depends on BUSYBOX_SELINUX + help + Enable support to get SELinux boolean values. + +config BUSYBOX_LOAD_POLICY + bool "load_policy" + default n + depends on BUSYBOX_SELINUX + help + Enable support to load SELinux policy. + +config BUSYBOX_MATCHPATHCON + bool "matchpathcon" + default n + depends on BUSYBOX_SELINUX + help + Enable support to get default security context of the + specified path from the file contexts configuration. + +config BUSYBOX_RESTORECON + bool "restorecon" + default n + depends on BUSYBOX_SELINUX + help + Enable support to relabel files. The feature is almost + the same as setfiles, but usage is a little different. + +config BUSYBOX_RUNCON + bool "runcon" + default n + depends on BUSYBOX_SELINUX + help + Enable support to run command in speficied security context. + +config BUSYBOX_FEATURE_RUNCON_LONG_OPTIONS + bool "Enable long options" + default y + depends on BUSYBOX_RUNCON && BUSYBOX_GETOPT_LONG + help + Support long options for the runcon applet. + +config BUSYBOX_SELINUXENABLED + bool "selinuxenabled" + default n + depends on BUSYBOX_SELINUX + help + Enable support for this command to be used within shell scripts + to determine if selinux is enabled. + +config BUSYBOX_SETENFORCE + bool "setenforce" + default n + depends on BUSYBOX_SELINUX + help + Enable support to modify the mode SELinux is running in. + +config BUSYBOX_SETFILES + bool "setfiles" + default n + depends on BUSYBOX_SELINUX + help + Enable support to modify to relabel files. + Notice: If you built libselinux with -D_FILE_OFFSET_BITS=64, + (It is default in libselinux's Makefile), you _must_ enable + CONFIG_LFS. + +config BUSYBOX_FEATURE_SETFILES_CHECK_OPTION + bool "Enable check option" + default n + depends on BUSYBOX_SETFILES + help + Support "-c" option (check the validity of the contexts against + the specified binary policy) for setfiles. Requires libsepol. + +config BUSYBOX_SETSEBOOL + bool "setsebool" + default n + depends on BUSYBOX_SELINUX + help + Enable support for change boolean. + semanage and -P option is not supported yet. + +config BUSYBOX_SESTATUS + bool "sestatus" + default n + depends on BUSYBOX_SELINUX + help + Displays the status of SELinux. + +endmenu + diff --git a/package/busybox/config/shell/Config.in b/package/busybox/config/shell/Config.in new file mode 100644 index 000000000..459bbc62b --- /dev/null +++ b/package/busybox/config/shell/Config.in @@ -0,0 +1,344 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Shells" + +choice + prompt "Choose your default shell" + default FEATURE_SH_IS_ASH + help + Choose a shell. The ash shell is the most bash compatible + and full featured one. + +config BUSYBOX_FEATURE_SH_IS_ASH + select BUSYBOX_ASH + bool "ash" + +config BUSYBOX_FEATURE_SH_IS_HUSH + select BUSYBOX_HUSH + bool "hush" + +####config FEATURE_SH_IS_LASH +#### select LASH +#### bool "lash" + +config BUSYBOX_FEATURE_SH_IS_MSH + select BUSYBOX_MSH + bool "msh" + +config BUSYBOX_FEATURE_SH_IS_NONE + bool "none" + +endchoice + +config BUSYBOX_ASH + bool "ash" + default y + help + Tha 'ash' shell adds about 60k in the default configuration and is + the most complete and most pedantically correct shell included with + busybox. This shell is actually a derivative of the Debian 'dash' + shell (by Herbert Xu), which was created by porting the 'ash' shell + (written by Kenneth Almquist) from NetBSD. + +comment "Ash Shell Options" + depends on BUSYBOX_ASH + +config BUSYBOX_ASH_BASH_COMPAT + bool "bash-compatible extensions" + default y + depends on BUSYBOX_ASH + help + Enable bash-compatible extensions. + +config BUSYBOX_ASH_JOB_CONTROL + bool "Job control" + default y + depends on BUSYBOX_ASH + help + Enable job control in the ash shell. + +config BUSYBOX_ASH_READ_NCHARS + bool "'read -n N' and 'read -s' support" + default n + depends on BUSYBOX_ASH + help + 'read -n N' will return a value after N characters have been read. + 'read -s' will read without echoing the user's input. + +config BUSYBOX_ASH_READ_TIMEOUT + bool "'read -t S' support" + default n + depends on BUSYBOX_ASH + help + 'read -t S' will return a value after S seconds have passed. + This implementation will allow fractional seconds, expressed + as a decimal fraction, e.g. 'read -t 2.5 foo'. + +config BUSYBOX_ASH_ALIAS + bool "alias support" + default y + depends on BUSYBOX_ASH + help + Enable alias support in the ash shell. + +config BUSYBOX_ASH_MATH_SUPPORT + bool "Posix math support" + default y + depends on BUSYBOX_ASH + help + Enable math support in the ash shell. + +config BUSYBOX_ASH_MATH_SUPPORT_64 + bool "Extend Posix math support to 64 bit" + default n + depends on BUSYBOX_ASH_MATH_SUPPORT + help + Enable 64-bit math support in the ash shell. This will make + the shell slightly larger, but will allow computation with very + large numbers. + +config BUSYBOX_ASH_GETOPTS + bool "Builtin getopt to parse positional parameters" + default y + depends on BUSYBOX_ASH + help + Enable getopts builtin in the ash shell. + +config BUSYBOX_ASH_BUILTIN_ECHO + bool "Builtin version of 'echo'" + default y + depends on BUSYBOX_ASH + help + Enable support for echo, builtin to ash. + +config BUSYBOX_ASH_BUILTIN_PRINTF + bool "Builtin version of 'printf'" + default y + depends on BUSYBOX_ASH + help + Enable support for printf, builtin to ash. + +config BUSYBOX_ASH_BUILTIN_TEST + bool "Builtin version of 'test'" + default y + depends on BUSYBOX_ASH + help + Enable support for test, builtin to ash. + +config BUSYBOX_ASH_CMDCMD + bool "'command' command to override shell builtins" + default n + depends on BUSYBOX_ASH + help + Enable support for the ash 'command' builtin, which allows + you to run the specified command with the specified arguments, + even when there is an ash builtin command with the same name. + +config BUSYBOX_ASH_MAIL + bool "Check for new mail on interactive shells" + default n + depends on BUSYBOX_ASH + help + Enable "check for new mail" in the ash shell. + +config BUSYBOX_ASH_OPTIMIZE_FOR_SIZE + bool "Optimize for size instead of speed" + default y + depends on BUSYBOX_ASH + help + Compile ash for reduced size at the price of speed. + +config BUSYBOX_ASH_RANDOM_SUPPORT + bool "Pseudorandom generator and variable $RANDOM" + default n + depends on BUSYBOX_ASH + help + Enable pseudorandom generator and dynamic variable "$RANDOM". + Each read of "$RANDOM" will generate a new pseudorandom value. + You can reset the generator by using a specified start value. + After "unset RANDOM" then generator will switch off and this + variable will no longer have special treatment. + +config BUSYBOX_ASH_EXPAND_PRMT + bool "Expand prompt string" + default n + depends on BUSYBOX_ASH + help + "PS#" may be contain volatile content, such as backquote commands. + This option recreates the prompt string from the environment + variable each time it is displayed. + +config BUSYBOX_HUSH + bool "hush" + default n + help + hush is a very small shell (just 18k) and it has fairly complete + Bourne shell grammar. It even handles all the normal flow control + options such as if/then/elif/else/fi, for/in/do/done, while loops, + case/esac. + + It uses only vfork, so it can be used on uClinux systems. + + It does not handle select, functions, here documents ( << + word ), arithmetic expansion, aliases, brace expansion, tilde + expansion, &> and >& redirection of stdout+stderr, etc. + +config BUSYBOX_HUSH_HELP + bool "help builtin" + default n + depends on BUSYBOX_HUSH + help + Enable help builtin in hush. Code size + ~1 kbyte. + +config BUSYBOX_HUSH_INTERACTIVE + bool "Interactive mode" + default y + depends on BUSYBOX_HUSH + help + Enable interactive mode (prompt and command editing). + Without this, hush simply reads and executes commands + from stdin just like a shell script from the file. + No prompt, no PS1/PS2 magic shell variables. + +config BUSYBOX_HUSH_JOB + bool "Job control" + default n + depends on BUSYBOX_HUSH_INTERACTIVE + help + Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current + command (not entire shell), fg/bg builtins work. Without this option, + "cmd &" still works by simply spawning a process and immediately + prompting for next command (or executing next command in a script), + but no separate process group is formed. + +config BUSYBOX_HUSH_TICK + bool "Process substitution" + default n + depends on BUSYBOX_HUSH + help + Enable process substitution `command` and $(command) in hush. + +config BUSYBOX_HUSH_IF + bool "Support if/then/elif/else/fi" + default n + depends on BUSYBOX_HUSH + help + Enable if/then/elif/else/fi in hush. + +config BUSYBOX_HUSH_LOOPS + bool "Support for, while and until loops" + default n + depends on BUSYBOX_HUSH + help + Enable for, while and until loops in hush. + As of 2008-07, break and continue statements are not supported. + +config BUSYBOX_HUSH_CASE + bool "Support case ... esac statement" + default n + depends on BUSYBOX_HUSH + help + Enable case ... esac statement in hush. +400 bytes. + +config BUSYBOX_LASH + bool "lash" + default n + select BUSYBOX_HUSH + help + lash is deprecated and will be removed, please migrate to hush. + +config BUSYBOX_MSH + bool "msh" + default n + help + The minix shell (adds just 30k) is quite complete and handles things + like for/do/done, case/esac and all the things you expect a Bourne + shell to do. It is not always pedantically correct about Bourne + shell grammar (try running the shell testscript "tests/sh.testcases" + on it and compare vs bash) but for most things it works quite well. + It uses only vfork, so it can be used on uClinux systems. + +comment "Bourne Shell Options" + depends on BUSYBOX_MSH || BUSYBOX_LASH || BUSYBOX_HUSH || BUSYBOX_ASH + +config BUSYBOX_FEATURE_SH_EXTRA_QUIET + bool "Hide message on interactive shell startup" + default n + depends on BUSYBOX_MSH || BUSYBOX_LASH || BUSYBOX_HUSH || BUSYBOX_ASH + help + Remove the busybox introduction when starting a shell. + +config BUSYBOX_FEATURE_SH_STANDALONE + bool "Standalone shell" + default n + depends on (BUSYBOX_MSH || BUSYBOX_LASH || BUSYBOX_HUSH || BUSYBOX_ASH) && BUSYBOX_FEATURE_PREFER_APPLETS + help + This option causes busybox shells to use busybox applets + in preference to executables in the PATH whenever possible. For + example, entering the command 'ifconfig' into the shell would cause + busybox to use the ifconfig busybox applet. Specifying the fully + qualified executable name, such as '/sbin/ifconfig' will still + execute the /sbin/ifconfig executable on the filesystem. This option + is generally used when creating a statically linked version of busybox + for use as a rescue shell, in the event that you screw up your system. + + This is implemented by re-execing /proc/self/exe (typically) + with right parameters. Some selected applets ("NOFORK" applets) + can even be executed without creating new process. + Instead, busybox will call _main() internally. + + However, this causes problems in chroot jails without mounted /proc + and with ps/top (command name can be shown as 'exe' for applets + started this way). +# untrue? +# Note that this will *also* cause applets to take precedence +# over shell builtins of the same name. So turning this on will +# eliminate any performance gained by turning on the builtin "echo" +# and "test" commands in ash. +# untrue? +# Note that when using this option, the shell will attempt to directly +# run '/bin/busybox'. If you do not have the busybox binary sitting in +# that exact location with that exact name, this option will not work at +# all. + +config BUSYBOX_FEATURE_SH_NOFORK + bool "Run 'nofork' applets directly" + default n + depends on (BUSYBOX_MSH || BUSYBOX_LASH || BUSYBOX_HUSH || BUSYBOX_ASH) && BUSYBOX_FEATURE_PREFER_APPLETS + help + This option causes busybox shells [currently only ash] + to not execute typical fork/exec/wait sequence, but call _main + directly, if possible. (Sometimes it is not possible: for example, + this is not possible in pipes). + + This will be done only for some applets (those which are marked + NOFORK in include/applets.h). + + This may significantly speed up some shell scripts. + + This feature is relatively new. Use with care. + +config BUSYBOX_CTTYHACK + bool "cttyhack" + default n + help + One common problem reported on the mailing list is "can't access tty; + job control turned off" error message which typically appears when + one tries to use shell with stdin/stdout opened to /dev/console. + This device is special - it cannot be a controlling tty. + + Proper solution is to use correct device instead of /dev/console. + + cttyhack provides "quick and dirty" solution to this problem. + It analyzes stdin with various ioctls, trying to determine whether + it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line). + If it detects one, it closes stdin/out/err and reopens that device. + Then it executes given program. Usage example for /etc/inittab + (for busybox init): + + ::respawn:/bin/cttyhack /bin/sh + +endmenu diff --git a/package/busybox/config/sysklogd/Config.in b/package/busybox/config/sysklogd/Config.in new file mode 100644 index 000000000..282de7bee --- /dev/null +++ b/package/busybox/config/sysklogd/Config.in @@ -0,0 +1,118 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "System Logging Utilities" + +config BUSYBOX_SYSLOGD + bool "syslogd" + default y + help + The syslogd utility is used to record logs of all the + significant events that occur on a system. Every + message that is logged records the date and time of the + event, and will generally also record the name of the + application that generated the message. When used in + conjunction with klogd, messages from the Linux kernel + can also be recorded. This is terribly useful, + especially for finding what happened when something goes + wrong. And something almost always will go wrong if + you wait long enough.... + +config BUSYBOX_FEATURE_ROTATE_LOGFILE + bool "Rotate message files" + default n + depends on BUSYBOX_SYSLOGD + help + This enables syslogd to rotate the message files + on his own. No need to use an external rotatescript. + +config BUSYBOX_FEATURE_REMOTE_LOG + bool "Remote Log support" + default n + depends on BUSYBOX_SYSLOGD + help + When you enable this feature, the syslogd utility can + be used to send system log messages to another system + connected via a network. This allows the remote + machine to log all the system messages, which can be + terribly useful for reducing the number of serial + cables you use. It can also be a very good security + measure to prevent system logs from being tampered with + by an intruder. + +config BUSYBOX_FEATURE_SYSLOGD_DUP + bool "Support -D (drop dups) option" + default n + depends on BUSYBOX_SYSLOGD + help + Option -D instructs syslogd to drop consecutive messages + which are totally the same. + +config BUSYBOX_FEATURE_IPC_SYSLOG + bool "Circular Buffer support" + default y + depends on BUSYBOX_SYSLOGD + help + When you enable this feature, the syslogd utility will + use a circular buffer to record system log messages. + When the buffer is filled it will continue to overwrite + the oldest messages. This can be very useful for + systems with little or no permanent storage, since + otherwise system logs can eventually fill up your + entire filesystem, which may cause your system to + break badly. + +config BUSYBOX_FEATURE_IPC_SYSLOG_BUFFER_SIZE + int "Circular buffer size in Kbytes (minimum 4KB)" + default 16 + range 4 2147483647 + depends on BUSYBOX_FEATURE_IPC_SYSLOG + help + This option sets the size of the circular buffer + used to record system log messages. + +config BUSYBOX_LOGREAD + bool "logread" + default y + depends on BUSYBOX_FEATURE_IPC_SYSLOG + help + If you enabled Circular Buffer support, you almost + certainly want to enable this feature as well. This + utility will allow you to read the messages that are + stored in the syslogd circular buffer. + +config BUSYBOX_FEATURE_LOGREAD_REDUCED_LOCKING + bool "Double buffering" + default y + depends on BUSYBOX_LOGREAD + help + 'logread' ouput to slow serial terminals can have + side effects on syslog because of the semaphore. + This option make logread to double buffer copy + from circular buffer, minimizing semaphore + contention at some minor memory expense. + +config BUSYBOX_KLOGD + bool "klogd" + default y + help + klogd is a utility which intercepts and logs all + messages from the Linux kernel and sends the messages + out to the 'syslogd' utility so they can be logged. If + you wish to record the messages produced by the kernel, + you should enable this option. + +config BUSYBOX_LOGGER + bool "logger" + default y + select BUSYBOX_FEATURE_SYSLOG + help + The logger utility allows you to send arbitrary text + messages to the system log (i.e. the 'syslogd' utility) so + they can be logged. This is generally used to help locate + problems that occur within programs and scripts. + +endmenu + diff --git a/package/busybox/config/util-linux/Config.in b/package/busybox/config/util-linux/Config.in new file mode 100644 index 000000000..3f67b0b8e --- /dev/null +++ b/package/busybox/config/util-linux/Config.in @@ -0,0 +1,845 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Linux System Utilities" + +config BUSYBOX_BLKID + bool "blkid" + default y + select BUSYBOX_VOLUMEID + help + Lists labels and UUIDs of all filesystems. + WARNING: + With all submodules selected, it will add ~8k to busybox. + +config BUSYBOX_DMESG + bool "dmesg" + default y + help + dmesg is used to examine or control the kernel ring buffer. When the + Linux kernel prints messages to the system log, they are stored in + the kernel ring buffer. You can use dmesg to print the kernel's ring + buffer, clear the kernel ring buffer, change the size of the kernel + ring buffer, and change the priority level at which kernel messages + are also logged to the system console. Enable this option if you + wish to enable the 'dmesg' utility. + +config BUSYBOX_FEATURE_DMESG_PRETTY + bool "Pretty dmesg output" + default y + depends on BUSYBOX_DMESG + help + If you wish to scrub the syslog level from the output, say 'Y' here. + The syslog level is a string prefixed to every line with the form + "<#>". + + With this option you will see: + # dmesg + Linux version 2.6.17.4 ..... + BIOS-provided physical RAM map: + BIOS-e820: 0000000000000000 - 000000000009f000 (usable) + + Without this option you will see: + # dmesg + <5>Linux version 2.6.17.4 ..... + <6>BIOS-provided physical RAM map: + <6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable) + +config BUSYBOX_FBSET + bool "fbset" + default n + help + fbset is used to show or change the settings of a Linux frame buffer + device. The frame buffer device provides a simple and unique + interface to access a graphics display. Enable this option + if you wish to enable the 'fbset' utility. + +config BUSYBOX_FEATURE_FBSET_FANCY + bool "Turn on extra fbset options" + default n + depends on BUSYBOX_FBSET + help + This option enables extended fbset options, allowing one to set the + framebuffer size, color depth, etc. interface to access a graphics + display. Enable this option if you wish to enable extended fbset + options. + +config BUSYBOX_FEATURE_FBSET_READMODE + bool "Turn on fbset readmode support" + default n + depends on BUSYBOX_FBSET + help + This option allows fbset to read the video mode database stored by + default as /etc/fb.modes, which can be used to set frame buffer + device to pre-defined video modes. + +config BUSYBOX_FDFLUSH + bool "fdflush" + default n + help + fdflush is only needed when changing media on slightly-broken + removable media drives. It is used to make Linux believe that a + hardware disk-change switch has been actuated, which causes Linux to + forget anything it has cached from the previous media. If you have + such a slightly-broken drive, you will need to run fdflush every time + you change a disk. Most people have working hardware and can safely + leave this disabled. + +config BUSYBOX_FDFORMAT + bool "fdformat" + default n + help + fdformat is used to low-level format a floppy disk. + +config BUSYBOX_FDISK + bool "fdisk" + default y + help + The fdisk utility is used to divide hard disks into one or more + logical disks, which are generally called partitions. This utility + can be used to list and edit the set of partitions or BSD style + 'disk slices' that are defined on a hard drive. + +config BUSYBOX_FDISK_SUPPORT_LARGE_DISKS + bool "Support over 4GB disks" + default y + depends on BUSYBOX_FDISK + help + Enable this option to support large disks > 4GB. + +config BUSYBOX_FEATURE_FDISK_WRITABLE + bool "Write support" + default y + depends on BUSYBOX_FDISK + help + Enabling this option allows you to create or change a partition table + and write those changes out to disk. If you leave this option + disabled, you will only be able to view the partition table. + +config BUSYBOX_FEATURE_AIX_LABEL + bool "Support AIX disklabels" + default n + depends on BUSYBOX_FDISK && BUSYBOX_FEATURE_FDISK_WRITABLE + help + Enabling this option allows you to create or change AIX disklabels. + Most people can safely leave this option disabled. + +config BUSYBOX_FEATURE_SGI_LABEL + bool "Support SGI disklabels" + default n + depends on BUSYBOX_FDISK && BUSYBOX_FEATURE_FDISK_WRITABLE + help + Enabling this option allows you to create or change SGI disklabels. + Most people can safely leave this option disabled. + +config BUSYBOX_FEATURE_SUN_LABEL + bool "Support SUN disklabels" + default n + depends on BUSYBOX_FDISK && BUSYBOX_FEATURE_FDISK_WRITABLE + help + Enabling this option allows you to create or change SUN disklabels. + Most people can safely leave this option disabled. + +config BUSYBOX_FEATURE_OSF_LABEL + bool "Support BSD disklabels" + default n + depends on BUSYBOX_FDISK && BUSYBOX_FEATURE_FDISK_WRITABLE + help + Enabling this option allows you to create or change BSD disklabels + and define and edit BSD disk slices. + +config BUSYBOX_FEATURE_FDISK_ADVANCED + bool "Support expert mode" + default n + depends on BUSYBOX_FDISK && BUSYBOX_FEATURE_FDISK_WRITABLE + help + Enabling this option allows you to do terribly unsafe things like + define arbitrary drive geometry, move the beginning of data in a + partition, and similarly evil things. Unless you have a very good + reason you would be wise to leave this disabled. + +config BUSYBOX_FINDFS + bool "findfs" + default n + select BUSYBOX_VOLUMEID + help + Prints the name of a filesystem with given label or UUID. + WARNING: + With all submodules selected, it will add ~8k to busybox. + +config BUSYBOX_FREERAMDISK + bool "freeramdisk" + default n + help + Linux allows you to create ramdisks. This utility allows you to + delete them and completely free all memory that was used for the + ramdisk. For example, if you boot Linux into a ramdisk and later + pivot_root, you may want to free the memory that is allocated to the + ramdisk. If you have no use for freeing memory from a ramdisk, leave + this disabled. + +config BUSYBOX_FSCK_MINIX + bool "fsck_minix" + default n + help + The minix filesystem is a nice, small, compact, read-write filesystem + with little overhead. It is not a journaling filesystem however and + can experience corruption if it is not properly unmounted or if the + power goes off in the middle of a write. This utility allows you to + check for and attempt to repair any corruption that occurs to a minix + filesystem. + +config BUSYBOX_MKFS_MINIX + bool "mkfs_minix" + default n + help + The minix filesystem is a nice, small, compact, read-write filesystem + with little overhead. If you wish to be able to create minix + filesystems this utility will do the job for you. + +comment "Minix filesystem support" + depends on BUSYBOX_FSCK_MINIX || BUSYBOX_MKFS_MINIX + +config BUSYBOX_FEATURE_MINIX2 + bool "Support Minix fs v2 (fsck_minix/mkfs_minix)" + default y + depends on BUSYBOX_FSCK_MINIX || BUSYBOX_MKFS_MINIX + help + If you wish to be able to create version 2 minix filesystems, enable + this. If you enabled 'mkfs_minix' then you almost certainly want to + be using the version 2 filesystem support. + +config BUSYBOX_GETOPT + bool "getopt" + default n + help + The getopt utility is used to break up (parse) options in command + lines to make it easy to write complex shell scripts that also check + for legal (and illegal) options. If you want to write horribly + complex shell scripts, or use some horribly complex shell script + written by others, this utility may be for you. Most people will + wisely leave this disabled. + +config BUSYBOX_HEXDUMP + bool "hexdump" + default y + help + The hexdump utility is used to display binary data in a readable + way that is comparable to the output from most hex editors. + +config BUSYBOX_FEATURE_HEXDUMP_REVERSE + bool "Support -R, reverse of 'hexdump -Cv'" + default n + depends on BUSYBOX_HEXDUMP + help + The hexdump utility is used to display binary data in an ascii + readable way. This option creates binary data from an ascii input. + NB: this option is non-standard. It's unwise to use it in scripts + aimed to be portable. + +config BUSYBOX_HD + bool "hd" + default n + select BUSYBOX_HEXDUMP + help + hd is an alias to hexdump -C. + +config BUSYBOX_HWCLOCK + bool "hwclock" + default n + help + The hwclock utility is used to read and set the hardware clock + on a system. This is primarily used to set the current time on + shutdown in the hardware clock, so the hardware will keep the + correct time when Linux is _not_ running. + +config BUSYBOX_FEATURE_HWCLOCK_LONG_OPTIONS + bool "Support long options (--hctosys,...)" + default n + depends on BUSYBOX_HWCLOCK && BUSYBOX_GETOPT_LONG + help + By default, the hwclock utility only uses short options. If you + are overly fond of its long options, such as --hctosys, --utc, etc) + then enable this option. + +config BUSYBOX_FEATURE_HWCLOCK_ADJTIME_FHS + bool "Use FHS /var/lib/hwclock/adjtime" + default y + depends on BUSYBOX_HWCLOCK + help + Starting with FHS 2.3, the adjtime state file is supposed to exist + at /var/lib/hwclock/adjtime instead of /etc/adjtime. If you wish + to use the FHS behavior, answer Y here, otherwise answer N for the + classic /etc/adjtime path. + + pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO + +config BUSYBOX_IPCRM + bool "ipcrm" + default y + select BUSYBOX_FEATURE_SUID + help + The ipcrm utility allows the removal of System V interprocess + communication (IPC) objects and the associated data structures + from the system. + +config BUSYBOX_IPCS + bool "ipcs" + default y + select BUSYBOX_FEATURE_SUID + help + The ipcs utility is used to provide information on the currently + allocated System V interprocess (IPC) objects in the system. + +config BUSYBOX_LOSETUP + bool "losetup" + default y + help + losetup is used to associate or detach a loop device with a regular + file or block device, and to query the status of a loop device. This + version does not currently support enabling data encryption. + +config BUSYBOX_MDEV + bool "mdev" + default y + help + mdev is a mini-udev implementation for dynamically creating device + nodes in the /dev directory. + + For more information, please see docs/mdev.txt + +config BUSYBOX_FEATURE_MDEV_CONF + bool "Support /etc/mdev.conf" + default y + depends on BUSYBOX_MDEV + help + Add support for the mdev config file to control ownership and + permissions of the device nodes. + + For more information, please see docs/mdev.txt + +config BUSYBOX_FEATURE_MDEV_RENAME + bool "Support subdirs/symlinks" + default y + depends on BUSYBOX_FEATURE_MDEV_CONF + help + Add support for renaming devices and creating symlinks. + + For more information, please see docs/mdev.txt + +config BUSYBOX_FEATURE_MDEV_RENAME_REGEXP + bool "Support regular expressions substitutions when renaming device" + default y + depends on BUSYBOX_FEATURE_MDEV_RENAME + help + Add support for regular expressions substitutions when renaming + device. + +config BUSYBOX_FEATURE_MDEV_EXEC + bool "Support command execution at device addition/removal" + default y + depends on BUSYBOX_FEATURE_MDEV_CONF + help + This adds support for an optional field to /etc/mdev.conf for + executing commands when devices are created/removed. + + For more information, please see docs/mdev.txt + +config BUSYBOX_FEATURE_MDEV_LOAD_FIRMWARE + bool "Support loading of firmwares" + default y + depends on BUSYBOX_MDEV + help + Some devices need to load firmware before they can be usable. + + These devices will request userspace look up the files in + /lib/firmware/ and if it exists, send it to the kernel for + loading into the hardware. + +config BUSYBOX_MKSWAP + bool "mkswap" + default n + help + The mkswap utility is used to configure a file or disk partition as + Linux swap space. This allows Linux to use the entire file or + partition as if it were additional RAM, which can greatly increase + the capability of low-memory machines. This additional memory is + much slower than real RAM, but can be very helpful at preventing your + applications being killed by the Linux out of memory (OOM) killer. + Once you have created swap space using 'mkswap' you need to enable + the swap space using the 'swapon' utility. + +config BUSYBOX_FEATURE_MKSWAP_V0 + bool "Version 0 support" + default n + depends on BUSYBOX_MKSWAP +# depends on BUSYBOX_MKSWAP && BUSYBOX_DEPRECATED + help + Enable support for the old v0 style. + If your kernel is older than 2.1.117, then v0 support is the + only option. + +config BUSYBOX_MORE + bool "more" + default y + help + more is a simple utility which allows you to read text one screen + sized page at a time. If you want to read text that is larger than + the screen, and you are using anything faster than a 300 baud modem, + you will probably find this utility very helpful. If you don't have + any need to reading text files, you can leave this disabled. + +config BUSYBOX_FEATURE_USE_TERMIOS + bool "Use termios to manipulate the screen" + default y + depends on BUSYBOX_MORE || BUSYBOX_TOP + help + This option allows utilities such as 'more' and 'top' to determine + the size of the screen. If you leave this disabled, your utilities + that display things on the screen will be especially primitive and + will be unable to determine the current screen size, and will be + unable to move the cursor. + +config BUSYBOX_VOLUMEID + bool #No description makes it a hidden option + default n + +config BUSYBOX_FEATURE_VOLUMEID_EXT + bool "Ext filesystem" + default n + depends on BUSYBOX_VOLUMEID + help + TODO + +config BUSYBOX_FEATURE_VOLUMEID_REISERFS + bool "Reiser filesystem" + default n + depends on BUSYBOX_VOLUMEID + help + TODO + +config BUSYBOX_FEATURE_VOLUMEID_FAT + bool "fat filesystem" + default n + depends on BUSYBOX_VOLUMEID + help + TODO + +config BUSYBOX_FEATURE_VOLUMEID_HFS + bool "hfs filesystem" + default n + depends on BUSYBOX_VOLUMEID + help + TODO + +config BUSYBOX_FEATURE_VOLUMEID_JFS + bool "jfs filesystem" + default n + depends on BUSYBOX_VOLUMEID + help + TODO + +### config FEATURE_VOLUMEID_UFS +### bool "ufs filesystem" +### default n +### depends on BUSYBOX_VOLUMEID +### help +### TODO + +config BUSYBOX_FEATURE_VOLUMEID_XFS + bool "xfs filesystem" + default y + depends on BUSYBOX_VOLUMEID + help + TODO + +config BUSYBOX_FEATURE_VOLUMEID_NTFS + bool "ntfs filesystem" + default n + depends on BUSYBOX_VOLUMEID + help + TODO + +config BUSYBOX_FEATURE_VOLUMEID_ISO9660 + bool "iso9660 filesystem" + default n + depends on BUSYBOX_VOLUMEID + help + TODO + +config BUSYBOX_FEATURE_VOLUMEID_UDF + bool "udf filesystem" + default n + depends on BUSYBOX_VOLUMEID + help + TODO + +config BUSYBOX_FEATURE_VOLUMEID_LUKS + bool "luks filesystem" + default n + depends on BUSYBOX_VOLUMEID + help + TODO + +config BUSYBOX_FEATURE_VOLUMEID_LINUXSWAP + bool "linux swap filesystem" + default n + depends on BUSYBOX_VOLUMEID + help + TODO + +### config FEATURE_VOLUMEID_LVM +### bool "lvm" +### default n +### depends on BUSYBOX_VOLUMEID +### help +### TODO + +config BUSYBOX_FEATURE_VOLUMEID_CRAMFS + bool "cramfs filesystem" + default n + depends on BUSYBOX_VOLUMEID + help + TODO + +### config FEATURE_VOLUMEID_HPFS +### bool "hpfs filesystem" +### default n +### depends on BUSYBOX_VOLUMEID +### help +### TODO + +config BUSYBOX_FEATURE_VOLUMEID_ROMFS + bool "romfs filesystem" + default n + depends on BUSYBOX_VOLUMEID + help + TODO + +config BUSYBOX_FEATURE_VOLUMEID_SYSV + bool "sysv filesystem" + default n + depends on BUSYBOX_VOLUMEID + help + TODO + +### config FEATURE_VOLUMEID_MINIX +### bool "minix filesystem" +### default n +### depends on BUSYBOX_VOLUMEID +### help +### TODO + +### These only detect partition tables - not used (yet?) +### config FEATURE_VOLUMEID_MAC +### bool "mac filesystem" +### default n +### depends on BUSYBOX_VOLUMEID +### help +### TODO +### +### config FEATURE_VOLUMEID_MSDOS +### bool "msdos filesystem" +### default n +### depends on BUSYBOX_VOLUMEID +### help +### TODO + +config BUSYBOX_FEATURE_VOLUMEID_OCFS2 + bool "ocfs2 filesystem" + default n + depends on BUSYBOX_VOLUMEID + help + TODO + +### config FEATURE_VOLUMEID_HIGHPOINTRAID +### bool "highpoint raid" +### default n +### depends on BUSYBOX_VOLUMEID +### help +### TODO + +### config FEATURE_VOLUMEID_ISWRAID +### bool "intel raid" +### default n +### depends on BUSYBOX_VOLUMEID +### help +### TODO + +### config FEATURE_VOLUMEID_LSIRAID +### bool "lsi raid" +### default n +### depends on BUSYBOX_VOLUMEID +### help +### TODO + +### config FEATURE_VOLUMEID_VIARAID +### bool "via raid" +### default n +### depends on BUSYBOX_VOLUMEID +### help +### TODO + +### config FEATURE_VOLUMEID_SILICONRAID +### bool "silicon raid" +### default n +### depends on BUSYBOX_VOLUMEID +### help +### TODO + +### config FEATURE_VOLUMEID_NVIDIARAID +### bool "nvidia raid" +### default n +### depends on BUSYBOX_VOLUMEID +### help +### TODO + +### config FEATURE_VOLUMEID_PROMISERAID +### bool "promise raid" +### default n +### depends on BUSYBOX_VOLUMEID +### help +### TODO + +config BUSYBOX_FEATURE_VOLUMEID_LINUXRAID + bool "linuxraid" + default n + depends on BUSYBOX_VOLUMEID + help + TODO + +config BUSYBOX_MOUNT + bool "mount" + default y + help + All files and filesystems in Unix are arranged into one big directory + tree. The 'mount' utility is used to graft a filesystem onto a + particular part of the tree. A filesystem can either live on a block + device, or it can be accessible over the network, as is the case with + NFS filesystems. Most people using BusyBox will also want to enable + the 'mount' utility. + +config BUSYBOX_FEATURE_MOUNT_FAKE + bool "Support option -f" + default n + depends on BUSYBOX_MOUNT + help + Enable support for faking a file system mount. + +config BUSYBOX_FEATURE_MOUNT_VERBOSE + bool "Support option -v" + default n + depends on BUSYBOX_MOUNT + help + Enable multi-level -v[vv...] verbose messages. Useful if you + debug mount problems and want to see what is exactly passed + to the kernel. + +config BUSYBOX_FEATURE_MOUNT_HELPERS + bool "Support mount helpers" + default y + depends on BUSYBOX_MOUNT + help + Enable mounting of virtual file systems via external helpers. + E.g. "mount obexfs#-b00.11.22.33.44.55 /mnt" will in effect call + "obexfs -b00.11.22.33.44.55 /mnt" + Also "mount -t sometype [-o opts] fs /mnt" will try + "sometype [-o opts] fs /mnt" if simple mount syscall fails. + The idea is to use such virtual filesystems in /etc/fstab. + +config BUSYBOX_FEATURE_MOUNT_LABEL + bool "Support specifiying devices by label or UUID" + default y + depends on BUSYBOX_MOUNT + select BUSYBOX_VOLUMEID + help + This allows for specifying a device by label or uuid, rather than by + name. This feature utilizes the same functionality as blkid/findfs. + +config BUSYBOX_FEATURE_MOUNT_NFS + bool "Support mounting NFS file systems" + default n + depends on BUSYBOX_MOUNT + select BUSYBOX_FEATURE_HAVE_RPC + select BUSYBOX_FEATURE_SYSLOG + help + Enable mounting of NFS file systems. + +config BUSYBOX_FEATURE_MOUNT_CIFS + bool "Support mounting CIFS/SMB file systems" + default n + depends on BUSYBOX_MOUNT + help + Enable support for samba mounts. + +config BUSYBOX_FEATURE_MOUNT_FLAGS + depends on BUSYBOX_MOUNT + bool "Support lots of -o flags in mount" + default y + help + Without this, mount only supports ro/rw/remount. With this, it + supports nosuid, suid, dev, nodev, exec, noexec, sync, async, atime, + noatime, diratime, nodiratime, loud, bind, move, shared, slave, + private, unbindable, rshared, rslave, rprivate, and runbindable. + +config BUSYBOX_FEATURE_MOUNT_FSTAB + depends on BUSYBOX_MOUNT + bool "Support /etc/fstab and -a" + default y + help + Support mount all and looking for files in /etc/fstab. + +config BUSYBOX_PIVOT_ROOT + bool "pivot_root" + default n + help + The pivot_root utility swaps the mount points for the root filesystem + with some other mounted filesystem. This allows you to do all sorts + of wild and crazy things with your Linux system and is far more + powerful than 'chroot'. + + Note: This is for initrd in linux 2.4. Under initramfs (introduced + in linux 2.6) use switch_root instead. + +config BUSYBOX_RDATE + bool "rdate" + default y + help + The rdate utility allows you to synchronize the date and time of your + system clock with the date and time of a remote networked system using + the RFC868 protocol, which is built into the inetd daemon on most + systems. + +config BUSYBOX_RDEV + bool "rdev" + default n + help + Print the device node associated with the filesystem mounted at '/'. + +config BUSYBOX_READPROFILE + bool "readprofile" + default n + help + This allows you to parse /proc/profile for basic profiling. + +config BUSYBOX_RTCWAKE + bool "rtcwake" + default n + help + Enter a system sleep state until specified wakeup time. + +config BUSYBOX_SCRIPT + bool "script" + default n + help + The script makes typescript of terminal session. + +config BUSYBOX_SETARCH + bool "setarch" + default n + help + The linux32 utility is used to create a 32bit environment for the + specified program (usually a shell). It only makes sense to have + this util on a system that supports both 64bit and 32bit userland + (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...). + +config BUSYBOX_SWAPONOFF + bool "swaponoff" + default n + help + This option enables both the 'swapon' and the 'swapoff' utilities. + Once you have created some swap space using 'mkswap', you also need + to enable your swap space with the 'swapon' utility. The 'swapoff' + utility is used, typically at system shutdown, to disable any swap + space. If you are not using any swap space, you can leave this + option disabled. + +config BUSYBOX_FEATURE_SWAPON_PRI + bool "Support priority option -p" + default n + depends on BUSYBOX_SWAPONOFF + help + Enable support for setting swap device priority in swapon. + +config BUSYBOX_SWITCH_ROOT + bool "switch_root" + default n + help + The switch_root utility is used from initramfs to select a new + root device. Under initramfs, you have to use this instead of + pivot_root. (Stop reading here if you don't care why.) + + Booting with initramfs extracts a gzipped cpio archive into rootfs + (which is a variant of ramfs/tmpfs). Because rootfs can't be moved + or unmounted*, pivot_root will not work from initramfs. Instead, + switch_root deletes everything out of rootfs (including itself), + does a mount --move that overmounts rootfs with the new root, and + then execs the specified init program. + + * Because the Linux kernel uses rootfs internally as the starting + and ending point for searching through the kernel's doubly linked + list of active mount points. That's why. + +config BUSYBOX_UMOUNT + bool "umount" + default y + help + When you want to remove a mounted filesystem from its current mount + point, for example when you are shutting down the system, the + 'umount' utility is the tool to use. If you enabled the 'mount' + utility, you almost certainly also want to enable 'umount'. + +config BUSYBOX_FEATURE_UMOUNT_ALL + bool "Support option -a" + default n + depends on BUSYBOX_UMOUNT + help + Support -a option to unmount all currently mounted filesystems. + +comment "Common options for mount/umount" + depends on BUSYBOX_MOUNT || BUSYBOX_UMOUNT + +config BUSYBOX_FEATURE_MOUNT_LOOP + bool "Support loopback mounts" + default y + depends on BUSYBOX_MOUNT || BUSYBOX_UMOUNT + help + Enabling this feature allows automatic mounting of files (containing + filesystem images) via the linux kernel's loopback devices. + The mount command will detect you are trying to mount a file instead + of a block device, and transparently associate the file with a + loopback device. The umount command will also free that loopback + device. + + You can still use the 'losetup' utility (to manually associate files + with loop devices) if you need to do something advanced, such as + specify an offset or cryptographic options to the loopback device. + (If you don't want umount to free the loop device, use "umount -D".) + +config BUSYBOX_FEATURE_MTAB_SUPPORT + bool "Support for the old /etc/mtab file" + default n + depends on BUSYBOX_MOUNT || BUSYBOX_UMOUNT + select BUSYBOX_FEATURE_MOUNT_FAKE + help + Historically, Unix systems kept track of the currently mounted + partitions in the file "/etc/mtab". These days, the kernel exports + the list of currently mounted partitions in "/proc/mounts", rendering + the old mtab file obsolete. (In modern systems, /etc/mtab should be + a symlink to /proc/mounts.) + + The only reason to have mount maintain an /etc/mtab file itself is if + your stripped-down embedded system does not have a /proc directory. + If you must use this, keep in mind it's inherently brittle (for + example a mount under chroot won't update it), can't handle modern + features like separate per-process filesystem namespaces, requires + that your /etc directory be writeable, tends to get easily confused + by --bind or --move mounts, won't update if you rename a directory + that contains a mount point, and so on. (In brief: avoid.) + + About the only reason to use this is if you've removed /proc from + your kernel. + +endmenu diff --git a/package/busybox/files/bridge.pre-up b/package/busybox/files/bridge.pre-up new file mode 100644 index 000000000..e69de29bb diff --git a/package/busybox/files/busybox.config b/package/busybox/files/busybox.config new file mode 100644 index 000000000..55be09532 --- /dev/null +++ b/package/busybox/files/busybox.config @@ -0,0 +1,665 @@ +# Busybox version: 1.4.2 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +CONFIG_NITPICK=y +# CONFIG_DESKTOP is not set +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_COMPRESS_USAGE is not set +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_LOCALE_SUPPORT is not set +CONFIG_GETOPT_LONG=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +CONFIG_FEATURE_SUID=y +CONFIG_FEATURE_SYSLOG=y +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +CONFIG_FEATURE_HAVE_RPC=y +# CONFIG_SELINUX is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_FULL_LIBBUSYBOX is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_LFS=y +# CONFIG_BUILD_AT_ONCE is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_NO_DEBUG_LIB is not set +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set +CONFIG_INCLUDE_SUSv2=y + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +CONFIG_PREFIX="@IDIR@" + +# +# Busybox Library Tuning +# +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SIZE_VS_SPEED=1 + +# +# Applets +# + +# +# Archival Utilities +# +# CONFIG_AR is not set +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +# CONFIG_BUNZIP2 is not set +# CONFIG_CPIO is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +CONFIG_GUNZIP=y +CONFIG_FEATURE_GUNZIP_UNCOMPRESS=y +CONFIG_GZIP=y +CONFIG_IPKG=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +# CONFIG_FEATURE_TAR_BZIP2 is not set +# CONFIG_FEATURE_TAR_LZMA is not set +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_GZIP=y +# CONFIG_FEATURE_TAR_COMPRESS is not set +# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_UNCOMPRESS is not set +# CONFIG_UNLZMA is not set +# CONFIG_FEATURE_LZMA_FAST is not set +# CONFIG_UNZIP is not set + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set +# CONFIG_FEATURE_DEB_TAR_GZ is not set +# CONFIG_FEATURE_DEB_TAR_BZ2 is not set +# CONFIG_FEATURE_DEB_TAR_LZMA is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +# CONFIG_CAL is not set +CONFIG_CAT=y +# CONFIG_CATV is not set +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +CONFIG_CKSUM=y +CONFIG_CMP=y +CONFIG_COMM=y +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +CONFIG_FEATURE_DD_IBS_OBS=y +CONFIG_DF=y +# CONFIG_DIFF is not set +# CONFIG_FEATURE_DIFF_BINARY is not set +# CONFIG_FEATURE_DIFF_DIR is not set +# CONFIG_FEATURE_DIFF_MINIMAL is not set +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +# CONFIG_UNIX2DOS is not set +CONFIG_DU=y +# CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K is not set +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set +CONFIG_EXPR=y +# CONFIG_EXPR_MATH_SUPPORT_64 is not set +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_HOSTID=y +CONFIG_ID=y +CONFIG_INSTALL=y +# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set +CONFIG_LENGTH=y +CONFIG_LN=y +# CONFIG_LOGNAME is not set +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +# CONFIG_FEATURE_MV_LONG_OPTIONS is not set +# CONFIG_NICE is not set +CONFIG_NOHUP=y +# CONFIG_OD is not set +# CONFIG_PRINTENV is not set +CONFIG_PRINTF=y +CONFIG_PWD=y +# CONFIG_REALPATH is not set +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_SEQ=y +# CONFIG_SHA1SUM is not set +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_SORT=y +CONFIG_FEATURE_SORT_BIG=y +CONFIG_STAT=y +CONFIG_FEATURE_STAT_FORMAT=y +CONFIG_STTY=y +# CONFIG_SUM is not set +CONFIG_SYNC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TEST=y +# CONFIG_FEATURE_TEST_64 is not set +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +# CONFIG_FEATURE_TR_EQUIV is not set +CONFIG_TRUE=y +# CONFIG_TTY is not set +CONFIG_UNAME=y +CONFIG_UNIQ=y +# CONFIG_USLEEP is not set +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +CONFIG_WATCH=y +CONFIG_WC=y +# CONFIG_FEATURE_WC_LARGE is not set +CONFIG_WHO=y +# CONFIG_WHOAMI is not set +CONFIG_YES=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls, more and telnet +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +# CONFIG_CHVT is not set +CONFIG_CLEAR=y +# CONFIG_DEALLOCVT is not set +# CONFIG_DUMPKMAP is not set +# CONFIG_LOADFONT is not set +# CONFIG_LOADKMAP is not set +# CONFIG_OPENVT is not set +CONFIG_RESET=y +# CONFIG_RESIZE is not set +# CONFIG_FEATURE_RESIZE_PRINT is not set +# CONFIG_SETCONSOLE is not set +# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set +# CONFIG_SETKEYCODES is not set +# CONFIG_SETLOGCONS is not set + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +# CONFIG_PIPE_PROGRESS is not set +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_RUN_PARTS=y +# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set +# CONFIG_START_STOP_DAEMON is not set +# CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set +# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +CONFIG_ED=y +# CONFIG_PATCH is not set +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y +CONFIG_FEATURE_ALLOW_EXEC=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_PRINT0=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_MMIN=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_NEWER=y +CONFIG_FEATURE_FIND_INUM=y +CONFIG_FEATURE_FIND_EXEC=y +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +CONFIG_INIT=y +# CONFIG_DEBUG_INIT is not set +CONFIG_FEATURE_USE_INITTAB=y +# CONFIG_FEATURE_INIT_SCTTY is not set +# CONFIG_FEATURE_EXTRA_QUIET is not set +# CONFIG_FEATURE_INIT_COREDUMPS is not set +# CONFIG_FEATURE_INITRD is not set +CONFIG_HALT=y +CONFIG_MESG=y + +# +# Login/Password Management Utilities +# +CONFIG_FEATURE_SHADOWPASSWDS=y +CONFIG_USE_BB_SHADOW=y +CONFIG_USE_BB_PWD_GRP=y +# CONFIG_ADDGROUP is not set +# CONFIG_DELGROUP is not set +# CONFIG_ADDUSER is not set +# CONFIG_DELUSER is not set +# CONFIG_GETTY is not set +CONFIG_FEATURE_UTMP=y +# CONFIG_FEATURE_WTMP is not set +# CONFIG_LOGIN is not set +# CONFIG_LOGIN_SCRIPTS is not set +# CONFIG_FEATURE_SECURETTY is not set +CONFIG_PASSWD=y +CONFIG_FEATURE_PASSWD_WEAK_CHECK=y +CONFIG_SU=y +CONFIG_FEATURE_SU_SYSLOG=y +CONFIG_FEATURE_SU_CHECKS_SHELLS=y +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Linux Ext2 FS Progs +# +# CONFIG_CHATTR is not set +CONFIG_FSCK=y +# CONFIG_LSATTR is not set + +# +# Linux Module Utilities +# +CONFIG_INSMOD=y +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +CONFIG_RMMOD=y +CONFIG_LSMOD=y +CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y +CONFIG_MODPROBE=y +# CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS is not set +# CONFIG_FEATURE_MODPROBE_FANCY_ALIAS is not set + +# +# Options common to multiple modutils +# +# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set +# CONFIG_FEATURE_2_4_MODULES is not set +CONFIG_FEATURE_2_6_MODULES=y +# CONFIG_FEATURE_QUERY_MODULE_INTERFACE is not set + +# +# Linux System Utilities +# +CONFIG_DMESG=y +CONFIG_FEATURE_DMESG_PRETTY=y +# CONFIG_FBSET is not set +# CONFIG_FEATURE_FBSET_FANCY is not set +# CONFIG_FEATURE_FBSET_READMODE is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +CONFIG_FDISK=y +CONFIG_FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FREERAMDISK is not set +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_FEATURE_MINIX2 is not set +# CONFIG_GETOPT is not set +CONFIG_HEXDUMP=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y +# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set +CONFIG_IPCRM=y +CONFIG_IPCS=y +CONFIG_LOSETUP=y +CONFIG_MDEV=y +CONFIG_FEATURE_MDEV_CONF=y +CONFIG_FEATURE_MDEV_EXEC=y +CONFIG_MKSWAP=y +# CONFIG_FEATURE_MKSWAP_V0 is not set +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_MOUNT=y +CONFIG_FEATURE_MOUNT_NFS=y +CONFIG_FEATURE_MOUNT_CIFS=y +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y +CONFIG_PIVOT_ROOT=y +# CONFIG_RDATE is not set +# CONFIG_READPROFILE is not set +# CONFIG_SETARCH is not set +CONFIG_SWAPONOFF=y +CONFIG_SWITCH_ROOT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_UMOUNT_ALL=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +# CONFIG_BBCONFIG is not set +CONFIG_CROND=y +# CONFIG_DEBUG_CROND_OPTION is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_CRONTAB=y +# CONFIG_DC is not set +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +# CONFIG_EJECT is not set +# CONFIG_LAST is not set +# CONFIG_LESS is not set +# CONFIG_FEATURE_LESS_MAXLINES is not set +# CONFIG_FEATURE_LESS_BRACKETS is not set +# CONFIG_FEATURE_LESS_FLAGS is not set +# CONFIG_FEATURE_LESS_FLAGCS is not set +# CONFIG_FEATURE_LESS_MARKS is not set +# CONFIG_FEATURE_LESS_REGEXP is not set +# CONFIG_HDPARM is not set +# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set +# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set +# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +# CONFIG_FEATURE_MAKEDEVS_TABLE is not set +# CONFIG_MOUNTPOINT is not set +# CONFIG_MT is not set +# CONFIG_NMETER is not set +# CONFIG_RAIDAUTORUN is not set +# CONFIG_READAHEAD is not set +# CONFIG_RUNLEVEL is not set +CONFIG_RX=y +CONFIG_STRINGS=y +# CONFIG_SETSID is not set +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +# CONFIG_TIME is not set +CONFIG_WATCHDOG=y + +# +# Networking Utilities +# +CONFIG_FEATURE_IPV6=y +CONFIG_ARP=y +CONFIG_ARPING=y +# CONFIG_DNSD is not set +CONFIG_ETHER_WAKE=y +# CONFIG_FAKEIDENTD is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y +CONFIG_IFUPDOWN=y +CONFIG_FEATURE_IFUPDOWN_IP=y +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +CONFIG_INETD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y +CONFIG_FEATURE_INETD_RPC=y +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +CONFIG_FEATURE_IP_RULE=y +# CONFIG_FEATURE_IP_SHORT_FORMS is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_IPRULE is not set +# CONFIG_IPCALC is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set +# CONFIG_NAMEIF is not set +CONFIG_NC=y +CONFIG_NC_SERVER=y +CONFIG_NC_EXTRA=y +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING6=y +CONFIG_ROUTE=y +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set +CONFIG_TELNETD=y +CONFIG_FEATURE_TELNETD_STANDALONE=y +CONFIG_TFTP=y +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +CONFIG_FEATURE_TFTP_BLOCKSIZE=y +CONFIG_DEBUG_TFTP=y +CONFIG_TRACEROUTE=y +CONFIG_FEATURE_TRACEROUTE_VERBOSE=y +CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE=y +CONFIG_FEATURE_TRACEROUTE_USE_ICMP=y +# CONFIG_APP_UDHCPD is not set +# CONFIG_APP_DHCPRELAY is not set +# CONFIG_APP_DUMPLEASES is not set +CONFIG_APP_UDHCPC=y +# CONFIG_FEATURE_UDHCP_SYSLOG is not set +# CONFIG_FEATURE_UDHCP_DEBUG is not set +# CONFIG_VCONFIG is not set +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_IP6_LITERAL=y +CONFIG_FEATURE_WGET_LONG_OPTIONS=y +# CONFIG_ZCIP is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_FUSER=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_KILLALL5=y +CONFIG_PIDOF=y +CONFIG_FEATURE_PIDOF_SINGLE=y +CONFIG_FEATURE_PIDOF_OMIT=y +CONFIG_PS=y +CONFIG_FEATURE_PS_WIDE=y +CONFIG_RENICE=y +CONFIG_BB_SYSCTL=y +CONFIG_TOP=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y + +# +# Shells +# +# CONFIG_FEATURE_SH_IS_ASH is not set +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +CONFIG_FEATURE_SH_IS_NONE=y +# CONFIG_ASH is not set +# CONFIG_ASH_JOB_CONTROL is not set +# CONFIG_ASH_READ_NCHARS is not set +# CONFIG_ASH_READ_TIMEOUT is not set +# CONFIG_ASH_ALIAS is not set +# CONFIG_ASH_MATH_SUPPORT is not set +# CONFIG_ASH_MATH_SUPPORT_64 is not set +# CONFIG_ASH_GETOPTS is not set +# CONFIG_ASH_BUILTIN_ECHO is not set +# CONFIG_ASH_BUILTIN_TEST is not set +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_MAIL is not set +# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_ASH_EXPAND_PRMT is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set +# CONFIG_FEATURE_SH_EXTRA_QUIET is not set +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set +# CONFIG_FEATURE_COMMAND_EDITING is not set +# CONFIG_FEATURE_COMMAND_EDITING_VI is not set +# CONFIG_FEATURE_COMMAND_HISTORY is not set +# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set +# CONFIG_FEATURE_COMMAND_TAB_COMPLETION is not set +# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set +# CONFIG_FEATURE_SH_FANCY_PROMPT is not set + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Runit Utilities +# +# CONFIG_RUNSV is not set +# CONFIG_RUNSVDIR is not set +# CONFIG_SV is not set +# CONFIG_SVLOGD is not set +# CONFIG_CHPST is not set +# CONFIG_SETUIDGID is not set +# CONFIG_ENVUIDGID is not set +# CONFIG_ENVDIR is not set +# CONFIG_SOFTLIMIT is not set diff --git a/package/busybox/files/crond.init b/package/busybox/files/crond.init new file mode 100644 index 000000000..c0b9da9e4 --- /dev/null +++ b/package/busybox/files/crond.init @@ -0,0 +1,27 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${crond:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + mkdir -p /var/spool/cron + crond -c /etc/crontabs + ;; +stop) + kill $(pidof crond|cut -d ' ' -f 3) + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/busybox/files/inetd.init b/package/busybox/files/inetd.init new file mode 100644 index 000000000..ad0527e6a --- /dev/null +++ b/package/busybox/files/inetd.init @@ -0,0 +1,27 @@ +#!/bin/sh +#FWINIT 41 +. /etc/rc.conf +case $1 in +autostart) + test x"$inetd" = x"NO" && exit 0 + test -e /etc/inetd.conf || exit 0 + exec sh $0 start + ;; +start) + /usr/sbin/inetd + ;; +autostop) + ;; +stop) + killall inetd + ;; +restart) + sh $0 stop + exec sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/busybox/files/ipv6 b/package/busybox/files/ipv6 new file mode 100644 index 000000000..837106519 --- /dev/null +++ b/package/busybox/files/ipv6 @@ -0,0 +1,71 @@ +#!/bin/sh + +ipv6_up() { + env | grep -q IF_IPV6_ || return 0 + + # IPV6-FLUSH + if [ "$IF_IPV6_FLUSH" == "1" ] || [ "$IF_IPV6_FLUSH" == "yes" ] || [ "$IF_IPV6_FLUSH" == "YES" ] + then + ip -6 addr flush $IFACE + logger -t IPv6 "deactivated IPv6 for interface $IFACE" + fi + # IPV6-AUTOCONF + if [ "$IF_IPV6_AUTOCONF" == "1" ] || [ "$IF_IPV6_AUTOCONF" == "yes" ] || [ "$IF_IPV6_AUTOCONF" == "YES" ] + then + echo 1 > /proc/sys/net/ipv6/conf/$IFACE/autoconf + logger -t IPv6 "autoconf enabled for $IFACE" + fi + if [ "$IF_IPV6_AUTOCONF" == "0" ] || [ "$IF_IPV6_AUTOCONF" == "no" ] || [ "$IF_IPV6_AUTOCONF" == "NO" ] + then + echo 0 > /proc/sys/net/ipv6/conf/$IFACE/autoconf + logger -t IPv6 "autoconf disabled for $IFACE" + fi + # IPV6-ACCEPT-RA + if [ "$IF_IPV6_ACCEPT_RA" == "1" ] || [ "$IF_IPV6_ACCEPT_RA" == "yes" ] || [ "$IF_IPV6_ACCEPT_RA" == "YES" ] + then + + echo 1 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra + logger -t IPv6 "accept-ra enabled for $IFACE" + fi + if [ "$IF_IPV6_ACCEPT_RA" == "0" ] || [ "$IF_IPV6_ACCEPT_RA" == "no" ] || [ "$IF_IPV6_ACCEPT_RA" == "NO" ] + then + echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra + logger -t IPv6 "accept-ra disabled for $IFACE" + fi + # IPV6-ACCEPT-REDIRECTS + if [ "$IF_IPV6_ACCEPT_REDIRECTS" == "1" ] || [ "$IF_IPV6_ACCEPT_REDIRECTS" == "yes" ] || [ "$IF_IPV6_ACCEPT_REDIRECTS" == "YES" ] + then + + echo 1 > /proc/sys/net/ipv6/conf/$IFACE/accept_redirects + logger -t IPv6 "accept-redirects enabled for $IFACE" + fi + if [ "$IF_IPV6_ACCEPT_REDIRECTS" == "0" ] || [ "$IF_IPV6_ACCEPT_REDIRECTS" == "no" ] || [ "$IF_IPV6_ACCEPT_REDIRECTS" == "NO" ] + then + echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_redirects + logger -t IPv6 "accept-redirects disabled for $IFACE" + fi + # IPV6-FORWARDING + if [ "$IF_IPV6_FORWARDING" == "1" ] || [ "$IF_IPV6_FORWARDING" == "yes" ] || [ "$IF_IPV6_FORWARDING" == "YES" ] + then + + echo 1 > /proc/sys/net/ipv6/conf/$IFACE/forwarding + logger -t IPv6 "forwarding enabled for $IFACE" + fi + if [ "$IF_IPV6_FORWARDING" == "0" ] || [ "$IF_IPV6_FORWARDING" == "no" ] || [ "$IF_IPV6_FORWARDING" == "NO" ] + then + echo 0 > /proc/sys/net/ipv6/conf/$IFACE/forwarding + logger -t IPv6 "forwarding disabled for $IFACE" + fi + # IPV6-USE-TEMPADDR + if [ "$IF_IPV6_USE_TEMPADDR" == "1" ] || [ "$IF_IPV6_USE_TEMPADDR" == "yes" ] || [ "$IF_IPV6_USE_TEMPADDR" == "YES" ] + then + + echo 1 > /proc/sys/net/ipv6/conf/$IFACE/use_tempaddr + logger -t IPv6 "use_tempaddr enabled for $IFACE" + fi + if [ "$IF_IPV6_USE_TEMPADDR" == "0" ] || [ "$IF_IPV6_USE_TEMPADDR" == "no" ] || [ "$IF_IPV6_USE_TEMPADDR" == "NO" ] + then + echo 0 > /proc/sys/net/ipv6/conf/$IFACE/use_tempaddr + logger -t IPv6 "use_tempaddr disabled for $IFACE" + fi +} diff --git a/package/busybox/files/ipv6.up b/package/busybox/files/ipv6.up new file mode 100644 index 000000000..e69de29bb diff --git a/package/busybox/files/network.init b/package/busybox/files/network.init new file mode 100644 index 000000000..0f3d4edad --- /dev/null +++ b/package/busybox/files/network.init @@ -0,0 +1,25 @@ +#!/bin/sh +#FWINIT 40 +. /etc/rc.conf +case $1 in +autostart) + test x"${network:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + [ -f /etc/network/interfaces ] || exit 1 + ifup -a + ;; +autostop|stop) + ifdown -a + ;; +restart) + sh $0 stop + exec sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/busybox/files/syslog.init b/package/busybox/files/syslog.init new file mode 100644 index 000000000..e06283480 --- /dev/null +++ b/package/busybox/files/syslog.init @@ -0,0 +1,28 @@ +#!/bin/sh +#FWINIT 05 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + [[ $syslogd_flags = NO ]] && exit 0 + exec sh $0 start + ;; +start) + syslogd $syslogd_flags + klogd + ;; +stop) + killall klogd + killall syslogd + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/busybox/files/vlan.pre-up b/package/busybox/files/vlan.pre-up new file mode 100644 index 000000000..e69de29bb diff --git a/package/busybox/ipkg/busybox.control b/package/busybox/ipkg/busybox.control new file mode 100644 index 000000000..e7fc84a29 --- /dev/null +++ b/package/busybox/ipkg/busybox.control @@ -0,0 +1,4 @@ +Package: busybox +Priority: optional +Section: net +Description: Core utilities for embedded Linux systems diff --git a/package/busybox/ipkg/busybox.postinst b/package/busybox/ipkg/busybox.postinst new file mode 100644 index 000000000..97e83b766 --- /dev/null +++ b/package/busybox/ipkg/busybox.postinst @@ -0,0 +1,6 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf network network YES +add_rcconf crond crond NO +add_rcconf 'use "-C16" normally, "NO" to disable' syslogd_flags '-C16' +add_rcconf inetd diff --git a/package/busybox/patches/001-ipkg.patch b/package/busybox/patches/001-ipkg.patch new file mode 100644 index 000000000..1d10696c6 --- /dev/null +++ b/package/busybox/patches/001-ipkg.patch @@ -0,0 +1,13797 @@ +diff -Nur busybox-1.12.1.orig/archival/Config.in busybox-1.12.1/archival/Config.in +--- busybox-1.12.1.orig/archival/Config.in 2008-09-28 20:04:15.000000000 +0200 ++++ busybox-1.12.1/archival/Config.in 2008-10-23 11:41:37.000000000 +0200 +@@ -157,6 +157,14 @@ + gzip is used to compress files. + It's probably the most widely used UNIX compression program. + ++config IPKG ++ bool "ipkg" ++ default n ++ select MD5SUM ++ select WGET ++ help ++ ipkg is the itsy package management system. ++ + config RPM2CPIO + bool "rpm2cpio" + default n +diff -Nur busybox-1.12.1.orig/archival/dpkg.c busybox-1.12.1/archival/dpkg.c +--- busybox-1.12.1.orig/archival/dpkg.c 2008-09-28 20:04:15.000000000 +0200 ++++ busybox-1.12.1/archival/dpkg.c 2008-10-23 11:53:33.000000000 +0200 +@@ -1481,16 +1481,7 @@ + return ar_handle->sub_archive->buffer; + } + +-static void FAST_FUNC data_extract_all_prefix(archive_handle_t *archive_handle) +-{ +- char *name_ptr = archive_handle->file_header->name; +- +- name_ptr += strspn(name_ptr, "./"); +- if (name_ptr[0] != '\0') { +- archive_handle->file_header->name = xasprintf("%s%s", archive_handle->buffer, name_ptr); +- data_extract_all(archive_handle); +- } +-} ++/* remove data_extract_all_prefix */ + + static void unpack_package(deb_file_t *deb_file) + { +diff -Nur busybox-1.12.1.orig/archival/ipkg.c busybox-1.12.1/archival/ipkg.c +--- busybox-1.12.1.orig/archival/ipkg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/ipkg.c 2008-10-23 12:14:28.000000000 +0200 +@@ -0,0 +1,28 @@ ++/* ipkg.c - the itsy package management system ++ ++ Florina Boor ++ ++ Copyright (C) 2003 kernel concepts ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ ipkg command line frontend using libipkg ++ ++*/ ++ ++#include "libbb.h" ++#include "libipkg/libipkg.h" ++ ++int ipkg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; ++int ipkg_main(int argc, char **argv) ++{ ++ return ipkg_op(argc, argv); ++} +diff -Nur busybox-1.12.1.orig/archival/Kbuild busybox-1.12.1/archival/Kbuild +--- busybox-1.12.1.orig/archival/Kbuild 2008-09-28 20:04:15.000000000 +0200 ++++ busybox-1.12.1/archival/Kbuild 2008-10-23 11:41:37.000000000 +0200 +@@ -16,6 +16,7 @@ + lib-$(CONFIG_DPKG_DEB) += dpkg_deb.o + lib-$(CONFIG_GUNZIP) += bbunzip.o + lib-$(CONFIG_GZIP) += gzip.o bbunzip.o ++lib-$(CONFIG_IPKG) += ipkg.o + lib-$(CONFIG_RPM2CPIO) += rpm2cpio.o + lib-$(CONFIG_RPM) += rpm.o + lib-$(CONFIG_TAR) += tar.o +diff -Nur busybox-1.12.1.orig/archival/libipkg/args.c busybox-1.12.1/archival/libipkg/args.c +--- busybox-1.12.1.orig/archival/libipkg/args.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/args.c 2008-10-23 15:00:11.000000000 +0200 +@@ -0,0 +1,242 @@ ++/* args.c - parse command-line args ++ ++ Carl D. Worth ++ ++ Copyright 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2, or (at your option) ++ any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include "ipkg.h" ++#include "ipkg_message.h" ++ ++#include "args.h" ++#include "sprintf_alloc.h" ++ ++#include "libbb.h" ++ ++ ++static void print_version(void); ++ ++enum long_args_opt ++{ ++ ARGS_OPT_FORCE_DEFAULTS = 129, ++ ARGS_OPT_FORCE_DEPENDS, ++ ARGS_OPT_FORCE_OVERWRITE, ++ ARGS_OPT_FORCE_DOWNGRADE, ++ ARGS_OPT_FORCE_REINSTALL, ++ ARGS_OPT_FORCE_REMOVAL_OF_DEPENDENT_PACKAGES, ++ ARGS_OPT_FORCE_REMOVAL_OF_ESSENTIAL_PACKAGES, ++ ARGS_OPT_FORCE_SPACE, ++ ARGS_OPT_NOACTION, ++ ARGS_OPT_NODEPS, ++ ARGS_OPT_VERBOSE_WGET, ++ ARGS_OPT_VERBOSITY, ++ ARGS_OPT_MULTIPLE_PROVIDERS ++}; ++ ++int args_init(args_t *args) ++{ ++ const char *conf_file_dir; ++ ++ memset(args, 0, sizeof(args_t)); ++ ++ args->dest = ARGS_DEFAULT_DEST; ++ ++ conf_file_dir = getenv("IPKG_CONF_DIR"); ++ if (conf_file_dir == NULL || conf_file_dir[0] == '\0') { ++ conf_file_dir = ARGS_DEFAULT_CONF_FILE_DIR; ++ } ++ sprintf_alloc(&args->conf_file, "%s/%s", conf_file_dir, ++ ARGS_DEFAULT_CONF_FILE_NAME); ++ ++ args->force_defaults = ARGS_DEFAULT_FORCE_DEFAULTS; ++ args->force_depends = ARGS_DEFAULT_FORCE_DEPENDS; ++ args->force_overwrite = ARGS_DEFAULT_FORCE_OVERWRITE; ++ args->force_downgrade = ARGS_DEFAULT_FORCE_DOWNGRADE; ++ args->force_reinstall = ARGS_DEFAULT_FORCE_REINSTALL; ++ args->force_removal_of_dependent_packages = ARGS_DEFAULT_FORCE_REMOVAL_OF_DEPENDENT_PACKAGES; ++ args->force_removal_of_essential_packages = ARGS_DEFAULT_FORCE_REMOVAL_OF_ESSENTIAL_PACKAGES; ++ args->noaction = ARGS_DEFAULT_NOACTION; ++ args->nodeps = ARGS_DEFAULT_NODEPS; ++ args->verbose_wget = ARGS_DEFAULT_VERBOSE_WGET; ++ args->verbosity = ARGS_DEFAULT_VERBOSITY; ++ args->offline_root = ARGS_DEFAULT_OFFLINE_ROOT; ++ args->offline_root_pre_script_cmd = ARGS_DEFAULT_OFFLINE_ROOT_PRE_SCRIPT_CMD; ++ args->offline_root_post_script_cmd = ARGS_DEFAULT_OFFLINE_ROOT_POST_SCRIPT_CMD; ++ args->multiple_providers = 0; ++ args->nocheckfordirorfile = 0; ++ args->noreadfeedsfile = 0; ++ ++ return 1; ++} ++ ++void args_deinit(args_t *args) ++{ ++ free(args->conf_file); ++ args->conf_file = NULL; ++} ++ ++int args_parse(args_t *args, int argc, char *argv[]) ++{ ++ int c; ++ int option_index = 0; ++ int parse_err = 0; ++ static struct option long_options[] = { ++ {"query-all", 0, 0, 'A'}, ++ {"conf-file", 1, 0, 'f'}, ++ {"conf", 1, 0, 'f'}, ++ {"dest", 1, 0, 'd'}, ++ {"force-defaults", 0, 0, ARGS_OPT_FORCE_DEFAULTS}, ++ {"force_defaults", 0, 0, ARGS_OPT_FORCE_DEFAULTS}, ++ {"force-depends", 0, 0, ARGS_OPT_FORCE_DEPENDS}, ++ {"force_depends", 0, 0, ARGS_OPT_FORCE_DEPENDS}, ++ {"force-overwrite", 0, 0, ARGS_OPT_FORCE_OVERWRITE}, ++ {"force_overwrite", 0, 0, ARGS_OPT_FORCE_OVERWRITE}, ++ {"force_downgrade", 0, 0, ARGS_OPT_FORCE_DOWNGRADE}, ++ {"force-downgrade", 0, 0, ARGS_OPT_FORCE_DOWNGRADE}, ++ {"force-reinstall", 0, 0, ARGS_OPT_FORCE_REINSTALL}, ++ {"force_reinstall", 0, 0, ARGS_OPT_FORCE_REINSTALL}, ++ {"force-space", 0, 0, ARGS_OPT_FORCE_SPACE}, ++ {"force_space", 0, 0, ARGS_OPT_FORCE_SPACE}, ++ {"recursive", 0, 0, ++ ARGS_OPT_FORCE_REMOVAL_OF_DEPENDENT_PACKAGES}, ++ {"force-removal-of-dependent-packages", 0, 0, ++ ARGS_OPT_FORCE_REMOVAL_OF_DEPENDENT_PACKAGES}, ++ {"force_removal_of_dependent_packages", 0, 0, ++ ARGS_OPT_FORCE_REMOVAL_OF_DEPENDENT_PACKAGES}, ++ {"force-removal-of-essential-packages", 0, 0, ++ ARGS_OPT_FORCE_REMOVAL_OF_ESSENTIAL_PACKAGES}, ++ {"force_removal_of_essential_packages", 0, 0, ++ ARGS_OPT_FORCE_REMOVAL_OF_ESSENTIAL_PACKAGES}, ++ {"multiple-providers", 0, 0, ARGS_OPT_MULTIPLE_PROVIDERS}, ++ {"multiple_providers", 0, 0, ARGS_OPT_MULTIPLE_PROVIDERS}, ++ {"noaction", 0, 0, ARGS_OPT_NOACTION}, ++ {"nodeps", 0, 0, ARGS_OPT_NODEPS}, ++ {"offline", 1, 0, 'o'}, ++ {"offline-root", 1, 0, 'o'}, ++ {"test", 0, 0, ARGS_OPT_NOACTION}, ++ {"tmp-dir", 1, 0, 't'}, ++ {"verbose-wget", 0, 0, ARGS_OPT_VERBOSE_WGET}, ++ {"verbose_wget", 0, 0, ARGS_OPT_VERBOSE_WGET}, ++ {"verbosity", 2, 0, 'V'}, ++ {"version", 0, 0, 'v'}, ++ {0, 0, 0, 0} ++ }; ++ ++ while (1) { ++ c = getopt_long_only(argc, argv, "Ad:f:no:t:vV:", long_options, &option_index); ++ if (c == -1) ++ break; ++ ++ switch (c) { ++ case 'A': ++ args->query_all = 1; ++ break; ++ case 'd': ++ args->dest = optarg; ++ break; ++ case 'f': ++ free(args->conf_file); ++ args->conf_file = strdup(optarg); ++ break; ++ case 'o': ++ args->offline_root = optarg; ++ break; ++ case 'n': ++ args->noaction = 1; ++ break; ++ case 't': ++ args->tmp_dir = strdup(optarg); ++ break; ++ case 'v': ++ print_version(); ++ exit(0); ++ case 'V': ++ case ARGS_OPT_VERBOSITY: ++ if (optarg) ++ args->verbosity = atoi(optarg); ++ else ++ args->verbosity += 1; ++ break; ++ case ARGS_OPT_FORCE_DEFAULTS: ++ args->force_defaults = 1; ++ break; ++ case ARGS_OPT_FORCE_DEPENDS: ++ args->force_depends = 1; ++ break; ++ case ARGS_OPT_FORCE_OVERWRITE: ++ args->force_overwrite = 1; ++ break; ++ case ARGS_OPT_FORCE_DOWNGRADE: ++ args->force_downgrade = 1; ++ break; ++ case ARGS_OPT_FORCE_REINSTALL: ++ args->force_reinstall = 1; ++ break; ++ case ARGS_OPT_FORCE_REMOVAL_OF_ESSENTIAL_PACKAGES: ++ args->force_removal_of_essential_packages = 1; ++ break; ++ case ARGS_OPT_FORCE_REMOVAL_OF_DEPENDENT_PACKAGES: ++ args->force_removal_of_dependent_packages = 1; ++ break; ++ case ARGS_OPT_FORCE_SPACE: ++ args->force_space = 1; ++ break; ++ case ARGS_OPT_VERBOSE_WGET: ++ args->verbose_wget = 1; ++ break; ++ case ARGS_OPT_MULTIPLE_PROVIDERS: ++ args->multiple_providers = 1; ++ break; ++ case ARGS_OPT_NODEPS: ++ args->nodeps = 1; ++ break; ++ case ARGS_OPT_NOACTION: ++ args->noaction = 1; ++ break; ++ case ':': ++ parse_err++; ++ break; ++ case '?': ++ parse_err++; ++ break; ++ default: ++ bb_error_msg("Confusion: getopt_long returned %d\n", c); ++ } ++ } ++ ++ if (parse_err) { ++ return -parse_err; ++ } else { ++ return optind; ++ } ++} ++ ++void args_usage(const char *complaint) ++{ ++ if (complaint) { ++ bb_error_msg("%s\n", complaint); ++ } ++ print_version(); ++ bb_show_usage(); ++ exit(1); ++} ++ ++static void print_version(void) ++{ ++ bb_error_msg("version %s\n", IPKG_VERSION); ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/args.h busybox-1.12.1/archival/libipkg/args.h +--- busybox-1.12.1.orig/archival/libipkg/args.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/args.h 2008-10-23 14:59:44.000000000 +0200 +@@ -0,0 +1,72 @@ ++/* args.h - parse command-line args ++ ++ Carl D. Worth ++ ++ Copyright 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2, or (at your option) ++ any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++*/ ++ ++#ifndef ARGS_H ++#define ARGS_H ++ ++struct args ++{ ++ char *conf_file; ++ char *dest; ++ char *tmp_dir; ++ int force_defaults; ++ int force_depends; ++ int force_overwrite; ++ int force_downgrade; ++ int force_reinstall; ++ int force_removal_of_essential_packages; ++ int force_removal_of_dependent_packages; ++ int force_space; ++ int noaction; ++ int nodeps; ++ int multiple_providers; ++ int query_all; ++ int verbose_wget; ++ int verbosity; ++ int nocheckfordirorfile; ++ int noreadfeedsfile; ++ char *offline_root; ++ char *offline_root_pre_script_cmd; ++ char *offline_root_post_script_cmd; ++}; ++typedef struct args args_t; ++ ++#define ARGS_DEFAULT_CONF_FILE_DIR "/etc" ++#define ARGS_DEFAULT_CONF_FILE_NAME "ipkg.conf" ++#define ARGS_DEFAULT_DEST NULL ++#define ARGS_DEFAULT_FORCE_DEFAULTS 0 ++#define ARGS_DEFAULT_FORCE_DEPENDS 0 ++#define ARGS_DEFAULT_FORCE_OVERWRITE 0 ++#define ARGS_DEFAULT_FORCE_DOWNGRADE 0 ++#define ARGS_DEFAULT_FORCE_REINSTALL 0 ++#define ARGS_DEFAULT_FORCE_REMOVAL_OF_ESSENTIAL_PACKAGES 0 ++#define ARGS_DEFAULT_FORCE_REMOVAL_OF_DEPENDENT_PACKAGES 0 ++#define ARGS_DEFAULT_FORCE_SPACE 0 ++#define ARGS_DEFAULT_OFFLINE_ROOT NULL ++#define ARGS_DEFAULT_OFFLINE_ROOT_PRE_SCRIPT_CMD NULL ++#define ARGS_DEFAULT_OFFLINE_ROOT_POST_SCRIPT_CMD NULL ++#define ARGS_DEFAULT_NOACTION 0 ++#define ARGS_DEFAULT_NODEPS 0 ++#define ARGS_DEFAULT_VERBOSE_WGET 0 ++#define ARGS_DEFAULT_VERBOSITY 1 ++ ++int args_init(args_t *args); ++void args_deinit(args_t *args); ++int args_parse(args_t *args, int argc, char *argv[]); ++void args_usage(const char *complaint); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/conffile.c busybox-1.12.1/archival/libipkg/conffile.c +--- busybox-1.12.1.orig/archival/libipkg/conffile.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/conffile.c 2008-10-23 12:48:24.000000000 +0200 +@@ -0,0 +1,65 @@ ++/* conffile.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include ++#include ++ ++#include "libbb.h" ++#include "ipkg.h" ++#include "ipkg_message.h" ++ ++#include "conffile.h" ++#include "file_util.h" ++#include "sprintf_alloc.h" ++ ++int conffile_init(conffile_t *conffile, const char *file_name, const uint8_t *md5sum) ++{ ++ return nv_pair_init(conffile, file_name, (char *)md5sum); ++} ++ ++void conffile_deinit(conffile_t *conffile) ++{ ++ nv_pair_deinit(conffile); ++} ++ ++int conffile_has_been_modified(ipkg_conf_t *conf, conffile_t *conffile) ++{ ++ uint8_t *md5sum; ++ char *filename = conffile->name; ++ char *root_filename; ++ int ret; ++ ++ if (conffile->value == NULL) { ++ ipkg_message(conf, IPKG_NOTICE, "%s: conffile %s has no md5sum\n", __FUNCTION__, conffile->name); ++ return 1; ++ } ++ ++ root_filename = root_filename_alloc(conf, filename); ++ ++ md5sum = file_md5sum_alloc(root_filename); ++ ++ ret = strcmp((char *)md5sum, conffile->value); ++ if (ret) { ++ ipkg_message(conf, IPKG_NOTICE, "%s: conffile %s: \t\nold md5=%s \t\nnew md5=%s\n", __FUNCTION__, ++ conffile->name, md5sum, conffile->value); ++ } ++ ++ free(root_filename); ++ free(md5sum); ++ ++ return ret; ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/conffile.h busybox-1.12.1/archival/libipkg/conffile.h +--- busybox-1.12.1.orig/archival/libipkg/conffile.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/conffile.h 2008-10-23 12:40:12.000000000 +0200 +@@ -0,0 +1,30 @@ ++/* conffile.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef CONFFILE_H ++#define CONFFILE_H ++ ++#include "nv_pair.h" ++ ++typedef struct nv_pair conffile_t; ++ ++int conffile_init(conffile_t *conffile, const char *file_name, const uint8_t *md5sum); ++void conffile_deinit(conffile_t *conffile); ++int conffile_has_been_modified(struct ipkg_conf *conf, conffile_t *conffile); ++ ++#endif ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/conffile_list.c busybox-1.12.1/archival/libipkg/conffile_list.c +--- busybox-1.12.1.orig/archival/libipkg/conffile_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/conffile_list.c 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,47 @@ ++/* conffile_list.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++ ++#include "conffile_list.h" ++ ++int conffile_list_init(conffile_list_t *list) ++{ ++ return nv_pair_list_init(list); ++} ++ ++void conffile_list_deinit(conffile_list_t *list) ++{ ++ nv_pair_list_deinit(list); ++} ++ ++conffile_t *conffile_list_append(conffile_list_t *list, const char *file_name, ++ const char *md5sum) ++{ ++ return nv_pair_list_append(list, file_name, md5sum); ++} ++ ++int conffile_list_push(conffile_list_t *list, conffile_t *data) ++{ ++ return nv_pair_list_push(list, data); ++} ++ ++conffile_list_elt_t *conffile_list_pop(conffile_list_t *list) ++{ ++ return nv_pair_list_pop(list); ++} ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/conffile_list.h busybox-1.12.1/archival/libipkg/conffile_list.h +--- busybox-1.12.1.orig/archival/libipkg/conffile_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/conffile_list.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,36 @@ ++/* conffile_list.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef CONFFILE_LIST_H ++#define CONFFILE_LIST_H ++ ++#include "conffile.h" ++#include "nv_pair_list.h" ++ ++typedef struct nv_pair_list_elt conffile_list_elt_t; ++typedef struct nv_pair_list conffile_list_t; ++ ++int conffile_list_init(conffile_list_t *list); ++void conffile_list_deinit(conffile_list_t *list); ++ ++conffile_t *conffile_list_append(conffile_list_t *list, const char *name, ++ const char *root_dir); ++int conffile_list_push(conffile_list_t *list, conffile_t *data); ++conffile_list_elt_t *conffile_list_pop(conffile_list_t *list); ++ ++#endif ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/file_util.c busybox-1.12.1/archival/libipkg/file_util.c +--- busybox-1.12.1.orig/archival/libipkg/file_util.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/file_util.c 2008-10-23 12:34:37.000000000 +0200 +@@ -0,0 +1,132 @@ ++/* file_util.c - convenience routines for common stat operations ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++#include ++#include ++ ++#include "sprintf_alloc.h" ++#include "file_util.h" ++#include "libbb.h" ++#undef strlen ++ ++int file_exists(const char *file_name) ++{ ++ int err; ++ struct stat stat_buf; ++ ++ err = stat(file_name, &stat_buf); ++ if (err == 0) { ++ return 1; ++ } else { ++ return 0; ++ } ++} ++ ++int file_is_dir(const char *file_name) ++{ ++ int err; ++ struct stat stat_buf; ++ ++ err = stat(file_name, &stat_buf); ++ if (err) { ++ return 0; ++ } ++ ++ return S_ISDIR(stat_buf.st_mode); ++} ++ ++/* read a single line from a file, stopping at a newline or EOF. ++ If a newline is read, it will appear in the resulting string. ++ Return value is a malloc'ed char * which should be freed at ++ some point by the caller. ++ ++ Return value is NULL if the file is at EOF when called. ++*/ ++#define FILE_READ_LINE_BUF_SIZE 1024 ++char *file_read_line_alloc(FILE *file) ++{ ++ char buf[FILE_READ_LINE_BUF_SIZE]; ++ int buf_len; ++ char *line = NULL; ++ int line_size = 0; ++ ++ memset(buf, 0, FILE_READ_LINE_BUF_SIZE); ++ while (fgets(buf, FILE_READ_LINE_BUF_SIZE, file)) { ++ buf_len = strlen(buf); ++ if (line) { ++ line_size += buf_len; ++ line = realloc(line, line_size); ++ if (line == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ break; ++ } ++ strcat(line, buf); ++ } else { ++ line_size = buf_len + 1; ++ line = strdup(buf); ++ } ++ if (buf[buf_len - 1] == '\n') { ++ break; ++ } ++ } ++ ++ return line; ++} ++ ++int file_move(const char *src, const char *dest) ++{ ++ int err; ++ ++ err = rename(src, dest); ++ ++ if (err && errno == EXDEV) { ++ err = file_copy(src, dest); ++ unlink(src); ++ } else if (err) { ++ fprintf(stderr, "%s: ERROR: failed to rename %s to %s: %s\n", ++ __FUNCTION__, src, dest, strerror(errno)); ++ } ++ ++ return err; ++} ++ ++/* I put these here to keep libbb dependencies from creeping all over ++ the ipkg code */ ++int file_copy(const char *src, const char *dest) ++{ ++ int err; ++ ++ err = copy_file(src, dest, FILEUTILS_FORCE | FILEUTILS_PRESERVE_STATUS); ++ if (err) { ++ fprintf(stderr, "%s: ERROR: failed to copy %s to %s\n", ++ __FUNCTION__, src, dest); ++ } ++ ++ return err; ++} ++ ++int file_mkdir_hier(char *path, long mode) ++{ ++ return bb_make_directory(path, mode, FILEUTILS_RECUR); ++} ++ ++uint8_t *file_md5sum_alloc(const char *file_name) ++{ ++ return hash_file(file_name, HASH_MD5); ++} ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/file_util.h busybox-1.12.1/archival/libipkg/file_util.h +--- busybox-1.12.1.orig/archival/libipkg/file_util.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/file_util.h 2008-10-23 12:30:58.000000000 +0200 +@@ -0,0 +1,29 @@ ++/* file_util.h - convenience routines for common file operations ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef FILE_UTIL_H ++#define FILE_UTIL_H ++ ++int file_exists(const char *file_name); ++int file_is_dir(const char *file_name); ++char *file_read_line_alloc(FILE *file); ++int file_move(const char *src, const char *dest); ++int file_copy(const char *src, const char *dest); ++int file_mkdir_hier(char *path, long mode); ++uint8_t *file_md5sum_alloc(const char *file_name); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/hash_table.c busybox-1.12.1/archival/libipkg/hash_table.c +--- busybox-1.12.1.orig/archival/libipkg/hash_table.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/hash_table.c 2008-10-23 16:12:57.000000000 +0200 +@@ -0,0 +1,155 @@ ++/* hash.c - hash tables for ipkg ++ ++ Steven M. Ayer, Jamey Hicks ++ ++ Copyright (C) 2002 Compaq Computer Corporation ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include ++#include ++#include ++#include ++#include "hash_table.h" ++#include "ipkg_message.h" ++ ++ ++static int hash_index(hash_table_t *hash, const char *pkg_name); ++static int rotating(const char *key, int len, int prime); ++ ++static int hash_index(hash_table_t *hash, const char *pkg_name) ++{ ++ return rotating(pkg_name, strlen(pkg_name), hash->n_entries); ++} ++ ++static int rotating(const char *key, int len, int prime) ++{ ++ unsigned int hash, i; ++ for (hash=len, i=0; i>28)^key[i]; ++ return (hash % prime); ++} ++ ++ ++/* ++ * this is an open table keyed by strings ++ */ ++int hash_table_init(const char *name, hash_table_t *hash, int len) ++{ ++ static int primes_table[] = { ++ 379, 761, 983, 1423, 2711, 3361, 3931, 4679, 5519, 6701, 9587, ++ 19471, 23143, 33961, 46499, 49727, 99529, 0 ++ }; ++ int *picker; ++ ++ if (hash->entries != NULL) { ++ /* we have been here already */ ++ return 0; ++ } ++ ++ hash->name = name; ++ hash->entries = NULL; ++ hash->n_entries = 0; ++ hash->hash_entry_key = NULL; ++ ++ picker = primes_table; ++ while(*picker && (*picker++ < len)); ++ if(!*picker) ++ fprintf(stderr, "%s: primes table might not be big enough (! << %d)\n", __FUNCTION__, len); ++ --picker; ++ ++ hash->n_entries = *picker; ++ hash->entries = (hash_entry_t *)calloc(hash->n_entries, sizeof(hash_entry_t)); ++ if (hash->entries == NULL) { ++ fprintf(stderr, "%s: Out of memory.\n", __FUNCTION__); ++ return ENOMEM; ++ } ++ return 0; ++} ++ ++void hash_table_deinit(hash_table_t *hash) ++{ ++ free(hash->entries); ++ hash->entries = NULL; ++ hash->n_entries = 0; ++} ++ ++void *hash_table_get(hash_table_t *hash, const char *key) ++{ ++ int ndx= hash_index(hash, key); ++ hash_entry_t *hash_entry = hash->entries + ndx; ++ while (hash_entry) ++ { ++ if (hash_entry->key) ++ { ++ if (strcmp(key, hash_entry->key) == 0) { ++ // ipkg_message(NULL, IPKG_DEBUG, "Function: %s. Key found for '%s' \n", __FUNCTION__, key); ++ return hash_entry->data; ++ } ++ } ++ hash_entry = hash_entry->next; ++ } ++ return NULL; ++} ++ ++int hash_table_insert(hash_table_t *hash, const char *key, void *value) ++{ ++ int ndx= hash_index(hash, key); ++ hash_entry_t *hash_entry = hash->entries + ndx; ++ if (0) ipkg_message(NULL, IPKG_DEBUG2, "Function: %s. Inserting in hash for '%s' \n", __FUNCTION__, key); ++ if (hash_entry->key) { ++ if (strcmp(hash_entry->key, key) == 0) { ++ /* alread in table, update the value */ ++ if (0) ipkg_message(NULL, IPKG_DEBUG2, "Function: %s. Value already in hash for '%s' \n", __FUNCTION__, key); ++ hash_entry->data = value; ++ return 0; ++ } else { ++ /* ++ * if this is a collision, we have to go to the end of the ll, ++ * then add a new entry ++ * before we can hook up the value ++ */ ++ if (0) ipkg_message(NULL, IPKG_DEBUG2, "Function: %s. Value already in hash by collision for '%s' \n", __FUNCTION__, key); ++ while (hash_entry->next) ++ hash_entry = hash_entry->next; ++ hash_entry->next = (hash_entry_t *)malloc(sizeof(hash_entry_t)); ++ if (!hash_entry->next) { ++ return -ENOMEM; ++ } ++ hash_entry = hash_entry->next; ++ hash_entry->next = NULL; ++ } ++ } ++ hash->n_elements++; ++ hash_entry->key = strdup(key); ++ hash_entry->data = value; ++ ++ return 0; ++} ++ ++ ++void hash_table_foreach(hash_table_t *hash, void (*f)(const char *key, void *entry, void *data), void *data) ++{ ++ int i; ++ if (!hash || !f) ++ return; ++ ++ for (i = 0; i < hash->n_entries; i++) { ++ hash_entry_t *hash_entry = (hash->entries + i); ++ do { ++ if(hash_entry->key) { ++ f(hash_entry->key, hash_entry->data, data); ++ } ++ } while((hash_entry = hash_entry->next)); ++ } ++} ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/hash_table.h busybox-1.12.1/archival/libipkg/hash_table.h +--- busybox-1.12.1.orig/archival/libipkg/hash_table.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/hash_table.h 2008-10-23 16:13:18.000000000 +0200 +@@ -0,0 +1,44 @@ ++/* hash.h - hash tables for ipkg ++ ++ Steven M. Ayer, Jamey Hicks ++ ++ Copyright (C) 2002 Compaq Computer Corporation ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef _HASH_TABLE_H_ ++#define _HASH_TABLE_H_ ++ ++typedef struct hash_entry hash_entry_t; ++typedef struct hash_table hash_table_t; ++ ++struct hash_entry { ++ const char * key; ++ void * data; ++ struct hash_entry * next; ++}; ++ ++struct hash_table { ++ const char *name; ++ hash_entry_t * entries; ++ int n_entries; /* number of buckets */ ++ int n_elements; ++ const char * (*hash_entry_key)(void * data); ++}; ++ ++int hash_table_init(const char *name, hash_table_t *hash, int len); ++void hash_table_deinit(hash_table_t *hash); ++void *hash_table_get(hash_table_t *hash, const char *key); ++int hash_table_insert(hash_table_t *hash, const char *key, void *value); ++void hash_table_foreach(hash_table_t *hash, void (*f)(const char *key, void *entry, void *data), void *data); ++ ++#endif /* _HASH_TABLE_H_ */ +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_cmd.c busybox-1.12.1/archival/libipkg/ipkg_cmd.c +--- busybox-1.12.1.orig/archival/libipkg/ipkg_cmd.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_cmd.c 2008-10-23 15:06:37.000000000 +0200 +@@ -0,0 +1,1433 @@ ++/* ipkg_cmd.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include ++ ++#include "ipkg.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "ipkg_conf.h" ++#include "ipkg_cmd.h" ++#include "ipkg_message.h" ++#include "pkg.h" ++#include "pkg_dest.h" ++#include "pkg_parse.h" ++#include "sprintf_alloc.h" ++#include "pkg.h" ++#include "file_util.h" ++#include "str_util.h" ++#include "unarchive.h" ++ ++#include ++ ++ ++#include "ipkg_download.h" ++#include "ipkg_install.h" ++#include "ipkg_upgrade.h" ++#include "ipkg_remove.h" ++#include "ipkg_configure.h" ++#include "ipkg_message.h" ++ ++#ifdef IPKG_LIB ++#include "libipkg.h" ++static void *p_userdata = NULL; ++#endif ++ ++static int ipkg_update_cmd(ipkg_conf_t *conf); ++static int ipkg_upgrade_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_list_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_info_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_status_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_install_pending_cmd(ipkg_conf_t *conf); ++static int ipkg_install_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_list_installed_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_remove_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_purge_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_flag_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_files_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_search_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_download_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_depends_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_whatdepends_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_whatdepends_recursively_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_whatsuggests_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_whatrecommends_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_whatprovides_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_whatconflicts_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_whatreplaces_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_compare_versions_cmd(ipkg_conf_t *conf, int argc, char **argv); ++static int ipkg_print_architecture_cmd(ipkg_conf_t *conf); ++static int ipkg_configure_cmd(ipkg_conf_t *conf, int argc, char **argv); ++ ++/* XXX: CLEANUP: The usage strings should be incorporated into this ++ array for easier maintenance */ ++static ipkg_cmd_t cmds[] = { ++ {"update", 0, (ipkg_cmd_fun_t)ipkg_update_cmd}, ++ {"upgrade", 0, (ipkg_cmd_fun_t)ipkg_upgrade_cmd}, ++ {"list", 0, (ipkg_cmd_fun_t)ipkg_list_cmd}, ++ {"list_installed", 0, (ipkg_cmd_fun_t)ipkg_list_installed_cmd}, ++ {"info", 0, (ipkg_cmd_fun_t)ipkg_info_cmd}, ++ {"flag", 1, (ipkg_cmd_fun_t)ipkg_flag_cmd}, ++ {"status", 0, (ipkg_cmd_fun_t)ipkg_status_cmd}, ++ {"install_pending", 0, (ipkg_cmd_fun_t)ipkg_install_pending_cmd}, ++ {"install", 1, (ipkg_cmd_fun_t)ipkg_install_cmd}, ++ {"remove", 1, (ipkg_cmd_fun_t)ipkg_remove_cmd}, ++ {"purge", 1, (ipkg_cmd_fun_t)ipkg_purge_cmd}, ++ {"configure", 0, (ipkg_cmd_fun_t)ipkg_configure_cmd}, ++ {"files", 1, (ipkg_cmd_fun_t)ipkg_files_cmd}, ++ {"search", 1, (ipkg_cmd_fun_t)ipkg_search_cmd}, ++ {"download", 1, (ipkg_cmd_fun_t)ipkg_download_cmd}, ++ {"compare_versions", 1, (ipkg_cmd_fun_t)ipkg_compare_versions_cmd}, ++ {"compare-versions", 1, (ipkg_cmd_fun_t)ipkg_compare_versions_cmd}, ++ {"print-architecture", 0, (ipkg_cmd_fun_t)ipkg_print_architecture_cmd}, ++ {"print_architecture", 0, (ipkg_cmd_fun_t)ipkg_print_architecture_cmd}, ++ {"print-installation-architecture", 0, (ipkg_cmd_fun_t)ipkg_print_architecture_cmd}, ++ {"print_installation_architecture", 0, (ipkg_cmd_fun_t)ipkg_print_architecture_cmd}, ++ {"depends", 1, (ipkg_cmd_fun_t)ipkg_depends_cmd}, ++ {"whatdepends", 1, (ipkg_cmd_fun_t)ipkg_whatdepends_cmd}, ++ {"whatdependsrec", 1, (ipkg_cmd_fun_t)ipkg_whatdepends_recursively_cmd}, ++ {"whatrecommends", 1, (ipkg_cmd_fun_t)ipkg_whatrecommends_cmd}, ++ {"whatsuggests", 1, (ipkg_cmd_fun_t)ipkg_whatsuggests_cmd}, ++ {"whatprovides", 1, (ipkg_cmd_fun_t)ipkg_whatprovides_cmd}, ++ {"whatreplaces", 1, (ipkg_cmd_fun_t)ipkg_whatreplaces_cmd}, ++ {"whatconflicts", 1, (ipkg_cmd_fun_t)ipkg_whatconflicts_cmd}, ++}; ++ ++int ipkg_state_changed; ++static void write_status_files_if_changed(ipkg_conf_t *conf) ++{ ++ if (ipkg_state_changed && !conf->noaction) { ++ ipkg_message(conf, IPKG_INFO, ++ " writing status file\n"); ++ ipkg_conf_write_status_files(conf); ++ pkg_write_changed_filelists(conf); ++ } else { ++ ipkg_message(conf, IPKG_NOTICE, "Nothing to be done\n"); ++ } ++} ++ ++ ++static int num_cmds = sizeof(cmds) / sizeof(ipkg_cmd_t); ++ ++ipkg_cmd_t *ipkg_cmd_find(const char *name) ++{ ++ int i; ++ ipkg_cmd_t *cmd; ++ ++ for (i=0; i < num_cmds; i++) { ++ cmd = &cmds[i]; ++ if (strcmp(name, cmd->name) == 0) { ++ return cmd; ++ } ++ } ++ ++ return NULL; ++} ++ ++#ifdef IPKG_LIB ++int ipkg_cmd_exec(ipkg_cmd_t *cmd, ipkg_conf_t *conf, int argc, const char **argv, void *userdata) ++{ ++ int result; ++ p_userdata = userdata; ++ ++ ++ result = (cmd->fun)(conf, argc, argv); ++ if ( result == 0 ) { ++ ipkg_message(conf, IPKG_NOTICE, "Done.\n"); ++ } else { ++ ipkg_message(conf, IPKG_NOTICE, "An error ocurred, return value: %d.\n", result); ++ ++ } ++ if ( error_list ) { ++ reverse_error_list(&error_list); ++ ++ ipkg_message(conf, IPKG_NOTICE, "Collected errors:\n"); ++ /* Here we print the errors collected and free the list */ ++ while (error_list != NULL) { ++ ipkg_message(conf, IPKG_NOTICE, "%s",error_list->errmsg); ++ error_list = error_list->next; ++ ++ } ++ free_error_list(&error_list); ++ ++ } ++ ++ p_userdata = NULL; ++ return result; ++} ++#else ++int ipkg_cmd_exec(ipkg_cmd_t *cmd, ipkg_conf_t *conf, int argc, const char **argv) ++{ ++ return (cmd->fun)(conf, argc, argv); ++} ++#endif ++ ++static int ipkg_update_cmd(ipkg_conf_t *conf) ++{ ++ int err; ++ int failures; ++ char *lists_dir; ++ pkg_src_list_elt_t *iter; ++ pkg_src_t *src; ++ ++ ++ sprintf_alloc(&lists_dir, "%s", conf->restrict_to_default_dest ? conf->default_dest->lists_dir : conf->lists_dir); ++ ++ if (! file_is_dir(lists_dir)) { ++ if (file_exists(lists_dir)) { ++ ipkg_message(conf, IPKG_ERROR, ++ "%s: ERROR: %s exists, but is not a directory\n", ++ __FUNCTION__, lists_dir); ++ free(lists_dir); ++ return EINVAL; ++ } ++ err = file_mkdir_hier(lists_dir, 0755); ++ if (err) { ++ ipkg_message(conf, IPKG_ERROR, ++ "%s: ERROR: failed to make directory %s: %s\n", ++ __FUNCTION__, lists_dir, strerror(errno)); ++ free(lists_dir); ++ return EINVAL; ++ } ++ } ++ ++ failures = 0; ++ for (iter = conf->pkg_src_list.head; iter; iter = iter->next) { ++ char *url, *list_file_name; ++ ++ src = iter->data; ++ ++ if (src->extra_data) /* debian style? */ ++ sprintf_alloc(&url, "%s/%s/%s", src->value, src->extra_data, ++ src->gzip ? "Packages.gz" : "Packages"); ++ else ++ sprintf_alloc(&url, "%s/%s", src->value, src->gzip ? "Packages.gz" : "Packages"); ++ ++ sprintf_alloc(&list_file_name, "%s/%s", lists_dir, src->name); ++ if (src->gzip) { ++ char *tmp; ++ char *tmp_file_name; ++ FILE *in, *out; ++ ++ tmp = strdup ("/tmp/ipkg.XXXXXX"); ++ ++ if (mkdtemp (tmp) == NULL) { ++ perror ("mkdtemp"); ++ failures++; ++ continue; ++ } ++ ++ sprintf_alloc (&tmp_file_name, "%s/%s.gz", tmp, src->name); ++ err = ipkg_download(conf, url, tmp_file_name); ++ if (err == 0) { ++ ipkg_message (conf, IPKG_NOTICE, "Inflating %s\n", url); ++ in = fopen (tmp_file_name, "r"); ++ out = fopen (list_file_name, "w"); ++ if (in && out) { ++ inflate_unzip_result res; ++ inflate_unzip (&res, 0x8000, fileno(in), fileno(out)); ++ } else ++ err = 1; ++ if (in) ++ fclose (in); ++ if (out) ++ fclose (out); ++ unlink (tmp_file_name); ++ rmdir (tmp); ++ free (tmp); ++ } ++ } else ++ err = ipkg_download(conf, url, list_file_name); ++ if (err) { ++ failures++; ++ } else { ++ ipkg_message(conf, IPKG_NOTICE, ++ "Updated list of available packages in %s\n", ++ list_file_name); ++ } ++ free(url); ++ free(list_file_name); ++ } ++ free(lists_dir); ++ ++#ifdef CONFIG_CLEAR_SW_INSTALL_FLAG ++#warning here ++ /* clear SW_INSTALL on any package where state is SS_NOT_INSTALLED. ++ * this is a hack to work around poor bookkeeping in old ipkg upgrade code ++ * -Jamey 3/1/03 ++ */ ++ { ++ int i; ++ int changed = 0; ++ pkg_vec_t *available = pkg_vec_alloc(); ++ pkg_hash_fetch_available(&conf->pkg_hash, available); ++ ipkg_message(conf, IPKG_DEBUG, "Clearing SW_INSTALL for SS_NOT_INSTALLED packages.\n"); ++ for (i = 0; i < available->len; i++) { ++ pkg_t *pkg = available->pkgs[i]; ++ if (pkg->state_want == SW_INSTALL && pkg->state_status == SS_NOT_INSTALLED) { ++ ipkg_message(conf, IPKG_DEBUG, "Clearing SW_INSTALL on package %s.\n", pkg->name); ++ pkg->state_want = SW_UNKNOWN; ++ changed = 1; ++ } ++ } ++ pkg_vec_free(available); ++ if (changed) { ++ write_status_files_if_changed(conf); ++ } ++ } ++#endif ++ ++ return failures; ++} ++ ++ ++/* scan the args passed and cache the local filenames of the packages */ ++int ipkg_multiple_files_scan(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ int i; ++ int err; ++ ++ /* ++ * First scan through package names/urls ++ * For any urls, download the packages and install in database. ++ * For any files, install package info in database. ++ */ ++ for (i = 0; i < argc; i ++) { ++ char *filename = argv [i]; ++ //char *tmp = basename (tmp); ++ //int tmplen = strlen (tmp); ++ ++ //if (strcmp (tmp + (tmplen - strlen (IPKG_PKG_EXTENSION)), IPKG_PKG_EXTENSION) != 0) ++ // continue; ++ //if (strcmp (tmp + (tmplen - strlen (DPKG_PKG_EXTENSION)), DPKG_PKG_EXTENSION) != 0) ++ // continue; ++ ++ ipkg_message(conf, IPKG_DEBUG2, "Debug mfs: %s \n",filename ); ++ ++ err = ipkg_prepare_url_for_install(conf, filename, &argv[i]); ++ if (err) ++ return err; ++ } ++ return 0; ++} ++ ++struct ipkg_intercept ++{ ++ char *oldpath; ++ char *statedir; ++}; ++ ++typedef struct ipkg_intercept *ipkg_intercept_t; ++ipkg_intercept_t ipkg_prep_intercepts(void); ++ ++ipkg_intercept_t ipkg_prep_intercepts(void) ++{ ++ ipkg_intercept_t ctx; ++ char *newpath; ++ int gen; ++ ++ ctx = malloc (sizeof (*ctx)); ++ ctx->oldpath = strdup (getenv ("PATH")); ++ ++ sprintf_alloc (&newpath, "%s/ipkg/intercept:%s", IPKGLIBDIR, ctx->oldpath); ++ setenv ("PATH", newpath, 1); ++ free (newpath); ++ ++ gen = 0; ++ retry: ++ sprintf_alloc (&ctx->statedir, "/tmp/ipkg-intercept-%d-%d", getpid (), gen); ++ if (mkdir (ctx->statedir, 0770) < 0) { ++ if (errno == EEXIST) { ++ free (ctx->statedir); ++ gen++; ++ goto retry; ++ } ++ perror (ctx->statedir); ++ return NULL; ++ } ++ setenv ("IPKG_INTERCEPT_DIR", ctx->statedir, 1); ++ return ctx; ++} ++ ++int ipkg_finalize_intercepts(ipkg_intercept_t ctx); ++ ++int ipkg_finalize_intercepts(ipkg_intercept_t ctx) ++{ ++ char *cmd; ++ DIR *dir; ++ int err = 0; ++ ++ setenv ("PATH", ctx->oldpath, 1); ++ free (ctx->oldpath); ++ ++ dir = opendir (ctx->statedir); ++ if (dir) { ++ struct dirent *de; ++ while (de = readdir (dir), de != NULL) { ++ char *path; ++ ++ if (de->d_name[0] == '.') ++ continue; ++ ++ sprintf_alloc (&path, "%s/%s", ctx->statedir, de->d_name); ++ if (access (path, X_OK) == 0) { ++ if (system (path)) { ++ err = errno; ++ perror (de->d_name); ++ } ++ } ++ free (path); ++ } ++ } else ++ perror (ctx->statedir); ++ ++ sprintf_alloc (&cmd, "rm -rf %s", ctx->statedir); ++ system (cmd); ++ free (cmd); ++ ++ free (ctx->statedir); ++ free (ctx); ++ ++ return err; ++} ++ ++int ipkg_configure_packages(ipkg_conf_t *conf, char *pkg_name) ++{ ++ pkg_vec_t *all; ++ int i; ++ pkg_t *pkg; ++ ipkg_intercept_t ic; ++ int r, err = 0; ++ ++ ipkg_message(conf, IPKG_INFO, ++ "Configuring unpacked packages\n"); ++ fflush( stdout ); ++ ++ all = pkg_vec_alloc(); ++ pkg_hash_fetch_available(&conf->pkg_hash, all); ++ ++ ic = ipkg_prep_intercepts(); ++ ++ for(i = 0; i < all->len; i++) { ++ pkg = all->pkgs[i]; ++ ++ if (pkg_name && fnmatch(pkg_name, pkg->name, 0)) ++ continue; ++ ++ if (pkg->state_status == SS_UNPACKED) { ++ ipkg_message(conf, IPKG_NOTICE, ++ "Configuring %s\n", pkg->name); ++ fflush( stdout ); ++ r = ipkg_configure(conf, pkg); ++ if (r == 0) { ++ pkg->state_status = SS_INSTALLED; ++ pkg->parent->state_status = SS_INSTALLED; ++ pkg->state_flag &= ~SF_PREFER; ++ } else { ++ if (!err) ++ err = r; ++ } ++ } ++ } ++ ++ r = ipkg_finalize_intercepts (ic); ++ if (r && !err) ++ err = r; ++ ++ pkg_vec_free(all); ++ return err; ++} ++ ++static void sigint_handler(int sig) ++{ ++ signal(sig, SIG_DFL); ++ ipkg_message(NULL, IPKG_NOTICE, ++ "ipkg: interrupted. writing out status database\n"); ++ write_status_files_if_changed(global_conf); ++ exit(128 + sig); ++} ++ ++static int ipkg_install_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ int i; ++ char *arg; ++ int err=0; ++ ++ global_conf = conf; ++ signal(SIGINT, sigint_handler); ++ ++ /* ++ * Now scan through package names and install ++ */ ++ for (i=0; i < argc; i++) { ++ arg = argv[i]; ++ ++ ipkg_message(conf, IPKG_DEBUG2, "Debug install_cmd: %s \n",arg ); ++ err = ipkg_prepare_url_for_install(conf, arg, &argv[i]); ++ if (err != EINVAL && err != 0) ++ return err; ++ } ++ pkg_info_preinstall_check(conf); ++ ++ for (i=0; i < argc; i++) { ++ arg = argv[i]; ++ if (conf->multiple_providers) ++ err = ipkg_install_multi_by_name(conf, arg); ++ else{ ++ err = ipkg_install_by_name(conf, arg); ++ } ++ if (err == IPKG_PKG_HAS_NO_CANDIDATE) { ++ ipkg_message(conf, IPKG_ERROR, ++ "Cannot find package %s.\n" ++ "Check the spelling or perhaps run 'ipkg update'\n", ++ arg); ++ } ++ } ++ ++ /* recheck to verify that all dependences are satisfied */ ++ if (0) ipkg_satisfy_all_dependences(conf); ++ ++ ipkg_configure_packages(conf, NULL); ++ ++ write_status_files_if_changed(conf); ++ ++ return err; ++} ++ ++static int ipkg_upgrade_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ int i; ++ pkg_t *pkg; ++ int err; ++ ++ global_conf = conf; ++ signal(SIGINT, sigint_handler); ++ ++ if (argc) { ++ for (i=0; i < argc; i++) { ++ char *arg = argv[i]; ++ ++ err = ipkg_prepare_url_for_install(conf, arg, &arg); ++ if (err != EINVAL && err != 0) ++ return err; ++ } ++ pkg_info_preinstall_check(conf); ++ ++ for (i=0; i < argc; i++) { ++ char *arg = argv[i]; ++ if (conf->restrict_to_default_dest) { ++ pkg = pkg_hash_fetch_installed_by_name_dest(&conf->pkg_hash, ++ argv[i], ++ conf->default_dest); ++ if (pkg == NULL) { ++ ipkg_message(conf, IPKG_NOTICE, ++ "Package %s not installed in %s\n", ++ argv[i], conf->default_dest->name); ++ continue; ++ } ++ } else { ++ pkg = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, ++ argv[i]); ++ } ++ if (pkg) ++ ipkg_upgrade_pkg(conf, pkg); ++ else { ++ ipkg_install_by_name(conf, arg); ++ } ++ } ++ } else { ++ pkg_vec_t *installed = pkg_vec_alloc(); ++ ++ pkg_info_preinstall_check(conf); ++ ++ pkg_hash_fetch_all_installed(&conf->pkg_hash, installed); ++ for (i = 0; i < installed->len; i++) { ++ pkg = installed->pkgs[i]; ++ ipkg_upgrade_pkg(conf, pkg); ++ } ++ pkg_vec_free(installed); ++ } ++ ++ /* recheck to verify that all dependences are satisfied */ ++ if (0) ipkg_satisfy_all_dependences(conf); ++ ++ ipkg_configure_packages(conf, NULL); ++ ++ write_status_files_if_changed(conf); ++ ++ return 0; ++} ++ ++static int ipkg_download_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ int i, err; ++ char *arg; ++ pkg_t *pkg; ++ ++ pkg_info_preinstall_check(conf); ++ for (i = 0; i < argc; i++) { ++ arg = argv[i]; ++ ++ pkg = pkg_hash_fetch_best_installation_candidate_by_name(conf, arg); ++ if (pkg == NULL) { ++ ipkg_message(conf, IPKG_ERROR, ++ "Cannot find package %s.\n" ++ "Check the spelling or perhaps run 'ipkg update'\n", ++ arg); ++ continue; ++ } ++ ++ err = ipkg_download_pkg(conf, pkg, "."); ++ ++ if (err) { ++ ipkg_message(conf, IPKG_ERROR, ++ "Failed to download %s\n", pkg->name); ++ } else { ++ ipkg_message(conf, IPKG_NOTICE, ++ "Downloaded %s as %s\n", ++ pkg->name, pkg->local_filename); ++ } ++ } ++ ++ return 0; ++} ++ ++ ++static int ipkg_list_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ int i ; ++ pkg_vec_t *available; ++ pkg_t *pkg; ++ char desc_short[IPKG_LIST_DESCRIPTION_LENGTH]; ++ char *newline; ++ char *pkg_name = NULL; ++ char *version_str; ++ ++ if (argc > 0) { ++ pkg_name = argv[0]; ++ } ++ available = pkg_vec_alloc(); ++ pkg_hash_fetch_available(&conf->pkg_hash, available); ++ for (i=0; i < available->len; i++) { ++ pkg = available->pkgs[i]; ++ /* if we have package name or pattern and pkg does not match, then skip it */ ++ if (pkg_name && fnmatch(pkg_name, pkg->name, 0)) ++ continue; ++ if (pkg->description) { ++ strncpy(desc_short, pkg->description, IPKG_LIST_DESCRIPTION_LENGTH); ++ } else { ++ desc_short[0] = '\0'; ++ } ++ desc_short[IPKG_LIST_DESCRIPTION_LENGTH - 1] = '\0'; ++ newline = strchr(desc_short, '\n'); ++ if (newline) { ++ *newline = '\0'; ++ } ++#ifndef IPKG_LIB ++ printf("%s - %s\n", pkg->name, desc_short); ++#else ++ if (ipkg_cb_list) { ++ version_str = pkg_version_str_alloc(pkg); ++ ipkg_cb_list(pkg->name,desc_short, ++ version_str, ++ pkg->state_status, ++ p_userdata); ++ free(version_str); ++ } ++#endif ++ } ++ pkg_vec_free(available); ++ ++ return 0; ++} ++ ++ ++static int ipkg_list_installed_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ int i ; ++ pkg_vec_t *available; ++ pkg_t *pkg; ++ char desc_short[IPKG_LIST_DESCRIPTION_LENGTH]; ++ char *newline; ++ char *pkg_name = NULL; ++ char *version_str; ++ ++ if (argc > 0) { ++ pkg_name = argv[0]; ++ } ++ available = pkg_vec_alloc(); ++ pkg_hash_fetch_all_installed(&conf->pkg_hash, available); ++ for (i=0; i < available->len; i++) { ++ pkg = available->pkgs[i]; ++ /* if we have package name or pattern and pkg does not match, then skip it */ ++ if (pkg_name && fnmatch(pkg_name, pkg->name, 0)) ++ continue; ++ if (pkg->description) { ++ strncpy(desc_short, pkg->description, IPKG_LIST_DESCRIPTION_LENGTH); ++ } else { ++ desc_short[0] = '\0'; ++ } ++ desc_short[IPKG_LIST_DESCRIPTION_LENGTH - 1] = '\0'; ++ newline = strchr(desc_short, '\n'); ++ if (newline) { ++ *newline = '\0'; ++ } ++#ifndef IPKG_LIB ++ printf("%s - %s\n", pkg->name, desc_short); ++#else ++ if (ipkg_cb_list) { ++ version_str = pkg_version_str_alloc(pkg); ++ ipkg_cb_list(pkg->name,desc_short, ++ version_str, ++ pkg->state_status, ++ p_userdata); ++ free(version_str); ++ } ++#endif ++ } ++ ++ return 0; ++} ++ ++static int ipkg_info_status_cmd(ipkg_conf_t *conf, int argc, char **argv, int installed_only) ++{ ++ int i; ++ pkg_vec_t *available; ++ pkg_t *pkg; ++ char *pkg_name = NULL; ++ char **pkg_fields = NULL; ++ int n_fields = 0; ++ char *buff ; // = (char *)malloc(1); ++ ++ if (argc > 0) { ++ pkg_name = argv[0]; ++ } ++ if (argc > 1) { ++ pkg_fields = &argv[1]; ++ n_fields = argc - 1; ++ } ++ ++ available = pkg_vec_alloc(); ++ if (installed_only) ++ pkg_hash_fetch_all_installed(&conf->pkg_hash, available); ++ else ++ pkg_hash_fetch_available(&conf->pkg_hash, available); ++ for (i=0; i < available->len; i++) { ++ pkg = available->pkgs[i]; ++ if (pkg_name && fnmatch(pkg_name, pkg->name, 0)) { ++ continue; ++ } ++#ifndef IPKG_LIB ++ if (n_fields) { ++ for (j = 0; j < n_fields; j++) ++ pkg_print_field(pkg, stdout, pkg_fields[j]); ++ } else { ++ pkg_print_info(pkg, stdout); ++ } ++#else ++ ++ buff = pkg_formatted_info(pkg); ++ if ( buff ) { ++ if (ipkg_cb_status) ipkg_cb_status(pkg->name, ++ pkg->state_status, ++ buff, ++ p_userdata); ++/* ++ We should not forget that actually the pointer is allocated. ++ We need to free it :) ( Thanks florian for seeing the error ) ++*/ ++ free(buff); ++ } ++#endif ++ if (conf->verbosity > 1) { ++ conffile_list_elt_t *iter; ++ for (iter = pkg->conffiles.head; iter; iter = iter->next) { ++ conffile_t *cf = iter->data; ++ int modified = conffile_has_been_modified(conf, cf); ++ ipkg_message(conf, IPKG_NOTICE, "conffile=%s md5sum=%s modified=%d\n", ++ cf->name, cf->value, modified); ++ } ++ } ++ } ++#ifndef IPKG_LIB ++ if (buff) ++ free(buff); ++#endif ++ pkg_vec_free(available); ++ ++ return 0; ++} ++ ++static int ipkg_info_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ return ipkg_info_status_cmd(conf, argc, argv, 0); ++} ++ ++static int ipkg_status_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ return ipkg_info_status_cmd(conf, argc, argv, 1); ++} ++ ++static int ipkg_configure_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ ++ int err; ++ if (argc > 0) { ++ char *pkg_name = NULL; ++ ++ pkg_name = argv[0]; ++ ++ err = ipkg_configure_packages (conf, pkg_name); ++ ++ } else { ++ err = ipkg_configure_packages (conf, NULL); ++ } ++ ++ write_status_files_if_changed(conf); ++ ++ return err; ++} ++ ++static int ipkg_install_pending_cmd(ipkg_conf_t *conf) ++{ ++ int i, err; ++ char *globpattern; ++ glob_t globbuf; ++ ++ sprintf_alloc(&globpattern, "%s/*" IPKG_PKG_EXTENSION, conf->pending_dir); ++ err = glob(globpattern, 0, NULL, &globbuf); ++ free(globpattern); ++ if (err) { ++ return 0; ++ } ++ ++ ipkg_message(conf, IPKG_NOTICE, ++ "The following packages in %s will now be installed.\n", ++ conf->pending_dir); ++ for (i = 0; i < globbuf.gl_pathc; i++) { ++ ipkg_message(conf, IPKG_NOTICE, ++ "%s%s", i == 0 ? "" : " ", globbuf.gl_pathv[i]); ++ } ++ ipkg_message(conf, IPKG_NOTICE, "\n"); ++ for (i = 0; i < globbuf.gl_pathc; i++) { ++ err = ipkg_install_from_file(conf, globbuf.gl_pathv[i]); ++ if (err == 0) { ++ err = unlink(globbuf.gl_pathv[i]); ++ if (err) { ++ ipkg_message(conf, IPKG_ERROR, ++ "%s: ERROR: failed to unlink %s: %s\n", ++ __FUNCTION__, globbuf.gl_pathv[i], strerror(err)); ++ return err; ++ } ++ } ++ } ++ globfree(&globbuf); ++ ++ return err; ++} ++ ++static int ipkg_remove_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ int i,a,done; ++ pkg_t *pkg; ++ pkg_t *pkg_to_remove; ++ pkg_vec_t *available; ++ char *pkg_name = NULL; ++ global_conf = conf; ++ signal(SIGINT, sigint_handler); ++ ++// ENH: Add the "no pkg removed" just in case. ++ ++ done = 0; ++ ++ available = pkg_vec_alloc(); ++ pkg_info_preinstall_check(conf); ++ if ( argc > 0 ) { ++ pkg_hash_fetch_all_installed(&conf->pkg_hash, available); ++ for (i=0; i < argc; i++) { ++ pkg_name = malloc(strlen(argv[i])+2); ++ strcpy(pkg_name,argv[i]); ++ for (a=0; a < available->len; a++) { ++ pkg = available->pkgs[a]; ++ if (pkg_name && fnmatch(pkg_name, pkg->name, 0)) { ++ continue; ++ } ++ if (conf->restrict_to_default_dest) { ++ pkg_to_remove = pkg_hash_fetch_installed_by_name_dest(&conf->pkg_hash, ++ pkg->name, ++ conf->default_dest); ++ } else { ++ pkg_to_remove = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, pkg->name ); ++ } ++ ++ if (pkg == NULL) { ++ ipkg_message(conf, IPKG_ERROR, "Package %s is not installed.\n", pkg->name); ++ continue; ++ } ++ if (pkg->state_status == SS_NOT_INSTALLED) { // Added the control, so every already removed package could be skipped ++ ipkg_message(conf, IPKG_ERROR, "Package seems to be %s not installed (STATUS = NOT_INSTALLED).\n", pkg->name); ++ continue; ++ } ++ ipkg_remove_pkg(conf, pkg_to_remove,0); ++ done = 1; ++ } ++ free (pkg_name); ++ } ++ pkg_vec_free(available); ++ } else { ++ pkg_vec_t *installed_pkgs = pkg_vec_alloc(); ++ int flagged_pkg_count = 0; ++ int removed; ++ ++ pkg_hash_fetch_all_installed(&conf->pkg_hash, installed_pkgs); ++ ++ for (i = 0; i < installed_pkgs->len; i++) { ++ pkg = installed_pkgs->pkgs[i]; ++ if (pkg->state_flag & SF_USER) { ++ flagged_pkg_count++; ++ } else { ++ if (!pkg_has_installed_dependents(pkg, NULL)) ++ ipkg_message(conf, IPKG_NOTICE, "Non-user leaf package: %s\n", pkg->name); ++ } ++ } ++ if (!flagged_pkg_count) { ++ ipkg_message(conf, IPKG_NOTICE, "No packages flagged as installed by user, \n" ++ "so refusing to uninstall unflagged non-leaf packages\n"); ++ return 0; ++ } ++ ++ /* find packages not flagged SF_USER (i.e., installed to ++ * satisfy a dependence) and not having any dependents, and ++ * remove them */ ++ do { ++ removed = 0; ++ for (i = 0; i < installed_pkgs->len; i++) { ++ pkg = installed_pkgs->pkgs[i]; ++ if (!(pkg->state_flag & SF_USER) ++ && !pkg_has_installed_dependents(pkg, NULL)) { ++ removed++; ++ ipkg_message(conf, IPKG_NOTICE, "Removing non-user leaf package %s\n"); ++ ipkg_remove_pkg(conf, pkg,0); ++ done = 1; ++ } ++ } ++ } while (removed); ++ pkg_vec_free(installed_pkgs); ++ } ++ ++ if ( done == 0 ) ++ ipkg_message(conf, IPKG_NOTICE, "No packages removed.\n"); ++ ++ write_status_files_if_changed(conf); ++ return 0; ++} ++ ++static int ipkg_purge_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ int i; ++ pkg_t *pkg; ++ ++ global_conf = conf; ++ signal(SIGINT, sigint_handler); ++ ++ pkg_info_preinstall_check(conf); ++ ++ for (i=0; i < argc; i++) { ++ if (conf->restrict_to_default_dest) { ++ pkg = pkg_hash_fetch_installed_by_name_dest(&conf->pkg_hash, ++ argv[i], ++ conf->default_dest); ++ } else { ++ pkg = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, argv[i]); ++ } ++ ++ if (pkg == NULL) { ++ ipkg_message(conf, IPKG_ERROR, ++ "Package %s is not installed.\n", argv[i]); ++ continue; ++ } ++ ipkg_purge_pkg(conf, pkg); ++ } ++ ++ write_status_files_if_changed(conf); ++ return 0; ++} ++ ++static int ipkg_flag_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ int i; ++ pkg_t *pkg; ++ char *flags = argv[0]; ++ ++ global_conf = conf; ++ signal(SIGINT, sigint_handler); ++ ++ for (i=1; i < argc; i++) { ++ if (conf->restrict_to_default_dest) { ++ pkg = pkg_hash_fetch_installed_by_name_dest(&conf->pkg_hash, ++ argv[i], ++ conf->default_dest); ++ } else { ++ pkg = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, argv[i]); ++ } ++ ++ if (pkg == NULL) { ++ ipkg_message(conf, IPKG_ERROR, ++ "Package %s is not installed.\n", argv[i]); ++ continue; ++ } ++ if (( strcmp(flags,"hold")==0)||( strcmp(flags,"noprune")==0)|| ++ ( strcmp(flags,"user")==0)||( strcmp(flags,"ok")==0)) { ++ pkg->state_flag = pkg_state_flag_from_str(flags); ++ } ++/* pb_ asked this feature 03292004 */ ++/* Actually I will use only this two, but this is an open for various status */ ++ if (( strcmp(flags,"installed")==0)||( strcmp(flags,"unpacked")==0)){ ++ pkg->state_status = pkg_state_status_from_str(flags); ++ } ++ ipkg_state_changed++; ++ ipkg_message(conf, IPKG_NOTICE, ++ "Setting flags for package %s to %s\n", ++ pkg->name, flags); ++ } ++ ++ write_status_files_if_changed(conf); ++ return 0; ++} ++ ++static int ipkg_files_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ pkg_t *pkg; ++ str_list_t *installed_files; ++ str_list_elt_t *iter; ++ char *pkg_version; ++ size_t buff_len = 8192; ++ size_t used_len; ++ char *buff ; ++ ++ buff = (char *)malloc(buff_len); ++ if ( buff == NULL ) { ++ fprintf( stderr,"%s: Unable to allocate memory \n",__FUNCTION__); ++ return ENOMEM; ++ } ++ ++ if (argc < 1) { ++ return EINVAL; ++ } ++ ++ pkg = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, ++ argv[0]); ++ if (pkg == NULL) { ++ ipkg_message(conf, IPKG_ERROR, ++ "Package %s not installed.\n", argv[0]); ++ return 0; ++ } ++ ++ installed_files = pkg_get_installed_files(pkg); ++ pkg_version = pkg_version_str_alloc(pkg); ++ ++#ifndef IPKG_LIB ++ printf("Package %s (%s) is installed on %s and has the following files:\n", ++ pkg->name, pkg_version, pkg->dest->name); ++ for (iter = installed_files->head; iter; iter = iter->next) { ++ puts(iter->data); ++ } ++#else ++ if (buff) { ++ try_again: ++ used_len = snprintf(buff, buff_len, "Package %s (%s) is installed on %s and has the following files:\n", ++ pkg->name, pkg_version, pkg->dest->name) + 1; ++ if (used_len > buff_len) { ++ buff_len *= 2; ++ buff = realloc (buff, buff_len); ++ goto try_again; ++ } ++ for (iter = installed_files->head; iter; iter = iter->next) { ++ used_len += strlen (iter->data) + 1; ++ while (buff_len <= used_len) { ++ buff_len *= 2; ++ buff = realloc (buff, buff_len); ++ } ++ strncat(buff, iter->data, buff_len); ++ strncat(buff, "\n", buff_len); ++ } ++ if (ipkg_cb_list) ipkg_cb_list(pkg->name, ++ buff, ++ pkg_version_str_alloc(pkg), ++ pkg->state_status, ++ p_userdata); ++ free(buff); ++ } ++#endif ++ ++ free(pkg_version); ++ pkg_free_installed_files(pkg); ++ ++ return 0; ++} ++ ++static int ipkg_depends_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ ++ if (argc > 0) { ++ pkg_vec_t *available_pkgs = pkg_vec_alloc(); ++ const char *rel_str = "depends on"; ++ int i; ++ ++ pkg_info_preinstall_check(conf); ++ ++ if (conf->query_all) ++ pkg_hash_fetch_available(&conf->pkg_hash, available_pkgs); ++ else ++ pkg_hash_fetch_all_installed(&conf->pkg_hash, available_pkgs); ++ for (i = 0; i < argc; i++) { ++ const char *target = argv[i]; ++ int j; ++ ++ ipkg_message(conf, IPKG_ERROR, "target=%s\n", target); ++ ++ for (j = 0; j < available_pkgs->len; j++) { ++ pkg_t *pkg = available_pkgs->pkgs[j]; ++ if (fnmatch(target, pkg->name, 0) == 0) { ++ int k; ++ int count = pkg->depends_count + pkg->pre_depends_count; ++ ipkg_message(conf, IPKG_ERROR, "What %s (arch=%s) %s\n", ++ target, pkg->architecture, rel_str); ++ for (k = 0; k < count; k++) { ++ compound_depend_t *cdepend = &pkg->depends[k]; ++ int l; ++ for (l = 0; l < cdepend->possibility_count; l++) { ++ depend_t *possibility = cdepend->possibilities[l]; ++ ipkg_message(conf, IPKG_ERROR, " %s", possibility->pkg->name); ++ if (conf->verbosity > 0) { ++ // char *ver = abstract_pkg_version_str_alloc(possibility->pkg); ++ ipkg_message(conf, IPKG_NOTICE, " %s", possibility->version); ++ if (possibility->version) { ++ const char *typestr = NULL; ++ switch (possibility->constraint) { ++ case NONE: typestr = "none"; break; ++ case EARLIER: typestr = "<"; break; ++ case EARLIER_EQUAL: typestr = "<="; break; ++ case EQUAL: typestr = "="; break; ++ case LATER_EQUAL: typestr = ">="; break; ++ case LATER: typestr = ">"; break; ++ } ++ ipkg_message(conf, IPKG_NOTICE, " (%s %s)", typestr, possibility->version); ++ } ++ // free(ver); ++ } ++ ipkg_message(conf, IPKG_ERROR, "\n"); ++ } ++ } ++ } ++ } ++ } ++ pkg_vec_free(available_pkgs); ++ } ++ return 0; ++} ++ ++enum what_field_type { ++ WHATDEPENDS, ++ WHATCONFLICTS, ++ WHATPROVIDES, ++ WHATREPLACES, ++ WHATRECOMMENDS, ++ WHATSUGGESTS ++}; ++ ++static int ipkg_what_depends_conflicts_cmd(ipkg_conf_t *conf, enum what_field_type what_field_type, int recursive, int argc, char **argv) ++{ ++ ++ if (argc > 0) { ++ pkg_vec_t *available_pkgs = pkg_vec_alloc(); ++ const char *rel_str = NULL; ++ int i; ++ int changed; ++ ++ switch (what_field_type) { ++ case WHATDEPENDS: rel_str = "depends on"; break; ++ case WHATCONFLICTS: rel_str = "conflicts with"; break; ++ case WHATSUGGESTS: rel_str = "suggests"; break; ++ case WHATRECOMMENDS: rel_str = "recommends"; break; ++ case WHATPROVIDES: rel_str = "provides"; break; ++ case WHATREPLACES: rel_str = "replaces"; break; ++ } ++ ++ if (conf->query_all) ++ pkg_hash_fetch_available(&conf->pkg_hash, available_pkgs); ++ else ++ pkg_hash_fetch_all_installed(&conf->pkg_hash, available_pkgs); ++ ++ /* mark the root set */ ++ pkg_vec_clear_marks(available_pkgs); ++ ipkg_message(conf, IPKG_NOTICE, "Root set:\n"); ++ for (i = 0; i < argc; i++) { ++ const char *dependee_pattern = argv[i]; ++ pkg_vec_mark_if_matches(available_pkgs, dependee_pattern); ++ } ++ for (i = 0; i < available_pkgs->len; i++) { ++ pkg_t *pkg = available_pkgs->pkgs[i]; ++ if (pkg->state_flag & SF_MARKED) { ++ /* mark the parent (abstract) package */ ++ pkg_mark_provides(pkg); ++ ipkg_message(conf, IPKG_NOTICE, " %s\n", pkg->name); ++ } ++ } ++ ++ ipkg_message(conf, IPKG_NOTICE, "What %s root set\n", rel_str); ++ do { ++ int j; ++ changed = 0; ++ ++ for (j = 0; j < available_pkgs->len; j++) { ++ pkg_t *pkg = available_pkgs->pkgs[j]; ++ int k; ++ int count = ((what_field_type == WHATCONFLICTS) ++ ? pkg->conflicts_count ++ : pkg->pre_depends_count + pkg->depends_count + pkg->recommends_count + pkg->suggests_count); ++ /* skip this package if it is already marked */ ++ if (pkg->parent->state_flag & SF_MARKED) { ++ continue; ++ } ++ for (k = 0; k < count; k++) { ++ compound_depend_t *cdepend = ++ (what_field_type == WHATCONFLICTS) ? &pkg->conflicts[k] : &pkg->depends[k]; ++ int l; ++ for (l = 0; l < cdepend->possibility_count; l++) { ++ depend_t *possibility = cdepend->possibilities[l]; ++ if (possibility->pkg->state_flag & SF_MARKED) { ++ /* mark the depending package so we won't visit it again */ ++ pkg->state_flag |= SF_MARKED; ++ pkg_mark_provides(pkg); ++ changed++; ++ ++ ipkg_message(conf, IPKG_NOTICE, " %s", pkg->name); ++ if (conf->verbosity > 0) { ++ char *ver = pkg_version_str_alloc(pkg); ++ ipkg_message(conf, IPKG_NOTICE, " %s", ver); ++ ipkg_message(conf, IPKG_NOTICE, "\t%s %s", rel_str, possibility->pkg->name); ++ if (possibility->version) { ++ const char *typestr = NULL; ++ switch (possibility->constraint) { ++ case NONE: typestr = "none"; break; ++ case EARLIER: typestr = "<"; break; ++ case EARLIER_EQUAL: typestr = "<="; break; ++ case EQUAL: typestr = "="; break; ++ case LATER_EQUAL: typestr = ">="; break; ++ case LATER: typestr = ">"; break; ++ } ++ ipkg_message(conf, IPKG_NOTICE, " (%s %s)", typestr, possibility->version); ++ } ++ free(ver); ++ if (!pkg_dependence_satisfiable(possibility)) ++ ipkg_message(conf, IPKG_NOTICE, " unsatisfiable"); ++ } ++ ipkg_message(conf, IPKG_NOTICE, "\n"); ++ goto next_package; ++ } ++ } ++ } ++ next_package: ++ ; ++ } ++ } while (changed && recursive); ++ pkg_vec_free(available_pkgs); ++ } ++ ++ return 0; ++} ++ ++int pkg_mark_provides(pkg_t *pkg) ++{ ++ int provides_count = pkg->provides_count; ++ abstract_pkg_t **provides = pkg->provides; ++ int i; ++ pkg->parent->state_flag |= SF_MARKED; ++ for (i = 0; i < provides_count; i++) { ++ provides[i]->state_flag |= SF_MARKED; ++ } ++ return 0; ++} ++ ++static int ipkg_whatdepends_recursively_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ return ipkg_what_depends_conflicts_cmd(conf, WHATDEPENDS, 1, argc, argv); ++} ++static int ipkg_whatdepends_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ return ipkg_what_depends_conflicts_cmd(conf, WHATDEPENDS, 0, argc, argv); ++} ++ ++static int ipkg_whatsuggests_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ return ipkg_what_depends_conflicts_cmd(conf, WHATSUGGESTS, 0, argc, argv); ++} ++ ++static int ipkg_whatrecommends_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ return ipkg_what_depends_conflicts_cmd(conf, WHATRECOMMENDS, 0, argc, argv); ++} ++ ++static int ipkg_whatconflicts_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ return ipkg_what_depends_conflicts_cmd(conf, WHATCONFLICTS, 0, argc, argv); ++} ++ ++static int ipkg_what_provides_replaces_cmd(ipkg_conf_t *conf, enum what_field_type what_field_type, int argc, char **argv) ++{ ++ ++ if (argc > 0) { ++ pkg_vec_t *available_pkgs = pkg_vec_alloc(); ++ const char *rel_str = (what_field_type == WHATPROVIDES ? "provides" : "replaces"); ++ int i; ++ ++ pkg_info_preinstall_check(conf); ++ ++ if (conf->query_all) ++ pkg_hash_fetch_available(&conf->pkg_hash, available_pkgs); ++ else ++ pkg_hash_fetch_all_installed(&conf->pkg_hash, available_pkgs); ++ for (i = 0; i < argc; i++) { ++ const char *target = argv[i]; ++ int j; ++ ++ ipkg_message(conf, IPKG_ERROR, "What %s %s\n", ++ rel_str, target); ++ for (j = 0; j < available_pkgs->len; j++) { ++ pkg_t *pkg = available_pkgs->pkgs[j]; ++ int k; ++ int count = (what_field_type == WHATPROVIDES) ? pkg->provides_count : pkg->replaces_count; ++ for (k = 0; k < count; k++) { ++ abstract_pkg_t *apkg = ++ ((what_field_type == WHATPROVIDES) ++ ? pkg->provides[k] ++ : pkg->replaces[k]); ++ if (fnmatch(target, apkg->name, 0) == 0) { ++ ipkg_message(conf, IPKG_ERROR, " %s", pkg->name); ++ if (strcmp(target, apkg->name) != 0) ++ ipkg_message(conf, IPKG_ERROR, "\t%s %s\n", rel_str, apkg->name); ++ ipkg_message(conf, IPKG_ERROR, "\n"); ++ } ++ } ++ } ++ } ++ pkg_vec_free(available_pkgs); ++ } ++ return 0; ++} ++ ++static int ipkg_whatprovides_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ return ipkg_what_provides_replaces_cmd(conf, WHATPROVIDES, argc, argv); ++} ++ ++static int ipkg_whatreplaces_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ return ipkg_what_provides_replaces_cmd(conf, WHATREPLACES, argc, argv); ++} ++ ++static int ipkg_search_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ int i; ++ ++ pkg_vec_t *installed; ++ pkg_t *pkg; ++ str_list_t *installed_files; ++ str_list_elt_t *iter; ++ char *installed_file; ++ ++ if (argc < 1) { ++ return EINVAL; ++ } ++ ++ installed = pkg_vec_alloc(); ++ pkg_hash_fetch_all_installed(&conf->pkg_hash, installed); ++ ++ for (i=0; i < installed->len; i++) { ++ pkg = installed->pkgs[i]; ++ ++ installed_files = pkg_get_installed_files(pkg); ++ ++ for (iter = installed_files->head; iter; iter = iter->next) { ++ installed_file = iter->data; ++ if (fnmatch(argv[0], installed_file, 0)==0) { ++#ifndef IPKG_LIB ++ printf("%s: %s\n", pkg->name, installed_file); ++#else ++ if (ipkg_cb_list) ipkg_cb_list(pkg->name, ++ installed_file, ++ pkg_version_str_alloc(pkg), ++ pkg->state_status, p_userdata); ++#endif ++ } ++ } ++ ++ pkg_free_installed_files(pkg); ++ } ++ ++ /* XXX: CLEANUP: It's not obvious from the name of ++ pkg_hash_fetch_all_installed that we need to call ++ pkg_vec_free to avoid a memory leak. */ ++ pkg_vec_free(installed); ++ ++ return 0; ++} ++ ++static int ipkg_compare_versions_cmd(ipkg_conf_t *conf, int argc, char **argv) ++{ ++ if (argc == 3) { ++ /* this is a bit gross */ ++ struct pkg p1, p2; ++ parseVersion(&p1, argv[0]); ++ parseVersion(&p2, argv[2]); ++ return pkg_version_satisfied(&p1, &p2, argv[1]); ++ } else { ++ ipkg_message(conf, IPKG_ERROR, ++ "ipkg compare_versions \n" ++ " is one of <= >= << >> =\n"); ++ return -1; ++ } ++} ++ ++#ifndef HOST_CPU_STR ++#define HOST_CPU_STR__(X) #X ++#define HOST_CPU_STR_(X) HOST_CPU_STR__(X) ++#define HOST_CPU_STR HOST_CPU_STR_(HOST_CPU_FOO) ++#endif ++ ++static int ipkg_print_architecture_cmd(ipkg_conf_t *conf) ++{ ++ nv_pair_list_elt_t *l; ++ ++ l = conf->arch_list.head; ++ while (l) { ++ nv_pair_t *nv = l->data; ++ printf("arch %s %s\n", nv->name, nv->value); ++ l = l->next; ++ } ++ return 0; ++} ++ ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_cmd.h busybox-1.12.1/archival/libipkg/ipkg_cmd.h +--- busybox-1.12.1.orig/archival/libipkg/ipkg_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_cmd.h 2008-10-23 13:46:55.000000000 +0200 +@@ -0,0 +1,46 @@ ++/* ipkg_cmd.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef IPKG_CMD_H ++#define IPKG_CMD_H ++ ++typedef int (*ipkg_cmd_fun_t)(ipkg_conf_t *conf, int argc, const char **argv); ++ ++struct ipkg_cmd ++{ ++ const char *name; ++ int requires_args; ++ ipkg_cmd_fun_t fun; ++}; ++typedef struct ipkg_cmd ipkg_cmd_t; ++ ++ipkg_cmd_t *ipkg_cmd_find(const char *name); ++#ifdef IPKG_LIB ++int ipkg_cmd_exec(ipkg_cmd_t *cmd, ipkg_conf_t *conf, int argc, ++ const char **argv, void *userdata); ++#else ++int ipkg_cmd_exec(ipkg_cmd_t *cmd, ipkg_conf_t *conf, int argc, const char **argv); ++#endif ++int ipkg_multiple_files_scan (ipkg_conf_t *conf, int argc, char *argv[]); ++/* install any packges with state_want == SW_INSTALL */ ++int ipkg_install_wanted_packages(ipkg_conf_t *conf); ++/* ensure that all dependences are satisfied */ ++int ipkg_configure_packages(ipkg_conf_t *conf, char *pkg_name); ++ ++int pkg_mark_provides(pkg_t *pkg); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_conf.c busybox-1.12.1/archival/libipkg/ipkg_conf.c +--- busybox-1.12.1.orig/archival/libipkg/ipkg_conf.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_conf.c 2008-10-23 13:45:16.000000000 +0200 +@@ -0,0 +1,711 @@ ++/* ipkg_conf.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include ++ ++#include "ipkg.h" ++#include "ipkg_conf.h" ++ ++#include "xregex.h" ++#include "sprintf_alloc.h" ++#include "ipkg_conf.h" ++#include "ipkg_message.h" ++#include "file_util.h" ++#include "str_util.h" ++#include "xsystem.h" ++ ++ ++ipkg_conf_t *global_conf; ++ ++static int ipkg_conf_parse_file(ipkg_conf_t *conf, const char *filename, ++ pkg_src_list_t *pkg_src_list, ++ nv_pair_list_t *tmp_dest_nv_pair_list, ++ char **tmp_lists_dir); ++static int ipkg_init_options_array(const ipkg_conf_t *conf, ipkg_option_t **options); ++static int ipkg_conf_set_option(const ipkg_option_t *options, ++ const char *name, const char *value); ++static int ipkg_conf_set_default_dest(ipkg_conf_t *conf, ++ const char *default_dest_name); ++static int set_and_load_pkg_src_list(ipkg_conf_t *conf, ++ pkg_src_list_t *nv_pair_list); ++static int set_and_load_pkg_dest_list(ipkg_conf_t *conf, ++ nv_pair_list_t *nv_pair_list, char * lists_dir); ++ ++int ipkg_init_options_array(const ipkg_conf_t *conf, ipkg_option_t **options) ++{ ++ ipkg_option_t tmp[] = { ++ { "force_defaults", IPKG_OPT_TYPE_BOOL, &conf->force_defaults }, ++ { "force_depends", IPKG_OPT_TYPE_BOOL, &conf->force_depends }, ++ { "force_overwrite", IPKG_OPT_TYPE_BOOL, &conf->force_overwrite }, ++ { "force_downgrade", IPKG_OPT_TYPE_BOOL, &conf->force_downgrade }, ++ { "force_reinstall", IPKG_OPT_TYPE_BOOL, &conf->force_reinstall }, ++ { "force_space", IPKG_OPT_TYPE_BOOL, &conf->force_space }, ++ { "ftp_proxy", IPKG_OPT_TYPE_STRING, &conf->ftp_proxy }, ++ { "http_proxy", IPKG_OPT_TYPE_STRING, &conf->http_proxy }, ++ { "multiple_providers", IPKG_OPT_TYPE_BOOL, &conf->multiple_providers }, ++ { "no_proxy", IPKG_OPT_TYPE_STRING, &conf->no_proxy }, ++ { "test", IPKG_OPT_TYPE_INT, &conf->noaction }, ++ { "noaction", IPKG_OPT_TYPE_INT, &conf->noaction }, ++ { "nodeps", IPKG_OPT_TYPE_BOOL, &conf->nodeps }, ++ { "offline_root", IPKG_OPT_TYPE_STRING, &conf->offline_root }, ++ { "offline_root_post_script_cmd", IPKG_OPT_TYPE_STRING, &conf->offline_root_post_script_cmd }, ++ { "offline_root_pre_script_cmd", IPKG_OPT_TYPE_STRING, &conf->offline_root_pre_script_cmd }, ++ { "proxy_passwd", IPKG_OPT_TYPE_STRING, &conf->proxy_passwd }, ++ { "proxy_user", IPKG_OPT_TYPE_STRING, &conf->proxy_user }, ++ { "query-all", IPKG_OPT_TYPE_BOOL, &conf->query_all }, ++ { "verbose-wget", IPKG_OPT_TYPE_BOOL, &conf->verbose_wget }, ++ { "verbosity", IPKG_OPT_TYPE_BOOL, &conf->verbosity }, ++ { NULL } ++ }; ++ ++ *options = (ipkg_option_t *)malloc(sizeof(tmp)); ++ if ( options == NULL ){ ++ fprintf(stderr,"%s: Unable to allocate memory\n",__FUNCTION__); ++ return -1; ++ } ++ ++ memcpy(*options, tmp, sizeof(tmp)); ++ return 0; ++}; ++ ++static void ipkg_conf_override_string(char **conf_str, char *arg_str) ++{ ++ if (arg_str) { ++ if (*conf_str) { ++ free(*conf_str); ++ } ++ *conf_str = strdup(arg_str); ++ } ++} ++ ++static void ipkg_conf_free_string(char **conf_str) ++{ ++ if (*conf_str) { ++ free(*conf_str); ++ *conf_str = NULL; ++ } ++} ++ ++int ipkg_conf_init(ipkg_conf_t *conf, const args_t *args) ++{ ++ int err; ++ char *tmp_dir_base; ++ nv_pair_list_t tmp_dest_nv_pair_list; ++ char * lists_dir =NULL; ++ glob_t globbuf; ++ const char *etc_ipkg_conf_pattern = "/etc/ipkg/*.conf"; ++ char *pending_dir =NULL; ++ ++ memset(conf, 0, sizeof(ipkg_conf_t)); ++ ++ pkg_src_list_init(&conf->pkg_src_list); ++ ++ nv_pair_list_init(&tmp_dest_nv_pair_list); ++ pkg_dest_list_init(&conf->pkg_dest_list); ++ ++ nv_pair_list_init(&conf->arch_list); ++ ++ conf->restrict_to_default_dest = 0; ++ conf->default_dest = NULL; ++ ++ ++ if (args->tmp_dir) ++ tmp_dir_base = args->tmp_dir; ++ else ++ tmp_dir_base = getenv("TMPDIR"); ++ sprintf_alloc(&conf->tmp_dir, "%s/%s", ++ tmp_dir_base ? tmp_dir_base : IPKG_CONF_DEFAULT_TMP_DIR_BASE, ++ IPKG_CONF_TMP_DIR_SUFFIX); ++ conf->tmp_dir = mkdtemp(conf->tmp_dir); ++ if (conf->tmp_dir == NULL) { ++ fprintf(stderr, "%s: Failed to create temporary directory `%s': %s\n", ++ __FUNCTION__, conf->tmp_dir, strerror(errno)); ++ return errno; ++ } ++ ++ conf->force_depends = 0; ++ conf->force_defaults = 0; ++ conf->force_overwrite = 0; ++ conf->force_downgrade = 0; ++ conf->force_reinstall = 0; ++ conf->force_space = 0; ++ conf->force_removal_of_essential_packages = 0; ++ conf->force_removal_of_dependent_packages = 0; ++ conf->nodeps = 0; ++ conf->verbose_wget = 0; ++ conf->offline_root = NULL; ++ conf->offline_root_pre_script_cmd = NULL; ++ conf->offline_root_post_script_cmd = NULL; ++ conf->multiple_providers = 0; ++ conf->verbosity = 1; ++ conf->noaction = 0; ++ ++ conf->http_proxy = NULL; ++ conf->ftp_proxy = NULL; ++ conf->no_proxy = NULL; ++ conf->proxy_user = NULL; ++ conf->proxy_passwd = NULL; ++ ++ pkg_hash_init("pkg-hash", &conf->pkg_hash, IPKG_CONF_DEFAULT_HASH_LEN); ++ hash_table_init("file-hash", &conf->file_hash, IPKG_CONF_DEFAULT_HASH_LEN); ++ hash_table_init("obs-file-hash", &conf->obs_file_hash, IPKG_CONF_DEFAULT_HASH_LEN); ++ lists_dir=(char *)malloc(1); ++ lists_dir[0]='\0'; ++ if (args->conf_file) { ++ struct stat stat_buf; ++ err = stat(args->conf_file, &stat_buf); ++ if (err == 0) ++ if (ipkg_conf_parse_file(conf, args->conf_file, ++ &conf->pkg_src_list, &tmp_dest_nv_pair_list,&lists_dir)<0) { ++ /* Memory leakage from ipkg_conf_parse-file */ ++ return -1; ++ } ++ ++ } ++ ++ /* if (!lists_dir ){*/ ++ if (strlen(lists_dir)<=1 ){ ++ lists_dir = realloc(lists_dir,strlen(IPKG_CONF_LISTS_DIR)+2); ++ sprintf (lists_dir,"%s",IPKG_CONF_LISTS_DIR); ++ } ++ ++ if (args->offline_root) { ++ char *tmp = malloc(strlen(lists_dir) + strlen(args->offline_root) + 1); ++ sprintf_alloc(&tmp, "%s/%s",args->offline_root,lists_dir); ++ free(lists_dir); ++ lists_dir = tmp; ++ } ++ ++ pending_dir = malloc(strlen(lists_dir)+strlen("/pending")+5); ++ snprintf(pending_dir,strlen(lists_dir)+strlen("/pending") ,"%s%s",lists_dir,"/pending"); ++ ++ conf->lists_dir = strdup(lists_dir); ++ conf->pending_dir = strdup(pending_dir); ++ ++ if (args->offline_root) ++ sprintf_alloc(&etc_ipkg_conf_pattern, "%s/etc/ipkg/*.conf", args->offline_root); ++ memset(&globbuf, 0, sizeof(globbuf)); ++ err = glob(etc_ipkg_conf_pattern, 0, NULL, &globbuf); ++ if (!err) { ++ int i; ++ for (i = 0; i < globbuf.gl_pathc; i++) { ++ if (globbuf.gl_pathv[i]) ++ if ( ipkg_conf_parse_file(conf, globbuf.gl_pathv[i], ++ &conf->pkg_src_list, &tmp_dest_nv_pair_list,&lists_dir)<0) { ++ /* Memory leakage from ipkg_conf_parse-file */ ++ return -1; ++ } ++ } ++ } ++ globfree(&globbuf); ++ ++ /* if no architectures were defined, then default all, noarch, and host architecture */ ++ if (nv_pair_list_empty(&conf->arch_list)) { ++ nv_pair_list_append(&conf->arch_list, "all", "1"); ++ nv_pair_list_append(&conf->arch_list, "noarch", "1"); ++ nv_pair_list_append(&conf->arch_list, HOST_CPU_STR, "10"); ++ } ++ ++ /* Even if there is no conf file, we'll need at least one dest. */ ++ if (tmp_dest_nv_pair_list.head == NULL) { ++ nv_pair_list_append(&tmp_dest_nv_pair_list, ++ IPKG_CONF_DEFAULT_DEST_NAME, ++ IPKG_CONF_DEFAULT_DEST_ROOT_DIR); ++ } ++ ++ /* After parsing the file, set options from command-line, (so that ++ command-line arguments take precedence) */ ++ /* XXX: CLEANUP: The interaction between args.c and ipkg_conf.c ++ really needs to be cleaned up. There is so much duplication ++ right now it is ridiculous. Maybe ipkg_conf_t should just save ++ a pointer to args_t (which could then not be freed), rather ++ than duplicating every field here? */ ++ if (args->force_depends) { ++ conf->force_depends = 1; ++ } ++ if (args->force_defaults) { ++ conf->force_defaults = 1; ++ } ++ if (args->force_overwrite) { ++ conf->force_overwrite = 1; ++ } ++ if (args->force_downgrade) { ++ conf->force_downgrade = 1; ++ } ++ if (args->force_reinstall) { ++ conf->force_reinstall = 1; ++ } ++ if (args->force_removal_of_dependent_packages) { ++ conf->force_removal_of_dependent_packages = 1; ++ } ++ if (args->force_removal_of_essential_packages) { ++ conf->force_removal_of_essential_packages = 1; ++ } ++ if (args->nodeps) { ++ conf->nodeps = 1; ++ } ++ if (args->noaction) { ++ conf->noaction = 1; ++ } ++ if (args->query_all) { ++ conf->query_all = 1; ++ } ++ if (args->verbose_wget) { ++ conf->verbose_wget = 1; ++ } ++ if (args->multiple_providers) { ++ conf->multiple_providers = 1; ++ } ++ if (args->verbosity != conf->verbosity) { ++ conf->verbosity = args->verbosity; ++ } ++ ++ ipkg_conf_override_string(&conf->offline_root, ++ args->offline_root); ++ ipkg_conf_override_string(&conf->offline_root_pre_script_cmd, ++ args->offline_root_pre_script_cmd); ++ ipkg_conf_override_string(&conf->offline_root_post_script_cmd, ++ args->offline_root_post_script_cmd); ++ ++/* Pigi: added a flag to disable the checking of structures if the command does not need to ++ read anything from there. ++*/ ++ if ( !(args->nocheckfordirorfile)){ ++ /* need to run load the source list before dest list -Jamey */ ++ if ( !(args->noreadfeedsfile)) ++ set_and_load_pkg_src_list(conf, &conf->pkg_src_list); ++ ++ /* Now that we have resolved conf->offline_root, we can commit to ++ the directory names for the dests and load in all the package ++ lists. */ ++ set_and_load_pkg_dest_list(conf, &tmp_dest_nv_pair_list,lists_dir); ++ ++ if (args->dest) { ++ err = ipkg_conf_set_default_dest(conf, args->dest); ++ if (err) { ++ return err; ++ } ++ } ++ } ++ nv_pair_list_deinit(&tmp_dest_nv_pair_list); ++ free(lists_dir); ++ free(pending_dir); ++ ++ return 0; ++} ++ ++void ipkg_conf_deinit(ipkg_conf_t *conf) ++{ ++#ifdef IPKG_DEBUG_NO_TMP_CLEANUP ++#error ++ fprintf(stderr, "%s: Not cleaning up %s since ipkg compiled " ++ "with IPKG_DEBUG_NO_TMP_CLEANUP\n", ++ __FUNCTION__, conf->tmp_dir); ++#else ++ int err; ++ ++ err = rmdir(conf->tmp_dir); ++ if (err) { ++ if (errno == ENOTEMPTY) { ++ char *cmd; ++ sprintf_alloc(&cmd, "rm -fr %s\n", conf->tmp_dir); ++ err = xsystem(cmd); ++ free(cmd); ++ } ++ if (err) ++ fprintf(stderr, "WARNING: Unable to remove temporary directory: %s: %s\n", conf->tmp_dir, strerror(errno)); ++ } ++#endif /* IPKG_DEBUG_NO_TMP_CLEANUP */ ++ ++ free(conf->tmp_dir); /*XXX*/ ++ ++ pkg_src_list_deinit(&conf->pkg_src_list); ++ pkg_dest_list_deinit(&conf->pkg_dest_list); ++ nv_pair_list_deinit(&conf->arch_list); ++ if (&conf->pkg_hash) ++ pkg_hash_deinit(&conf->pkg_hash); ++ if (&conf->file_hash) ++ hash_table_deinit(&conf->file_hash); ++ if (&conf->obs_file_hash) ++ hash_table_deinit(&conf->obs_file_hash); ++ ++ ipkg_conf_free_string(&conf->offline_root); ++ ipkg_conf_free_string(&conf->offline_root_pre_script_cmd); ++ ipkg_conf_free_string(&conf->offline_root_post_script_cmd); ++ ++ if (conf->verbosity > 1) { ++ int i; ++ hash_table_t *hashes[] = { ++ &conf->pkg_hash, ++ &conf->file_hash, ++ &conf->obs_file_hash }; ++ for (i = 0; i < 3; i++) { ++ hash_table_t *hash = hashes[i]; ++ int c = 0; ++ int n_conflicts = 0; ++ int j; ++ for (j = 0; j < hash->n_entries; j++) { ++ int len = 0; ++ hash_entry_t *e = &hash->entries[j]; ++ if (e->next) ++ n_conflicts++; ++ while (e && e->key) { ++ len++; ++ e = e->next; ++ } ++ if (len > c) ++ c = len; ++ } ++ ipkg_message(conf, IPKG_DEBUG, "hash_table[%s] n_buckets=%d n_elements=%d max_conflicts=%d n_conflicts=%d\n", ++ hash->name, hash->n_entries, hash->n_elements, c, n_conflicts); ++ hash_table_deinit(hash); ++ } ++ } ++} ++ ++static int ipkg_conf_set_default_dest(ipkg_conf_t *conf, ++ const char *default_dest_name) ++{ ++ pkg_dest_list_elt_t *iter; ++ pkg_dest_t *dest; ++ ++ for (iter = conf->pkg_dest_list.head; iter; iter = iter->next) { ++ dest = iter->data; ++ if (strcmp(dest->name, default_dest_name) == 0) { ++ conf->default_dest = dest; ++ conf->restrict_to_default_dest = 1; ++ return 0; ++ } ++ } ++ ++ fprintf(stderr, "ERROR: Unknown dest name: `%s'\n", default_dest_name); ++ ++ return 1; ++} ++ ++static int set_and_load_pkg_src_list(ipkg_conf_t *conf, pkg_src_list_t *pkg_src_list) ++{ ++ pkg_src_list_elt_t *iter; ++ pkg_src_t *src; ++ char *list_file; ++ ++ for (iter = pkg_src_list->head; iter; iter = iter->next) { ++ src = iter->data; ++ if (src == NULL) { ++ continue; ++ } ++ ++ sprintf_alloc(&list_file, "%s/%s", ++ conf->restrict_to_default_dest ? conf->default_dest->lists_dir : conf->lists_dir, ++ src->name); ++ ++ if (file_exists(list_file)) { ++ pkg_hash_add_from_file(conf, list_file, src, NULL, 0); ++ } ++ free(list_file); ++ } ++ ++ return 0; ++} ++ ++static int set_and_load_pkg_dest_list(ipkg_conf_t *conf, nv_pair_list_t *nv_pair_list, char *lists_dir ) ++{ ++ nv_pair_list_elt_t *iter; ++ nv_pair_t *nv_pair; ++ pkg_dest_t *dest; ++ char *root_dir; ++ ++ for (iter = nv_pair_list->head; iter; iter = iter->next) { ++ nv_pair = iter->data; ++ ++ if (conf->offline_root) { ++ sprintf_alloc(&root_dir, "%s%s", conf->offline_root, nv_pair->value); ++ } else { ++ root_dir = strdup(nv_pair->value); ++ } ++ dest = pkg_dest_list_append(&conf->pkg_dest_list, nv_pair->name, root_dir, lists_dir); ++ free(root_dir); ++ if (dest == NULL) { ++ continue; ++ } ++ if (conf->default_dest == NULL) { ++ conf->default_dest = dest; ++ } ++ if (file_exists(dest->status_file_name)) { ++ pkg_hash_add_from_file(conf, dest->status_file_name, ++ NULL, dest, 1); ++ } ++ } ++ ++ return 0; ++} ++ ++static int ipkg_conf_parse_file(ipkg_conf_t *conf, const char *filename, ++ pkg_src_list_t *pkg_src_list, ++ nv_pair_list_t *tmp_dest_nv_pair_list, ++ char **lists_dir) ++{ ++ ipkg_option_t * options; ++ FILE *file = fopen(filename, "r"); ++ regex_t valid_line_re, comment_re; ++#define regmatch_size 12 ++ regmatch_t regmatch[regmatch_size]; ++ ++ if (ipkg_init_options_array(conf, &options)<0) ++ return ENOMEM; ++ ++ if (file == NULL) { ++ fprintf(stderr, "%s: failed to open %s: %s\n", ++ __FUNCTION__, filename, strerror(errno)); ++ free(options); ++ return errno; ++ } ++ ipkg_message(conf, IPKG_NOTICE, "loading conf file %s\n", filename); ++ ++ xregcomp(&comment_re, ++ "^[[:space:]]*(#.*|[[:space:]]*)$", ++ REG_EXTENDED); ++ xregcomp(&valid_line_re, "^[[:space:]]*(\"([^\"]*)\"|([^[:space:]]*))[[:space:]]*(\"([^\"]*)\"|([^[:space:]]*))[[:space:]]*(\"([^\"]*)\"|([^[:space:]]*))([[:space:]]+([^[:space:]]+))?[[:space:]]*$", REG_EXTENDED); ++ ++ while(1) { ++ int line_num = 0; ++ char *line; ++ char *type, *name, *value, *extra; ++ ++ line = file_read_line_alloc(file); ++ line_num++; ++ if (line == NULL) { ++ break; ++ } ++ ++ str_chomp(line); ++ ++ if (regexec(&comment_re, line, 0, 0, 0) == 0) { ++ goto NEXT_LINE; ++ } ++ ++ if (regexec(&valid_line_re, line, regmatch_size, regmatch, 0) == REG_NOMATCH) { ++ str_chomp(line); ++ fprintf(stderr, "%s:%d: Ignoring invalid line: `%s'\n", ++ filename, line_num, line); ++ goto NEXT_LINE; ++ } ++ ++ /* This has to be so ugly to deal with optional quotation marks */ ++ if (regmatch[2].rm_so > 0) { ++ type = strndup(line + regmatch[2].rm_so, ++ regmatch[2].rm_eo - regmatch[2].rm_so); ++ } else { ++ type = strndup(line + regmatch[3].rm_so, ++ regmatch[3].rm_eo - regmatch[3].rm_so); ++ } ++ if (regmatch[5].rm_so > 0) { ++ name = strndup(line + regmatch[5].rm_so, ++ regmatch[5].rm_eo - regmatch[5].rm_so); ++ } else { ++ name = strndup(line + regmatch[6].rm_so, ++ regmatch[6].rm_eo - regmatch[6].rm_so); ++ } ++ if (regmatch[8].rm_so > 0) { ++ value = strndup(line + regmatch[8].rm_so, ++ regmatch[8].rm_eo - regmatch[8].rm_so); ++ } else { ++ value = strndup(line + regmatch[9].rm_so, ++ regmatch[9].rm_eo - regmatch[9].rm_so); ++ } ++ extra = NULL; ++ if (regmatch[11].rm_so > 0) { ++ extra = strndup (line + regmatch[11].rm_so, ++ regmatch[11].rm_eo - regmatch[11].rm_so); ++ } ++ ++ /* We use the tmp_dest_nv_pair_list below instead of ++ conf->pkg_dest_list because we might encounter an ++ offline_root option later and that would invalidate the ++ directories we would have computed in ++ pkg_dest_list_init. (We do a similar thing with ++ tmp_src_nv_pair_list for sake of symmetry.) */ ++ if (strcmp(type, "option") == 0) { ++ ipkg_conf_set_option(options, name, value); ++ } else if (strcmp(type, "src") == 0) { ++ if (!nv_pair_list_find((nv_pair_list_t *)pkg_src_list, name)) { ++ pkg_src_list_append (pkg_src_list, name, value, extra, 0); ++ } else { ++ ipkg_message(conf, IPKG_ERROR, "ERROR: duplicate src declaration. Skipping:\n\t src %s %s\n", ++ name, value); ++ } ++ } else if (strcmp(type, "src/gz") == 0) { ++ if (!nv_pair_list_find((nv_pair_list_t *)pkg_src_list, name)) { ++ pkg_src_list_append (pkg_src_list, name, value, extra, 1); ++ } else { ++ ipkg_message(conf, IPKG_ERROR, "ERROR: duplicate src declaration. Skipping:\n\t src %s %s\n", ++ name, value); ++ } ++ } else if (strcmp(type, "dest") == 0) { ++ nv_pair_list_append(tmp_dest_nv_pair_list, name, value); ++ } else if (strcmp(type, "lists_dir") == 0) { ++ *lists_dir = realloc(*lists_dir,strlen(value)+1); ++ if (*lists_dir == NULL) { ++ ipkg_message(conf, IPKG_ERROR, "ERROR: Not enough memory\n"); ++ free(options); ++ return EINVAL; ++ } ++ sprintf (*lists_dir,"%s",value); ++ } else if (strcmp(type, "arch") == 0) { ++ ipkg_message(conf, IPKG_INFO, "supported arch %s priority (%s)\n", name, value); ++ if (!value) { ++ ipkg_message(conf, IPKG_NOTICE, "defaulting architecture %s priority to 10\n", name); ++ value = strdup("10"); ++ } ++ nv_pair_list_append(&conf->arch_list, strdup(name), strdup(value)); ++ } else { ++ fprintf(stderr, "WARNING: Ignoring unknown configuration " ++ "parameter: %s %s %s\n", type, name, value); ++ free(options); ++ return EINVAL; ++ } ++ ++ free(type); ++ free(name); ++ free(value); ++ if (extra) ++ free (extra); ++ ++ NEXT_LINE: ++ free(line); ++ } ++ ++ free(options); ++ regfree(&comment_re); ++ regfree(&valid_line_re); ++ fclose(file); ++ ++ return 0; ++} ++ ++static int ipkg_conf_set_option(const ipkg_option_t *options, ++ const char *name, const char *value) ++{ ++ int i = 0; ++ while (options[i].name) { ++ if (strcmp(options[i].name, name) == 0) { ++ switch (options[i].type) { ++ case IPKG_OPT_TYPE_BOOL: ++ *((int *)options[i].value) = 1; ++ return 0; ++ case IPKG_OPT_TYPE_INT: ++ if (value) { ++ *((int *)options[i].value) = atoi(value); ++ return 0; ++ } else { ++ printf("%s: Option %s need an argument\n", ++ __FUNCTION__, name); ++ return EINVAL; ++ } ++ case IPKG_OPT_TYPE_STRING: ++ if (value) { ++ *((char **)options[i].value) = strdup(value); ++ return 0; ++ } else { ++ printf("%s: Option %s need an argument\n", ++ __FUNCTION__, name); ++ return EINVAL; ++ } ++ } ++ } ++ i++; ++ } ++ ++ fprintf(stderr, "%s: Unrecognized option: %s=%s\n", ++ __FUNCTION__, name, value); ++ return EINVAL; ++} ++ ++int ipkg_conf_write_status_files(ipkg_conf_t *conf) ++{ ++ pkg_dest_list_elt_t *iter; ++ pkg_dest_t *dest; ++ pkg_vec_t *all; ++ pkg_t *pkg; ++ register int i; ++ int err; ++ ++ if (conf->noaction) ++ return 0; ++ for (iter = conf->pkg_dest_list.head; iter; iter = iter->next) { ++ dest = iter->data; ++ dest->status_file = fopen(dest->status_file_tmp_name, "w"); ++ if (dest->status_file == NULL) { ++ fprintf(stderr, "%s: Can't open status file: %s for writing: %s\n", ++ __FUNCTION__, dest->status_file_name, strerror(errno)); ++ } ++ } ++ ++ all = pkg_vec_alloc(); ++ pkg_hash_fetch_available(&conf->pkg_hash, all); ++ ++ for(i = 0; i < all->len; i++) { ++ pkg = all->pkgs[i]; ++ /* We don't need most uninstalled packages in the status file */ ++ if (pkg->state_status == SS_NOT_INSTALLED ++ && (pkg->state_want == SW_UNKNOWN ++ || pkg->state_want == SW_DEINSTALL ++ || pkg->state_want == SW_PURGE)) { ++ continue; ++ } ++ if (!pkg) { ++ fprintf(stderr, "Null package\n"); ++ } ++ if (pkg->dest == NULL) { ++ fprintf(stderr, "%s: ERROR: Can't write status for " ++ "package %s since it has a NULL dest\n", ++ __FUNCTION__, pkg->name); ++ continue; ++ } ++ if (pkg->dest->status_file) { ++ pkg_print_status(pkg, pkg->dest->status_file); ++ } ++ } ++ ++ pkg_vec_free(all); ++ ++ for (iter = conf->pkg_dest_list.head; iter; iter = iter->next) { ++ dest = iter->data; ++ if (dest->status_file) { ++ err = ferror(dest->status_file); ++ fclose(dest->status_file); ++ dest->status_file = NULL; ++ if (!err) { ++ file_move(dest->status_file_tmp_name, dest->status_file_name); ++ } else { ++ fprintf(stderr, "%s: ERROR: An error has occurred writing %s, " ++ "retaining old %s\n", __FUNCTION__, ++ dest->status_file_tmp_name, dest->status_file_name); ++ } ++ } ++ } ++ ++ return 0; ++} ++ ++ ++char *root_filename_alloc(ipkg_conf_t *conf, char *filename) ++{ ++ char *root_filename; ++ sprintf_alloc(&root_filename, "%s%s", (conf->offline_root ? conf->offline_root : ""), filename); ++ return root_filename; ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_conf.h busybox-1.12.1/archival/libipkg/ipkg_conf.h +--- busybox-1.12.1.orig/archival/libipkg/ipkg_conf.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_conf.h 2008-10-23 13:41:34.000000000 +0200 +@@ -0,0 +1,107 @@ ++/* ipkg_conf.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef IPKG_CONF_H ++#define IPKG_CONF_H ++ ++typedef struct ipkg_conf ipkg_conf_t; ++ ++#include "hash_table.h" ++#include "ipkg.h" ++#include "args.h" ++#include "pkg.h" ++#include "pkg_hash.h" ++#include "pkg_src_list.h" ++#include "pkg_dest_list.h" ++#include "nv_pair_list.h" ++ ++#define IPKG_CONF_DEFAULT_TMP_DIR_BASE "/tmp" ++#define IPKG_CONF_TMP_DIR_SUFFIX "ipkg-XXXXXX" ++#define IPKG_CONF_LISTS_DIR IPKG_STATE_DIR_PREFIX "/lists" ++#define IPKG_CONF_PENDING_DIR IPKG_STATE_DIR_PREFIX "/pending" ++ ++/* In case the config file defines no dest */ ++#define IPKG_CONF_DEFAULT_DEST_NAME "root" ++#define IPKG_CONF_DEFAULT_DEST_ROOT_DIR "/" ++ ++#define IPKG_CONF_DEFAULT_HASH_LEN 1024 ++ ++struct ipkg_conf ++{ ++ pkg_src_list_t pkg_src_list; ++ pkg_dest_list_t pkg_dest_list; ++ nv_pair_list_t arch_list; ++ ++ int restrict_to_default_dest; ++ pkg_dest_t *default_dest; ++ ++ char *tmp_dir; ++ char *lists_dir; ++ char *pending_dir; ++ ++ /* options */ ++ int force_depends; ++ int force_defaults; ++ int force_overwrite; ++ int force_downgrade; ++ int force_reinstall; ++ int force_space; ++ int force_removal_of_dependent_packages; ++ int force_removal_of_essential_packages; ++ int nodeps; /* do not follow dependences */ ++ int verbose_wget; ++ int multiple_providers; ++ char *offline_root; ++ char *offline_root_pre_script_cmd; ++ char *offline_root_post_script_cmd; ++ int query_all; ++ int verbosity; ++ int noaction; ++ ++ /* proxy options */ ++ char *http_proxy; ++ char *ftp_proxy; ++ char *no_proxy; ++ char *proxy_user; ++ char *proxy_passwd; ++ ++ hash_table_t pkg_hash; ++ hash_table_t file_hash; ++ hash_table_t obs_file_hash; ++}; ++ ++enum ipkg_option_type { ++ IPKG_OPT_TYPE_BOOL, ++ IPKG_OPT_TYPE_INT, ++ IPKG_OPT_TYPE_STRING ++}; ++typedef enum ipkg_option_type ipkg_option_type_t; ++ ++typedef struct ipkg_option ipkg_option_t; ++struct ipkg_option { ++ const char *name; ++ const ipkg_option_type_t type; ++ const void *value; ++}; ++ ++int ipkg_conf_init(ipkg_conf_t *conf, const args_t *args); ++void ipkg_conf_deinit(ipkg_conf_t *conf); ++ ++int ipkg_conf_write_status_files(ipkg_conf_t *conf); ++char *root_filename_alloc(ipkg_conf_t *conf, char *filename); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_configure.c busybox-1.12.1/archival/libipkg/ipkg_configure.c +--- busybox-1.12.1.orig/archival/libipkg/ipkg_configure.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_configure.c 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,40 @@ ++/* ipkg_configure.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++ ++#include "ipkg_configure.h" ++ ++int ipkg_configure(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ int err; ++ ++ /* DPKG_INCOMPATIBILITY: ++ dpkg actually does some conffile handling here, rather than at the ++ end of ipkg_install(). Do we care? */ ++ /* DPKG_INCOMPATIBILITY: ++ dpkg actually includes a version number to this script call */ ++ err = pkg_run_script(conf, pkg, "postinst", "configure"); ++ if (err) { ++ printf("ERROR: %s.postinst returned %d\n", pkg->name, err); ++ return err; ++ } ++ ++ ipkg_state_changed++; ++ return 0; ++} ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_configure.h busybox-1.12.1/archival/libipkg/ipkg_configure.h +--- busybox-1.12.1.orig/archival/libipkg/ipkg_configure.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_configure.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,25 @@ ++/* ipkg_configure.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef IPKG_CONFIGURE_H ++#define IPKG_CONFIGURE_H ++ ++#include "ipkg_conf.h" ++ ++int ipkg_configure(ipkg_conf_t *ipkg_conf, pkg_t *pkg); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_download.c busybox-1.12.1/archival/libipkg/ipkg_download.c +--- busybox-1.12.1.orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_download.c 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,195 @@ ++/* ipkg_download.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++#include "ipkg_download.h" ++#include "ipkg_message.h" ++ ++#include "sprintf_alloc.h" ++#include "xsystem.h" ++#include "file_util.h" ++#include "str_util.h" ++ ++int ipkg_download(ipkg_conf_t *conf, const char *src, const char *dest_file_name) ++{ ++ int err = 0; ++ ++ char *src_basec = strdup(src); ++ char *src_base = basename(src_basec); ++ char *tmp_file_location; ++ char *cmd; ++ ++ ipkg_message(conf,IPKG_NOTICE,"Downloading %s\n", src); ++ ++ fflush(stdout); ++ ++ if (str_starts_with(src, "file:")) { ++ int ret; ++ const char *file_src = src + 5; ++ ipkg_message(conf,IPKG_INFO,"Copying %s to %s...", file_src, dest_file_name); ++ ret = file_copy(src + 5, dest_file_name); ++ ipkg_message(conf,IPKG_INFO,"Done.\n"); ++ return ret; ++ } ++ ++ sprintf_alloc(&tmp_file_location, "%s/%s", conf->tmp_dir, src_base); ++ err = unlink(tmp_file_location); ++ if (err && errno != ENOENT) { ++ ipkg_message(conf,IPKG_ERROR, "%s: ERROR: failed to unlink %s: %s\n", ++ __FUNCTION__, tmp_file_location, strerror(errno)); ++ free(tmp_file_location); ++ return errno; ++ } ++ ++ if (conf->http_proxy) { ++ ipkg_message(conf,IPKG_DEBUG,"Setting environment variable: http_proxy = %s\n", conf->http_proxy); ++ setenv("http_proxy", conf->http_proxy, 1); ++ } ++ if (conf->ftp_proxy) { ++ ipkg_message(conf,IPKG_DEBUG,"Setting environment variable: ftp_proxy = %s\n", conf->ftp_proxy); ++ setenv("ftp_proxy", conf->ftp_proxy, 1); ++ } ++ if (conf->no_proxy) { ++ ipkg_message(conf,IPKG_DEBUG,"Setting environment variable: no_proxy = %s\n", conf->no_proxy); ++ setenv("no_proxy", conf->no_proxy, 1); ++ } ++ ++ /* XXX: BUG rewrite to use execvp or else busybox's internal wget -Jamey 7/23/2002 */ ++ sprintf_alloc(&cmd, "wget --passive-ftp %s %s%s %s%s %s -P %s %s", ++ (conf->http_proxy || conf->ftp_proxy) ? "--proxy=on" : "", ++ conf->proxy_user ? "--proxy-user=" : "", ++ conf->proxy_user ? conf->proxy_user : "", ++ conf->proxy_passwd ? "--proxy-passwd=" : "", ++ conf->proxy_passwd ? conf->proxy_passwd : "", ++ conf->verbose_wget ? "" : "-q", ++ conf->tmp_dir, ++ src); ++ err = xsystem(cmd); ++ if (err) { ++ if (err != -1) { ++ ipkg_message(conf,IPKG_ERROR, "%s: ERROR: Command failed with return value %d: `%s'\n", ++ __FUNCTION__, err, cmd); ++ } ++ unlink(tmp_file_location); ++ free(tmp_file_location); ++ free(src_basec); ++ free(cmd); ++ return EINVAL; ++ } ++ free(cmd); ++ ++ err = file_move(tmp_file_location, dest_file_name); ++ ++ free(tmp_file_location); ++ free(src_basec); ++ ++ if (err) { ++ return err; ++ } ++ ++ return 0; ++} ++ ++int ipkg_download_pkg(ipkg_conf_t *conf, pkg_t *pkg, const char *dir) ++{ ++ int err; ++ char *url; ++ ++ if (pkg->src == NULL) { ++ ipkg_message(conf,IPKG_ERROR, "ERROR: Package %s (parent %s) is not available from any configured src.\n", ++ pkg->name, pkg->parent->name); ++ return -1; ++ } ++ ++ sprintf_alloc(&url, "%s/%s", pkg->src->value, pkg->filename); ++ ++ /* XXX: BUG: The pkg->filename might be something like ++ "../../foo.ipk". While this is correct, and exactly what we ++ want to use to construct url above, here we actually need to ++ use just the filename part, without any directory. */ ++ sprintf_alloc(&pkg->local_filename, "%s/%s", dir, pkg->filename); ++ ++ err = ipkg_download(conf, url, pkg->local_filename); ++ free(url); ++ ++ return err; ++} ++ ++/* ++ * Downloads file from url, installs in package database, return package name. ++ */ ++int ipkg_prepare_url_for_install(ipkg_conf_t *conf, const char *url, char **namep) ++{ ++ int err = 0; ++ pkg_t *pkg; ++ pkg = pkg_new(); ++ if (pkg == NULL) ++ return ENOMEM; ++ ++ if (str_starts_with(url, "http://") ++ || str_starts_with(url, "ftp://")) { ++ char *tmp_file; ++ char *file_basec = strdup(url); ++ char *file_base = basename(file_basec); ++ ++ sprintf_alloc(&tmp_file, "%s/%s", conf->tmp_dir, file_base); ++ err = ipkg_download(conf, url, tmp_file); ++ if (err) ++ return err; ++ ++ err = pkg_init_from_file(pkg, tmp_file); ++ if (err) ++ return err; ++ pkg->local_filename = strdup(tmp_file); ++ ++ free(tmp_file); ++ free(file_basec); ++ ++ } else if (strcmp(&url[strlen(url) - 4], IPKG_PKG_EXTENSION) == 0 ++ || strcmp(&url[strlen(url) - 4], DPKG_PKG_EXTENSION) == 0) { ++ ++ err = pkg_init_from_file(pkg, url); ++ if (err) ++ return err; ++ pkg->local_filename = strdup(url); ++ ipkg_message(conf, IPKG_DEBUG2, "Package %s provided by hand (%s).\n", pkg->name,pkg->local_filename); ++ pkg->provided_by_hand = 1; ++ ++ } else { ++ pkg_deinit(pkg); ++ free(pkg); ++ return 0; ++ } ++ ++ if (!pkg->architecture) { ++ ipkg_message(conf, IPKG_ERROR, "Package %s has no Architecture defined.\n", pkg->name); ++ return -EINVAL; ++ } ++ ++ pkg->dest = conf->default_dest; ++ pkg->state_want = SW_INSTALL; ++ pkg->state_flag |= SF_PREFER; ++ pkg = hash_insert_pkg(&conf->pkg_hash, pkg, 1,conf); ++ if ( pkg == NULL ){ ++ fprintf(stderr, "%s : This should never happen. Report this Bug in bugzilla please \n ",__FUNCTION__); ++ return 0; ++ } ++ if (namep) { ++ *namep = strdup(pkg->name); ++ } ++ return 0; ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_download.h busybox-1.12.1/archival/libipkg/ipkg_download.h +--- busybox-1.12.1.orig/archival/libipkg/ipkg_download.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_download.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,30 @@ ++/* ipkg_download.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef IPKG_DOWNLOAD_H ++#define IPKG_DOWNLOAD_H ++ ++#include "ipkg_conf.h" ++ ++int ipkg_download(ipkg_conf_t *conf, const char *src, const char *dest_file_name); ++int ipkg_download_pkg(ipkg_conf_t *conf, pkg_t *pkg, const char *dir); ++/* ++ * Downloads file from url, installs in package database, return package name. ++ */ ++int ipkg_prepare_url_for_install(ipkg_conf_t *conf, const char *url, char **namep); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg.h busybox-1.12.1/archival/libipkg/ipkg.h +--- busybox-1.12.1.orig/archival/libipkg/ipkg.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg.h 2008-10-23 13:40:24.000000000 +0200 +@@ -0,0 +1,66 @@ ++/* ipkg.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef IPKG_H ++#define IPKG_H ++ ++#include "libbb.h" ++ ++#include "ipkg_includes.h" ++#include "ipkg_conf.h" ++#include "ipkg_message.h" ++ ++#define IPKG_PKG_EXTENSION ".ipk" ++#define DPKG_PKG_EXTENSION ".deb" ++ ++#define IPKG_LEGAL_PKG_NAME_CHARS "abcdefghijklmnopqrstuvwxyz0123456789.+-" ++#define IPKG_PKG_VERSION_SEP_CHAR '_' ++ ++#define IPKG_STATE_DIR_PREFIX IPKGLIBDIR"/ipkg" ++#define IPKG_LISTS_DIR_SUFFIX "lists" ++#define IPKG_INFO_DIR_SUFFIX "info" ++#define IPKG_STATUS_FILE_SUFFIX "status" ++ ++#define IPKG_BACKUP_SUFFIX "-ipkg.backup" ++ ++#define IPKG_LIST_DESCRIPTION_LENGTH 128 ++ ++#define IPKG_VERSION "1.00" ++ ++ ++enum ipkg_error { ++ IPKG_SUCCESS = 0, ++ IPKG_PKG_DEPS_UNSATISFIED, ++ IPKG_PKG_IS_ESSENTIAL, ++ IPKG_PKG_HAS_DEPENDENTS, ++ IPKG_PKG_HAS_NO_CANDIDATE ++}; ++typedef enum ipkg_error ipkg_error_t; ++ ++extern int ipkg_state_changed; ++ ++ ++struct errlist { ++ char * errmsg; ++ struct errlist * next; ++} ; ++ ++extern struct errlist* error_list; ++ ++extern ipkg_conf_t *global_conf; ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_includes.h busybox-1.12.1/archival/libipkg/ipkg_includes.h +--- busybox-1.12.1.orig/archival/libipkg/ipkg_includes.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_includes.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,79 @@ ++#ifndef IPKG_INCLUDES_H ++#define IPKG_INCLUDES_H ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_MEMORY_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_REGEX_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STDLIB_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STRINGS_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STRING_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_STAT_H 1 ++ ++/* Define to 1 if you have that is POSIX.1 compatible. */ ++#define HAVE_SYS_WAIT_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_UNISTD_H 1 ++ ++/* Define to 1 if you have the ANSI C header files. */ ++#define STDC_HEADERS 1 ++ ++ ++#include ++ ++#if STDC_HEADERS ++# include ++# include ++# include ++# include ++# include ++#else ++# if HAVE_STDLIB_H ++# include ++# endif ++#endif ++ ++#if HAVE_REGEX_H ++# include ++#endif ++ ++#if HAVE_STRING_H ++# if !STDC_HEADERS && HAVE_MEMORY_H ++# include ++# endif ++/* XXX: What's the right way to pick up GNU's strndup declaration? */ ++# if __GNUC__ ++# define __USE_GNU 1 ++# endif ++# include ++# undef __USE_GNU ++#endif ++ ++#if HAVE_STRINGS_H ++# include ++#endif ++ ++#if HAVE_SYS_STAT_H ++# include ++#endif ++ ++#if HAVE_SYS_WAIT_H ++# include ++#endif ++ ++#if HAVE_UNISTD_H ++# include ++# include ++#endif ++ ++#endif /* IPKG_INCLUDES_H */ +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_install.c busybox-1.12.1/archival/libipkg/ipkg_install.c +--- busybox-1.12.1.orig/archival/libipkg/ipkg_install.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_install.c 2008-10-23 15:07:04.000000000 +0200 +@@ -0,0 +1,1982 @@ ++/* ipkg_install.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++#include ++#include ++#include ++#include ++#include ++typedef void (*sighandler_t)(int); ++ ++#include "pkg.h" ++#include "pkg_hash.h" ++#include "pkg_extract.h" ++ ++#include "ipkg_install.h" ++#include "ipkg_configure.h" ++#include "ipkg_download.h" ++#include "ipkg_remove.h" ++ ++#include "ipkg_utils.h" ++#include "ipkg_message.h" ++ ++#include "sprintf_alloc.h" ++#include "file_util.h" ++#include "str_util.h" ++#include "xsystem.h" ++#include "user.h" ++ ++int satisfy_dependencies_for(ipkg_conf_t *conf, pkg_t *pkg); ++static int verify_pkg_installable(ipkg_conf_t *conf, pkg_t *pkg); ++static int unpack_pkg_control_files(ipkg_conf_t *conf, pkg_t *pkg); ++ ++/* ++static int prerm_upgrade_old_pkg(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); ++static int prerm_upgrade_old_pkg_unwind(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); ++static int prerm_deconfigure_conflictors(ipkg_conf_t *conf, pkg_t *pkg, pkg_vec_t *conflictors); ++static int prerm_deconfigure_conflictors_unwind(ipkg_conf_t *conf, pkg_t *pkg, pkg_vec_t *conflictors); ++static int preinst_configure_unwind(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); ++static int check_data_file_clashes_unwind(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); ++static int postrm_upgrade_old_pkg(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); ++static int remove_disappeared(ipkg_conf_t *conf, pkg_t *pkg); ++static int postrm_upgrade_old_pkg_unwind(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); ++*/ ++static int preinst_configure(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); ++static int check_data_file_clashes(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); ++static int check_data_file_clashes_change(ipkg_conf_t *conf, pkg_t *pkg); ++static int backup_modified_conffiles(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); ++static int backup_modified_conffiles_unwind(pkg_t *pkg, pkg_t *old_pkg); ++ ++static int remove_obsolesced_files(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); ++static int install_maintainer_scripts(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); ++static int install_data_files(ipkg_conf_t *conf, pkg_t *pkg); ++static int resolve_conffiles(ipkg_conf_t *conf, pkg_t *pkg); ++ ++static int cleanup_temporary_files(ipkg_conf_t *conf, pkg_t *pkg); ++ ++static int user_prefers_old_conffile(const char *file, const char *backup); ++ ++static char *backup_filename_alloc(const char *file_name); ++static int backup_make_backup(ipkg_conf_t *conf, const char *file_name); ++static int backup_exists_for(const char *file_name); ++static int backup_remove(const char *file_name); ++ ++int pkg_get_installed_replacees(pkg_t *pkg, pkg_vec_t *installed_replacees); ++int pkg_remove_installed_replacees(ipkg_conf_t *conf, pkg_vec_t *replacees); ++int pkg_remove_installed_replacees_unwind(ipkg_conf_t *conf, pkg_vec_t *replacees); ++ ++int ipkg_install_from_file(ipkg_conf_t *conf, const char *filename) ++{ ++ int err, cmp; ++ pkg_t *pkg, *old; ++ char *old_version, *new_version; ++ ++ pkg = pkg_new(); ++ if (pkg == NULL) { ++ return ENOMEM; ++ } ++ ++ err = pkg_init_from_file(pkg, filename); ++ if (err) { ++ return err; ++ } ++ ++ if (!pkg->architecture) { ++ ipkg_message(conf, IPKG_ERROR, "Package %s has no Architecture defined.\n", pkg->name); ++ return -EINVAL; ++ } ++ ++ /* XXX: CLEANUP: hash_insert_pkg has a nasty side effect of possibly ++ freeing the pkg that we pass in. It might be nice to clean this up ++ if possible. */ ++ pkg = hash_insert_pkg(&conf->pkg_hash, pkg, 1,conf); ++ old = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, pkg->name); ++ ++ pkg->local_filename = strdup(filename); ++ ++ if (old) { ++ old_version = pkg_version_str_alloc(old); ++ new_version = pkg_version_str_alloc(pkg); ++ ++ cmp = pkg_compare_versions(old, pkg); ++ if ( (conf->force_downgrade==1) && (cmp > 0) ){ /* We've been asked to allow downgrade and version is precedent */ ++ cmp = -1 ; /* then we force ipkg to downgrade */ ++ /* We need to use a value < 0 because in the 0 case we are asking to */ ++ /* reinstall, and some check could fail asking the "force-reinstall" option */ ++ } ++ if (cmp > 0) { ++ ipkg_message(conf, IPKG_NOTICE, ++ "Not downgrading package %s on %s from %s to %s.\n", ++ old->name, old->dest->name, old_version, new_version); ++ pkg->state_want = SW_DEINSTALL; ++ pkg->state_flag |= SF_OBSOLETE; ++ free(old_version); ++ free(new_version); ++ return 0; ++ } else { ++ free(old_version); ++ free(new_version); ++ } ++ } ++ ++ ipkg_message(conf, IPKG_DEBUG2,"Function: %s calling ipkg_install_pkg \n",__FUNCTION__); ++ return ipkg_install_pkg(conf, pkg,0); ++} ++ ++ipkg_error_t ipkg_install_by_name(ipkg_conf_t *conf, const char *pkg_name) ++{ ++ int cmp; ++ pkg_t *old, *new; ++ char *old_version, *new_version; ++ ++ ipkg_message(conf, IPKG_DEBUG2, " Getting old from pkg_hash_fetch \n" ); ++ old = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, pkg_name); ++ if ( old ) ++ ipkg_message(conf, IPKG_DEBUG2, " Old versions from pkg_hash_fetch %s \n", old->version ); ++ ++ ipkg_message(conf, IPKG_DEBUG2, " Getting new from pkg_hash_fetch \n" ); ++ new = pkg_hash_fetch_best_installation_candidate_by_name(conf, pkg_name); ++ if ( new ) ++ ipkg_message(conf, IPKG_DEBUG2, " New versions from pkg_hash_fetch %s \n", new->version ); ++ ++/* Pigi Basically here is broken the version stuff. ++ What's happening is that nothing provide the version to differents ++ functions, so the returned struct is always the latest. ++ That's why the install by name don't work. ++*/ ++ ipkg_message(conf, IPKG_DEBUG2, " Versions from pkg_hash_fetch in %s ", __FUNCTION__ ); ++ ++ if ( old ) ++ ipkg_message(conf, IPKG_DEBUG2, " old %s ", old->version ); ++ if ( new ) ++ ipkg_message(conf, IPKG_DEBUG2, " new %s ", new->version ); ++ ipkg_message(conf, IPKG_DEBUG2, " \n"); ++ ++ if (new == NULL) { ++ return IPKG_PKG_HAS_NO_CANDIDATE; ++ } ++ ++ new->state_flag |= SF_USER; ++ if (old) { ++ old_version = pkg_version_str_alloc(old); ++ new_version = pkg_version_str_alloc(new); ++ ++ cmp = pkg_compare_versions(old, new); ++ if ( (conf->force_downgrade==1) && (cmp > 0) ){ /* We've been asked to allow downgrade and version is precedent */ ++ ipkg_message(conf, IPKG_DEBUG, " Forcing downgrade \n"); ++ cmp = -1 ; /* then we force ipkg to downgrade */ ++ /* We need to use a value < 0 because in the 0 case we are asking to */ ++ /* reinstall, and some check could fail asking the "force-reinstall" option */ ++ } ++ ipkg_message(conf, IPKG_DEBUG, ++ "Comparing visible versions of pkg %s:" ++ "\n\t%s is installed " ++ "\n\t%s is available " ++ "\n\t%d was comparison result\n", ++ pkg_name, old_version, new_version, cmp); ++ if (cmp == 0 && !conf->force_reinstall) { ++ ipkg_message(conf, IPKG_NOTICE, ++ "Package %s (%s) installed in %s is up to date.\n", ++ old->name, old_version, old->dest->name); ++ free(old_version); ++ free(new_version); ++ return 0; ++ } else if (cmp > 0) { ++ ipkg_message(conf, IPKG_NOTICE, ++ "Not downgrading package %s on %s from %s to %s.\n", ++ old->name, old->dest->name, old_version, new_version); ++ free(old_version); ++ free(new_version); ++ return 0; ++ } else if (cmp < 0) { ++ new->dest = old->dest; ++ old->state_want = SW_DEINSTALL; /* Here probably the problem for bug 1277 */ ++ } ++ } ++ ++ /* XXX: CLEANUP: The error code of ipkg_install_by_name is really ++ supposed to be an ipkg_error_t, but ipkg_install_pkg could ++ return any kind of integer, (might be errno from a syscall, ++ etc.). This is a real mess and will need to be cleaned up if ++ anyone ever wants to make a nice libipkg. */ ++ ++ ipkg_message(conf, IPKG_DEBUG2,"Function: %s calling ipkg_install_pkg \n",__FUNCTION__); ++ return ipkg_install_pkg(conf, new,0); ++} ++ ++ipkg_error_t ipkg_install_multi_by_name(ipkg_conf_t *conf, const char *pkg_name) ++{ ++ abstract_pkg_vec_t *providers = pkg_hash_fetch_all_installation_candidates (&conf->pkg_hash, pkg_name); ++ int i; ++ ipkg_error_t err; ++ abstract_pkg_t *ppkg ; ++ ++ if (providers == NULL) ++ return IPKG_PKG_HAS_NO_CANDIDATE; ++ ++ for (i = 0; i < providers->len; i++) { ++ ppkg = abstract_pkg_vec_get(providers, i); ++ ipkg_message(conf, IPKG_DEBUG2,"Function: %s calling ipkg_install_by_name %d \n",__FUNCTION__, i); ++ err = ipkg_install_by_name(conf, ppkg->name); ++ if (err) ++ return err; ++/* XXX Maybe ppkg should be freed ? */ ++ } ++ return 0; ++} ++ ++/* ++ * Walk dependence graph starting with pkg, collect packages to be ++ * installed into pkgs_needed, in dependence order. ++ */ ++int pkg_mark_dependencies_for_installation(ipkg_conf_t *conf, pkg_t *pkg, pkg_vec_t *pkgs_needed) ++{ ++ int i, err; ++ pkg_vec_t *depends = pkg_vec_alloc(); ++ char **unresolved = NULL; ++ int ndepends; ++ ++ ndepends = pkg_hash_fetch_unsatisfied_dependencies(conf, ++ pkg, depends, ++ &unresolved); ++ ++ if (unresolved) { ++ ipkg_message(conf, IPKG_ERROR, ++ "%s: Cannot satisfy the following dependencies for %s:\n\t", ++ conf->force_depends ? "Warning" : "ERROR", pkg->name); ++ while (*unresolved) { ++ ipkg_message(conf, IPKG_ERROR, " %s", *unresolved); ++ unresolved++; ++ } ++ ipkg_message(conf, IPKG_ERROR, "\n"); ++ if (! conf->force_depends) { ++ ipkg_message(conf, IPKG_INFO, ++ "This could mean that your package list is out of date or that the packages\n" ++ "mentioned above do not yet exist (try 'ipkg update'). To proceed in spite\n" ++ "of this problem try again with the '-force-depends' option.\n"); ++ pkg_vec_free(depends); ++ return IPKG_PKG_DEPS_UNSATISFIED; ++ } ++ } ++ ++ if (ndepends <= 0) { ++ pkg_vec_free(depends); ++ return 0; ++ } ++ ++ for (i = 0; i < depends->len; i++) { ++ pkg_t *dep = depends->pkgs[i]; ++ /* The package was uninstalled when we started, but another ++ dep earlier in this loop may have depended on it and pulled ++ it in, so check first. */ ++ if ((dep->state_status != SS_INSTALLED) ++ && (dep->state_status != SS_UNPACKED) ++ && (dep->state_want != SW_INSTALL)) { ++ ++ /* Mark packages as to-be-installed */ ++ dep->state_want = SW_INSTALL; ++ ++ /* Dependencies should be installed the same place as pkg */ ++ if (dep->dest == NULL) { ++ dep->dest = pkg->dest; ++ } ++ ++ err = pkg_mark_dependencies_for_installation(conf, dep, pkgs_needed); ++ if (err) { ++ pkg_vec_free(depends); ++ return err; ++ } ++ } ++ } ++ if (pkgs_needed) ++ pkg_vec_insert(pkgs_needed, pkg); ++ ++ pkg_vec_free(depends); ++ ++ return 0; ++} ++ ++int name_mark_dependencies_for_installation(ipkg_conf_t *conf, const char *pkg_name, pkg_vec_t *pkgs_needed) ++{ ++ int cmp; ++ pkg_t *old, *new; ++ char *old_version, *new_version; ++ ++ old = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, pkg_name); ++ ++ new = pkg_hash_fetch_best_installation_candidate_by_name(conf, pkg_name); ++ if (new == NULL) { ++ return IPKG_PKG_HAS_NO_CANDIDATE; ++ } ++ if (old) { ++ old_version = pkg_version_str_alloc(old); ++ new_version = pkg_version_str_alloc(new); ++ ++ cmp = pkg_compare_versions(old, new); ++ if ( (conf->force_downgrade==1) && (cmp > 0) ){ /* We've been asked to allow downgrade and version is precedent */ ++ ipkg_message(conf, IPKG_DEBUG, " Forcing downgrade "); ++ cmp = -1 ; /* then we force ipkg to downgrade */ ++ /* We need to use a value < 0 because in the 0 case we are asking to */ ++ /* reinstall, and some check could fail asking the "force-reinstall" option */ ++ } ++ ipkg_message(conf, IPKG_DEBUG, ++ "comparing visible versions of pkg %s:" ++ "\n\t%s is installed " ++ "\n\t%s is available " ++ "\n\t%d was comparison result\n", ++ pkg_name, old_version, new_version, cmp); ++ if (cmp == 0 && !conf->force_reinstall) { ++ ipkg_message(conf, IPKG_NOTICE, ++ "Package %s (%s) installed in %s is up to date.\n", ++ old->name, old_version, old->dest->name); ++ free(old_version); ++ free(new_version); ++ return 0; ++ } else if (cmp > 0) { ++ ipkg_message(conf, IPKG_NOTICE, ++ "Not downgrading package %s on %s from %s to %s.\n", ++ old->name, old->dest->name, old_version, new_version); ++ free(old_version); ++ free(new_version); ++ return 0; ++ } else if (cmp < 0) { ++ new->dest = old->dest; ++ old->state_want = SW_DEINSTALL; ++ old->state_flag |= SF_OBSOLETE; ++ } ++ } ++ return pkg_mark_dependencies_for_installation(conf, new, pkgs_needed); ++} ++ ++ ++ ++int satisfy_dependencies_for(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ int i, err; ++ pkg_vec_t *depends = pkg_vec_alloc(); ++ pkg_t *dep; ++ char **unresolved = NULL; ++ int ndepends; ++ ++ ndepends = pkg_hash_fetch_unsatisfied_dependencies(conf, ++ pkg, depends, ++ &unresolved); ++ ++ if (unresolved) { ++ ipkg_message(conf, IPKG_ERROR, ++ "%s: Cannot satisfy the following dependencies for %s:\n\t", ++ conf->force_depends ? "Warning" : "ERROR", pkg->name); ++ while (*unresolved) { ++ ipkg_message(conf, IPKG_ERROR, " %s", *unresolved); ++ unresolved++; ++ } ++ ipkg_message(conf, IPKG_ERROR, "\n"); ++ if (! conf->force_depends) { ++ ipkg_message(conf, IPKG_INFO, ++ "This could mean that your package list is out of date or that the packages\n" ++ "mentioned above do not yet exist (try 'ipkg update'). To proceed in spite\n" ++ "of this problem try again with the '-force-depends' option.\n"); ++ pkg_vec_free(depends); ++ return IPKG_PKG_DEPS_UNSATISFIED; ++ } ++ } ++ ++ if (ndepends <= 0) { ++ return 0; ++ } ++ ++ /* Mark packages as to-be-installed */ ++ for (i=0; i < depends->len; i++) { ++ /* Dependencies should be installed the same place as pkg */ ++ if (depends->pkgs[i]->dest == NULL) { ++ depends->pkgs[i]->dest = pkg->dest; ++ } ++ depends->pkgs[i]->state_want = SW_INSTALL; ++ } ++ ++ for (i = 0; i < depends->len; i++) { ++ dep = depends->pkgs[i]; ++ /* The package was uninstalled when we started, but another ++ dep earlier in this loop may have depended on it and pulled ++ it in, so check first. */ ++ if ((dep->state_status != SS_INSTALLED) ++ && (dep->state_status != SS_UNPACKED)) { ++ ipkg_message(conf, IPKG_DEBUG2,"Function: %s calling ipkg_install_pkg \n",__FUNCTION__); ++ err = ipkg_install_pkg(conf, dep,0); ++ if (err) { ++ pkg_vec_free(depends); ++ return err; ++ } ++ } ++ } ++ ++ pkg_vec_free(depends); ++ ++ return 0; ++} ++ ++ ++/* check all packages have their dependences satisfied, e.g., in case an upgraded package split */ ++int ipkg_satisfy_all_dependences(ipkg_conf_t *conf) ++{ ++ if (conf->nodeps == 0) { ++ int i; ++ pkg_vec_t *installed = pkg_vec_alloc(); ++ pkg_hash_fetch_all_installed(&conf->pkg_hash, installed); ++ for (i = 0; i < installed->len; i++) { ++ pkg_t *pkg = installed->pkgs[i]; ++ satisfy_dependencies_for(conf, pkg); ++ } ++ pkg_vec_free(installed); ++ } ++ return 0; ++} ++ ++ ++ ++static int check_conflicts_for(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ int i; ++ pkg_vec_t *conflicts = NULL; ++ int level; ++ const char *prefix; ++ if (conf->force_depends) { ++ level = IPKG_NOTICE; ++ prefix = "Warning"; ++ } else { ++ level = IPKG_ERROR; ++ prefix = "ERROR"; ++ } ++ ++ if (!conf->force_depends) ++ conflicts = (pkg_vec_t *)pkg_hash_fetch_conflicts(pkg); ++ ++ if (conflicts) { ++ ipkg_message(conf, level, ++ "%s: The following packages conflict with %s:\n\t", prefix, pkg->name); ++ i = 0; ++ while (i < conflicts->len) ++ ipkg_message(conf, level, " %s", conflicts->pkgs[i++]->name); ++ ipkg_message(conf, level, "\n"); ++ pkg_vec_free(conflicts); ++ return IPKG_PKG_DEPS_UNSATISFIED; ++ } ++ return 0; ++} ++ ++static int update_file_ownership(ipkg_conf_t *conf, pkg_t *new_pkg, pkg_t *old_pkg) ++{ ++ str_list_t *new_list = pkg_get_installed_files(new_pkg); ++ str_list_elt_t *iter; ++ ++ for (iter = new_list->head; iter; iter = iter->next) { ++ char *new_file = iter->data; ++ pkg_t *owner = file_hash_get_file_owner(conf, new_file); ++ if (!new_file) ++ ipkg_message(conf, IPKG_ERROR, "Null new_file for new_pkg=%s\n", new_pkg->name); ++ if (!owner || (owner == old_pkg)) ++ file_hash_set_file_owner(conf, new_file, new_pkg); ++ } ++ if (old_pkg) { ++ str_list_t *old_list = pkg_get_installed_files(old_pkg); ++ for (iter = old_list->head; iter; iter = iter->next) { ++ char *old_file = iter->data; ++ pkg_t *owner = file_hash_get_file_owner(conf, old_file); ++ if (owner == old_pkg) { ++ /* obsolete */ ++ hash_table_insert(&conf->obs_file_hash, old_file, old_pkg); ++ } ++ } ++ } ++ return 0; ++} ++ ++static int verify_pkg_installable(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ /* XXX: FEATURE: Anything else needed here? Maybe a check on free space? */ ++ ++ /* sma 6.20.02: yup; here's the first bit */ ++ /* ++ * XXX: BUG easy for cworth ++ * 1) please point the call below to the correct current root destination ++ * 2) we need to resolve how to check the required space for a pending pkg, ++ * my diddling with the .ipk file size below isn't going to cut it. ++ * 3) return a proper error code instead of 1 ++ */ ++ int comp_size, blocks_available; ++ ++ if (!conf->force_space && pkg->installed_size != NULL) { ++ blocks_available = get_available_blocks(conf->default_dest->root_dir); ++ ++ comp_size = strtoul(pkg->installed_size, NULL, 0); ++ /* round up a blocks count without doing fancy-but-slow casting jazz */ ++ comp_size = (int)((comp_size + 1023) / 1024); ++ ++ if (comp_size >= blocks_available) { ++ ipkg_message(conf, IPKG_ERROR, ++ "Only have %d available blocks on filesystem %s, pkg %s needs %d\n", ++ blocks_available, conf->default_dest->root_dir, pkg->name, comp_size); ++ return ENOSPC; ++ } ++ } ++ return 0; ++} ++ ++static int unpack_pkg_control_files(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ int err; ++ char *conffiles_file_name; ++ char *root_dir; ++ FILE *conffiles_file; ++ ++ sprintf_alloc(&pkg->tmp_unpack_dir, "%s/%s-XXXXXX", conf->tmp_dir, pkg->name); ++ ++ pkg->tmp_unpack_dir = mkdtemp(pkg->tmp_unpack_dir); ++ if (pkg->tmp_unpack_dir == NULL) { ++ ipkg_message(conf, IPKG_ERROR, ++ "%s: Failed to create temporary directory '%s': %s\n", ++ __FUNCTION__, pkg->tmp_unpack_dir, strerror(errno)); ++ return errno; ++ } ++ ++ err = pkg_extract_control_files_to_dir(pkg, pkg->tmp_unpack_dir); ++ if (err) { ++ return err; ++ } ++ ++ /* XXX: CLEANUP: There might be a cleaner place to read in the ++ conffiles. Seems like I should be able to get everything to go ++ through pkg_init_from_file. If so, maybe it would make sense to ++ move all of unpack_pkg_control_files to that function. */ ++ ++ /* Don't need to re-read conffiles if we already have it */ ++ if (pkg->conffiles.head) { ++ return 0; ++ } ++ ++ sprintf_alloc(&conffiles_file_name, "%s/conffiles", pkg->tmp_unpack_dir); ++ if (! file_exists(conffiles_file_name)) { ++ free(conffiles_file_name); ++ return 0; ++ } ++ ++ conffiles_file = fopen(conffiles_file_name, "r"); ++ if (conffiles_file == NULL) { ++ fprintf(stderr, "%s: failed to open %s: %s\n", ++ __FUNCTION__, conffiles_file_name, strerror(errno)); ++ free(conffiles_file_name); ++ return errno; ++ } ++ free(conffiles_file_name); ++ ++ while (1) { ++ char *cf_name; ++ char *cf_name_in_dest; ++ ++ cf_name = file_read_line_alloc(conffiles_file); ++ if (cf_name == NULL) { ++ break; ++ } ++ str_chomp(cf_name); ++ if (cf_name[0] == '\0') { ++ continue; ++ } ++ ++ /* Prepend dest->root_dir to conffile name. ++ Take pains to avoid multiple slashes. */ ++ root_dir = pkg->dest->root_dir; ++ if (conf->offline_root) ++ /* skip the offline_root prefix */ ++ root_dir = pkg->dest->root_dir + strlen(conf->offline_root); ++ sprintf_alloc(&cf_name_in_dest, "%s%s", root_dir, ++ cf_name[0] == '/' ? (cf_name + 1) : cf_name); ++ ++ /* Can't get an md5sum now, (file isn't extracted yet). ++ We'll wait until resolve_conffiles */ ++ conffile_list_append(&pkg->conffiles, cf_name_in_dest, NULL); ++ ++ free(cf_name); ++ free(cf_name_in_dest); ++ } ++ ++ fclose(conffiles_file); ++ ++ return 0; ++} ++ ++/* returns number of installed replacees */ ++int pkg_get_installed_replacees(pkg_t *pkg, pkg_vec_t *installed_replacees) ++{ ++ abstract_pkg_t **replaces = pkg->replaces; ++ int replaces_count = pkg->replaces_count; ++ int i, j; ++ for (i = 0; i < replaces_count; i++) { ++ abstract_pkg_t *ab_pkg = replaces[i]; ++ pkg_vec_t *pkg_vec = ab_pkg->pkgs; ++ if (pkg_vec) { ++ for (j = 0; j < pkg_vec->len; j++) { ++ pkg_t *replacee = pkg_vec->pkgs[j]; ++ if (!pkg_conflicts(pkg, replacee)) ++ continue; ++ if (replacee->state_status == SS_INSTALLED) { ++ pkg_vec_insert(installed_replacees, replacee); ++ } ++ } ++ } ++ } ++ return installed_replacees->len; ++} ++ ++int pkg_remove_installed_replacees(ipkg_conf_t *conf, pkg_vec_t *replacees) ++{ ++ int i; ++ int replaces_count = replacees->len; ++ for (i = 0; i < replaces_count; i++) { ++ pkg_t *replacee = replacees->pkgs[i]; ++ int err; ++ replacee->state_flag |= SF_REPLACE; /* flag it so remove won't complain */ ++ err = ipkg_remove_pkg(conf, replacee,0); ++ if (err) ++ return err; ++ } ++ return 0; ++} ++ ++/* to unwind the removal: make sure they are installed */ ++int pkg_remove_installed_replacees_unwind(ipkg_conf_t *conf, pkg_vec_t *replacees) ++{ ++ int i, err; ++ int replaces_count = replacees->len; ++ for (i = 0; i < replaces_count; i++) { ++ pkg_t *replacee = replacees->pkgs[i]; ++ if (replacee->state_status != SS_INSTALLED) { ++ ipkg_message(conf, IPKG_DEBUG2,"Function: %s calling ipkg_install_pkg \n",__FUNCTION__); ++ err = ipkg_install_pkg(conf, replacee,0); ++ if (err) ++ return err; ++ } ++ } ++ return 0; ++} ++ ++int caught_sigint = 0; ++static void ipkg_install_pkg_sigint_handler(int sig) ++{ ++ caught_sigint = sig; ++} ++ ++/* compares versions of pkg and old_pkg, returns 0 if OK to proceed with installation of pkg, 1 otherwise */ ++static int ipkg_install_check_downgrade(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg, int message) ++{ ++ if (old_pkg) { ++ char message_out[15]; ++ char *old_version = pkg_version_str_alloc(old_pkg); ++ char *new_version = pkg_version_str_alloc(pkg); ++ int cmp = pkg_compare_versions(old_pkg, pkg); ++ int rc = 0; ++ ++ memset(message_out,'\x0',15); ++ strncpy (message_out,"Upgrading ",strlen("Upgrading ")); ++ if ( (conf->force_downgrade==1) && (cmp > 0) ){ /* We've been asked to allow downgrade and version is precedent */ ++ cmp = -1 ; /* then we force ipkg to downgrade */ ++ strncpy (message_out,"Downgrading ",strlen("Downgrading ")); /* We need to use a value < 0 because in the 0 case we are asking to */ ++ /* reinstall, and some check could fail asking the "force-reinstall" option */ ++ } ++ ++ if (cmp > 0) { ++ ipkg_message(conf, IPKG_NOTICE, ++ "Not downgrading package %s on %s from %s to %s.\n", ++ old_pkg->name, old_pkg->dest->name, old_version, new_version); ++ rc = 1; ++ } else if (cmp < 0) { ++ ipkg_message(conf, IPKG_NOTICE, ++ "%s%s on %s from %s to %s...\n", ++ message_out, pkg->name, old_pkg->dest->name, old_version, new_version); ++ pkg->dest = old_pkg->dest; ++ rc = 0; ++ } else /* cmp == 0 */ { ++ if (conf->force_reinstall) { ++ ipkg_message(conf, IPKG_NOTICE, ++ "Reinstalling %s (%s) on %s...\n", ++ pkg->name, new_version, old_pkg->dest->name); ++ pkg->dest = old_pkg->dest; ++ rc = 0; ++ } else { ++ ipkg_message(conf, IPKG_NOTICE, ++ "Not installing %s (%s) on %s -- already installed.\n", ++ pkg->name, new_version, old_pkg->dest->name); ++ rc = 1; ++ } ++ } ++ free(old_version); ++ free(new_version); ++ return rc; ++ } else { ++ char message_out[15], *version ; ++ memset(message_out,'\x0',15); ++ if ( message ) ++ strncpy( message_out,"Upgrading ",strlen("Upgrading ") ); ++ else ++ strncpy( message_out,"Installing ",strlen("Installing ") ); ++ version = pkg_version_str_alloc(pkg); ++ ++ ipkg_message(conf, IPKG_NOTICE, ++ "%s%s (%s) to %s...\n", message_out, ++ pkg->name, version, pkg->dest->name); ++ free(version); ++ return 0; ++ } ++} ++ ++/* and now the meat... */ ++int ipkg_install_pkg(ipkg_conf_t *conf, pkg_t *pkg, int from_upgrade) ++{ ++ int err = 0; ++ int message = 0; ++ pkg_t *old_pkg = NULL; ++ pkg_vec_t *replacees; ++ abstract_pkg_t *ab_pkg = NULL; ++ int old_state_flag; ++ uint8_t *file_md5; ++ ++ ++ if ( from_upgrade ) ++ message = 1; /* Coming from an upgrade, and should change the output message */ ++ ++ if (!pkg) { ++ ipkg_message(conf, IPKG_ERROR, ++ "INTERNAL ERROR: null pkg passed to ipkg_install_pkg\n"); ++ return -EINVAL; ++ } ++ ++ ipkg_message(conf, IPKG_DEBUG2, "Function: %s calling pkg_arch_supported %s \n", __FUNCTION__, __FUNCTION__); ++ ++ if (!pkg_arch_supported(conf, pkg)) { ++ ipkg_message(conf, IPKG_ERROR, "INTERNAL ERROR: architecture %s for pkg %s is unsupported.\n", ++ pkg->architecture, pkg->name); ++ return -EINVAL; ++ } ++ if (pkg->state_status == SS_INSTALLED && conf->force_reinstall == 0 && conf->nodeps == 0) { ++ err = satisfy_dependencies_for(conf, pkg); ++ if (err) { return err; } ++ ++ ipkg_message(conf, IPKG_NOTICE, ++ "Package %s is already installed in %s.\n", ++ pkg->name, pkg->dest->name); ++ return 0; ++ } ++ ++ if (pkg->dest == NULL) { ++ pkg->dest = conf->default_dest; ++ } ++ ++ old_pkg = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, pkg->name); ++ ++ err = ipkg_install_check_downgrade(conf, pkg, old_pkg, message); ++ if (err) { return err; } ++ ++ pkg->state_want = SW_INSTALL; ++ if (old_pkg){ ++ old_pkg->state_want = SW_DEINSTALL; /* needed for check_data_file_clashes of dependences */ ++ } ++ ++ ++ /* Abhaya: conflicts check */ ++ err = check_conflicts_for(conf, pkg); ++ if (err) { return err; } ++ ++ /* this setup is to remove the upgrade scenario in the end when ++ installing pkg A, A deps B & B deps on A. So both B and A are ++ installed. Then A's installation is started resulting in an ++ uncecessary upgrade */ ++ if (pkg->state_status == SS_INSTALLED ++ && conf->force_reinstall == 0) return 0; ++ ++ err = verify_pkg_installable(conf, pkg); ++ if (err) { return err; } ++ ++ if (pkg->local_filename == NULL) { ++ err = ipkg_download_pkg(conf, pkg, conf->tmp_dir); ++ if (err) { ++ ipkg_message(conf, IPKG_ERROR, ++ "Failed to download %s. Perhaps you need to run 'ipkg update'?\n", ++ pkg->name); ++ return err; ++ } ++ } ++ ++/* Check for md5 values */ ++ if (pkg->md5sum) ++ { ++ file_md5 = file_md5sum_alloc(pkg->local_filename); ++ if (strcmp((char *)file_md5, pkg->md5sum)) ++ { ++ ipkg_message(conf, IPKG_ERROR, ++ "Package %s md5sum mismatch. Either the ipkg or the package index are corrupt. Try 'ipkg update'.\n", ++ pkg->name); ++ free(file_md5); ++ return err; ++ } ++ free(file_md5); ++ } ++ ++ if (pkg->tmp_unpack_dir == NULL) { ++ unpack_pkg_control_files(conf, pkg); ++ } ++ ++ /* We should update the filelist here, so that upgrades of packages that split will not fail. -Jamey 27-MAR-03 */ ++/* Pigi: check if it will pass from here when replacing. It seems to fail */ ++/* That's rather strange that files don't change owner. Investigate !!!!!!*/ ++ err = update_file_ownership(conf, pkg, old_pkg); ++ if (err) { return err; } ++ ++ if (conf->nodeps == 0) { ++ err = satisfy_dependencies_for(conf, pkg); ++ if (err) { return err; } ++ } ++ ++ replacees = pkg_vec_alloc(); ++ pkg_get_installed_replacees(pkg, replacees); ++ ++ /* this next section we do with SIGINT blocked to prevent inconsistency between ipkg database and filesystem */ ++ { ++ sigset_t newset, oldset; ++ sighandler_t old_handler = NULL; ++ int use_signal = 0; ++ caught_sigint = 0; ++ if (use_signal) { ++ old_handler = signal(SIGINT, ipkg_install_pkg_sigint_handler); ++ } else { ++ sigemptyset(&newset); ++ sigaddset(&newset, SIGINT); ++ sigprocmask(SIG_BLOCK, &newset, &oldset); ++ } ++ ++ ipkg_state_changed++; ++ pkg->state_flag |= SF_FILELIST_CHANGED; ++ ++ /* XXX: BUG: we really should treat replacement more like an upgrade ++ * Instead, we're going to remove the replacees ++ */ ++ err = pkg_remove_installed_replacees(conf, replacees); ++ if (err) goto UNWIND_REMOVE_INSTALLED_REPLACEES; ++ ++ /* ++ err = prerm_upgrade_old_pkg(conf, pkg, old_pkg); ++ if (err) goto UNWIND_PRERM_UPGRADE_OLD_PKG; ++ ++ err = prerm_deconfigure_conflictors(conf, pkg, replacees); ++ if (err) goto UNWIND_PRERM_DECONFIGURE_CONFLICTORS; ++ */ ++ ++ err = preinst_configure(conf, pkg, old_pkg); ++ /* ++ if (err) goto UNWIND_PREINST_CONFIGURE; ++ */ ++ ++ err = backup_modified_conffiles(conf, pkg, old_pkg); ++ if (err) goto UNWIND_BACKUP_MODIFIED_CONFFILES; ++ ++ err = check_data_file_clashes(conf, pkg, old_pkg); ++ /* ++ if (err) goto UNWIND_CHECK_DATA_FILE_CLASHES; ++ ++ err = postrm_upgrade_old_pkg(conf, pkg, old_pkg); ++ if (err) goto UNWIND_POSTRM_UPGRADE_OLD_PKG; ++ */ ++ ++ if (conf->noaction) return 0; ++ ++ /* point of no return: no unwinding after this */ ++ if (old_pkg && !conf->force_reinstall) { ++ old_pkg->state_want = SW_DEINSTALL; ++ ++ if (old_pkg->state_flag & SF_NOPRUNE) { ++ ipkg_message(conf, IPKG_INFO, ++ " not removing obsolesced files because package marked noprune\n"); ++ } else { ++ ipkg_message(conf, IPKG_INFO, ++ " removing obsolesced files\n"); ++ remove_obsolesced_files(conf, pkg, old_pkg); ++ } ++ /* removing files from old package, to avoid ghost files */ ++ remove_data_files_and_list(conf, old_pkg); ++/* Pigi : It should be better to remove also maintainer and postrem scripts here, just in case*/ ++ remove_maintainer_scripts_except_postrm(conf, old_pkg); ++ remove_postrm(conf, old_pkg); ++/* Pigi */ ++ ++ } ++ ++ ++ ipkg_message(conf, IPKG_INFO, ++ " installing maintainer scripts\n"); ++ install_maintainer_scripts(conf, pkg, old_pkg); ++ ++ /* the following just returns 0 ++ remove_disappeared(conf, pkg); ++ */ ++ ++ ipkg_message(conf, IPKG_INFO, ++ " installing data files\n"); ++ install_data_files(conf, pkg); ++ ++/* read comments from function for detail but I will execute this here as all other tests are ok.*/ ++ err = check_data_file_clashes_change(conf, pkg); ++ ++ ipkg_message(conf, IPKG_INFO, ++ " resolving conf files\n"); ++ resolve_conffiles(conf, pkg); ++ ++ pkg->state_status = SS_UNPACKED; ++ old_state_flag = pkg->state_flag; ++ pkg->state_flag &= ~SF_PREFER; ++ ipkg_message(conf, IPKG_DEBUG, " pkg=%s old_state_flag=%x state_flag=%x\n", pkg->name, old_state_flag, pkg->state_flag); ++ ++ if (old_pkg && !conf->force_reinstall) { ++ old_pkg->state_status = SS_NOT_INSTALLED; ++ } ++ ++ time(&pkg->installed_time); ++ ++ ipkg_message(conf, IPKG_INFO, ++ " cleanup temp files\n"); ++ cleanup_temporary_files(conf, pkg); ++ ++ ab_pkg = pkg->parent; ++ if (ab_pkg) ++ ab_pkg->state_status = pkg->state_status; ++ ++ ipkg_message(conf, IPKG_INFO, "Done.\n"); ++ ++ if (use_signal) ++ signal(SIGINT, old_handler); ++ else ++ sigprocmask(SIG_UNBLOCK, &newset, &oldset); ++ ++ return 0; ++ ++ ++ /* ++ UNWIND_POSTRM_UPGRADE_OLD_PKG: ++ postrm_upgrade_old_pkg_unwind(conf, pkg, old_pkg); ++ UNWIND_CHECK_DATA_FILE_CLASHES: ++ check_data_file_clashes_unwind(conf, pkg, old_pkg); ++ */ ++ UNWIND_BACKUP_MODIFIED_CONFFILES: ++ backup_modified_conffiles_unwind(pkg, old_pkg); ++ /* ++ UNWIND_PREINST_CONFIGURE: ++ preinst_configure_unwind(conf, pkg, old_pkg); ++ UNWIND_PRERM_DECONFIGURE_CONFLICTORS: ++ prerm_deconfigure_conflictors_unwind(conf, pkg, replacees); ++ UNWIND_PRERM_UPGRADE_OLD_PKG: ++ prerm_upgrade_old_pkg_unwind(conf, pkg, old_pkg); ++ */ ++ UNWIND_REMOVE_INSTALLED_REPLACEES: ++ pkg_remove_installed_replacees_unwind(conf, replacees); ++ ++ ipkg_message(conf, IPKG_INFO, ++ " cleanup temp files\n"); ++ cleanup_temporary_files(conf, pkg); ++ ++ ipkg_message(conf, IPKG_INFO, ++ "Failed.\n"); ++ if (use_signal) ++ signal(SIGINT, old_handler); ++ else ++ sigprocmask(SIG_UNBLOCK, &newset, &oldset); ++ ++ return err; ++ } ++} ++ ++/* ++static int prerm_upgrade_old_pkg(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) ++{ ++ DPKG_INCOMPATIBILITY: ++ dpkg does some things here that we don't do yet. Do we care? ++ ++ 1. If a version of the package is already installed, call ++ old-prerm upgrade new-version ++ 2. If the script runs but exits with a non-zero exit status ++ new-prerm failed-upgrade old-version ++ Error unwind, for both the above cases: ++ old-postinst abort-upgrade new-version ++ return 0; ++} ++*/ ++ ++/* ++static int prerm_upgrade_old_pkg_unwind(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) ++{ ++ DPKG_INCOMPATIBILITY: ++ dpkg does some things here that we don't do yet. Do we care? ++ (See prerm_upgrade_old_package for details) ++ ++ return 0; ++} ++*/ ++ ++/* ++static int prerm_deconfigure_conflictors(ipkg_conf_t *conf, pkg_t *pkg, pkg_vec_t *conflictors) ++{ ++ DPKG_INCOMPATIBILITY: ++ dpkg does some things here that we don't do yet. Do we care? ++ 2. If a 'conflicting' package is being removed at the same time: ++ 1. If any packages depended on that conflicting package and ++ --auto-deconfigure is specified, call, for each such package: ++ deconfigured's-prerm deconfigure \ ++ in-favour package-being-installed version \ ++ removing conflicting-package version ++ Error unwind: ++ deconfigured's-postinst abort-deconfigure \ ++ in-favour package-being-installed-but-failed version \ ++ removing conflicting-package version ++ ++ The deconfigured packages are marked as requiring ++ configuration, so that if --install is used they will be ++ configured again if possible. ++ 2. To prepare for removal of the conflicting package, call: ++ conflictor's-prerm remove in-favour package new-version ++ Error unwind: ++ conflictor's-postinst abort-remove in-favour package new-version ++ return 0; ++} ++*/ ++ ++/* ++static int prerm_deconfigure_conflictors_unwind(ipkg_conf_t *conf, pkg_t *pkg, pkg_vec_t *conflictors) ++{ ++ DPKG_INCOMPATIBILITY: dpkg does some things here that we don't ++ do yet. Do we care? (See prerm_deconfigure_conflictors for ++ details) ++ return 0; ++} ++*/ ++ ++static int preinst_configure(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) ++{ ++ int err; ++ char *preinst_args; ++ ++ if (old_pkg) { ++ char *old_version = pkg_version_str_alloc(old_pkg); ++ sprintf_alloc(&preinst_args, "upgrade %s", old_version); ++ free(old_version); ++ } else if (pkg->state_status == SS_CONFIG_FILES) { ++ char *pkg_version = pkg_version_str_alloc(pkg); ++ sprintf_alloc(&preinst_args, "install %s", pkg_version); ++ free(pkg_version); ++ } else { ++ preinst_args = strdup("install"); ++ } ++ ++ err = pkg_run_script(conf, pkg, "preinst", preinst_args); ++ if (err) { ++ ipkg_message(conf, IPKG_ERROR, ++ "Aborting installation of %s\n", pkg->name); ++ return 1; ++ } ++ ++ free(preinst_args); ++ ++ return 0; ++} ++ ++/* ++static int preinst_configure_unwind(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) ++{ ++ DPKG_INCOMPATIBILITY: ++ dpkg does the following error unwind, should we? ++ pkg->postrm abort-upgrade old-version ++ OR pkg->postrm abort-install old-version ++ OR pkg->postrm abort-install ++ return 0; ++} ++*/ ++ ++static int backup_modified_conffiles(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) ++{ ++ int err; ++ conffile_list_elt_t *iter; ++ conffile_t *cf; ++ ++ if (conf->noaction) return 0; ++ ++ /* Backup all modified conffiles */ ++ if (old_pkg) { ++ for (iter = old_pkg->conffiles.head; iter; iter = iter->next) { ++ char *cf_name; ++ ++ cf = iter->data; ++ cf_name = root_filename_alloc(conf, cf->name); ++ ++ /* Don't worry if the conffile is just plain gone */ ++ if (file_exists(cf_name) && conffile_has_been_modified(conf, cf)) { ++ err = backup_make_backup(conf, cf_name); ++ if (err) { ++ return err; ++ } ++ } ++ free(cf_name); ++ } ++ } ++ ++ /* Backup all conffiles that were not conffiles in old_pkg */ ++ for (iter = pkg->conffiles.head; iter; iter = iter->next) { ++ char *cf_name; ++ cf = iter->data; ++ cf_name = root_filename_alloc(conf, cf->name); ++ /* Ignore if this was a conffile in old_pkg as well */ ++ if (pkg_get_conffile(old_pkg, cf->name)) { ++ continue; ++ } ++ ++ if (file_exists(cf_name) && (! backup_exists_for(cf_name))) { ++ err = backup_make_backup(conf, cf_name); ++ if (err) { ++ return err; ++ } ++ } ++ free(cf_name); ++ } ++ ++ return 0; ++} ++ ++static int backup_modified_conffiles_unwind(pkg_t *pkg, pkg_t *old_pkg) ++{ ++ conffile_list_elt_t *iter; ++ ++ if (old_pkg) { ++ for (iter = old_pkg->conffiles.head; iter; iter = iter->next) { ++ backup_remove(iter->data->name); ++ } ++ } ++ ++ for (iter = pkg->conffiles.head; iter; iter = iter->next) { ++ backup_remove(iter->data->name); ++ } ++ ++ return 0; ++} ++ ++ ++static int check_data_file_clashes(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) ++{ ++ /* DPKG_INCOMPATIBILITY: ++ ipkg takes a slightly different approach than dpkg at this ++ point. dpkg installs each file in the new package while ++ creating a backup for any file that is replaced, (so that it ++ can unwind if necessary). To avoid complexity and redundant ++ storage, ipkg doesn't do any installation until later, (at the ++ point at which dpkg removes the backups. ++ ++ But, we do have to check for data file clashes, since after ++ installing a package with a file clash, removing either of the ++ packages involved in the clash has the potential to break the ++ other package. ++ */ ++ str_list_t *files_list; ++ str_list_elt_t *iter; ++ ++ int clashes = 0; ++ ++ files_list = pkg_get_installed_files(pkg); ++ for (iter = files_list->head; iter; iter = iter->next) { ++ char *root_filename; ++ char *filename = iter->data; ++ root_filename = root_filename_alloc(conf, filename); ++ if (file_exists(root_filename) && (! file_is_dir(root_filename))) { ++ pkg_t *owner; ++ pkg_t *obs; ++ /* Pre-existing conffiles are OK */ ++ /* @@@@ should have way to check that it is a conffile -Jamey */ ++ if (backup_exists_for(root_filename)) { ++ continue; ++ } ++ ++ /* Pre-existing files are OK if force-overwrite was asserted. */ ++ if (conf->force_overwrite) { ++ /* but we need to change who owns this file */ ++ file_hash_set_file_owner(conf, filename, pkg); ++ continue; ++ } ++ ++ owner = file_hash_get_file_owner(conf, filename); ++ ++ /* Pre-existing files are OK if owned by the pkg being upgraded. */ ++ if (owner && old_pkg) { ++ if (strcmp(owner->name, old_pkg->name) == 0) { ++ continue; ++ } ++ } ++ ++ /* Pre-existing files are OK if owned by a package replaced by new pkg. */ ++ if (owner) { ++ ipkg_message(conf, IPKG_DEBUG2, "Checking for replaces for %s in package %s\n", filename, owner->name); ++ if (pkg_replaces(pkg, owner)) { ++ continue; ++ } ++/* If the file that would be installed is owned by the same package, ( as per a reinstall or similar ) ++ then it's ok to overwrite. */ ++ if (strcmp(owner->name,pkg->name)==0){ ++ ipkg_message(conf, IPKG_INFO, "Replacing pre-existing file %s owned by package %s\n", filename, owner->name); ++ continue; ++ } ++ } ++ ++ /* Pre-existing files are OK if they are obsolete */ ++ obs = hash_table_get(&conf->obs_file_hash, filename); ++ if (obs) { ++ ipkg_message(conf, IPKG_INFO, "Pre-exiting file %s is obsolete. obs_pkg=%s\n", filename, obs->name); ++ continue; ++ } ++ ++ /* We have found a clash. */ ++ ipkg_message(conf, IPKG_ERROR, ++ "Package %s wants to install file %s\n" ++ "\tBut that file is already provided by package ", ++ pkg->name, filename); ++ if (owner) { ++ ipkg_message(conf, IPKG_ERROR, ++ "%s\n", owner->name); ++ } else { ++ ipkg_message(conf, IPKG_ERROR, ++ "\nPlease move this file out of the way and try again.\n"); ++ } ++ clashes++; ++ } ++ free(root_filename); ++ } ++ pkg_free_installed_files(pkg); ++ ++ return clashes; ++} ++ ++static int check_data_file_clashes_change(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ /* Basically that's the worst hack I could do to be able to change ownership of ++ file list, but, being that we have no way to unwind the mods, due to structure ++ of hash table, probably is the quickest hack too, whishing it would not slow-up thing too much. ++ What we do here is change the ownership of file in hash if a replace ( or similar events ++ happens ) ++ Only the action that are needed to change name should be considered. ++ @@@ To change after 1.0 release. ++ */ ++ str_list_t *files_list; ++ str_list_elt_t *iter; ++ ++ int clashes = 0; ++ ++ files_list = pkg_get_installed_files(pkg); ++ for (iter = files_list->head; iter; iter = iter->next) { ++ char *root_filename; ++ char *filename = iter->data; ++ root_filename = root_filename_alloc(conf, filename); ++ if (file_exists(root_filename) && (! file_is_dir(root_filename))) { ++ pkg_t *owner; ++ ++ if (conf->force_overwrite) { ++ /* but we need to change who owns this file */ ++ file_hash_set_file_owner(conf, filename, pkg); ++ continue; ++ } ++ ++ owner = file_hash_get_file_owner(conf, filename); ++ ++ /* Pre-existing files are OK if owned by a package replaced by new pkg. */ ++ if (owner) { ++ if (pkg_replaces(pkg, owner)) { ++/* It's now time to change the owner of that file. ++ It has been "replaced" from the new "Replaces", then I need to inform lists file about that. */ ++ ipkg_message(conf, IPKG_INFO, "Replacing pre-existing file %s owned by package %s\n", filename, owner->name); ++ file_hash_set_file_owner(conf, filename, pkg); ++ continue; ++ } ++ } ++ ++ } ++ free(root_filename); ++ } ++ pkg_free_installed_files(pkg); ++ ++ return clashes; ++} ++ ++/* ++static int check_data_file_clashes_unwind(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) ++{ ++ Nothing to do since check_data_file_clashes doesn't change state ++ return 0; ++} ++*/ ++ ++/* ++static int postrm_upgrade_old_pkg(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) ++{ ++ DPKG_INCOMPATIBILITY: dpkg does the following here, should we? ++ 1. If the package is being upgraded, call ++ old-postrm upgrade new-version ++ 2. If this fails, attempt: ++ new-postrm failed-upgrade old-version ++ Error unwind, for both cases: ++ old-preinst abort-upgrade new-version ++ return 0; ++} ++*/ ++ ++/* ++static int postrm_upgrade_old_pkg_unwind(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) ++{ ++ DPKG_INCOMPATIBILITY: ++ dpkg does some things here that we don't do yet. Do we care? ++ (See postrm_upgrade_old_pkg for details) ++ return 0; ++} ++*/ ++ ++static int remove_obsolesced_files(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) ++{ ++ int err; ++ str_list_t *old_files; ++ str_list_elt_t *of; ++ str_list_t *new_files; ++ str_list_elt_t *nf; ++ ++ if (old_pkg == NULL) { ++ return 0; ++ } ++ ++ old_files = pkg_get_installed_files(old_pkg); ++ new_files = pkg_get_installed_files(pkg); ++ ++ for (of = old_files->head; of; of = of->next) { ++ pkg_t *owner; ++ char *old, *new; ++ old = of->data; ++ for (nf = new_files->head; nf; nf = nf->next) { ++ new = nf->data; ++ if (strcmp(old, new) == 0) { ++ goto NOT_OBSOLETE; ++ } ++ } ++ if (file_is_dir(old)) { ++ continue; ++ } ++ owner = file_hash_get_file_owner(conf, old); ++ if (owner != old_pkg) { ++ /* in case obsolete file no longer belongs to old_pkg */ ++ continue; ++ } ++ ++ /* old file is obsolete */ ++ ipkg_message(conf, IPKG_INFO, ++ " removing obsolete file %s\n", old); ++ if (!conf->noaction) { ++ err = unlink(old); ++ if (err) { ++ ipkg_message(conf, IPKG_ERROR, " Warning: remove %s failed: %s\n", old, ++ strerror(errno)); ++ } ++ } ++ ++ NOT_OBSOLETE: ++ ; ++ } ++ ++ pkg_free_installed_files(old_pkg); ++ pkg_free_installed_files(pkg); ++ ++ return 0; ++} ++ ++static int remove_obsolete_maintainer_scripts(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) ++{ ++ int i; ++ int err = 0; ++ char *globpattern; ++ glob_t globbuf; ++ if (0) { ++ if (!pkg->dest) { ++ ipkg_message(conf, IPKG_ERROR, "%s: no dest for package %s\n", __FUNCTION__, pkg->name); ++ return -1; ++ } ++ sprintf_alloc(&globpattern, "%s/%s.*", pkg->dest->info_dir, pkg->name); ++ err = glob(globpattern, 0, NULL, &globbuf); ++ free(globpattern); ++ if (err) { ++ return err; ++ } ++ /* XXXX this should perhaps only remove the ones that are not overwritten in new package. Jamey 11/11/2003 */ ++ for (i = 0; i < globbuf.gl_pathc; i++) { ++ ipkg_message(conf, IPKG_DEBUG, "Removing control file %s from old_pkg %s\n", ++ globbuf.gl_pathv[i], old_pkg->name); ++ if (!conf->noaction) ++ unlink(globbuf.gl_pathv[i]); ++ } ++ globfree(&globbuf); ++ } ++ return err; ++} ++ ++static int install_maintainer_scripts(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) ++{ ++ int ret; ++ char *prefix; ++ ++ if (old_pkg) ++ remove_obsolete_maintainer_scripts(conf, pkg, old_pkg); ++ sprintf_alloc(&prefix, "%s.", pkg->name); ++ ret = pkg_extract_control_files_to_dir_with_prefix(pkg, ++ pkg->dest->info_dir, ++ prefix); ++ free(prefix); ++ return ret; ++} ++ ++/* ++static int remove_disappeared(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ DPKG_INCOMPATIBILITY: ++ This is a fairly sophisticated dpkg operation. Shall we ++ skip it? ++ ++ Any packages all of whose files have been overwritten during the ++ installation, and which aren't required for dependencies, are ++ considered to have been removed. For each such package ++ 1. disappearer's-postrm disappear overwriter overwriter-version ++ 2. The package's maintainer scripts are removed ++ 3. It is noted in the status database as being in a sane state, ++ namely not installed (any conffiles it may have are ignored, ++ rather than being removed by dpkg). Note that disappearing ++ packages do not have their prerm called, because dpkg doesn't ++ know in advance that the package is going to vanish. ++ ++ ++ return 0; ++} ++*/ ++ ++static int install_data_files(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ int err; ++ ++ /* ipkg takes a slightly different approach to data file backups ++ than dpkg. Rather than removing backups at this point, we ++ actually do the data file installation now. See comments in ++ check_data_file_clashes() for more details. */ ++ ++ ipkg_message(conf, IPKG_INFO, ++ " extracting data files to %s\n", pkg->dest->root_dir); ++ err = pkg_extract_data_files_to_dir(pkg, pkg->dest->root_dir); ++ if (err) { ++ return err; ++ } ++ ++ /* XXX: BUG or FEATURE : We are actually loosing the Essential flag, ++ so we can't save ourself from removing important packages ++ At this point we (should) have extracted the .control file, so it ++ would be a good idea to reload the data in it, and set the Essential ++ state in *pkg. From now on the Essential is back in status file and ++ we can protect again. ++ We should operate this way: ++ fopen the file ( pkg->dest->root_dir/pkg->name.control ) ++ check for "Essential" in it ++ set the value in pkg->essential. ++ This new routine could be useful also for every other flag ++ Pigi: 16/03/2004 */ ++ set_flags_from_control(conf, pkg) ; ++ ++ ipkg_message(conf, IPKG_DEBUG, " Calling pkg_write_filelist from %s\n", __FUNCTION__); ++ err = pkg_write_filelist(conf, pkg); ++ if (err) ++ return err; ++ ++ /* XXX: FEATURE: ipkg should identify any files which existed ++ before installation and which were overwritten, (see ++ check_data_file_clashes()). What it must do is remove any such ++ files from the filelist of the old package which provided the ++ file. Otherwise, if the old package were removed at some point ++ it would break the new package. Removing the new package will ++ also break the old one, but this cannot be helped since the old ++ package's file has already been deleted. This is the importance ++ of check_data_file_clashes(), and only allowing ipkg to install ++ a clashing package with a user force. */ ++ ++ return 0; ++} ++ ++static int resolve_conffiles(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ conffile_list_elt_t *iter; ++ conffile_t *cf; ++ char *cf_backup; ++ uint8_t *md5sum; ++ ++ ++ if (conf->noaction) return 0; ++ ++ for (iter = pkg->conffiles.head; iter; iter = iter->next) { ++ char *root_filename; ++ cf = iter->data; ++ root_filename = root_filename_alloc(conf, cf->name); ++ ++ /* Might need to initialize the md5sum for each conffile */ ++ if (cf->value == NULL) { ++ cf->value = (char *)file_md5sum_alloc(root_filename); ++ } ++ ++ if (!file_exists(root_filename)) { ++ free(root_filename); ++ continue; ++ } ++ ++ cf_backup = backup_filename_alloc(root_filename); ++ ++ ++ if (file_exists(cf_backup)) { ++ /* Let's compute md5 to test if files are changed */ ++ md5sum = file_md5sum_alloc(cf_backup); ++ if (strcmp( cf->value, (char *)md5sum) != 0 ) { ++ if (conf->force_defaults ++ || user_prefers_old_conffile(cf->name, cf_backup) ) { ++ rename(cf_backup, root_filename); ++ } ++ } ++ unlink(cf_backup); ++ free(md5sum); ++ } ++ ++ free(cf_backup); ++ free(root_filename); ++ } ++ ++ return 0; ++} ++ ++static int user_prefers_old_conffile(const char *file_name, const char *backup) ++{ ++ char *response; ++ const char *short_file_name; ++ ++ short_file_name = strrchr(file_name, '/'); ++ if (short_file_name) { ++ short_file_name++; ++ } else { ++ short_file_name = file_name; ++ } ++ ++ while (1) { ++ response = get_user_response(" Configuration file '%s'\n" ++ " ==> File on system created by you or by a script.\n" ++ " ==> File also in package provided by package maintainer.\n" ++ " What would you like to do about it ? Your options are:\n" ++ " Y or I : install the package maintainer's version\n" ++ " N or O : keep your currently-installed version\n" ++#ifdef CONFIG_DIFF ++ " D : show the differences between the versions\n" ++#endif ++ " The default action is to keep your current version.\n" ++ " *** %s (Y/I/N/O" ++#ifdef CONFIG_DIFF ++ "/D" ++#endif ++ ") [default=N] ? ", file_name, short_file_name); ++ if (strcmp(response, "y") == 0 ++ || strcmp(response, "i") == 0 ++ || strcmp(response, "yes") == 0) { ++ free(response); ++ return 0; ++ } ++ ++#ifdef CONFIG_DIFF ++ if (strcmp(response, "d") == 0) { ++ char *cmd; ++ ++ free(response); ++ /* XXX: BUG rewrite to use exec or busybox's internal diff */ ++ sprintf_alloc(&cmd, "diff -u %s %s", backup, file_name); ++ xsystem(cmd); ++ free(cmd); ++ printf(" [Press ENTER to continue]\n"); ++ response = file_read_line_alloc(stdin); ++ free(response); ++ continue; ++ } ++#endif ++ ++ free(response); ++ return 1; ++ } ++} ++ ++/* XXX: CLEANUP: I'd like to move all of the code for ++ creating/cleaning pkg->tmp_unpack_dir directly into pkg.c. (Then, ++ it would make sense to cleanup pkg->tmp_unpack_dir directly from ++ pkg_deinit for example). */ ++static int cleanup_temporary_files(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ DIR *tmp_dir; ++ struct dirent *dirent; ++ char *tmp_file; ++ ++#ifdef IPKG_DEBUG_NO_TMP_CLEANUP ++#error ++ ipkg_message(conf, IPKG_DEBUG, ++ "%s: Not cleaning up %s since ipkg compiled with IPKG_DEBUG_NO_TMP_CLEANUP\n", ++ __FUNCTION__, pkg->tmp_unpack_dir); ++ return 0; ++#endif ++ ++ if (pkg->tmp_unpack_dir && file_is_dir(pkg->tmp_unpack_dir)) { ++ tmp_dir = opendir(pkg->tmp_unpack_dir); ++ if (tmp_dir) { ++ while (1) { ++ dirent = readdir(tmp_dir); ++ if (dirent == NULL) { ++ break; ++ } ++ sprintf_alloc(&tmp_file, "%s/%s", ++ pkg->tmp_unpack_dir, dirent->d_name); ++ if (! file_is_dir(tmp_file)) { ++ unlink(tmp_file); ++ } ++ free(tmp_file); ++ } ++ closedir(tmp_dir); ++ rmdir(pkg->tmp_unpack_dir); ++ free(pkg->tmp_unpack_dir); ++ pkg->tmp_unpack_dir = NULL; ++ } ++ } ++ ++ ipkg_message(conf, IPKG_INFO, "cleanup_temporary_files: pkg=%s local_filename=%s tmp_dir=%s\n", ++ pkg->name, pkg->local_filename, conf->tmp_dir); ++ if (pkg->local_filename && strncmp(pkg->local_filename, conf->tmp_dir, strlen(conf->tmp_dir)) == 0) { ++ unlink(pkg->local_filename); ++ free(pkg->local_filename); ++ pkg->local_filename = NULL; ++ } ++ ++ return 0; ++} ++ ++static char *backup_filename_alloc(const char *file_name) ++{ ++ char *backup; ++ ++ sprintf_alloc(&backup, "%s%s", file_name, IPKG_BACKUP_SUFFIX); ++ ++ return backup; ++} ++ ++int backup_make_backup(ipkg_conf_t *conf, const char *file_name) ++{ ++ int err; ++ char *backup; ++ ++ backup = backup_filename_alloc(file_name); ++ err = file_copy(file_name, backup); ++ if (err) { ++ ipkg_message(conf, IPKG_ERROR, ++ "%s: Failed to copy %s to %s\n", ++ __FUNCTION__, file_name, backup); ++ } ++ ++ free(backup); ++ ++ return err; ++} ++ ++static int backup_exists_for(const char *file_name) ++{ ++ int ret; ++ char *backup; ++ ++ backup = backup_filename_alloc(file_name); ++ ++ ret = file_exists(backup); ++ ++ free(backup); ++ ++ return ret; ++} ++ ++static int backup_remove(const char *file_name) ++{ ++ char *backup; ++ ++ backup = backup_filename_alloc(file_name); ++ unlink(backup); ++ free(backup); ++ ++ return 0; ++} ++ ++ ++ ++#ifdef CONFIG_IPKG_PROCESS_ACTIONS ++ ++int ipkg_remove_packages(ipkg_conf_t *conf, pkg_vec_t *pkgs_to_remove) ++{ ++ /* first, remove the packages that need removing */ ++ for (i = 0 ; i < pkgs_to_remove->len; i++ ) { ++ pkg_t *pkg = pkgs_to_remove->pkgs[i]; ++ err = ipkg_remove_pkg(conf, pkg,0); ++ if (err) return err; ++ } ++ return 0; ++} ++ ++int ipkg_process_actions_sanity_check(ipkg_conf_t *conf, pkg_vec_t *pkgs_to_remove, pkg_vec_t *pkgs_superseded, pkg_vec_t *pkgs_to_install) ++{ ++ int i; ++ /* now one more pass checking on the ones that need to be installed */ ++ for (i = 0 ; i < pkgs_to_install->len; i++ ) { ++ pkg_t *pkg = pkgs_to_install->pkgs[i]; ++ if (pkg->dest == NULL) ++ pkg->dest = conf->default_dest; ++ ++ pkg->state_want = SW_INSTALL; ++ ++ /* Abhaya: conflicts check */ ++ err = check_conflicts_for(conf, pkg); ++ if (err) { return err; } ++ } ++ return 0; ++} ++ ++int ipkg_process_actions_unpack_packages(ipkg_conf_t *conf, pkg_vec_t *pkgs_to_remove, pkg_vec_t *pkgs_to_install) ++{ ++ int i; ++ /* now one more pass checking on the ones that need to be installed */ ++ for (i = 0 ; i < pkgs_to_install->len; i++ ) { ++ pkg_t *pkg = pkgs_to_install->pkgs[i]; ++ ++ /* XXX: FEATURE: Need to really support Provides/Replaces: here at some point */ ++ pkg_vec_t *replacees = pkg_vec_alloc(); ++ pkg_get_installed_replacees(pkg, replacees); ++ ++ /* XXX: BUG: we really should treat replacement more like an upgrade ++ * Instead, we're going to remove the replacees ++ */ ++ err = pkg_remove_installed_replacees(conf, replacees); ++ if (err) return err; ++ pkg->state_flag |= SF_REMOVED_REPLACEES; ++ } ++ return 0; ++} ++ ++int ipkg_process_actions_unpack_packages(ipkg_conf_t *conf, pkg_vec_t *pkgs_to_remove, pkg_vec_t *pkgs_to_install) ++{ ++ int i; ++ /* now one more pass checking on the ones that need to be installed */ ++ for (i = 0 ; i < pkgs_to_install->len; i++ ) { ++ pkg_t *pkg = pkgs_to_install->pkgs[i]; ++ if (pkg->local_filename == NULL) { ++ err = ipkg_download_pkg(conf, pkg, conf->tmp_dir); ++ if (err) { ++ ipkg_message(conf, IPKG_ERROR, ++ "Failed to download %s. Perhaps you need to run 'ipkg update'?\n", ++ pkg->name); ++ return err; ++ } ++ } ++ if (pkg->tmp_unpack_dir == NULL) { ++ err = unpack_pkg_control_files(conf, pkg); ++ if (err) return err; ++ } ++ } ++ return 0; ++} ++ ++int ipkg_process_actions_prerm(ipkg_conf_t *conf, pkg_vec_t *pkgs_to_install) ++{ ++ int i; ++ /* now one more pass checking on the ones that need to be installed */ ++ for (i = 0 ; i < pkgs_to_install->len; i++ ) { ++ pkg_t *pkg = pkgs_to_install->pkgs[i]; ++ pkg_t *old_pkg = pkg->old_pkg; ++ ++ err = prerm_upgrade_old_pkg(conf, pkg, old_pkg); ++ if (err) return err; ++ ++ err = prerm_deconfigure_conflictors(conf, pkg, replacees); ++ if (err) return err; ++ ++ err = preinst_configure(conf, pkg, old_pkg); ++ if (err) return err; ++ ++ err = backup_modified_conffiles(conf, pkg, old_pkg); ++ if (err) return err; ++ ++ err = postrm_upgrade_old_pkg(conf, pkg, old_pkg); ++ if (err) return err; ++ } ++ return 0; ++} ++ ++int ipkg_process_actions_install(ipkg_conf_t *conf, pkg_vec_t *pkgs_to_install) ++{ ++ int i; ++ /* now one more pass checking on the ones that need to be installed */ ++ for (i = 0 ; i < pkgs_to_install->len; i++ ) { ++ pkg_t *pkg = pkgs_to_install->pkgs[i]; ++ pkg_t *old_pkg = pkg->old_pkg; ++ ++ if (old_pkg) { ++ old_pkg->state_want = SW_DEINSTALL; ++ ++ if (old_pkg->state_flag & SF_NOPRUNE) { ++ ipkg_message(conf, IPKG_INFO, ++ " not removing obsolesced files because package marked noprune\n"); ++ } else { ++ ipkg_message(conf, IPKG_INFO, ++ " removing obsolesced files\n"); ++ remove_obsolesced_files(conf, pkg, old_pkg); ++ } ++ } ++ ++ ipkg_message(conf, IPKG_INFO, ++ " installing maintainer scripts\n"); ++ install_maintainer_scripts(conf, pkg, old_pkg); ++ ++ /* the following just returns 0 */ ++ remove_disappeared(conf, pkg); ++ ++ ipkg_message(conf, IPKG_INFO, ++ " installing data files\n"); ++ install_data_files(conf, pkg); ++ ++ ipkg_message(conf, IPKG_INFO, ++ " resolving conf files\n"); ++ resolve_conffiles(conf, pkg); ++ ++ pkg->state_status = SS_UNPACKED; ++ ++ if (old_pkg) { ++ old_pkg->state_status = SS_NOT_INSTALLED; ++ } ++ ++ time(&pkg->installed_time); ++ ++ ipkg_message(conf, IPKG_INFO, ++ " cleanup temp files\n"); ++ cleanup_temporary_files(conf, pkg); ++ ++ if (pkg->parent) ++ pkg->parent->state_status = pkg->state_status; ++ } ++ return 0; ++} ++ ++int ipkg_process_actions_unwind_prerm(ipkg_conf_t *conf, pkg_vec_t *pkgs_to_install) ++{ ++ int i; ++ /* now one more pass checking on the ones that need to be installed */ ++ for (i = 0 ; i < pkgs_to_install->len; i++ ) { ++ pkg_t *pkg = pkgs_to_install->pkgs[i]; ++ pkg_t *old_pkg = pkg->old_pkg; ++ ++ if (old_pkg) { ++ if (old_pkg->state_flags & SF_POSTRM_UPGRADE) ++ postrm_upgrade_old_pkg_unwind(conf, pkg, old_pkg); ++ if (old_pkg->state_flags & SF_CHECK_DATA_FILE_CLASHES) ++ check_data_file_clashes_unwind(conf, pkg, old_pkg); ++ if (old_pkg->state_flags & SF_BACKUP_MODIFIED_CONFFILES) ++ backup_modified_conffiles_unwind(pkg, old_pkg); ++ */ ++ if (old_pkg->state_flags & SF_PREINST_CONFIGURE) ++ preinst_configure_unwind(conf, pkg, old_pkg); ++ if (old_pkg->state_flags & SF_DECONFIGURE_CONFLICTORS) ++ prerm_deconfigure_conflictors_unwind(conf, pkg, replacees); ++ if (old_pkg->state_flags & SF_PRERM_UPGRADE) ++ prerm_upgrade_old_pkg_unwind(conf, pkg, old_pkg); ++ */ ++ ++ if (old_pkg->state_flags & SF_REMOVED_REPLACEES) ++ remove_installed_replacees_unwind(conf, pkg, old_pkg); ++ ++ } ++ } ++ return 0; ++} ++ ++/* ++ * Perform all the actions. ++ * ++ * pkgs_to_remove are packages marked for removal. ++ * pkgs_superseded are the old packages being replaced by upgrades. ++ * ++ * Assumes pkgs_to_install includes all dependences, recursively, sorted in installable order. ++ */ ++int ipkg_process_actions(ipkg_conf_t *conf, pkg_vec_t *pkgs_to_remove, pkg_vec_t *pkgs_superseded, pkg_vec_t *pkgs_to_install) ++{ ++ int err; ++ int i; ++ ++ err = ipkg_remove_packages(conf, pkgs_to_remove); ++ if (err) return err; ++ ++ err = ipkg_process_actions_sanity_check(conf, pkgs_superseded, pkgs_to_install); ++ if (err) return err; ++ ++ err = ipkg_process_actions_remove_replacees(conf, pkgs_to_install); ++ if (err) goto UNWIND; ++ ++ /* @@@@ look at ipkg_install_pkg for handling replacements */ ++ err = ipkg_process_actions_unpack_packages(conf, pkgs_to_install); ++ if (err) goto UNWIND; ++ ++ /* ++ * Now that we have the packages unpacked, we can look for data ++ * file clashes. First, we mark the files from the superseded ++ * packages as obsolete. Then we scan the files in ++ * pkgs_to_install, and only complain about clashes with ++ * non-obsolete files. ++ */ ++ ++ err = ipkg_process_actions_check_data_file_clashes(conf, pkgs_superseded, pkgs_to_install); ++ if (err) goto UNWIND; ++ ++ /* this was before checking data file clashes */ ++ err = ipkg_process_actions_prerm(conf, pkgs_superseded, pkgs_to_install); ++ if (err) goto UNWIND; ++ ++ /* point of no return: no unwinding after this */ ++ err = ipkg_process_actions_install(conf, pkgs_to_install); ++ if (err) return err; ++ ++ ipkg_message(conf, IPKG_INFO, "Done.\n"); ++ return 0; ++ ++ UNWIND: ++ ipkg_process_actions_unwind(conf, pkgs_to_install); ++ ++ ipkg_message(conf, IPKG_INFO, ++ " cleanup temp files\n"); ++ cleanup_temporary_files(conf, pkg); ++ ++ ipkg_message(conf, IPKG_INFO, ++ "Failed.\n"); ++ return err; ++} ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_install.h busybox-1.12.1/archival/libipkg/ipkg_install.h +--- busybox-1.12.1.orig/archival/libipkg/ipkg_install.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_install.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,35 @@ ++/* ipkg_install.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef IPKG_INSTALL_H ++#define IPKG_INSTALL_H ++ ++#include "pkg.h" ++#include "ipkg_conf.h" ++ ++ipkg_error_t ipkg_install_by_name(ipkg_conf_t *conf, const char *pkg_name); ++ipkg_error_t ipkg_install_multi_by_name(ipkg_conf_t *conf, const char *pkg_name); ++int ipkg_install_from_file(ipkg_conf_t *conf, const char *filename); ++int ipkg_install_pkg(ipkg_conf_t *conf, pkg_t *pkg,int from_upgrading); ++int satisfy_dependencies_for(ipkg_conf_t *conf, pkg_t *pkg); ++ ++int ipkg_satisfy_all_dependences(ipkg_conf_t *conf); ++ ++int pkg_mark_dependencies_for_installation(ipkg_conf_t *conf, pkg_t *pkg_name, pkg_vec_t *pkgs_needed); ++int name_mark_dependencies_for_installation(ipkg_conf_t *conf, const char *pkg_name, pkg_vec_t *pkgs_needed); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_message.c busybox-1.12.1/archival/libipkg/ipkg_message.c +--- busybox-1.12.1.orig/archival/libipkg/ipkg_message.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_message.c 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,61 @@ ++/* ipkg_message.c - the itsy package management system ++ ++ Copyright (C) 2003 Daniele Nicolodi ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++ ++#include "ipkg.h" ++#include "ipkg_conf.h" ++#include "ipkg_message.h" ++ ++#ifndef IPKG_LIB ++ ++void ++ipkg_message (ipkg_conf_t * conf, message_level_t level, char *fmt, ...) ++{ ++ va_list ap; ++ ++ if (conf && (conf->verbosity < level)) ++ { ++ return; ++ } ++ else ++ { ++ ++ va_start (ap, fmt); ++ vprintf (fmt, ap); ++ va_end (ap); ++ } ++} ++ ++#else ++ ++#include "libipkg.h" ++ ++//#define ipkg_message(conf, level, fmt, arg...) ipkg_cb_message(conf, level, fmt, ## arg) ++ ++void ++ipkg_message (ipkg_conf_t * conf, message_level_t level, const char *fmt, ...) ++{ ++ va_list ap; ++ char ts[256]; ++ ++ if (ipkg_cb_message) ++ { ++ va_start (ap, fmt); ++ vsnprintf (ts,256,fmt, ap); ++ va_end (ap); ++ ipkg_cb_message(conf,level,ts); ++ } ++} ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_message.h busybox-1.12.1/archival/libipkg/ipkg_message.h +--- busybox-1.12.1.orig/archival/libipkg/ipkg_message.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_message.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,32 @@ ++/* ipkg_message.h - the itsy package management system ++ ++ Copyright (C) 2003 Daniele Nicolodi ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef _IPKG_MESSAGE_H_ ++#define _IPKG_MESSAGE_H_ ++ ++#include "ipkg.h" ++#include "ipkg_conf.h" ++ ++typedef enum { ++ IPKG_ERROR, /* error conditions */ ++ IPKG_NOTICE, /* normal but significant condition */ ++ IPKG_INFO, /* informational message */ ++ IPKG_DEBUG, /* debug level message */ ++ IPKG_DEBUG2, /* more debug level message */ ++} message_level_t; ++ ++extern void ipkg_message(ipkg_conf_t *conf, message_level_t level, const char *fmt, ...); ++ ++#endif /* _IPKG_MESSAGE_H_ */ +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_remove.c busybox-1.12.1/archival/libipkg/ipkg_remove.c +--- busybox-1.12.1.orig/archival/libipkg/ipkg_remove.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_remove.c 2008-10-23 14:42:08.000000000 +0200 +@@ -0,0 +1,385 @@ ++/* ipkg_remove.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++#include "ipkg_message.h" ++ ++#include ++ ++#include "ipkg_remove.h" ++ ++#include "file_util.h" ++#include "sprintf_alloc.h" ++#include "str_util.h" ++ ++#include "ipkg_cmd.h" ++ ++int ipkg_remove_dependent_pkgs (ipkg_conf_t *conf, pkg_t *pkg, abstract_pkg_t **dependents); ++ ++/* ++ * Returns number of the number of packages depending on the packages provided by this package. ++ * Every package implicitly provides itself. ++ */ ++int pkg_has_installed_dependents(pkg_t *pkg, abstract_pkg_t *** pdependents) ++{ ++ int nprovides = pkg->provides_count; ++ abstract_pkg_t **provides = pkg->provides; ++ int n_installed_dependents = 0; ++ int i; ++ for (i = 0; i <= nprovides; i++) { ++ abstract_pkg_t *providee = provides[i]; ++ abstract_pkg_t **dependers = providee->depended_upon_by; ++ abstract_pkg_t *dep_ab_pkg; ++ if (dependers == NULL) ++ continue; ++ while ((dep_ab_pkg = *dependers++) != NULL) { ++ if (dep_ab_pkg->state_status == SS_INSTALLED){ ++ n_installed_dependents++; ++ } ++ } ++ ++ } ++ /* if caller requested the set of installed dependents */ ++ if (pdependents) { ++ int p = 0; ++ abstract_pkg_t **dependents = (abstract_pkg_t **)malloc((n_installed_dependents+1)*sizeof(abstract_pkg_t *)); ++ ++ if ( dependents == NULL ){ ++ fprintf(stderr,"%s Unable to allocate memory. REPORT THIS BUG IN BUGZILLA PLEASE\n", __FUNCTION__); ++ return -1; ++ } ++ ++ *pdependents = dependents; ++ for (i = 0; i <= nprovides; i++) { ++ abstract_pkg_t *providee = provides[i]; ++ abstract_pkg_t **dependers = providee->depended_upon_by; ++ abstract_pkg_t *dep_ab_pkg; ++ if (dependers == NULL) ++ continue; ++ while ((dep_ab_pkg = *dependers++) != NULL) { ++ if (dep_ab_pkg->state_status == SS_INSTALLED && !(dep_ab_pkg->state_flag & SF_MARKED)) { ++ dependents[p++] = dep_ab_pkg; ++ dep_ab_pkg->state_flag |= SF_MARKED; ++ } ++ } ++ } ++ dependents[p] = NULL; ++ /* now clear the marks */ ++ for (i = 0; i < p; i++) { ++ abstract_pkg_t *dep_ab_pkg = dependents[i]; ++ dep_ab_pkg->state_flag &= ~SF_MARKED; ++ } ++ } ++ return n_installed_dependents; ++} ++ ++int ipkg_remove_dependent_pkgs (ipkg_conf_t *conf, pkg_t *pkg, abstract_pkg_t **dependents) ++{ ++ int i; ++ int a; ++ int count; ++ pkg_vec_t *dependent_pkgs = pkg_vec_alloc(); ++ abstract_pkg_t * ab_pkg; ++ ++ if((ab_pkg = pkg->parent) == NULL){ ++ fprintf(stderr, "%s: unable to get dependent pkgs. pkg %s isn't in hash table\n", ++ __FUNCTION__, pkg->name); ++ return 0; ++ } ++ ++ if (dependents == NULL) ++ return 0; ++ ++ // here i am using the dependencies_checked ++ if (ab_pkg->dependencies_checked == 2) // variable to make out whether this package ++ return 0; // has already been encountered in the process ++ // of marking packages for removal - Karthik ++ ab_pkg->dependencies_checked = 2; ++ ++ i = 0; ++ count = 1; ++ while (dependents [i] != NULL) { ++ abstract_pkg_t *dep_ab_pkg = dependents[i]; ++ ++ if (dep_ab_pkg->dependencies_checked == 2){ ++ i++; ++ continue; ++ } ++ if (dep_ab_pkg->state_status == SS_INSTALLED) { ++ for (a = 0; a < dep_ab_pkg->pkgs->len; a++) { ++ pkg_t *dep_pkg = dep_ab_pkg->pkgs->pkgs[a]; ++ if (dep_pkg->state_status == SS_INSTALLED) { ++ pkg_vec_insert(dependent_pkgs, dep_pkg); ++ count++; ++ } ++ } ++ } ++ i++; ++ /* 1 - to keep track of visited ab_pkgs when checking for possiblility of a broken removal of pkgs. ++ * 2 - to keep track of pkgs whose deps have been checked alrdy - Karthik */ ++ } ++ ++ if (count == 1) ++ return 0; ++ ++ ++ for (i = 0; i < dependent_pkgs->len; i++) { ++ int err = ipkg_remove_pkg(conf, dependent_pkgs->pkgs[i],0); ++ if (err) ++ return err; ++ } ++ return 0; ++} ++ ++static int user_prefers_removing_dependents(ipkg_conf_t *conf, pkg_t *pkg, abstract_pkg_t **dependents) ++{ ++ abstract_pkg_t *dep_ab_pkg; ++ ipkg_message(conf, IPKG_ERROR, "Package %s is depended upon by packages:\n", pkg->name); ++ while ((dep_ab_pkg = *dependents++) != NULL) { ++ if (dep_ab_pkg->state_status == SS_INSTALLED) ++ ipkg_message(conf, IPKG_ERROR, "\t%s\n", dep_ab_pkg->name); ++ } ++ ipkg_message(conf, IPKG_ERROR, "These might cease to work if package %s is removed.\n\n", pkg->name); ++ ipkg_message(conf, IPKG_ERROR, ""); ++ ipkg_message(conf, IPKG_ERROR, "You can force removal of this package with -force-depends.\n"); ++ ipkg_message(conf, IPKG_ERROR, "You can force removal of this package and its dependents\n"); ++ ipkg_message(conf, IPKG_ERROR, "with -force-removal-of-dependent-packages or -recursive\n"); ++ ipkg_message(conf, IPKG_ERROR, "or by setting option force_removal_of_dependent_packages\n"); ++ ipkg_message(conf, IPKG_ERROR, "in ipkg.conf.\n"); ++ return 0; ++} ++ ++int ipkg_remove_pkg(ipkg_conf_t *conf, pkg_t *pkg,int message) ++{ ++/* Actually, when "message == 1" I have been called from an upgrade, and not from a normal remove ++ thus I wan't check for essential, as I'm upgrading. ++ I hope it won't break anything :) ++*/ ++ int err; ++ abstract_pkg_t *parent_pkg = NULL; ++ ++ if (pkg->essential && !message) { ++ if (conf->force_removal_of_essential_packages) { ++ fprintf(stderr, "WARNING: Removing essential package %s under your coercion.\n" ++ "\tIf your system breaks, you get to keep both pieces\n", ++ pkg->name); ++ } else { ++ fprintf(stderr, "ERROR: Refusing to remove essential package %s.\n" ++ "\tRemoving an essential package may lead to an unusable system, but if\n" ++ "\tyou enjoy that kind of pain, you can force ipkg to proceed against\n" ++ "\tits will with the option: -force-removal-of-essential-packages\n", ++ pkg->name); ++ return IPKG_PKG_IS_ESSENTIAL; ++ } ++ } ++ ++ if ((parent_pkg = pkg->parent) == NULL) ++ return 0; ++ ++ /* only attempt to remove dependent installed packages if ++ * force_depends is not specified or the package is being ++ * replaced. ++ */ ++ if (!conf->force_depends ++ && !(pkg->state_flag & SF_REPLACE)) { ++ abstract_pkg_t **dependents; ++ int has_installed_dependents = ++ pkg_has_installed_dependents(pkg, &dependents); ++ ++ if (has_installed_dependents) { ++ /* ++ * if this package is depended up by others, then either we should ++ * not remove it or we should remove it and all of its dependents ++ */ ++ ++ if (!conf->force_removal_of_dependent_packages ++ && !user_prefers_removing_dependents(conf, pkg, dependents)) { ++ return IPKG_PKG_HAS_DEPENDENTS; ++ } ++ ++ /* remove packages depending on this package - Karthik */ ++ err = ipkg_remove_dependent_pkgs (conf, pkg, dependents); ++ free(dependents); ++ if (err) return err; ++ } ++ } ++ ++ if ( message==0 ){ ++ printf("Removing package %s from %s...\n", pkg->name, pkg->dest->name); ++ fflush(stdout); ++ } ++ pkg->state_flag |= SF_FILELIST_CHANGED; ++ ++ pkg->state_want = SW_DEINSTALL; ++ ipkg_state_changed++; ++ ++ pkg_run_script(conf, pkg, "prerm", "remove"); ++ ++ /* DPKG_INCOMPATIBILITY: dpkg is slightly different here. It ++ maintains an empty filelist rather than deleting it. That seems ++ like a big pain, and I don't see that that should make a big ++ difference, but for anyone who wants tighter compatibility, ++ feel free to fix this. */ ++ remove_data_files_and_list(conf, pkg); ++ ++ pkg_run_script(conf, pkg, "postrm", "remove"); ++ ++ remove_maintainer_scripts_except_postrm(conf, pkg); ++ ++ /* Aman Gupta - Since ipkg is made for handheld devices with limited ++ * space, it doesn't make sense to leave extra configurations, files, ++ * and maintainer scripts left around. So, we make remove like purge, ++ * and take out all the crap :) */ ++ ++ remove_postrm(conf, pkg); ++ pkg->state_status = SS_NOT_INSTALLED; ++ ++ if (parent_pkg) ++ parent_pkg->state_status = SS_NOT_INSTALLED; ++ ++ return 0; ++} ++ ++int ipkg_purge_pkg(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ ipkg_remove_pkg(conf, pkg,0); ++ return 0; ++} ++ ++int remove_data_files_and_list(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ str_list_t installed_dirs; ++ str_list_t *installed_files; ++ str_list_elt_t *iter; ++ char *file_name; ++ conffile_t *conffile; ++ int removed_a_dir; ++ pkg_t *owner; ++ ++ str_list_init(&installed_dirs); ++ installed_files = pkg_get_installed_files(pkg); ++ ++ for (iter = installed_files->head; iter; iter = iter->next) { ++ file_name = iter->data; ++ ++ if (file_is_dir(file_name)) { ++ str_list_append(&installed_dirs, strdup(file_name)); ++ continue; ++ } ++ ++ conffile = pkg_get_conffile(pkg, file_name); ++ if (conffile) { ++ /* XXX: QUESTION: Is this right? I figure we only need to ++ save the conffile if it has been modified. Is that what ++ dpkg does? Or does dpkg preserve all conffiles? If so, ++ this seems like a better thing to do to conserve ++ space. */ ++ if (conffile_has_been_modified(conf, conffile)) { ++ printf(" not deleting modified conffile %s\n", file_name); ++ fflush(stdout); ++ continue; ++ } ++ } ++ ++ ipkg_message(conf, IPKG_INFO, " deleting %s (noaction=%d)\n", file_name, conf->noaction); ++ if (!conf->noaction) ++ unlink(file_name); ++ } ++ ++ if (!conf->noaction) { ++ do { ++ removed_a_dir = 0; ++ for (iter = installed_dirs.head; iter; iter = iter->next) { ++ file_name = iter->data; ++ ++ if (rmdir(file_name) == 0) { ++ ipkg_message(conf, IPKG_INFO, " deleting %s\n", file_name); ++ removed_a_dir = 1; ++ str_list_remove(&installed_dirs, &iter); ++ } ++ } ++ } while (removed_a_dir); ++ } ++ ++ pkg_free_installed_files(pkg); ++ /* We have to remove the file list now, so that ++ find_pkg_owning_file does not always just report this package */ ++ pkg_remove_installed_files_list(conf, pkg); ++ ++ /* Don't print warning for dirs that are provided by other packages */ ++ for (iter = installed_dirs.head; iter; iter = iter->next) { ++ file_name = iter->data; ++ ++ owner = file_hash_get_file_owner(conf, file_name); ++ if (owner) { ++ free(iter->data); ++ iter->data = NULL; ++ str_list_remove(&installed_dirs, &iter); ++ } ++ } ++ ++ /* cleanup */ ++ for (iter = installed_dirs.head; iter; iter = iter->next) { ++ free(iter->data); ++ iter->data = NULL; ++ } ++ str_list_deinit(&installed_dirs); ++ ++ return 0; ++} ++ ++int remove_maintainer_scripts_except_postrm(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ int i, err; ++ char *globpattern; ++ glob_t globbuf; ++ ++ if (conf->noaction) return 0; ++ ++ sprintf_alloc(&globpattern, "%s/%s.*", ++ pkg->dest->info_dir, pkg->name); ++ err = glob(globpattern, 0, NULL, &globbuf); ++ free(globpattern); ++ if (err) { ++ return 0; ++ } ++ ++ for (i = 0; i < globbuf.gl_pathc; i++) { ++ if (str_ends_with(globbuf.gl_pathv[i], ".postrm")) { ++ continue; ++ } ++ ipkg_message(conf, IPKG_INFO, " deleting %s\n", globbuf.gl_pathv[i]); ++ unlink(globbuf.gl_pathv[i]); ++ } ++ globfree(&globbuf); ++ ++ return 0; ++} ++ ++int remove_postrm(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ char *postrm_file_name; ++ ++ if (conf->noaction) return 0; ++ ++ sprintf_alloc(&postrm_file_name, "%s/%s.postrm", ++ pkg->dest->info_dir, pkg->name); ++ unlink(postrm_file_name); ++ free(postrm_file_name); ++ ++ return 0; ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_remove.h busybox-1.12.1/archival/libipkg/ipkg_remove.h +--- busybox-1.12.1.orig/archival/libipkg/ipkg_remove.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_remove.h 2008-10-23 14:42:20.000000000 +0200 +@@ -0,0 +1,33 @@ ++/* ipkg_remove.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef IPKG_REMOVE_H ++#define IPKG_REMOVE_H ++ ++#include "pkg.h" ++#include "ipkg_conf.h" ++ ++int ipkg_remove_pkg(ipkg_conf_t *conf, pkg_t *pkg,int message); ++int ipkg_purge_pkg(ipkg_conf_t *conf, pkg_t *pkg); ++int possible_broken_removal_of_packages (ipkg_conf_t *conf, pkg_t *pkg); ++int pkg_has_installed_dependents(pkg_t *pkg, abstract_pkg_t *** pdependents); ++int remove_data_files_and_list(ipkg_conf_t *conf, pkg_t *pkg); ++int remove_maintainer_scripts_except_postrm (ipkg_conf_t *conf, pkg_t *pkg); ++int remove_postrm (ipkg_conf_t *conf, pkg_t *pkg); ++ ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_upgrade.c busybox-1.12.1/archival/libipkg/ipkg_upgrade.c +--- busybox-1.12.1.orig/archival/libipkg/ipkg_upgrade.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_upgrade.c 2008-10-23 14:43:14.000000000 +0200 +@@ -0,0 +1,79 @@ ++/* ipkg_upgrade.c - the itsy package management system ++ ++ Carl D. Worth ++ Copyright (C) 2001 University of Southern California ++ ++ Copyright (C) 2003 Daniele Nicolodi ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++#include "ipkg_install.h" ++#include "ipkg_message.h" ++ ++int ipkg_upgrade_pkg(ipkg_conf_t *conf, pkg_t *old); ++ ++int ipkg_upgrade_pkg(ipkg_conf_t *conf, pkg_t *old) ++{ ++ pkg_t *new; ++ int cmp; ++ char *old_version, *new_version; ++ ++ if (old->state_flag & SF_HOLD) { ++ ipkg_message(conf, IPKG_NOTICE, ++ "Not upgrading package %s which is marked " ++ "hold (flags=%#x)\n", old->name, old->state_flag); ++ return 0; ++ } ++ ++ new = pkg_hash_fetch_best_installation_candidate_by_name(conf, old->name); ++ if (new == NULL) { ++ old_version = pkg_version_str_alloc(old); ++ ipkg_message(conf, IPKG_NOTICE, ++ "Assuming locally installed package %s (%s) " ++ "is up to date.\n", old->name, old_version); ++ free(old_version); ++ return 0; ++ } ++ ++ old_version = pkg_version_str_alloc(old); ++ new_version = pkg_version_str_alloc(new); ++ ++ cmp = pkg_compare_versions(old, new); ++ ipkg_message(conf, IPKG_DEBUG, ++ "comparing visible versions of pkg %s:" ++ "\n\t%s is installed " ++ "\n\t%s is available " ++ "\n\t%d was comparison result\n", ++ old->name, old_version, new_version, cmp); ++ if (cmp == 0) { ++ ipkg_message(conf, IPKG_INFO, ++ "Package %s (%s) installed in %s is up to date.\n", ++ old->name, old_version, old->dest->name); ++ free(old_version); ++ free(new_version); ++ return 0; ++ } else if (cmp > 0) { ++ ipkg_message(conf, IPKG_NOTICE, ++ "Not downgrading package %s on %s from %s to %s.\n", ++ old->name, old->dest->name, old_version, new_version); ++ free(old_version); ++ free(new_version); ++ return 0; ++ } else if (cmp < 0) { ++ new->dest = old->dest; ++ old->state_want = SW_DEINSTALL; ++ } ++ ++ new->state_flag |= SF_USER; ++ return ipkg_install_pkg(conf, new,1); ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_upgrade.h busybox-1.12.1/archival/libipkg/ipkg_upgrade.h +--- busybox-1.12.1.orig/archival/libipkg/ipkg_upgrade.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_upgrade.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,18 @@ ++/* ipkg_upgrade.c - the itsy package management system ++ ++ Copyright (C) 2003 Daniele Nicolodi ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++ ++int ipkg_upgrade_pkg(ipkg_conf_t *conf, pkg_t *old); +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_utils.c busybox-1.12.1/archival/libipkg/ipkg_utils.c +--- busybox-1.12.1.orig/archival/libipkg/ipkg_utils.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_utils.c 2008-10-23 14:44:05.000000000 +0200 +@@ -0,0 +1,185 @@ ++/* ipkg_utils.c - the itsy package management system ++ ++ Steven M. Ayer ++ ++ Copyright (C) 2002 Compaq Computer Corporation ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++#include ++#include ++#include ++ ++#include "ipkg_utils.h" ++#include "pkg.h" ++#include "pkg_hash.h" ++ ++void push_error_list(struct errlist ** errors, char * msg); ++void reverse_error_list(struct errlist **errors); ++void free_error_list(struct errlist **errors); ++ ++struct errlist* error_list; ++ ++int get_available_blocks(char * filesystem) ++{ ++ struct statfs sfs; ++ ++ if(statfs(filesystem, &sfs)){ ++ fprintf(stderr, "bad statfs\n"); ++ return 0; ++ } ++ /* fprintf(stderr, "reported fs type %x\n", sfs.f_type); */ ++ return ((sfs.f_bavail * sfs.f_bsize) / 1024); ++} ++ ++char **read_raw_pkgs_from_file(const char *file_name) ++{ ++ FILE *fp; ++ char **ret; ++ ++ if(!(fp = fopen(file_name, "r"))){ ++ fprintf(stderr, "can't get %s open for read\n", file_name); ++ return NULL; ++ } ++ ++ ret = read_raw_pkgs_from_stream(fp); ++ ++ fclose(fp); ++ ++ return ret; ++} ++ ++char **read_raw_pkgs_from_stream(FILE *fp) ++{ ++ char **raw = NULL, *buf, *scout; ++ int count = 0; ++ size_t size = 512; ++ ++ buf = malloc (size); ++ ++ while (fgets(buf, size, fp)) { ++ while (strlen (buf) == (size - 1) ++ && buf[size-2] != '\n') { ++ size_t o = size - 1; ++ size *= 2; ++ buf = realloc (buf, size); ++ if (fgets (buf + o, size - o, fp) == NULL) ++ break; ++ } ++ ++ if(!(count % 50)) ++ raw = realloc(raw, (count + 50) * sizeof(char *)); ++ ++ if((scout = strchr(buf, '\n'))) ++ *scout = '\0'; ++ ++ raw[count++] = strdup(buf); ++ } ++ ++ raw = realloc(raw, (count + 1) * sizeof(char *)); ++ raw[count] = NULL; ++ ++ free (buf); ++ ++ return raw; ++} ++ ++/* something to remove whitespace, a hash pooper */ ++char *trim_alloc(char *line) ++{ ++ char *new; ++ char *dest, *src, *end; ++ ++ new = malloc(strlen(line) + 1); ++ if ( new == NULL ){ ++ fprintf(stderr,"%s: Unable to allocate memory\n",__FUNCTION__); ++ return NULL; ++ } ++ dest = new, src = line, end = line + (strlen(line) - 1); ++ ++ /* remove it from the front */ ++ while(src && ++ isspace(*src) && ++ *src) ++ src++; ++ /* and now from the back */ ++ while((end > src) && ++ isspace(*end)) ++ end--; ++ end++; ++ *end = '\0'; ++ strcpy(new, src); ++ /* this does from the first space ++ * blasting away any versions stuff in depends ++ while(src && ++ !isspace(*src) && ++ *src) ++ *dest++ = *src++; ++ *dest = '\0'; ++ */ ++ ++ return new; ++} ++ ++int line_is_blank(const char *line) ++{ ++ const char *s; ++ ++ for (s = line; *s; s++) { ++ if (!isspace(*s)) ++ return 0; ++ } ++ return 1; ++} ++ ++void push_error_list(struct errlist ** errors, char * msg){ ++ struct errlist *err_lst_tmp; ++ ++ ++ err_lst_tmp = malloc ( sizeof (err_lst_tmp) ); ++ err_lst_tmp->errmsg=strdup(msg) ; ++ err_lst_tmp->next = *errors; ++ *errors = err_lst_tmp; ++} ++ ++ ++void reverse_error_list(struct errlist **errors){ ++ struct errlist *result=NULL; ++ struct errlist *current= *errors; ++ struct errlist *next; ++ ++ while ( current != NULL ) { ++ next = current->next; ++ current->next=result; ++ result=current; ++ current=next; ++ } ++ *errors=result; ++ ++} ++ ++ ++void free_error_list(struct errlist **errors){ ++ struct errlist *current = *errors; ++ ++ while (current != NULL) { ++ free(current->errmsg); ++ current = (*errors)->next; ++ free(*errors); ++ *errors = current; ++ } ++ ++ ++} ++ ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/ipkg_utils.h busybox-1.12.1/archival/libipkg/ipkg_utils.h +--- busybox-1.12.1.orig/archival/libipkg/ipkg_utils.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/ipkg_utils.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,29 @@ ++/* ipkg_utils.h - the itsy package management system ++ ++ Steven M. Ayer ++ ++ Copyright (C) 2002 Compaq Computer Corporation ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef IPKG_UTILS_H ++#define IPKG_UTILS_H ++ ++#include "pkg.h" ++ ++int get_available_blocks(char * filesystem); ++char **read_raw_pkgs_from_file(const char *file_name); ++char **read_raw_pkgs_from_stream(FILE *fp); ++char *trim_alloc(char * line); ++int line_is_blank(const char *line); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/Kbuild busybox-1.12.1/archival/libipkg/Kbuild +--- busybox-1.12.1.orig/archival/libipkg/Kbuild 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/Kbuild 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,60 @@ ++# Makefile for busybox ++# ++# Copyright (C) 1999-2004 by Erik Andersen ++# Copyright (C) 2006 OpenWrt.org ++# ++# Licensed under the GPL v2 or later, see the file LICENSE in this tarball. ++ ++LIBIPKG_CORE_OBJS:= \ ++ args.o \ ++ libipkg.o \ ++ user.o \ ++ ++LIBIPKG_CMD_OBJS:= \ ++ ipkg_cmd.o \ ++ ipkg_configure.o \ ++ ipkg_download.o \ ++ ipkg_install.o \ ++ ipkg_remove.o \ ++ ipkg_upgrade.o \ ++ ++LIBIPKG_DB_OBJS:= \ ++ hash_table.o \ ++ ipkg_conf.o \ ++ ipkg_utils.o \ ++ pkg.o \ ++ pkg_depends.o \ ++ pkg_extract.o \ ++ pkg_hash.o \ ++ pkg_parse.o \ ++ pkg_vec.o \ ++ ++LIBIPKG_LIST_OBJS:= \ ++ conffile.o \ ++ conffile_list.o \ ++ nv_pair.o \ ++ nv_pair_list.o \ ++ pkg_dest.o \ ++ pkg_dest_list.o \ ++ pkg_src.o \ ++ pkg_src_list.o \ ++ str_list.o \ ++ void_list.o \ ++ ++LIBIPKG_UTIL_OBJS:= \ ++ file_util.o \ ++ ipkg_message.o \ ++ str_util.o \ ++ xsystem.o \ ++ ++lib-y := ++lib-$(CONFIG_IPKG) += $(LIBIPKG_CORE_OBJS) ++lib-$(CONFIG_IPKG) += $(LIBIPKG_CMD_OBJS) ++lib-$(CONFIG_IPKG) += $(LIBIPKG_DB_OBJS) ++lib-$(CONFIG_IPKG) += $(LIBIPKG_LIST_OBJS) ++lib-$(CONFIG_IPKG) += $(LIBIPKG_UTIL_OBJS) ++ ++ifeq ($(strip $(IPKG_ARCH)),) ++IPKG_ARCH:=$(TARGET_ARCH) ++endif ++CFLAGS += -DIPKG_LIB -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(IPKG_ARCH)\"" +diff -Nur busybox-1.12.1.orig/archival/libipkg/libipkg.c busybox-1.12.1/archival/libipkg/libipkg.c +--- busybox-1.12.1.orig/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/libipkg.c 2008-10-23 14:59:01.000000000 +0200 +@@ -0,0 +1,532 @@ ++/* ipkglib.c - the itsy package management system ++ ++ Florina Boor ++ ++ Copyright (C) 2003 kernel concepts ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifdef IPKG_LIB ++ ++#include "ipkg.h" ++#include "ipkg_includes.h" ++#include "libipkg.h" ++ ++#include "args.h" ++#include "ipkg_conf.h" ++#include "ipkg_cmd.h" ++#include "file_util.h" ++ ++int ipkg_file_what(args_t *args, const char *file, const char* command); ++int default_ipkg_message_callback(ipkg_conf_t *conf, message_level_t level, ++ char *msg); ++int default_ipkg_list_callback(char *name, char *desc, char *version); ++int default_ipkg_files_callback(char *desc); ++int default_ipkg_status_callback(char *desc); ++char* default_ipkg_response_callback(char *question); ++ ++ ++ipkg_message_callback ipkg_cb_message = NULL; ++ipkg_response_callback ipkg_cb_response = NULL; ++ipkg_status_callback ipkg_cb_status = NULL; ++ipkg_list_callback ipkg_cb_list = NULL; ++ ++ ++int ++ipkg_init (ipkg_message_callback mcall, ++ ipkg_response_callback rcall, ++ args_t * args) ++{ ++ ipkg_cb_message = mcall; ++ ipkg_cb_response = rcall; ++ ++ args_init (args); ++ ++ return 0; ++} ++ ++ ++int ++ipkg_deinit (args_t * args) ++{ ++ args_deinit (args); ++ ipkg_cb_message = NULL; ++ ipkg_cb_response = NULL; ++ ++ /* place other cleanup stuff here */ ++ ++ return 0; ++} ++ ++ ++int ++ipkg_packages_list(args_t *args, ++ const char *packages, ++ ipkg_list_callback cblist, ++ void *userdata) ++{ ++ ipkg_cmd_t *cmd; ++ ipkg_conf_t ipkg_conf; ++ int err; ++ ++ err = ipkg_conf_init (&ipkg_conf, args); ++ if (err) ++ { ++ return err; ++ } ++ ++ ipkg_cb_list = cblist; ++ /* we need to do this because of static declarations, ++ * maybe a good idea to change */ ++ cmd = ipkg_cmd_find ("list"); ++ if (packages) ++ err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &packages, userdata); ++ else ++ err = ipkg_cmd_exec (cmd, &ipkg_conf, 0, NULL, userdata); ++ ipkg_cb_list = NULL; ++ ipkg_conf_deinit (&ipkg_conf); ++ return (err); ++} ++ ++ ++int ++ipkg_packages_status(args_t *args, ++ const char *packages, ++ ipkg_status_callback cbstatus, ++ void *userdata) ++{ ++ ipkg_cmd_t *cmd; ++ ipkg_conf_t ipkg_conf; ++ int err; ++ ++ err = ipkg_conf_init (&ipkg_conf, args); ++ if (err) ++ { ++ return err; ++ } ++ ++ ipkg_cb_status = cbstatus; ++ ++ /* we need to do this because of static declarations, ++ * maybe a good idea to change */ ++ cmd = ipkg_cmd_find ("status"); ++ if (packages) ++ err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &packages, userdata); ++ else ++ err = ipkg_cmd_exec (cmd, &ipkg_conf, 0, NULL, userdata); ++ ++ ipkg_cb_status = NULL; ++ ipkg_conf_deinit (&ipkg_conf); ++ return (err); ++} ++ ++ ++int ++ipkg_packages_info(args_t *args, ++ const char *packages, ++ ipkg_status_callback cbstatus, ++ void *userdata) ++{ ++ ipkg_cmd_t *cmd; ++ ipkg_conf_t ipkg_conf; ++ int err; ++ ++ err = ipkg_conf_init (&ipkg_conf, args); ++ if (err) ++ { ++ return err; ++ } ++ ++ ipkg_cb_status = cbstatus; ++ ++ /* we need to do this because of static declarations, ++ * maybe a good idea to change */ ++ cmd = ipkg_cmd_find ("info"); ++ if (packages) ++ err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &packages, userdata); ++ else ++ err = ipkg_cmd_exec (cmd, &ipkg_conf, 0, NULL, userdata); ++ ++ ipkg_cb_status = NULL; ++ ipkg_conf_deinit (&ipkg_conf); ++ return (err); ++} ++ ++ ++int ++ipkg_packages_install (args_t * args, const char *name) ++{ ++ ipkg_cmd_t *cmd; ++ ipkg_conf_t ipkg_conf; ++ int err; ++ ++ /* this error should be handled in application */ ++ if (!name || !strlen (name)) ++ return (-1); ++ ++ err = ipkg_conf_init (&ipkg_conf, args); ++ if (err) ++ { ++ return err; ++ } ++ ++ /* we need to do this because of static declarations, ++ * maybe a good idea to change */ ++ cmd = ipkg_cmd_find ("install"); ++ err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &name, NULL); ++ ++ ipkg_conf_deinit(&ipkg_conf); ++ return (err); ++} ++ ++ ++int ++ipkg_packages_remove(args_t *args, const char *name, int purge) ++{ ++ ipkg_cmd_t *cmd; ++ ipkg_conf_t ipkg_conf; ++ int err; ++ ++ /* this error should be handled in application */ ++ if (!name || !strlen (name)) ++ return (-1); ++ ++ err = ipkg_conf_init (&ipkg_conf, args); ++ if (err) ++ { ++ return err; ++ } ++ ++ /* we need to do this because of static declarations, ++ * maybe a good idea to change */ ++ if (purge) ++ cmd = ipkg_cmd_find ("purge"); ++ else ++ cmd = ipkg_cmd_find ("remove"); ++ ++ err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &name, NULL); ++ ++ ipkg_conf_deinit(&ipkg_conf); ++ return (err); ++} ++ ++ ++int ++ipkg_lists_update(args_t *args) ++{ ++ ipkg_cmd_t *cmd; ++ ipkg_conf_t ipkg_conf; ++ int err; ++ ++ err = ipkg_conf_init (&ipkg_conf, args); ++ if (err) ++ { ++ return err; ++ } ++ ++ /* we need to do this because of static declarations, ++ * maybe a good idea to change */ ++ cmd = ipkg_cmd_find ("update"); ++ ++ err = ipkg_cmd_exec (cmd, &ipkg_conf, 0, NULL, NULL); ++ ++ ipkg_conf_deinit(&ipkg_conf); ++ return (err); ++} ++ ++ ++int ++ipkg_packages_upgrade(args_t *args) ++{ ++ ipkg_cmd_t *cmd; ++ ipkg_conf_t ipkg_conf; ++ int err; ++ ++ err = ipkg_conf_init (&ipkg_conf, args); ++ if (err) ++ { ++ return err; ++ } ++ ++ /* we need to do this because of static declarations, ++ * maybe a good idea to change */ ++ cmd = ipkg_cmd_find ("upgrade"); ++ ++ err = ipkg_cmd_exec (cmd, &ipkg_conf, 0, NULL, NULL); ++ ++ ipkg_conf_deinit(&ipkg_conf); ++ return (err); ++} ++ ++ ++int ++ipkg_packages_download (args_t * args, const char *name) ++{ ++ ipkg_cmd_t *cmd; ++ ipkg_conf_t ipkg_conf; ++ int err; ++ ++ /* this error should be handled in application */ ++ if (!name || !strlen (name)) ++ return (-1); ++ ++ err = ipkg_conf_init (&ipkg_conf, args); ++ if (err) ++ { ++ return err; ++ } ++ ++ /* we need to do this because of static declarations, ++ * maybe a good idea to change */ ++ cmd = ipkg_cmd_find ("download"); ++ err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &name, NULL); ++ ++ ipkg_conf_deinit(&ipkg_conf); ++ return (err); ++} ++ ++ ++int ++ipkg_package_files(args_t *args, ++ const char *name, ++ ipkg_list_callback cblist, ++ void *userdata) ++{ ++ ipkg_cmd_t *cmd; ++ ipkg_conf_t ipkg_conf; ++ int err; ++ ++ /* this error should be handled in application */ ++ if (!name || !strlen (name)) ++ return (-1); ++ ++ err = ipkg_conf_init (&ipkg_conf, args); ++ if (err) ++ { ++ return err; ++ } ++ ++ ipkg_cb_list = cblist; ++ ++ /* we need to do this because of static declarations, ++ * maybe a good idea to change */ ++ cmd = ipkg_cmd_find ("files"); ++ ++ err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &name, userdata); ++ ++ ipkg_cb_list = NULL; ++ ipkg_conf_deinit(&ipkg_conf); ++ return (err); ++} ++ ++ ++int ++ipkg_file_search(args_t *args, ++ const char *file, ++ ipkg_list_callback cblist, ++ void *userdata) ++{ ++ ipkg_cmd_t *cmd; ++ ipkg_conf_t ipkg_conf; ++ int err; ++ ++ /* this error should be handled in application */ ++ if (!file || !strlen (file)) ++ return (-1); ++ ++ err = ipkg_conf_init (&ipkg_conf, args); ++ if (err) ++ { ++ return err; ++ } ++ ++ ipkg_cb_list = cblist; ++ ++ /* we need to do this because of static declarations, ++ * maybe a good idea to change */ ++ cmd = ipkg_cmd_find ("search"); ++ err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &file, userdata); ++ ++ ipkg_cb_list = NULL; ++ ipkg_conf_deinit(&ipkg_conf); ++ return(err); ++} ++ ++ ++int ++ipkg_file_what(args_t *args, const char *file, const char* command) ++{ ++ ipkg_cmd_t *cmd; ++ ipkg_conf_t ipkg_conf; ++ int err; ++ ++ /* this error should be handled in application */ ++ if (!file || !strlen (file)) ++ return (-1); ++ ++ err = ipkg_conf_init (&ipkg_conf, args); ++ if (err) ++ { ++ return err; ++ } ++ ++ /* we need to do this because of static declarations, ++ * maybe a good idea to change */ ++ cmd = ipkg_cmd_find (command); ++ err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &file, NULL); ++ ++ ipkg_conf_deinit(&ipkg_conf); ++ return(err); ++} ++ ++#define ipkg_package_whatdepends(args,file) ipkg_file_what(args,file,"whatdepends") ++#define ipkg_package_whatrecommends(args, file) ipkg_file_what(args,file,"whatrecommends") ++#define ipkg_package_whatprovides(args, file) ipkg_file_what(args,file,"whatprovides") ++#define ipkg_package_whatconflicts(args, file) ipkg_file_what(args,file,"whatconflicts") ++#define ipkg_package_whatreplaces(args, file) ipkg_file_what(args,file,"whatreplaces") ++ ++ ++int default_ipkg_message_callback(ipkg_conf_t *conf, message_level_t level, ++ char *msg) ++{ ++ if (conf && (conf->verbosity < level)) { ++ return 0; ++ } else { ++#ifdef IPKG_LIB ++ if ( level == IPKG_ERROR ){ ++ push_error_list(&error_list, msg); ++// printf(msg); ++ } else ++#endif ++ printf(msg); ++ } ++ return 0; ++} ++ ++int default_ipkg_list_callback(char *name, char *desc, char *version) ++{ ++ if (desc) ++ printf("%s - %s - %s\n", name, version, desc); ++ else ++ printf("%s - %s\n", name, version); ++ return 0; ++} ++ ++int default_ipkg_files_callback(char *desc) ++{ ++ if (desc) ++ printf("%s\n", desc); ++ return 0; ++} ++ ++int default_ipkg_status_callback(char *desc) ++{ ++ printf("%s\n", desc); ++ return 0; ++} ++ ++char* default_ipkg_response_callback(char *question) ++{ ++ char *response = NULL; ++ printf(question); ++ fflush(stdout); ++ do { ++ response = (char *)file_read_line_alloc(stdin); ++ } while (response == NULL); ++ return response; ++} ++ ++/* This is used for backward compatibility */ ++int ++ipkg_op (int argc, char *argv[]) ++{ ++ int err, optind_; ++ args_t args; ++ char *cmd_name; ++ ipkg_cmd_t *cmd; ++ ipkg_conf_t ipkg_conf; ++ const char *message = "ipkg must have one sub-command argument"; ++ ++ args_init (&args); ++ ++ optind_ = args_parse (&args, argc, argv); ++ if (optind_ == argc || optind_ < 0) ++ { ++ args_usage(message); ++ } ++ ++ cmd_name = argv[optind_++]; ++/* Pigi: added a flag to disable the checking of structures if the command does not need to ++ read anything from there. ++*/ ++ if ( !strcmp(cmd_name,"print-architecture") || ++ !strcmp(cmd_name,"print_architecture") || ++ !strcmp(cmd_name,"print-installation-architecture") || ++ !strcmp(cmd_name,"print_installation_architecture") ) ++ args.nocheckfordirorfile = 1; ++ ++/* Pigi: added a flag to disable the reading of feed files if the command does not need to ++ read anything from there. ++*/ ++ if ( !strcmp(cmd_name,"flag") || ++ !strcmp(cmd_name,"configure") || ++ !strcmp(cmd_name,"remove") || ++ !strcmp(cmd_name,"files") || ++ !strcmp(cmd_name,"search") || ++ !strcmp(cmd_name,"compare_versions") || ++ !strcmp(cmd_name,"compare-versions") || ++ !strcmp(cmd_name,"list_installed") || ++ !strcmp(cmd_name,"list-installed") || ++ !strcmp(cmd_name,"status") ) ++ args.noreadfeedsfile = 1; ++ ++ ++ err = ipkg_conf_init (&ipkg_conf, &args); ++ if (err) ++ { ++ return err; ++ } ++ ++ args_deinit (&args); ++ ++ ipkg_cb_message = default_ipkg_message_callback; ++ ipkg_cb_response = default_ipkg_response_callback; ++ ipkg_cb_status = (ipkg_status_callback)default_ipkg_status_callback; ++ if ( strcmp(cmd_name, "files")==0) ++ ipkg_cb_list = (ipkg_list_callback)default_ipkg_files_callback; ++ else ++ ipkg_cb_list = (ipkg_list_callback)default_ipkg_list_callback; ++ ++ cmd = ipkg_cmd_find (cmd_name); ++ if (cmd == NULL) ++ { ++ fprintf (stderr, "%s: unknown sub-command %s\n", argv[0], ++ cmd_name); ++ args_usage (NULL); ++ } ++ ++ if (cmd->requires_args && optind_ == argc) ++ { ++ fprintf (stderr, ++ "%s: the ``%s'' command requires at least one argument\n", ++ __FUNCTION__, cmd_name); ++ args_usage (NULL); ++ } ++ ++ err = ipkg_cmd_exec (cmd, &ipkg_conf, argc - optind_, (const char **) (argv + optind_), NULL); ++ ++ ipkg_conf_deinit (&ipkg_conf); ++ ++ return err; ++} ++ ++#endif /* IPKG_LIB */ +diff -Nur busybox-1.12.1.orig/archival/libipkg/libipkg.h busybox-1.12.1/archival/libipkg/libipkg.h +--- busybox-1.12.1.orig/archival/libipkg/libipkg.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/libipkg.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,87 @@ ++/* ipkglib.h - the itsy package management system ++ ++ Florian Boor ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef IPKGLIB_H ++#define IPKGLIB_H ++ ++#ifdef IPKG_LIB ++ ++#include "ipkg_conf.h" ++#include "ipkg_message.h" ++ ++#include "args.h" ++#include "pkg.h" ++ ++typedef int (*ipkg_message_callback)(ipkg_conf_t *conf, message_level_t level, ++ char *msg); ++typedef int (*ipkg_list_callback)(char *name, char *desc, char *version, ++ pkg_state_status_t status, void *userdata); ++typedef int (*ipkg_status_callback)(char *name, int istatus, char *desc, ++ void *userdata); ++typedef char* (*ipkg_response_callback)(char *question); ++ ++extern int ipkg_op(int argc, char *argv[]); /* ipkglib.c */ ++extern int ipkg_init (ipkg_message_callback mcall, ++ ipkg_response_callback rcall, ++ args_t * args); ++ ++extern int ipkg_deinit (args_t *args); ++extern int ipkg_packages_list(args_t *args, ++ const char *packages, ++ ipkg_list_callback cblist, ++ void *userdata); ++extern int ipkg_packages_status(args_t *args, ++ const char *packages, ++ ipkg_status_callback cbstatus, ++ void *userdata); ++extern int ipkg_packages_info(args_t *args, ++ const char *packages, ++ ipkg_status_callback cbstatus, ++ void *userdata); ++extern int ipkg_packages_install(args_t *args, const char *name); ++extern int ipkg_packages_remove(args_t *args, const char *name, int purge); ++extern int ipkg_lists_update(args_t *args); ++extern int ipkg_packages_upgrade(args_t *args); ++extern int ipkg_packages_download(args_t *args, const char *name); ++extern int ipkg_package_files(args_t *args, ++ const char *name, ++ ipkg_list_callback cblist, ++ void *userdata); ++extern int ipkg_file_search(args_t *args, ++ const char *file, ++ ipkg_list_callback cblist, ++ void *userdata); ++extern int ipkg_package_whatdepends(args_t *args, const char *file); ++extern int ipkg_package_whatrecommends(args_t *args, const char *file); ++extern int ipkg_package_whatprovides(args_t *args, const char *file); ++extern int ipkg_package_whatconflicts(args_t *args, const char *file); ++extern int ipkg_package_whatreplaces(args_t *args, const char *file); ++ ++extern ipkg_message_callback ipkg_cb_message; /* ipkglib.c */ ++extern ipkg_response_callback ipkg_cb_response; ++extern ipkg_status_callback ipkg_cb_status; ++extern ipkg_list_callback ipkg_cb_list; ++extern void push_error_list(struct errlist **errors,char * msg); ++extern void reverse_error_list(struct errlist **errors); ++extern void free_error_list(struct errlist **errors); ++ ++#else ++ ++extern int ipkg_op(int argc, char *argv[]); ++ ++#endif ++ ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/nv_pair.c busybox-1.12.1/archival/libipkg/nv_pair.c +--- busybox-1.12.1.orig/archival/libipkg/nv_pair.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/nv_pair.c 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,40 @@ ++/* nv_pair.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++ ++#include "nv_pair.h" ++#include "str_util.h" ++ ++int nv_pair_init(nv_pair_t *nv_pair, const char *name, const char *value) ++{ ++ nv_pair->name = str_dup_safe(name); ++ nv_pair->value = str_dup_safe(value); ++ ++ return 0; ++} ++ ++void nv_pair_deinit(nv_pair_t *nv_pair) ++{ ++ free(nv_pair->name); ++ nv_pair->name = NULL; ++ ++ free(nv_pair->value); ++ nv_pair->value = NULL; ++} ++ ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/nv_pair.h busybox-1.12.1/archival/libipkg/nv_pair.h +--- busybox-1.12.1.orig/archival/libipkg/nv_pair.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/nv_pair.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,32 @@ ++/* nv_pair.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef NV_PAIR_H ++#define NV_PAIR_H ++ ++typedef struct nv_pair nv_pair_t; ++struct nv_pair ++{ ++ char *name; ++ char *value; ++}; ++ ++int nv_pair_init(nv_pair_t *nv_pair, const char *name, const char *value); ++void nv_pair_deinit(nv_pair_t *nv_pair); ++ ++#endif ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/nv_pair_list.c busybox-1.12.1/archival/libipkg/nv_pair_list.c +--- busybox-1.12.1.orig/archival/libipkg/nv_pair_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/nv_pair_list.c 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,98 @@ ++/* nv_pair_list.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++ ++#include "nv_pair.h" ++#include "void_list.h" ++#include "nv_pair_list.h" ++ ++int nv_pair_list_elt_init(nv_pair_list_elt_t *elt, nv_pair_t *data) ++{ ++ return void_list_elt_init((void_list_elt_t *) elt, data); ++} ++ ++void nv_pair_list_elt_deinit(nv_pair_list_elt_t *elt) ++{ ++ void_list_elt_deinit((void_list_elt_t *) elt); ++} ++ ++int nv_pair_list_init(nv_pair_list_t *list) ++{ ++ return void_list_init((void_list_t *) list); ++} ++ ++void nv_pair_list_deinit(nv_pair_list_t *list) ++{ ++ nv_pair_list_elt_t *iter; ++ nv_pair_t *nv_pair; ++ ++ for (iter = list->head; iter; iter = iter->next) { ++ nv_pair = iter->data; ++ nv_pair_deinit(nv_pair); ++ ++ /* malloced in nv_pair_list_append */ ++ free(nv_pair); ++ iter->data = NULL; ++ } ++ void_list_deinit((void_list_t *) list); ++} ++ ++nv_pair_t *nv_pair_list_append(nv_pair_list_t *list, const char *name, const char *value) ++{ ++ int err; ++ ++ /* freed in nv_pair_list_deinit */ ++ nv_pair_t *nv_pair = malloc(sizeof(nv_pair_t)); ++ ++ if (nv_pair == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ nv_pair_init(nv_pair, name, value); ++ ++ err = void_list_append((void_list_t *) list, nv_pair); ++ if (err) { ++ return NULL; ++ } ++ ++ return nv_pair; ++} ++ ++int nv_pair_list_push(nv_pair_list_t *list, nv_pair_t *data) ++{ ++ return void_list_push((void_list_t *) list, data); ++} ++ ++nv_pair_list_elt_t *nv_pair_list_pop(nv_pair_list_t *list) ++{ ++ return (nv_pair_list_elt_t *) void_list_pop((void_list_t *) list); ++} ++ ++char *nv_pair_list_find(nv_pair_list_t *list, char *name) ++{ ++ nv_pair_list_elt_t *iter; ++ nv_pair_t *nv_pair; ++ ++ for (iter = list->head; iter; iter = iter->next) { ++ nv_pair = iter->data; ++ if (strcmp(nv_pair->name, name) == 0) { ++ return nv_pair->value; ++ } ++ } ++ return NULL; ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/nv_pair_list.h busybox-1.12.1/archival/libipkg/nv_pair_list.h +--- busybox-1.12.1.orig/archival/libipkg/nv_pair_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/nv_pair_list.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,60 @@ ++/* nv_pair_list.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef NV_PAIR_LIST_H ++#define NV_PAIR_LIST_H ++ ++#include "nv_pair.h" ++#include "void_list.h" ++ ++typedef struct nv_pair_list_elt nv_pair_list_elt_t; ++struct nv_pair_list_elt ++{ ++ nv_pair_list_elt_t *next; ++ nv_pair_t *data; ++}; ++ ++typedef struct nv_pair_list nv_pair_list_t; ++struct nv_pair_list ++{ ++ nv_pair_list_elt_t pre_head; ++ nv_pair_list_elt_t *head; ++ nv_pair_list_elt_t *tail; ++}; ++ ++static inline int nv_pair_list_empty(nv_pair_list_t *list) ++{ ++ if (list->head == NULL) ++ return 1; ++ else ++ return 0; ++} ++ ++int nv_pair_list_elt_init(nv_pair_list_elt_t *elt, nv_pair_t *data); ++void nv_pair_list_elt_deinit(nv_pair_list_elt_t *elt); ++ ++int nv_pair_list_init(nv_pair_list_t *list); ++void nv_pair_list_deinit(nv_pair_list_t *list); ++ ++nv_pair_t *nv_pair_list_append(nv_pair_list_t *list, ++ const char *name, const char *value); ++int nv_pair_list_push(nv_pair_list_t *list, nv_pair_t *data); ++nv_pair_list_elt_t *nv_pair_list_pop(nv_pair_list_t *list); ++char *nv_pair_list_find(nv_pair_list_t *list, char *name); ++ ++#endif ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg.c busybox-1.12.1/archival/libipkg/pkg.c +--- busybox-1.12.1.orig/archival/libipkg/pkg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg.c 2008-10-23 15:02:19.000000000 +0200 +@@ -0,0 +1,1757 @@ ++/* pkg.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++#include ++#include ++#include ++ ++#include "pkg.h" ++ ++#include "pkg_parse.h" ++#include "pkg_extract.h" ++#include "ipkg_message.h" ++#include "ipkg_utils.h" ++ ++#include "sprintf_alloc.h" ++#include "file_util.h" ++#include "str_util.h" ++#include "xsystem.h" ++#include "ipkg_conf.h" ++ ++int pkg_get_arch_priority(ipkg_conf_t *conf, const char *archname); ++void pkg_write_filelist_helper(const char *key, void *entry_, void *data_); ++ ++typedef struct enum_map enum_map_t; ++struct enum_map ++{ ++ int value; ++ const char *str; ++}; ++ ++static const enum_map_t pkg_state_want_map[] = { ++ { SW_UNKNOWN, "unknown"}, ++ { SW_INSTALL, "install"}, ++ { SW_DEINSTALL, "deinstall"}, ++ { SW_PURGE, "purge"} ++}; ++ ++static const enum_map_t pkg_state_flag_map[] = { ++ { SF_OK, "ok"}, ++ { SF_REINSTREQ, "reinstreq"}, ++ { SF_HOLD, "hold"}, ++ { SF_REPLACE, "replace"}, ++ { SF_NOPRUNE, "noprune"}, ++ { SF_PREFER, "prefer"}, ++ { SF_OBSOLETE, "obsolete"}, ++ { SF_USER, "user"}, ++}; ++ ++static const enum_map_t pkg_state_status_map[] = { ++ { SS_NOT_INSTALLED, "not-installed" }, ++ { SS_UNPACKED, "unpacked" }, ++ { SS_HALF_CONFIGURED, "half-configured" }, ++ { SS_INSTALLED, "installed" }, ++ { SS_HALF_INSTALLED, "half-installed" }, ++ { SS_CONFIG_FILES, "config-files" }, ++ { SS_POST_INST_FAILED, "post-inst-failed" }, ++ { SS_REMOVAL_FAILED, "removal-failed" } ++}; ++ ++static int verrevcmp(const char *val, const char *ref); ++ ++ ++pkg_t *pkg_new(void) ++{ ++ pkg_t *pkg; ++ ++ pkg = malloc(sizeof(pkg_t)); ++ if (pkg == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ ++ pkg_init(pkg); ++ ++ return pkg; ++} ++ ++int pkg_init(pkg_t *pkg) ++{ ++ memset(pkg, 0, sizeof(pkg_t)); ++ pkg->name = NULL; ++ pkg->epoch = 0; ++ pkg->version = NULL; ++ pkg->revision = NULL; ++ pkg->familiar_revision = NULL; ++ pkg->dest = NULL; ++ pkg->src = NULL; ++ pkg->architecture = NULL; ++ pkg->maintainer = NULL; ++ pkg->section = NULL; ++ pkg->description = NULL; ++ pkg->state_want = SW_UNKNOWN; ++ pkg->state_flag = SF_OK; ++ pkg->state_status = SS_NOT_INSTALLED; ++ pkg->depends_str = NULL; ++ pkg->provides_str = NULL; ++ pkg->depends_count = 0; ++ pkg->depends = NULL; ++ pkg->suggests_str = NULL; ++ pkg->recommends_str = NULL; ++ pkg->suggests_count = 0; ++ pkg->recommends_count = 0; ++ ++ /* Abhaya: added init for conflicts fields */ ++ pkg->conflicts = NULL; ++ pkg->conflicts_count = 0; ++ ++ /* added for replaces. Jamey 7/23/2002 */ ++ pkg->replaces = NULL; ++ pkg->replaces_count = 0; ++ ++ pkg->pre_depends_count = 0; ++ pkg->pre_depends_str = NULL; ++ pkg->provides_count = 0; ++ pkg->provides = NULL; ++ pkg->filename = NULL; ++ pkg->local_filename = NULL; ++ pkg->tmp_unpack_dir = NULL; ++ pkg->md5sum = NULL; ++ pkg->size = NULL; ++ pkg->installed_size = NULL; ++ pkg->priority = NULL; ++ pkg->source = NULL; ++ conffile_list_init(&pkg->conffiles); ++ pkg->installed_files = NULL; ++ pkg->installed_files_ref_cnt = 0; ++ pkg->essential = 0; ++ pkg->provided_by_hand = 0; ++ ++ return 0; ++} ++ ++void pkg_deinit(pkg_t *pkg) ++{ ++ free(pkg->name); ++ pkg->name = NULL; ++ pkg->epoch = 0; ++ free(pkg->version); ++ pkg->version = NULL; ++ /* revision and familiar_revision share storage with version, so ++ don't free */ ++ pkg->revision = NULL; ++ pkg->familiar_revision = NULL; ++ /* owned by ipkg_conf_t */ ++ pkg->dest = NULL; ++ /* owned by ipkg_conf_t */ ++ pkg->src = NULL; ++ free(pkg->architecture); ++ pkg->architecture = NULL; ++ free(pkg->maintainer); ++ pkg->maintainer = NULL; ++ free(pkg->section); ++ pkg->section = NULL; ++ free(pkg->description); ++ pkg->description = NULL; ++ pkg->state_want = SW_UNKNOWN; ++ pkg->state_flag = SF_OK; ++ pkg->state_status = SS_NOT_INSTALLED; ++ free(pkg->depends_str); ++ pkg->depends_str = NULL; ++ free(pkg->provides_str); ++ pkg->provides_str = NULL; ++ pkg->depends_count = 0; ++ /* XXX: CLEANUP: MEMORY_LEAK: how to free up pkg->depends ? */ ++ pkg->pre_depends_count = 0; ++ free(pkg->pre_depends_str); ++ pkg->pre_depends_str = NULL; ++ pkg->provides_count = 0; ++ /* XXX: CLEANUP: MEMORY_LEAK: how to free up pkg->provides ? */ ++ /* XXX: CLEANUP: MEMORY_LEAK: how to free up pkg->suggests ? */ ++ free(pkg->filename); ++ pkg->filename = NULL; ++ free(pkg->local_filename); ++ pkg->local_filename = NULL; ++ /* CLEANUP: It'd be nice to pullin the cleanup function from ++ ipkg_install.c here. See comment in ++ ipkg_install.c:cleanup_temporary_files */ ++ free(pkg->tmp_unpack_dir); ++ pkg->tmp_unpack_dir = NULL; ++ free(pkg->md5sum); ++ pkg->md5sum = NULL; ++ free(pkg->size); ++ pkg->size = NULL; ++ free(pkg->installed_size); ++ pkg->installed_size = NULL; ++ free(pkg->priority); ++ pkg->priority = NULL; ++ free(pkg->source); ++ pkg->source = NULL; ++ conffile_list_deinit(&pkg->conffiles); ++ /* XXX: QUESTION: Is forcing this to 1 correct? I suppose so, ++ since if they are calling deinit, they should know. Maybe do an ++ assertion here instead? */ ++ pkg->installed_files_ref_cnt = 1; ++ pkg_free_installed_files(pkg); ++ pkg->essential = 0; ++} ++ ++int pkg_init_from_file(pkg_t *pkg, const char *filename) ++{ ++ int err; ++ char **raw; ++ FILE *control_file; ++ ++ err = pkg_init(pkg); ++ if (err) { return err; } ++ ++ pkg->local_filename = strdup(filename); ++ ++ control_file = tmpfile(); ++ err = pkg_extract_control_file_to_stream(pkg, control_file); ++ if (err) { return err; } ++ ++ rewind(control_file); ++ raw = read_raw_pkgs_from_stream(control_file); ++ pkg_parse_raw(pkg, &raw, NULL, NULL); ++ ++ fclose(control_file); ++ ++ return 0; ++} ++ ++/* Merge any new information in newpkg into oldpkg */ ++/* XXX: CLEANUP: This function shouldn't actually modify anything in ++ newpkg, but should leave it usable. This rework is so that ++ pkg_hash_insert doesn't clobber the pkg that you pass into it. */ ++/* ++ * uh, i thought that i had originally written this so that it took ++ * two pkgs and returned a new one? we can do that again... -sma ++ */ ++int pkg_merge(pkg_t *oldpkg, pkg_t *newpkg, int set_status) ++{ ++ if (oldpkg == newpkg) { ++ return 0; ++ } ++ ++ if (!oldpkg->src) ++ oldpkg->src = newpkg->src; ++ if (!oldpkg->dest) ++ oldpkg->dest = newpkg->dest; ++ if (!oldpkg->architecture) ++ oldpkg->architecture = str_dup_safe(newpkg->architecture); ++ if (!oldpkg->arch_priority) ++ oldpkg->arch_priority = newpkg->arch_priority; ++ if (!oldpkg->section) ++ oldpkg->section = str_dup_safe(newpkg->section); ++ if(!oldpkg->maintainer) ++ oldpkg->maintainer = str_dup_safe(newpkg->maintainer); ++ if(!oldpkg->description) ++ oldpkg->description = str_dup_safe(newpkg->description); ++ if (set_status) { ++ /* merge the state_flags from the new package */ ++ oldpkg->state_want = newpkg->state_want; ++ oldpkg->state_status = newpkg->state_status; ++ oldpkg->state_flag = newpkg->state_flag; ++ } else { ++ if (oldpkg->state_want == SW_UNKNOWN) ++ oldpkg->state_want = newpkg->state_want; ++ if (oldpkg->state_status == SS_NOT_INSTALLED) ++ oldpkg->state_status = newpkg->state_status; ++ oldpkg->state_flag |= newpkg->state_flag; ++ } ++ ++ if (!oldpkg->depends_str && !oldpkg->pre_depends_str && !oldpkg->recommends_str && !oldpkg->suggests_str) { ++ oldpkg->depends_str = newpkg->depends_str; ++ newpkg->depends_str = NULL; ++ oldpkg->depends_count = newpkg->depends_count; ++ newpkg->depends_count = 0; ++ ++ oldpkg->depends = newpkg->depends; ++ newpkg->depends = NULL; ++ ++ oldpkg->pre_depends_str = newpkg->pre_depends_str; ++ newpkg->pre_depends_str = NULL; ++ oldpkg->pre_depends_count = newpkg->pre_depends_count; ++ newpkg->pre_depends_count = 0; ++ ++ oldpkg->recommends_str = newpkg->recommends_str; ++ newpkg->recommends_str = NULL; ++ oldpkg->recommends_count = newpkg->recommends_count; ++ newpkg->recommends_count = 0; ++ ++ oldpkg->suggests_str = newpkg->suggests_str; ++ newpkg->suggests_str = NULL; ++ oldpkg->suggests_count = newpkg->suggests_count; ++ newpkg->suggests_count = 0; ++ } ++ ++ if (!oldpkg->provides_str) { ++ oldpkg->provides_str = newpkg->provides_str; ++ newpkg->provides_str = NULL; ++ oldpkg->provides_count = newpkg->provides_count; ++ newpkg->provides_count = 0; ++ ++ oldpkg->provides = newpkg->provides; ++ newpkg->provides = NULL; ++ } ++ ++ if (!oldpkg->conflicts_str) { ++ oldpkg->conflicts_str = newpkg->conflicts_str; ++ newpkg->conflicts_str = NULL; ++ oldpkg->conflicts_count = newpkg->conflicts_count; ++ newpkg->conflicts_count = 0; ++ ++ oldpkg->conflicts = newpkg->conflicts; ++ newpkg->conflicts = NULL; ++ } ++ ++ if (!oldpkg->replaces_str) { ++ oldpkg->replaces_str = newpkg->replaces_str; ++ newpkg->replaces_str = NULL; ++ oldpkg->replaces_count = newpkg->replaces_count; ++ newpkg->replaces_count = 0; ++ ++ oldpkg->replaces = newpkg->replaces; ++ newpkg->replaces = NULL; ++ } ++ ++ if (!oldpkg->filename) ++ oldpkg->filename = str_dup_safe(newpkg->filename); ++ if (0) ++ fprintf(stdout, "pkg=%s old local_filename=%s new local_filename=%s\n", ++ oldpkg->name, oldpkg->local_filename, newpkg->local_filename); ++ if (!oldpkg->local_filename) ++ oldpkg->local_filename = str_dup_safe(newpkg->local_filename); ++ if (!oldpkg->tmp_unpack_dir) ++ oldpkg->tmp_unpack_dir = str_dup_safe(newpkg->tmp_unpack_dir); ++ if (!oldpkg->md5sum) ++ oldpkg->md5sum = str_dup_safe(newpkg->md5sum); ++ if (!oldpkg->size) ++ oldpkg->size = str_dup_safe(newpkg->size); ++ if (!oldpkg->installed_size) ++ oldpkg->installed_size = str_dup_safe(newpkg->installed_size); ++ if (!oldpkg->priority) ++ oldpkg->priority = str_dup_safe(newpkg->priority); ++ if (!oldpkg->source) ++ oldpkg->source = str_dup_safe(newpkg->source); ++ if (oldpkg->conffiles.head == NULL){ ++ oldpkg->conffiles = newpkg->conffiles; ++ conffile_list_init(&newpkg->conffiles); ++ } ++ if (!oldpkg->installed_files){ ++ oldpkg->installed_files = newpkg->installed_files; ++ oldpkg->installed_files_ref_cnt = newpkg->installed_files_ref_cnt; ++ newpkg->installed_files = NULL; ++ } ++ if (!oldpkg->essential) ++ oldpkg->essential = newpkg->essential; ++ ++ return 0; ++} ++ ++abstract_pkg_t *abstract_pkg_new(void) ++{ ++ abstract_pkg_t * ab_pkg; ++ ++ ab_pkg = malloc(sizeof(abstract_pkg_t)); ++ ++ if (ab_pkg == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ ++ if ( abstract_pkg_init(ab_pkg) < 0 ) ++ return NULL; ++ ++ return ab_pkg; ++} ++ ++int abstract_pkg_init(abstract_pkg_t *ab_pkg) ++{ ++ memset(ab_pkg, 0, sizeof(abstract_pkg_t)); ++ ++ ab_pkg->provided_by = abstract_pkg_vec_alloc(); ++ if (ab_pkg->provided_by==NULL){ ++ return -1; ++ } ++ ab_pkg->dependencies_checked = 0; ++ ab_pkg->state_status = SS_NOT_INSTALLED; ++ ++ return 0; ++} ++ ++void set_flags_from_control(ipkg_conf_t *conf, pkg_t *pkg){ ++ char * temp_str; ++ char **raw =NULL; ++ char **raw_start=NULL; ++ ++ temp_str = (char *) malloc (strlen(pkg->dest->info_dir)+strlen(pkg->name)+12); ++ if (temp_str == NULL ){ ++ ipkg_message(conf, IPKG_INFO, "Out of memory in %s\n", __FUNCTION__); ++ return; ++ } ++ sprintf( temp_str,"%s/%s.control",pkg->dest->info_dir,pkg->name); ++ ++ raw = raw_start = read_raw_pkgs_from_file(temp_str); ++ if (raw == NULL ){ ++ ipkg_message(conf, IPKG_ERROR, "Unable to open the control file in %s\n", __FUNCTION__); ++ return; ++ } ++ ++ while(*raw){ ++ if (!pkg_valorize_other_field(pkg, &raw ) == 0) { ++ ipkg_message(conf, IPKG_DEBUG, "unable to read control file for %s. May be empty\n", pkg->name); ++ } ++ } ++ raw = raw_start; ++ while (*raw) { ++ if (raw!=NULL) ++ free(*raw++); ++ } ++ ++ free(raw_start); ++ free(temp_str); ++ ++ return ; ++ ++} ++ ++char * pkg_formatted_info(pkg_t *pkg ) ++{ ++ char *line; ++ char * buff; ++ ++ buff = malloc(8192); ++ if (buff == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ ++ buff[0] = '\0'; ++ ++ line = pkg_formatted_field(pkg, "Package"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Version"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Depends"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Recommends"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Suggests"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Provides"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Replaces"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Conflicts"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Status"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Section"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Essential"); /* @@@@ should be removed in future release. *//* I do not agree with this Pigi*/ ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Architecture"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Maintainer"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "MD5sum"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Size"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Filename"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Conffiles"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Source"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Description"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ line = pkg_formatted_field(pkg, "Installed-Time"); ++ strncat(buff ,line, strlen(line)); ++ free(line); ++ ++ return buff; ++} ++ ++char * pkg_formatted_field(pkg_t *pkg, const char *field ) ++{ ++ static size_t LINE_LEN = 128; ++ char * temp = (char *)malloc(1); ++ int len = 0; ++ int flag_provide_false = 0; ++ ++/* ++ Pigi: After some discussion with Florian we decided to modify the full procedure in ++ dynamic memory allocation. This should avoid any other segv in this area ( except for bugs ) ++*/ ++ ++ if (strlen(field) < PKG_MINIMUM_FIELD_NAME_LEN) { ++ goto UNKNOWN_FMT_FIELD; ++ } ++ ++ temp[0]='\0'; ++ ++ switch (field[0]) ++ { ++ case 'a': ++ case 'A': ++ if (strcasecmp(field, "Architecture") == 0) { ++ /* Architecture */ ++ if (pkg->architecture) { ++ temp = (char *)realloc(temp,strlen(pkg->architecture)+17); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ snprintf(temp, (strlen(pkg->architecture)+17), "Architecture: %s\n", pkg->architecture); ++ } ++ } else { ++ goto UNKNOWN_FMT_FIELD; ++ } ++ break; ++ case 'c': ++ case 'C': ++ if (strcasecmp(field, "Conffiles") == 0) { ++ /* Conffiles */ ++ conffile_list_elt_t *iter; ++ char confstr_[LINE_LEN]; ++ ++ if (pkg->conffiles.head == NULL) { ++ return temp; ++ } ++ ++ len = 14 ; ++ for (iter = pkg->conffiles.head; iter; iter = iter->next) { ++ if (iter->data->name && iter->data->value) { ++ len = len + (strlen(iter->data->name)+strlen(iter->data->value)+5); ++ } ++ } ++ temp = (char *)realloc(temp,len); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ strncpy(temp, "Conffiles:\n", 12); ++ for (iter = pkg->conffiles.head; iter; iter = iter->next) { ++ if (iter->data->name && iter->data->value) { ++ snprintf(confstr_, LINE_LEN, "%s %s\n", iter->data->name, iter->data->value); ++ strncat(temp, confstr_, strlen(confstr_)); ++ } ++ } ++ } else if (strcasecmp(field, "Conflicts") == 0) { ++ int i; ++ ++ if (pkg->conflicts_count) { ++ char conflictstr[LINE_LEN]; ++ len = 14 ; ++ for(i = 0; i < pkg->conflicts_count; i++) { ++ len = len + (strlen(pkg->conflicts_str[i])+5); ++ } ++ temp = (char *)realloc(temp,len); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ strncpy(temp, "Conflicts:", 11); ++ for(i = 0; i < pkg->conflicts_count; i++) { ++ snprintf(conflictstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->conflicts_str[i]); ++ strncat(temp, conflictstr, strlen(conflictstr)); ++ } ++ strncat(temp, "\n", strlen("\n")); ++ } ++ } else { ++ goto UNKNOWN_FMT_FIELD; ++ } ++ break; ++ case 'd': ++ case 'D': ++ if (strcasecmp(field, "Depends") == 0) { ++ /* Depends */ ++ int i; ++ ++ if (pkg->depends_count) { ++ char depstr[LINE_LEN]; ++ len = 14 ; ++ for(i = 0; i < pkg->depends_count; i++) { ++ len = len + (strlen(pkg->depends_str[i])+4); ++ } ++ temp = (char *)realloc(temp,len); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ strncpy(temp, "Depends:", 10); ++ for(i = 0; i < pkg->depends_count; i++) { ++ snprintf(depstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->depends_str[i]); ++ strncat(temp, depstr, strlen(depstr)); ++ } ++ strncat(temp, "\n", strlen("\n")); ++ } ++ } else if (strcasecmp(field, "Description") == 0) { ++ /* Description */ ++ if (pkg->description) { ++ temp = (char *)realloc(temp,strlen(pkg->description)+16); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ snprintf(temp, (strlen(pkg->description)+16), "Description: %s\n", pkg->description); ++ } ++ } else { ++ goto UNKNOWN_FMT_FIELD; ++ } ++ break; ++ case 'e': ++ case 'E': { ++ /* Essential */ ++ if (pkg->essential) { ++ temp = (char *)realloc(temp,16); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ snprintf(temp, (16), "Essential: yes\n"); ++ } ++ } ++ break; ++ case 'f': ++ case 'F': { ++ /* Filename */ ++ if (pkg->filename) { ++ temp = (char *)realloc(temp,strlen(pkg->filename)+12); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ snprintf(temp, (strlen(pkg->filename)+12), "Filename: %s\n", pkg->filename); ++ } ++ } ++ break; ++ case 'i': ++ case 'I': { ++ if (strcasecmp(field, "Installed-Size") == 0) { ++ /* Installed-Size */ ++ temp = (char *)realloc(temp,strlen(pkg->installed_size)+17); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ snprintf(temp, (strlen(pkg->installed_size)+17), "Installed-Size: %s\n", pkg->installed_size); ++ } else if (strcasecmp(field, "Installed-Time") == 0 && pkg->installed_time) { ++ temp = (char *)realloc(temp,29); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ snprintf(temp, 29, "Installed-Time: %lu\n", pkg->installed_time); ++ } ++ } ++ break; ++ case 'm': ++ case 'M': { ++ /* Maintainer | MD5sum */ ++ if (strcasecmp(field, "Maintainer") == 0) { ++ /* Maintainer */ ++ if (pkg->maintainer) { ++ temp = (char *)realloc(temp,strlen(pkg->maintainer)+14); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ snprintf(temp, (strlen(pkg->maintainer)+14), "maintainer: %s\n", pkg->maintainer); ++ } ++ } else if (strcasecmp(field, "MD5sum") == 0) { ++ /* MD5sum */ ++ if (pkg->md5sum) { ++ temp = (char *)realloc(temp,strlen(pkg->md5sum)+11); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ snprintf(temp, (strlen(pkg->md5sum)+11), "MD5Sum: %s\n", pkg->md5sum); ++ } ++ } else { ++ goto UNKNOWN_FMT_FIELD; ++ } ++ } ++ break; ++ case 'p': ++ case 'P': { ++ if (strcasecmp(field, "Package") == 0) { ++ /* Package */ ++ temp = (char *)realloc(temp,strlen(pkg->name)+11); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ snprintf(temp, (strlen(pkg->name)+11), "Package: %s\n", pkg->name); ++ } else if (strcasecmp(field, "Priority") == 0) { ++ /* Priority */ ++ temp = (char *)realloc(temp,strlen(pkg->priority)+12); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ snprintf(temp, (strlen(pkg->priority)+12), "Priority: %s\n", pkg->priority); ++ } else if (strcasecmp(field, "Provides") == 0) { ++ /* Provides */ ++ int i; ++ ++ if (pkg->provides_count) { ++ /* Here we check if the ipkg_internal_use_only is used, and we discard it.*/ ++ for ( i=0; i < pkg->provides_count; i++ ){ ++ if (strstr(pkg->provides_str[i],"ipkg_internal_use_only")!=NULL) { ++ memset (pkg->provides_str[i],'\x0',strlen(pkg->provides_str[i])); /* Pigi clear my trick flag, just in case */ ++ flag_provide_false = 1; ++ } ++ } ++ if ( !flag_provide_false || /* Pigi there is not my trick flag */ ++ ((flag_provide_false) && (pkg->provides_count > 1))){ /* Pigi There is, but we also have others Provides */ ++ char provstr[LINE_LEN]; ++ len = 15; ++ for(i = 0; i < pkg->provides_count; i++) { ++ len = len + (strlen(pkg->provides_str[i])+5); ++ } ++ temp = (char *)realloc(temp,len); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ strncpy(temp, "Provides:", 12); ++ for(i = 0; i < pkg->provides_count; i++) { ++ if (strlen(pkg->provides_str[i])>0){; ++ snprintf(provstr, LINE_LEN, "%s %s", i == 1 ? "" : ",", pkg->provides_str[i]); ++ strncat(temp, provstr, strlen(provstr)); ++ } ++ } ++ strncat(temp, "\n", strlen("\n")); ++ } ++ } ++ } else { ++ goto UNKNOWN_FMT_FIELD; ++ } ++ } ++ break; ++ case 'r': ++ case 'R': { ++ int i; ++ /* Replaces | Recommends*/ ++ if (strcasecmp (field, "Replaces") == 0) { ++ if (pkg->replaces_count) { ++ char replstr[LINE_LEN]; ++ len = 14; ++ for (i = 0; i < pkg->replaces_count; i++) { ++ len = len + (strlen(pkg->replaces_str[i])+5); ++ } ++ temp = (char *)realloc(temp,len); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ strncpy(temp, "Replaces:", 12); ++ for (i = 0; i < pkg->replaces_count; i++) { ++ snprintf(replstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->replaces_str[i]); ++ strncat(temp, replstr, strlen(replstr)); ++ } ++ strncat(temp, "\n", strlen("\n")); ++ } ++ } else if (strcasecmp (field, "Recommends") == 0) { ++ if (pkg->recommends_count) { ++ char recstr[LINE_LEN]; ++ len = 15; ++ for(i = 0; i < pkg->recommends_count; i++) { ++ len = len + (strlen( pkg->recommends_str[i])+5); ++ } ++ temp = (char *)realloc(temp,len); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ strncpy(temp, "Recommends:", 13); ++ for(i = 0; i < pkg->recommends_count; i++) { ++ snprintf(recstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->recommends_str[i]); ++ strncat(temp, recstr, strlen(recstr)); ++ } ++ strncat(temp, "\n", strlen("\n")); ++ } ++ } else { ++ goto UNKNOWN_FMT_FIELD; ++ } ++ } ++ break; ++ case 's': ++ case 'S': { ++ /* Section | Size | Source | Status | Suggests */ ++ if (strcasecmp(field, "Section") == 0) { ++ /* Section */ ++ if (pkg->section) { ++ temp = (char *)realloc(temp,strlen(pkg->section)+11); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ snprintf(temp, (strlen(pkg->section)+11), "Section: %s\n", pkg->section); ++ } ++ } else if (strcasecmp(field, "Size") == 0) { ++ /* Size */ ++ if (pkg->size) { ++ temp = (char *)realloc(temp,strlen(pkg->size)+8); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ snprintf(temp, (strlen(pkg->size)+8), "Size: %s\n", pkg->size); ++ } ++ } else if (strcasecmp(field, "Source") == 0) { ++ /* Source */ ++ if (pkg->source) { ++ temp = (char *)realloc(temp,strlen(pkg->source)+10); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ snprintf(temp, (strlen(pkg->source)+10), "Source: %s\n", pkg->source); ++ } ++ } else if (strcasecmp(field, "Status") == 0) { ++ /* Status */ ++ /* Benjamin Pineau note: we should avoid direct usage of ++ * strlen(arg) without keeping "arg" for later free() ++ */ ++ char *pflag=pkg_state_flag_to_str(pkg->state_flag); ++ char *pstat=pkg_state_status_to_str(pkg->state_status); ++ char *pwant=pkg_state_want_to_str(pkg->state_want); ++ ++ size_t sum_of_sizes = (size_t) ( strlen(pwant)+ strlen(pflag)+ strlen(pstat) + 12 ); ++ temp = (char *)realloc(temp,sum_of_sizes); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ snprintf(temp, sum_of_sizes , "Status: %s %s %s\n", pwant, pflag, pstat); ++ free(pflag); ++ free(pwant); ++ if(pstat) /* pfstat can be NULL if ENOMEM */ ++ free(pstat); ++ } else if (strcasecmp(field, "Suggests") == 0) { ++ if (pkg->suggests_count) { ++ int i; ++ char sugstr[LINE_LEN]; ++ len = 13; ++ for(i = 0; i < pkg->suggests_count; i++) { ++ len = len + (strlen(pkg->suggests_str[i])+5); ++ } ++ temp = (char *)realloc(temp,len); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ strncpy(temp, "Suggests:", 10); ++ for(i = 0; i < pkg->suggests_count; i++) { ++ snprintf(sugstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->suggests_str[i]); ++ strncat(temp, sugstr, strlen(sugstr)); ++ } ++ strncat(temp, "\n", strlen("\n")); ++ } ++ } else { ++ goto UNKNOWN_FMT_FIELD; ++ } ++ } ++ break; ++ case 'v': ++ case 'V': { ++ /* Version */ ++ char *version = pkg_version_str_alloc(pkg); ++ temp = (char *)realloc(temp,strlen(version)+14); ++ if ( temp == NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ temp[0]='\0'; ++ snprintf(temp, (strlen(version)+12), "Version: %s\n", version); ++ free(version); ++ } ++ break; ++ default: ++ goto UNKNOWN_FMT_FIELD; ++ } ++ ++ if ( strlen(temp)<2 ) { ++ temp[0]='\0'; ++ } ++ return temp; ++ ++ UNKNOWN_FMT_FIELD: ++ fprintf(stderr, "%s: ERROR: Unknown field name: %s\n", __FUNCTION__, field); ++ if ( strlen(temp)<2 ) { ++ temp[0]='\0'; ++ } ++ ++ return temp; ++} ++ ++void pkg_print_info(pkg_t *pkg, FILE *file) ++{ ++ char * buff; ++ if (pkg == NULL) { ++ return; ++ } ++ ++ buff = pkg_formatted_info(pkg); ++ if ( buff == NULL ) ++ return; ++ if (strlen(buff)>2){ ++ fwrite(buff, 1, strlen(buff), file); ++ } ++ free(buff); ++} ++ ++void pkg_print_status(pkg_t * pkg, FILE * file) ++{ ++ if (pkg == NULL) { ++ return; ++ } ++ ++ /* XXX: QUESTION: Do we actually want more fields here? The ++ original idea was to save space by installing only what was ++ needed for actual computation, (package, version, status, ++ essential, conffiles). The assumption is that all other fields ++ can be found in th available file. ++ ++ But, someone proposed the idea to make it possible to ++ reconstruct a .ipk from an installed package, (ie. for beaming ++ from one handheld to another). So, maybe we actually want a few ++ more fields here, (depends, suggests, etc.), so that that would ++ be guaranteed to work even in the absence of more information ++ from the available file. ++ ++ 28-MAR-03: kergoth and I discussed this yesterday. We think ++ the essential info needs to be here for all installed packages ++ because they may not appear in the Packages files on various ++ feeds. Furthermore, one should be able to install from URL or ++ local storage without requiring a Packages file from any feed. ++ -Jamey ++ */ ++ pkg_print_field(pkg, file, "Package"); ++ pkg_print_field(pkg, file, "Version"); ++ pkg_print_field(pkg, file, "Depends"); ++ pkg_print_field(pkg, file, "Recommends"); ++ pkg_print_field(pkg, file, "Suggests"); ++ pkg_print_field(pkg, file, "Provides"); ++ pkg_print_field(pkg, file, "Replaces"); ++ pkg_print_field(pkg, file, "Conflicts"); ++ pkg_print_field(pkg, file, "Status"); ++ pkg_print_field(pkg, file, "Essential"); /* @@@@ should be removed in future release. */ ++ pkg_print_field(pkg, file, "Architecture"); ++ pkg_print_field(pkg, file, "Conffiles"); ++ pkg_print_field(pkg, file, "Installed-Time"); ++ fputs("\n", file); ++} ++ ++void pkg_print_field(pkg_t *pkg, FILE *file, const char *field) ++{ ++ char *buff; ++ if (strlen(field) < PKG_MINIMUM_FIELD_NAME_LEN) { ++ fprintf(stderr, "%s: ERROR: Unknown field name: %s\n", ++ __FUNCTION__, field); ++ } ++ buff = pkg_formatted_field(pkg, field); ++ if (strlen(buff)>2) { ++ fprintf(file, "%s", buff); ++ fflush(file); ++ } ++ free(buff); ++ return; ++} ++ ++/* ++ * libdpkg - Debian packaging suite library routines ++ * vercmp.c - comparison of version numbers ++ * ++ * Copyright (C) 1995 Ian Jackson ++ */ ++int pkg_compare_versions(const pkg_t *pkg, const pkg_t *ref_pkg) ++{ ++ int r; ++ ++ if (pkg->epoch > ref_pkg->epoch) { ++ return 1; ++ } ++ ++ if (pkg->epoch < ref_pkg->epoch) { ++ return -1; ++ } ++ ++ r = verrevcmp(pkg->version, ref_pkg->version); ++ if (r) { ++ return r; ++ } ++ ++#ifdef USE_DEBVERSION ++ r = verrevcmp(pkg->revision, ref_pkg->revision); ++ if (r) { ++ return r; ++ } ++ ++ r = verrevcmp(pkg->familiar_revision, ref_pkg->familiar_revision); ++#endif ++ ++ return r; ++} ++ ++int verrevcmp(const char *val, const char *ref) ++{ ++ int vc, rc; ++ long vl, rl; ++ const char *vp, *rp; ++ const char *vsep, *rsep; ++ ++ if (!val) val= ""; ++ if (!ref) ref= ""; ++ for (;;) { ++ vp= val; while (*vp && !isdigit(*vp)) vp++; ++ rp= ref; while (*rp && !isdigit(*rp)) rp++; ++ for (;;) { ++ vc= (val == vp) ? 0 : *val++; ++ rc= (ref == rp) ? 0 : *ref++; ++ if (!rc && !vc) break; ++ if (vc && !isalpha(vc)) vc += 256; /* assumes ASCII character set */ ++ if (rc && !isalpha(rc)) rc += 256; ++ if (vc != rc) return vc - rc; ++ } ++ val= vp; ++ ref= rp; ++ vl=0; if (isdigit(*vp)) vl= strtol(val,(char**)&val,10); ++ rl=0; if (isdigit(*rp)) rl= strtol(ref,(char**)&ref,10); ++ if (vl != rl) return vl - rl; ++ ++ vc = *val; ++ rc = *ref; ++ vsep = strchr(".-", vc); ++ rsep = strchr(".-", rc); ++ if (vsep && !rsep) return -1; ++ if (!vsep && rsep) return +1; ++ ++ if (!*val && !*ref) return 0; ++ if (!*val) return -1; ++ if (!*ref) return +1; ++ } ++} ++ ++int pkg_version_satisfied(pkg_t *it, pkg_t *ref, const char *op) ++{ ++ int r; ++ ++ r = pkg_compare_versions(it, ref); ++ ++ if (strcmp(op, "<=") == 0 || strcmp(op, "<") == 0) { ++ return r <= 0; ++ } ++ ++ if (strcmp(op, ">=") == 0 || strcmp(op, ">") == 0) { ++ return r >= 0; ++ } ++ ++ if (strcmp(op, "<<") == 0) { ++ return r < 0; ++ } ++ ++ if (strcmp(op, ">>") == 0) { ++ return r > 0; ++ } ++ ++ if (strcmp(op, "=") == 0) { ++ return r == 0; ++ } ++ ++ fprintf(stderr, "unknown operator: %s", op); ++ return 0; ++} ++ ++int pkg_name_version_and_architecture_compare(pkg_t *p1, pkg_t *p2) ++{ ++ const pkg_t *a = *(const pkg_t **)p1; ++ const pkg_t *b = *(const pkg_t **)p2; ++ int namecmp; ++ int vercmp; ++ if (!a->name || !b->name) { ++ fprintf(stderr, "pkg_name_version_and_architecture_compare: a=%p a->name=%p b=%p b->name=%p\n", ++ a, a->name, b, b->name); ++ return 0; ++ } ++ ++ namecmp = strcmp(a->name, b->name); ++ if (namecmp) ++ return namecmp; ++ vercmp = pkg_compare_versions(a, b); ++ if (vercmp) ++ return vercmp; ++ if (!a->arch_priority || !b->arch_priority) { ++ fprintf(stderr, "pkg_name_version_and_architecture_compare: a=%p a->arch_priority=%i b=%p b->arch_priority=%i\n", ++ a, a->arch_priority, b, b->arch_priority); ++ return 0; ++ } ++ if (a->arch_priority > b->arch_priority) ++ return 1; ++ if (a->arch_priority < b->arch_priority) ++ return -1; ++ return 0; ++} ++ ++int abstract_pkg_name_compare(abstract_pkg_t *p1, abstract_pkg_t *p2) ++{ ++ const abstract_pkg_t *a = *(const abstract_pkg_t **)p1; ++ const abstract_pkg_t *b = *(const abstract_pkg_t **)p2; ++ if (!a->name || !b->name) { ++ fprintf(stderr, "abstract_pkg_name_compare: a=%p a->name=%p b=%p b->name=%p\n", ++ a, a->name, b, b->name); ++ return 0; ++ } ++ return strcmp(a->name, b->name); ++} ++ ++ ++char *pkg_version_str_alloc(pkg_t *pkg) ++{ ++ char *complete_version; ++ char *epoch_str; ++#ifdef USE_DEBVERSION ++ char *revision_str; ++ char *familiar_revision_str; ++#endif ++ ++ if (pkg->epoch) { ++ sprintf_alloc(&epoch_str, "%lu:", (unsigned long)pkg->epoch); ++ } else { ++ epoch_str = strdup(""); ++ } ++ ++#ifdef USE_DEBVERSION ++ if (pkg->revision && strlen(pkg->revision)) { ++ sprintf_alloc(&revision_str, "-%s", pkg->revision); ++ } else { ++ revision_str = strdup(""); ++ } ++ ++ if (pkg->familiar_revision && strlen(pkg->familiar_revision)) { ++ sprintf_alloc(&familiar_revision_str, "-fam%s", pkg->familiar_revision); ++ } else { ++ familiar_revision_str = strdup(""); ++ } ++#endif ++ ++#ifdef USE_DEBVERSION ++ sprintf_alloc(&complete_version, "%s%s%s%s", ++ epoch_str, pkg->version, revision_str, familiar_revision_str); ++#else ++ sprintf_alloc(&complete_version, "%s%s", ++ epoch_str, pkg->version); ++#endif ++ ++ free(epoch_str); ++#ifdef USE_DEBVERSION ++ free(revision_str); ++ free(familiar_revision_str); ++#endif ++ ++ return complete_version; ++} ++ ++str_list_t *pkg_get_installed_files(pkg_t *pkg) ++{ ++ int err; ++ char *list_file_name = NULL; ++ FILE *list_file = NULL; ++ char *line; ++ char *installed_file_name; ++ int rootdirlen; ++ ++ pkg->installed_files_ref_cnt++; ++ ++ if (pkg->installed_files) { ++ return pkg->installed_files; ++ } ++ ++ pkg->installed_files = str_list_alloc(); ++ if (pkg->installed_files == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ ++ /* For uninstalled packages, get the file list firectly from the package. ++ For installed packages, look at the package.list file in the database. ++ */ ++ if (pkg->state_status == SS_NOT_INSTALLED || pkg->dest == NULL) { ++ if (pkg->local_filename == NULL) { ++ return pkg->installed_files; ++ } ++ /* XXX: CLEANUP: Maybe rewrite this to avoid using a temporary ++ file. In other words, change deb_extract so that it can ++ simply return the file list as a char *[] rather than ++ insisting on writing in to a FILE * as it does now. */ ++ list_file = tmpfile(); ++ err = pkg_extract_data_file_names_to_stream(pkg, list_file); ++ if (err) { ++ fclose(list_file); ++ fprintf(stderr, "%s: Error extracting file list from %s: %s\n", ++ __FUNCTION__, pkg->local_filename, strerror(err)); ++ return pkg->installed_files; ++ } ++ rewind(list_file); ++ } else { ++ sprintf_alloc(&list_file_name, "%s/%s.list", ++ pkg->dest->info_dir, pkg->name); ++ if (! file_exists(list_file_name)) { ++ free(list_file_name); ++ return pkg->installed_files; ++ } ++ ++ list_file = fopen(list_file_name, "r"); ++ if (list_file == NULL) { ++ fprintf(stderr, "WARNING: Cannot open %s: %s\n", ++ list_file_name, strerror(errno)); ++ free(list_file_name); ++ return pkg->installed_files; ++ } ++ free(list_file_name); ++ } ++ ++ rootdirlen = strlen( pkg->dest->root_dir ); ++ while (1) { ++ char *file_name; ++ ++ line = file_read_line_alloc(list_file); ++ if (line == NULL) { ++ break; ++ } ++ str_chomp(line); ++ file_name = line; ++ ++ /* Take pains to avoid uglies like "/./" in the middle of file_name. */ ++ if( strncmp( pkg->dest->root_dir, ++ file_name, ++ rootdirlen ) ) { ++ if (*file_name == '.') { ++ file_name++; ++ } ++ if (*file_name == '/') { ++ file_name++; ++ } ++ ++ /* Freed in pkg_free_installed_files */ ++ sprintf_alloc(&installed_file_name, "%s%s", pkg->dest->root_dir, file_name); ++ } else { ++ // already contains root_dir as header -> ABSOLUTE ++ sprintf_alloc(&installed_file_name, "%s", file_name); ++ } ++ str_list_append(pkg->installed_files, installed_file_name); ++ free(line); ++ } ++ ++ fclose(list_file); ++ ++ return pkg->installed_files; ++} ++ ++/* XXX: CLEANUP: This function and it's counterpart, ++ (pkg_get_installed_files), do not match our init/deinit naming ++ convention. Nor the alloc/free convention. But, then again, neither ++ of these conventions currrently fit the way these two functions ++ work. */ ++int pkg_free_installed_files(pkg_t *pkg) ++{ ++ str_list_elt_t *iter; ++ ++ pkg->installed_files_ref_cnt--; ++ if (pkg->installed_files_ref_cnt > 0) { ++ return 0; ++ } ++ ++ if (pkg->installed_files) { ++ ++ for (iter = pkg->installed_files->head; iter; iter = iter->next) { ++ /* malloced in pkg_get_installed_files */ ++ free (iter->data); ++ iter->data = NULL; ++ } ++ ++ str_list_deinit(pkg->installed_files); ++ } ++ ++ pkg->installed_files = NULL; ++ ++ return 0; ++} ++ ++int pkg_remove_installed_files_list(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ int err; ++ char *list_file_name; ++ ++ //I don't think pkg_free_installed_files should be called here. Jamey ++ //pkg_free_installed_files(pkg); ++ ++ sprintf_alloc(&list_file_name, "%s/%s.list", ++ pkg->dest->info_dir, pkg->name); ++ if (!conf->noaction) { ++ err = unlink(list_file_name); ++ free(list_file_name); ++ ++ if (err) { ++ return errno; ++ } ++ } ++ return 0; ++} ++ ++conffile_t *pkg_get_conffile(pkg_t *pkg, const char *file_name) ++{ ++ conffile_list_elt_t *iter; ++ conffile_t *conffile; ++ ++ if (pkg == NULL) { ++ return NULL; ++ } ++ ++ for (iter = pkg->conffiles.head; iter; iter = iter->next) { ++ conffile = iter->data; ++ ++ if (strcmp(conffile->name, file_name) == 0) { ++ return conffile; ++ } ++ } ++ ++ return NULL; ++} ++ ++int pkg_run_script(ipkg_conf_t *conf, pkg_t *pkg, ++ const char *script, const char *args) ++{ ++ int err; ++ char *path; ++ char *cmd; ++ ++ /* XXX: FEATURE: When conf->offline_root is set, we should run the ++ maintainer script within a chroot environment. */ ++ ++ /* Installed packages have scripts in pkg->dest->info_dir, uninstalled packages ++ have scripts in pkg->tmp_unpack_dir. */ ++ if (pkg->state_status == SS_INSTALLED || pkg->state_status == SS_UNPACKED) { ++ if (pkg->dest == NULL) { ++ fprintf(stderr, "%s: ERROR: installed package %s has a NULL dest\n", ++ __FUNCTION__, pkg->name); ++ return EINVAL; ++ } ++ sprintf_alloc(&path, "%s/%s.%s", pkg->dest->info_dir, pkg->name, script); ++ } else { ++ if (pkg->tmp_unpack_dir == NULL) { ++ fprintf(stderr, "%s: ERROR: uninstalled package %s has a NULL tmp_unpack_dir\n", ++ __FUNCTION__, pkg->name); ++ return EINVAL; ++ } ++ sprintf_alloc(&path, "%s/%s", pkg->tmp_unpack_dir, script); ++ } ++ ++ ipkg_message(conf, IPKG_INFO, "Running script %s\n", path); ++ if (conf->noaction) return 0; ++ ++ /* XXX: CLEANUP: There must be a better way to handle maintainer ++ scripts when running with offline_root mode and/or a dest other ++ than '/'. I've been playing around with some clever chroot ++ tricks and I might come up with something workable. */ ++ if (conf->offline_root) { ++ setenv("IPKG_OFFLINE_ROOT", conf->offline_root, 1); ++ } ++ ++ setenv("PKG_ROOT", ++ pkg->dest ? pkg->dest->root_dir : conf->default_dest->root_dir, 1); ++ ++ if (! file_exists(path)) { ++ free(path); ++ return 0; ++ } ++ ++ if (conf->offline_root) { ++ fprintf(stderr, "(offline root mode: not running %s.%s)\n", pkg->name, script); ++ free(path); ++ return 0; ++ } ++ ++ sprintf_alloc(&cmd, "%s %s", path, args); ++ free(path); ++ ++ err = xsystem(cmd); ++ free(cmd); ++ ++ if (err) { ++ fprintf(stderr, "%s script returned status %d\n", script, err); ++ return err; ++ } ++ ++ return 0; ++} ++ ++char *pkg_state_want_to_str(pkg_state_want_t sw) ++{ ++ int i; ++ ++ for (i=0; i < ARRAY_SIZE(pkg_state_want_map); i++) { ++ if (pkg_state_want_map[i].value == sw) { ++ return strdup(pkg_state_want_map[i].str); ++ } ++ } ++ ++ fprintf(stderr, "%s: ERROR: Illegal value for state_want: %d\n", ++ __FUNCTION__, sw); ++ return strdup(""); ++} ++ ++pkg_state_want_t pkg_state_want_from_str(char *str) ++{ ++ int i; ++ ++ for (i=0; i < ARRAY_SIZE(pkg_state_want_map); i++) { ++ if (strcmp(str, pkg_state_want_map[i].str) == 0) { ++ return pkg_state_want_map[i].value; ++ } ++ } ++ ++ fprintf(stderr, "%s: ERROR: Illegal value for state_want string: %s\n", ++ __FUNCTION__, str); ++ return SW_UNKNOWN; ++} ++ ++char *pkg_state_flag_to_str(pkg_state_flag_t sf) ++{ ++ int i; ++ int len = 3; /* ok\000 is minimum */ ++ char *str = NULL; ++ ++ /* clear the temporary flags before converting to string */ ++ sf &= SF_NONVOLATILE_FLAGS; ++ ++ if (sf == 0) { ++ return strdup("ok"); ++ } else { ++ ++ for (i=0; i < ARRAY_SIZE(pkg_state_flag_map); i++) { ++ if (sf & pkg_state_flag_map[i].value) { ++ len += strlen(pkg_state_flag_map[i].str) + 1; ++ } ++ } ++ str = malloc(len); ++ if ( str == NULL ) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ str[0] = 0; ++ for (i=0; i < ARRAY_SIZE(pkg_state_flag_map); i++) { ++ if (sf & pkg_state_flag_map[i].value) { ++ strcat(str, pkg_state_flag_map[i].str); ++ strcat(str, ","); ++ } ++ } ++ len = strlen(str); ++ str[len-1] = 0; /* squash last comma */ ++ return str; ++ } ++} ++ ++pkg_state_flag_t pkg_state_flag_from_str(char *str) ++{ ++ int i; ++ int sf = SF_OK; ++ ++ if (strcmp(str, "ok") == 0) { ++ return SF_OK; ++ } ++ for (i=0; i < ARRAY_SIZE(pkg_state_flag_map); i++) { ++ const char *sfname = pkg_state_flag_map[i].str; ++ int sfname_len = strlen(sfname); ++ if (strncmp(str, sfname, sfname_len) == 0) { ++ sf |= pkg_state_flag_map[i].value; ++ str += sfname_len; ++ if (str[0] == ',') { ++ str++; ++ } else { ++ break; ++ } ++ } ++ } ++ ++ return sf; ++} ++ ++char *pkg_state_status_to_str(pkg_state_status_t ss) ++{ ++ int i; ++ ++ for (i=0; i < ARRAY_SIZE(pkg_state_status_map); i++) { ++ if (pkg_state_status_map[i].value == ss) { ++ return strdup(pkg_state_status_map[i].str); ++ } ++ } ++ ++ fprintf(stderr, "%s: ERROR: Illegal value for state_status: %d\n", ++ __FUNCTION__, ss); ++ return strdup(""); ++} ++ ++pkg_state_status_t pkg_state_status_from_str(char *str) ++{ ++ int i; ++ ++ for (i=0; i < ARRAY_SIZE(pkg_state_status_map); i++) { ++ if (strcmp(str, pkg_state_status_map[i].str) == 0) { ++ return pkg_state_status_map[i].value; ++ } ++ } ++ ++ fprintf(stderr, "%s: ERROR: Illegal value for state_status string: %s\n", ++ __FUNCTION__, str); ++ return SS_NOT_INSTALLED; ++} ++ ++int pkg_arch_supported(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ nv_pair_list_elt_t *l; ++ ++ if (!pkg->architecture) ++ return 1; ++ ++ l = conf->arch_list.head; ++ ++ while (l) { ++ nv_pair_t *nv = l->data; ++ if (strcmp(nv->name, pkg->architecture) == 0) { ++ ipkg_message(conf, IPKG_DEBUG, "arch %s (priority %s) supported for pkg %s\n", nv->name, nv->value, pkg->name); ++ return 1; ++ } ++ l = l->next; ++ } ++ ++ ipkg_message(conf, IPKG_DEBUG, "arch %s unsupported for pkg %s\n", pkg->architecture, pkg->name); ++ return 0; ++} ++ ++int pkg_get_arch_priority(ipkg_conf_t *conf, const char *archname) ++{ ++ nv_pair_list_elt_t *l; ++ ++ l = conf->arch_list.head; ++ ++ while (l) { ++ nv_pair_t *nv = l->data; ++ if (strcmp(nv->name, archname) == 0) { ++ int priority = strtol(nv->value, NULL, 0); ++ return priority; ++ } ++ l = l->next; ++ } ++ return 0; ++} ++ ++int pkg_info_preinstall_check(ipkg_conf_t *conf) ++{ ++ int i; ++ hash_table_t *pkg_hash = &conf->pkg_hash; ++ pkg_vec_t *available_pkgs = pkg_vec_alloc(); ++ pkg_vec_t *installed_pkgs = pkg_vec_alloc(); ++ ++ ipkg_message(conf, IPKG_INFO, "pkg_info_preinstall_check: updating arch priority for each package\n"); ++ pkg_hash_fetch_available(pkg_hash, available_pkgs); ++ /* update arch_priority for each package */ ++ for (i = 0; i < available_pkgs->len; i++) { ++ pkg_t *pkg = available_pkgs->pkgs[i]; ++ int arch_priority = 1; ++ if (!pkg) ++ continue; ++ // ipkg_message(conf, IPKG_DEBUG2, " package %s version=%s arch=%p:", pkg->name, pkg->version, pkg->architecture); ++ if (pkg->architecture) ++ arch_priority = pkg_get_arch_priority(conf, pkg->architecture); ++ else ++ ipkg_message(conf, IPKG_ERROR, "pkg_info_preinstall_check: no architecture for package %s\n", pkg->name); ++ // ipkg_message(conf, IPKG_DEBUG2, "%s arch_priority=%d\n", pkg->architecture, arch_priority); ++ pkg->arch_priority = arch_priority; ++ } ++ ++ for (i = 0; i < available_pkgs->len; i++) { ++ pkg_t *pkg = available_pkgs->pkgs[i]; ++ if (!pkg->arch_priority && (pkg->state_flag || (pkg->state_want != SW_UNKNOWN))) { ++ /* clear flags and want for any uninstallable package */ ++ ipkg_message(conf, IPKG_NOTICE, "Clearing state_want and state_flag for pkg=%s (arch_priority=%d flag=%d want=%d)\n", ++ pkg->name, pkg->arch_priority, pkg->state_flag, pkg->state_want); ++ pkg->state_want = SW_UNKNOWN; ++ pkg->state_flag = 0; ++ } ++ } ++ pkg_vec_free(available_pkgs); ++ ++ /* update the file owner data structure */ ++ ipkg_message(conf, IPKG_INFO, "pkg_info_preinstall_check: update file owner list\n"); ++ pkg_hash_fetch_all_installed(pkg_hash, installed_pkgs); ++ for (i = 0; i < installed_pkgs->len; i++) { ++ pkg_t *pkg = installed_pkgs->pkgs[i]; ++ str_list_t *installed_files = pkg_get_installed_files(pkg); /* this causes installed_files to be cached */ ++ str_list_elt_t *iter; ++ if (installed_files == NULL) { ++ ipkg_message(conf, IPKG_ERROR, "No installed files for pkg %s\n", pkg->name); ++ break; ++ } ++ for (iter = installed_files->head; iter; iter = iter->next) { ++ char *installed_file = iter->data; ++ // ipkg_message(conf, IPKG_DEBUG2, "pkg %s: file=%s\n", pkg->name, installed_file); ++ file_hash_set_file_owner(conf, installed_file, pkg); ++ } ++ } ++ pkg_vec_free(installed_pkgs); ++ ++ return 0; ++} ++ ++struct pkg_write_filelist_data { ++ ipkg_conf_t *conf; ++ pkg_t *pkg; ++ FILE *stream; ++}; ++ ++void pkg_write_filelist_helper(const char *key, void *entry_, void *data_) ++{ ++ struct pkg_write_filelist_data *data = data_; ++ pkg_t *entry = entry_; ++ if (entry == data->pkg) { ++ fprintf(data->stream, "%s\n", key); ++ } ++} ++ ++int pkg_write_filelist(ipkg_conf_t *conf, pkg_t *pkg) ++{ ++ struct pkg_write_filelist_data data; ++ char *list_file_name = NULL; ++ int err = 0; ++ ++ if (!pkg) { ++ ipkg_message(conf, IPKG_ERROR, "Null pkg\n"); ++ return -EINVAL; ++ } ++ ipkg_message(conf, IPKG_INFO, ++ " creating %s.list file\n", pkg->name); ++ sprintf_alloc(&list_file_name, "%s/%s.list", pkg->dest->info_dir, pkg->name); ++ if (!list_file_name) { ++ ipkg_message(conf, IPKG_ERROR, "Failed to alloc list_file_name\n"); ++ return -ENOMEM; ++ } ++ ipkg_message(conf, IPKG_INFO, ++ " creating %s file for pkg %s\n", list_file_name, pkg->name); ++ data.stream = fopen(list_file_name, "w"); ++ if (!data.stream) { ++ ipkg_message(conf, IPKG_ERROR, "Could not open %s for writing: %s\n", ++ list_file_name, strerror(errno)); ++ return errno; ++ } ++ data.pkg = pkg; ++ data.conf = conf; ++ hash_table_foreach(&conf->file_hash, pkg_write_filelist_helper, &data); ++ fclose(data.stream); ++ free(list_file_name); ++ ++ return err; ++} ++ ++int pkg_write_changed_filelists(ipkg_conf_t *conf) ++{ ++ pkg_vec_t *installed_pkgs = pkg_vec_alloc(); ++ hash_table_t *pkg_hash = &conf->pkg_hash; ++ int i; ++ int err; ++ if (conf->noaction) ++ return 0; ++ ++ ipkg_message(conf, IPKG_INFO, "%s: saving changed filelists\n", __FUNCTION__); ++ pkg_hash_fetch_all_installed(pkg_hash, installed_pkgs); ++ for (i = 0; i < installed_pkgs->len; i++) { ++ pkg_t *pkg = installed_pkgs->pkgs[i]; ++ if (pkg->state_flag & SF_FILELIST_CHANGED) { ++ ipkg_message(conf, IPKG_DEBUG, "Calling pkg_write_filelist for pkg=%s from %s\n", pkg->name, __FUNCTION__); ++ err = pkg_write_filelist(conf, pkg); ++ if (err) ++ ipkg_message(conf, IPKG_NOTICE, "pkg_write_filelist pkg=%s returned %d\n", pkg->name, err); ++ } ++ } ++ return 0; ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_depends.c busybox-1.12.1/archival/libipkg/pkg_depends.c +--- busybox-1.12.1.orig/archival/libipkg/pkg_depends.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_depends.c 2008-10-23 15:05:10.000000000 +0200 +@@ -0,0 +1,1032 @@ ++/* pkg_depends.c - the itsy package management system ++ ++ Steven M. Ayer ++ ++ Copyright (C) 2002 Compaq Computer Corporation ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++#include ++#include ++ ++#include "pkg.h" ++#include "ipkg_utils.h" ++#include "pkg_hash.h" ++#include "ipkg_message.h" ++#include "pkg_parse.h" ++#include "hash_table.h" ++ ++static int parseDepends(compound_depend_t *compound_depend, hash_table_t * hash, char * depend_str); ++static depend_t * depend_init(void); ++static void depend_deinit(depend_t *d); ++static char ** add_unresolved_dep(pkg_t * pkg, char ** the_lost, int ref_ndx); ++static char ** merge_unresolved(char ** oldstuff, char ** newstuff); ++static int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg); ++int is_pkg_a_replaces(pkg_t *pkg_scout,pkg_t *pkg); ++ ++static int pkg_installed_and_constraint_satisfied(pkg_t *pkg, void *cdata) ++{ ++ depend_t *depend = (depend_t *)cdata; ++ if ((pkg->state_status == SS_INSTALLED || pkg->state_status == SS_UNPACKED) && version_constraints_satisfied(depend, pkg)) ++ return 1; ++ else ++ return 0; ++} ++ ++static int pkg_constraint_satisfied(pkg_t *pkg, void *cdata) ++{ ++ depend_t *depend = (depend_t *)cdata; ++#if 0 ++ pkg_t * temp = pkg_new(); ++ int comparison; ++ parseVersion(temp, depend->version); ++ comparison = pkg_compare_versions(pkg, temp); ++ free(temp); ++ ++ fprintf(stderr, "%s: pkg=%s pkg->version=%s constraint=%p type=%d version=%s comparison=%d satisfied=%d\n", ++ __FUNCTION__, pkg->name, pkg->version, ++ depend, depend->constraint, depend->version, ++ comparison, version_constraints_satisfied(depend, pkg)); ++#endif ++ if (version_constraints_satisfied(depend, pkg)) ++ return 1; ++ else ++ return 0; ++} ++ ++/* returns ndependences or negative error value */ ++int pkg_hash_fetch_unsatisfied_dependencies(ipkg_conf_t *conf, pkg_t * pkg, ++ pkg_vec_t *unsatisfied, char *** unresolved) ++{ ++ pkg_t * satisfier_entry_pkg; ++ register int i, j, k, l; ++ int count, found; ++ char ** the_lost; ++ abstract_pkg_t * ab_pkg; ++ ++ /* ++ * this is a setup to check for redundant/cyclic dependency checks, ++ * which are marked at the abstract_pkg level ++ */ ++ if (!(ab_pkg = pkg->parent)) { ++ fprintf(stderr, "%s:%d: something terribly wrong with pkg %s\n", __FUNCTION__, __LINE__, pkg->name); ++ *unresolved = NULL; ++ return 0; ++ } ++ if (ab_pkg->dependencies_checked) { /* avoid duplicate or cyclic checks */ ++ *unresolved = NULL; ++ return 0; ++ } else { ++ ab_pkg->dependencies_checked = 1; /* mark it for subsequent visits */ ++ } ++ /**/ ++ ++ count = pkg->pre_depends_count + pkg->depends_count + pkg->recommends_count + pkg->suggests_count; ++ if (!count){ ++ *unresolved = NULL; ++ return 0; ++ } ++ ++ the_lost = NULL; ++ ++ /* foreach dependency */ ++ for (i = 0; i < count; i++) { ++ compound_depend_t * compound_depend = &pkg->depends[i]; ++ depend_t ** possible_satisfiers = compound_depend->possibilities;; ++ found = 0; ++ satisfier_entry_pkg = NULL; ++ ++ if (compound_depend->type == GREEDY_DEPEND) { ++ /* foreach possible satisfier */ ++ for (j = 0; j < compound_depend->possibility_count; j++) { ++ /* foreach provided_by, which includes the abstract_pkg itself */ ++ abstract_pkg_t *abpkg = possible_satisfiers[j]->pkg; ++ abstract_pkg_vec_t *ab_provider_vec = abpkg->provided_by; ++ int nposs = ab_provider_vec->len; ++ abstract_pkg_t **ab_providers = ab_provider_vec->pkgs; ++ for (l = 0; l < nposs; l++) { ++ pkg_vec_t *test_vec = ab_providers[l]->pkgs; ++ /* if no depends on this one, try the first package that Provides this one */ ++ if (!test_vec){ /* no pkg_vec hooked up to the abstract_pkg! (need another feed?) */ ++ continue; ++ } ++ ++ /* cruise this possiblity's pkg_vec looking for an installed version */ ++ for (k = 0; k < test_vec->len; k++) { ++ pkg_t *pkg_scout = test_vec->pkgs[k]; ++ /* not installed, and not already known about? */ ++ if ((pkg_scout->state_want != SW_INSTALL) ++ && !pkg_scout->parent->dependencies_checked ++ && !is_pkg_in_pkg_vec(unsatisfied, pkg_scout)) { ++ char ** newstuff = NULL; ++ int rc; ++ pkg_vec_t *tmp_vec = pkg_vec_alloc (); ++ /* check for not-already-installed dependencies */ ++ rc = pkg_hash_fetch_unsatisfied_dependencies(conf, ++ pkg_scout, ++ tmp_vec, ++ &newstuff); ++ if (newstuff == NULL) { ++ int ok = 1; ++ for (i = 0; i < rc; i++) { ++ pkg_t *p = tmp_vec->pkgs[i]; ++ if (p->state_want == SW_INSTALL) ++ continue; ++ ipkg_message(conf, IPKG_DEBUG, "not installing %s due to requirement for %s\n", pkg_scout->name, p->name); ++ ok = 0; ++ break; ++ } ++ pkg_vec_free (tmp_vec); ++ if (ok) { ++ /* mark this one for installation */ ++ ipkg_message(conf, IPKG_NOTICE, "Adding satisfier for greedy dependence: %s\n", pkg_scout->name); ++ pkg_vec_insert(unsatisfied, pkg_scout); ++ } ++ } else { ++ ipkg_message(conf, IPKG_DEBUG, "not installing %s due to broken depends \n", pkg_scout->name); ++ free (newstuff); ++ } ++ } ++ } ++ } ++ } ++ ++ continue; ++ } ++ ++ /* foreach possible satisfier, look for installed package */ ++ for (j = 0; j < compound_depend->possibility_count; j++) { ++ /* foreach provided_by, which includes the abstract_pkg itself */ ++ depend_t *dependence_to_satisfy = possible_satisfiers[j]; ++ abstract_pkg_t *satisfying_apkg = possible_satisfiers[j]->pkg; ++ pkg_t *satisfying_pkg = ++ pkg_hash_fetch_best_installation_candidate(conf, satisfying_apkg, ++ pkg_installed_and_constraint_satisfied, ++ dependence_to_satisfy, 1); ++ /* Being that I can't test constraing in pkg_hash, I will test it here */ ++ if (satisfying_pkg != NULL) { ++ if (!pkg_installed_and_constraint_satisfied ( satisfying_pkg,dependence_to_satisfy)) { ++ satisfying_pkg = NULL; ++ } ++ } ++ ipkg_message(conf, IPKG_DEBUG, "%s:%d: satisfying_pkg=%p \n", __FILE__, __LINE__, satisfying_pkg); ++ if (satisfying_pkg != NULL) { ++ found = 1; ++ break; ++ } ++ ++ } ++ /* if nothing installed matches, then look for uninstalled satisfier */ ++ if (!found) { ++ /* foreach possible satisfier, look for installed package */ ++ for (j = 0; j < compound_depend->possibility_count; j++) { ++ /* foreach provided_by, which includes the abstract_pkg itself */ ++ depend_t *dependence_to_satisfy = possible_satisfiers[j]; ++ abstract_pkg_t *satisfying_apkg = possible_satisfiers[j]->pkg; ++ pkg_t *satisfying_pkg = ++ pkg_hash_fetch_best_installation_candidate(conf, satisfying_apkg, ++ pkg_constraint_satisfied, ++ dependence_to_satisfy, 1); ++ /* Being that I can't test constraing in pkg_hash, I will test it here too */ ++ if (satisfying_pkg != NULL) { ++ if (!pkg_constraint_satisfied ( satisfying_pkg,dependence_to_satisfy)) { ++ satisfying_pkg = NULL; ++ } ++ } ++ ++ /* user request overrides package recommendation */ ++ if (satisfying_pkg != NULL ++ && (compound_depend->type == RECOMMEND || compound_depend->type == SUGGEST) ++ && (satisfying_pkg->state_want == SW_DEINSTALL || satisfying_pkg->state_want == SW_PURGE)) { ++ ipkg_message (conf, IPKG_NOTICE, "%s: ignoring recommendation for %s at user request\n", ++ pkg->name, satisfying_pkg->name); ++ continue; ++ } ++ ++ ipkg_message(conf, IPKG_DEBUG, "%s:%d: satisfying_pkg=%p\n", __FILE__, __LINE__, satisfying_pkg); ++ if (satisfying_pkg != NULL) { ++ satisfier_entry_pkg = satisfying_pkg; ++ break; ++ } ++ } ++ } ++ ++ /* we didn't find one, add something to the unsatisfied vector */ ++ if (!found) { ++ if (!satisfier_entry_pkg) { ++ /* failure to meet recommendations is not an error */ ++ if (compound_depend->type != RECOMMEND && compound_depend->type != SUGGEST) ++ the_lost = add_unresolved_dep(pkg, the_lost, i); ++ else ++ ipkg_message (conf, IPKG_NOTICE, "%s: unsatisfied recommendation for %s\n", ++ pkg->name, compound_depend->possibilities[0]->pkg->name); ++ } ++ else { ++ if (compound_depend->type == SUGGEST) { ++ /* just mention it politely */ ++ ipkg_message (conf, IPKG_NOTICE, "package %s suggests installing %s\n", ++ pkg->name, satisfier_entry_pkg->name); ++ } else { ++ char ** newstuff = NULL; ++ ++ if (satisfier_entry_pkg != pkg && ++ !is_pkg_in_pkg_vec(unsatisfied, satisfier_entry_pkg)) { ++ pkg_vec_insert(unsatisfied, satisfier_entry_pkg); ++ pkg_hash_fetch_unsatisfied_dependencies(conf, ++ satisfier_entry_pkg, ++ unsatisfied, ++ &newstuff); ++ the_lost = merge_unresolved(the_lost, newstuff); ++ } ++ } ++ } ++ } ++ } ++ *unresolved = the_lost; ++ ++ return unsatisfied->len; ++} ++ ++/*checking for conflicts !in replaces ++ If a packages conflicts with another but is also replacing it, I should not consider it a ++ really conflicts ++ returns 0 if conflicts <> replaces or 1 if conflicts == replaces ++*/ ++int is_pkg_a_replaces(pkg_t *pkg_scout,pkg_t *pkg) ++{ ++ int i ; ++ int replaces_count = pkg->replaces_count; ++ abstract_pkg_t **replaces; ++ ++ if (pkg->replaces_count==0) // No replaces, it's surely a conflict ++ return 0; ++ ++ replaces = pkg->replaces; ++ ++ for (i = 0; i < replaces_count; i++) { ++ if (strcmp(pkg_scout->name,pkg->replaces[i]->name)==0) { // Found ++ ipkg_message(NULL, IPKG_DEBUG2, "Seems I've found a replace %s %s \n",pkg_scout->name,pkg->replaces[i]->name); ++ return 1; ++ } ++ } ++ return 0; ++ ++} ++ ++ ++/* Abhaya: added support for conflicts */ ++pkg_vec_t * pkg_hash_fetch_conflicts(pkg_t * pkg) ++{ ++ pkg_vec_t * installed_conflicts, * test_vec; ++ compound_depend_t * conflicts; ++ depend_t ** possible_satisfiers; ++ depend_t * possible_satisfier; ++ register int i, j, k; ++ int count; ++ abstract_pkg_t * ab_pkg; ++ pkg_t **pkg_scouts; ++ pkg_t *pkg_scout; ++ ++ /* ++ * this is a setup to check for redundant/cyclic dependency checks, ++ * which are marked at the abstract_pkg level ++ */ ++ if(!(ab_pkg = pkg->parent)){ ++ fprintf(stderr, "dependency check error. pkg %s isn't in hash table\n", pkg->name); ++ return (pkg_vec_t *)NULL; ++ } ++ ++ conflicts = pkg->conflicts; ++ if(!conflicts){ ++ return (pkg_vec_t *)NULL; ++ } ++ installed_conflicts = pkg_vec_alloc(); ++ ++ count = pkg->conflicts_count; ++ ++ ++ ++ /* foreach conflict */ ++ for(i = 0; i < pkg->conflicts_count; i++){ ++ ++ possible_satisfiers = conflicts->possibilities; ++ ++ /* foreach possible satisfier */ ++ for(j = 0; j < conflicts->possibility_count; j++){ ++ possible_satisfier = possible_satisfiers[j]; ++ if (!possible_satisfier) ++ fprintf(stderr, "%s:%d: possible_satisfier is null\n", __FUNCTION__, __LINE__); ++ if (!possible_satisfier->pkg) ++ fprintf(stderr, "%s:%d: possible_satisfier->pkg is null\n", __FUNCTION__, __LINE__); ++ test_vec = possible_satisfier->pkg->pkgs; ++ if (test_vec) { ++ /* pkg_vec found, it is an actual package conflict ++ * cruise this possiblity's pkg_vec looking for an installed version */ ++ pkg_scouts = test_vec->pkgs; ++ for(k = 0; k < test_vec->len; k++){ ++ pkg_scout = pkg_scouts[k]; ++ if (!pkg_scout) { ++ fprintf(stderr, "%s: null pkg scout\n", __FUNCTION__); ++ continue; ++ } ++ if ((pkg_scout->state_status == SS_INSTALLED || pkg_scout->state_want == SW_INSTALL) && ++ version_constraints_satisfied(possible_satisfier, pkg_scout) && !is_pkg_a_replaces(pkg_scout,pkg)){ ++ if (!is_pkg_in_pkg_vec(installed_conflicts, pkg_scout)){ ++ pkg_vec_insert(installed_conflicts, pkg_scout); ++ } ++ } ++ } ++ } ++ } ++ conflicts++; ++ } ++ ++ if (installed_conflicts->len) ++ return installed_conflicts; ++ pkg_vec_free(installed_conflicts); ++ return (pkg_vec_t *)NULL; ++} ++ ++int version_constraints_satisfied(depend_t * depends, pkg_t * pkg) ++{ ++ pkg_t * temp; ++ int comparison; ++ ++ if(depends->constraint == NONE) ++ return 1; ++ ++ temp = pkg_new(); ++ ++ parseVersion(temp, depends->version); ++ ++ comparison = pkg_compare_versions(pkg, temp); ++ ++ free(temp); ++ ++ if((depends->constraint == EARLIER) && ++ (comparison < 0)) ++ return 1; ++ else if((depends->constraint == LATER) && ++ (comparison > 0)) ++ return 1; ++ else if(comparison == 0) ++ return 1; ++ else if((depends->constraint == LATER_EQUAL) && ++ (comparison >= 0)) ++ return 1; ++ else if((depends->constraint == EARLIER_EQUAL) && ++ (comparison <= 0)) ++ return 1; ++ ++ return 0; ++} ++ ++int pkg_dependence_satisfiable(depend_t *depend) ++{ ++ abstract_pkg_t *apkg = depend->pkg; ++ abstract_pkg_vec_t *provider_apkgs = apkg->provided_by; ++ int n_providers = provider_apkgs->len; ++ abstract_pkg_t **apkgs = provider_apkgs->pkgs; ++ pkg_vec_t *pkg_vec; ++ int n_pkgs ; ++ int i; ++ int j; ++ ++ for (i = 0; i < n_providers; i++) { ++ abstract_pkg_t *papkg = apkgs[i]; ++ pkg_vec = papkg->pkgs; ++ if (pkg_vec) { ++ n_pkgs = pkg_vec->len; ++ for (j = 0; j < n_pkgs; j++) { ++ pkg_t *pkg = pkg_vec->pkgs[j]; ++ if (version_constraints_satisfied(depend, pkg)) { ++ return 1; ++ } ++ } ++ } ++ } ++ return 0; ++} ++ ++int pkg_dependence_satisfied(depend_t *depend) ++{ ++ abstract_pkg_t *apkg = depend->pkg; ++ abstract_pkg_vec_t *provider_apkgs = apkg->provided_by; ++ int n_providers = provider_apkgs->len; ++ abstract_pkg_t **apkgs = provider_apkgs->pkgs; ++ int i; ++ int n_pkgs; ++ int j; ++ ++ for (i = 0; i < n_providers; i++) { ++ abstract_pkg_t *papkg = apkgs[i]; ++ pkg_vec_t *pkg_vec = papkg->pkgs; ++ if (pkg_vec) { ++ n_pkgs = pkg_vec->len; ++ for (j = 0; j < n_pkgs; j++) { ++ pkg_t *pkg = pkg_vec->pkgs[j]; ++ if (version_constraints_satisfied(depend, pkg)) { ++ if (pkg->state_status == SS_INSTALLED || pkg->state_status == SS_UNPACKED) ++ return 1; ++ } ++ } ++ } ++ } ++ return 0; ++} ++ ++static int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg) ++{ ++ register int i; ++ pkg_t ** pkgs = vec->pkgs; ++ ++ for(i = 0; i < vec->len; i++) ++ if((strcmp(pkg->name, (*(pkgs + i))->name) == 0) ++ && (pkg_compare_versions(pkg, *(pkgs + i)) == 0) ++ && (strcmp(pkg->architecture, (*(pkgs + i))->architecture) == 0)) ++ return 1; ++ return 0; ++} ++ ++ ++#ifdef DeadCode ++/** ++ * pkg_has_common_provides returns 1 if pkg and replacee both provide ++ * the same abstract package and 0 otherwise. ++ */ ++int pkg_has_common_provides(pkg_t *pkg, pkg_t *replacee) ++{ ++ abstract_pkg_t **provides = pkg->provides; ++ int provides_count = pkg->provides_count; ++ abstract_pkg_t **replacee_provides = replacee->provides; ++ int replacee_provides_count = replacee->provides_count; ++ int i, j; ++ for (i = 0; i < provides_count; i++) { ++ abstract_pkg_t *apkg = provides[i]; ++ for (j = 0; j < replacee_provides_count; j++) { ++ abstract_pkg_t *replacee_apkg = replacee_provides[i]; ++ if (apkg == replacee_apkg) ++ return 1; ++ } ++ } ++ return 0; ++} ++#endif ++ ++/** ++ * pkg_provides_abstract returns 1 if pkg->provides contains providee ++ * and 0 otherwise. ++ */ ++int pkg_provides_abstract(pkg_t *pkg, abstract_pkg_t *providee) ++{ ++ abstract_pkg_t **provides = pkg->provides; ++ int provides_count = pkg->provides_count; ++ int i; ++ for (i = 0; i < provides_count; i++) { ++ if (provides[i] == providee) ++ return 1; ++ } ++ return 0; ++} ++ ++/** ++ * pkg_replaces returns 1 if pkg->replaces contains one of replacee's provides and 0 ++ * otherwise. ++ */ ++int pkg_replaces(pkg_t *pkg, pkg_t *replacee) ++{ ++ abstract_pkg_t **replaces = pkg->replaces; ++ int replaces_count = pkg->replaces_count; ++ /* abstract_pkg_t **replacee_provides = pkg->provides; ++ int replacee_provides_count = pkg->provides_count; */ ++ int i, j; ++ for (i = 0; i < replaces_count; i++) { ++ abstract_pkg_t *abstract_replacee = replaces[i]; ++ for (j = 0; j < replaces_count; j++) { ++ /* ipkg_message(NULL, IPKG_DEBUG2, "Searching pkg-name %s repprovname %s absrepname %s \n", ++ pkg->name,replacee->provides[j]->name, abstract_replacee->name); */ ++ if (replacee->provides[j] == abstract_replacee) ++ return 1; ++ } ++ } ++ return 0; ++} ++ ++ ++/** ++ * pkg_conflicts_abstract returns 1 if pkg->conflicts contains conflictee and 0 ++ * otherwise. ++ */ ++int pkg_conflicts_abstract(pkg_t *pkg, abstract_pkg_t *conflictee) ++{ ++ compound_depend_t *conflicts = pkg->conflicts; ++ int conflicts_count = pkg->conflicts_count; ++ int i, j; ++ for (i = 0; i < conflicts_count; i++) { ++ int possibility_count = conflicts[i].possibility_count; ++ struct depend **possibilities = conflicts[i].possibilities; ++ for (j = 0; j < possibility_count; j++) { ++ if (possibilities[j]->pkg == conflictee) { ++ return 1; ++ } ++ } ++ } ++ return 0; ++} ++ ++/** ++ * pkg_conflicts returns 1 if pkg->conflicts contains one of ++ * conflictee's provides and 0 otherwise. ++ */ ++int pkg_conflicts(pkg_t *pkg, pkg_t *conflictee) ++{ ++ compound_depend_t *conflicts = pkg->conflicts; ++ int conflicts_count = pkg->conflicts_count; ++ abstract_pkg_t **conflictee_provides = conflictee->provides; ++ int conflictee_provides_count = conflictee->provides_count; ++ int i, j, k; ++ int possibility_count; ++ struct depend **possibilities; ++ abstract_pkg_t *possibility ; ++ ++ for (i = 0; i < conflicts_count; i++) { ++ possibility_count = conflicts[i].possibility_count; ++ possibilities = conflicts[i].possibilities; ++ for (j = 0; j < possibility_count; j++) { ++ possibility = possibilities[j]->pkg; ++ for (k = 0; k < conflictee_provides_count; k++) { ++ if (possibility == conflictee_provides[k]) { ++ return 1; ++ } ++ } ++ } ++ } ++ return 0; ++} ++ ++static char ** merge_unresolved(char ** oldstuff, char ** newstuff) ++{ ++ int oldlen = 0, newlen = 0; ++ char ** result; ++ register int i, j; ++ ++ if(!newstuff) ++ return oldstuff; ++ ++ while(oldstuff && oldstuff[oldlen]) oldlen++; ++ while(newstuff && newstuff[newlen]) newlen++; ++ ++ result = (char **)realloc(oldstuff, sizeof(char *) * (oldlen + newlen + 1)); ++ if (result == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ ++ for(i = oldlen, j = 0; i < (oldlen + newlen); i++, j++) ++ *(result + i) = *(newstuff + j); ++ ++ *(result + i) = NULL; ++ ++ return result; ++} ++ ++/* ++ * a kinda kludgy way to back out depends str from two different arrays (reg'l'r 'n pre) ++ * this is null terminated, no count is carried around ++ */ ++char ** add_unresolved_dep(pkg_t * pkg, char ** the_lost, int ref_ndx) ++{ ++ int count; ++ char ** resized; ++ char *depend_str = pkg_depend_str(pkg, ref_ndx); ++ ++ count = 0; ++ while(the_lost && the_lost[count]) count++; ++ ++ count++; /* need one to hold the null */ ++ resized = (char **)realloc(the_lost, sizeof(char *) * (count + 1)); ++ if (resized == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ resized[count - 1] = strdup(depend_str); ++ resized[count] = NULL; ++ ++ return resized; ++} ++ ++void printDepends(pkg_t * pkg) ++{ ++ register int i, j; ++ compound_depend_t * depend; ++ int count; ++ ++ count = pkg->pre_depends_count + pkg->depends_count; ++ ++ depend = pkg->depends; ++ if(!depend){ ++ fprintf(stderr, "Depends pointer is NULL\n"); ++ return; ++ } ++ for(i = 0; i < count; i++){ ++ fprintf(stderr, "%s has %d possibilities:\n", ++ (depend->type == GREEDY_DEPEND) ? "Greedy-Depend" : ((depend->type == DEPEND) ? "Depend" : "Pre-Depend"), ++ depend->possibility_count); ++ for(j = 0; j < depend->possibility_count; j++) ++ fprintf(stderr, "\t%s version %s (%d)\n", ++ depend->possibilities[j]->pkg->name, ++ depend->possibilities[j]->version, ++ depend->possibilities[j]->constraint); ++ depend++; ++ } ++} ++ ++int buildProvides(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg) ++{ ++ register int i, j; ++ ++ /* every pkg provides itself */ ++ abstract_pkg_vec_insert(ab_pkg->provided_by, ab_pkg); ++ ++ if (!pkg->provides_count) ++ return 0; ++ ++ pkg->provides = (abstract_pkg_t **)malloc(sizeof(abstract_pkg_t *) * (pkg->provides_count + 1)); ++ if (pkg->provides == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return -1 ; ++ } ++ pkg->provides[0] = ab_pkg; ++ ++ // if (strcmp(ab_pkg->name, pkg->name)) ++ // fprintf(stderr, __FUNCTION__ ": ab_pkg=%s pkg=%s\n", ab_pkg->name, pkg->name); ++ ++ for(i = 0; i < pkg->provides_count; i++){ ++ abstract_pkg_t *provided_abpkg = ensure_abstract_pkg_by_name(hash, pkg->provides_str[i]); ++ ++ pkg->provides[i+1] = provided_abpkg; ++ ++ j = 0; ++ abstract_pkg_vec_insert(provided_abpkg->provided_by, ab_pkg); ++ } ++ return 0; ++} ++ ++/* Abhaya: added conflicts support */ ++int buildConflicts(hash_table_t * hash, pkg_t * pkg) ++{ ++ register int i; ++ compound_depend_t * conflicts; ++ ++ if (!pkg->conflicts_count) ++ return 0; ++ ++ conflicts = pkg->conflicts = malloc(sizeof(compound_depend_t) * ++ pkg->conflicts_count); ++ if (conflicts == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return -1; ++ } ++ for (i = 0; i < pkg->conflicts_count; i++) { ++ conflicts->type = CONFLICTS; ++ parseDepends(conflicts, hash, ++ pkg->conflicts_str[i]); ++#if 0 ++ for (j = 0; j < conflicts->possibility_count; j++) { ++ depend_t *possibility = conflicts->possibilities[j]; ++ abstract_pkg_t *conflicting_apkg = possibility->pkg; ++ pkg_add_conflict_pair(ab_pkg, conflicting_apkg); ++ } ++#endif ++ conflicts++; ++ } ++ return 0; ++} ++ ++int buildReplaces(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg) ++{ ++ register int i, j; ++ ++ if (!pkg->replaces_count) ++ return 0; ++ ++ pkg->replaces = (abstract_pkg_t **)malloc(sizeof(abstract_pkg_t *) * pkg->replaces_count); ++ if (pkg->replaces == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return -1; ++ } ++ ++ // if (strcmp(ab_pkg->name, pkg->name)) ++ // fprintf(stderr, __FUNCTION__ ": ab_pkg=%s pkg=%s\n", ab_pkg->name, pkg->name); ++ ++ for(i = 0; i < pkg->replaces_count; i++){ ++ abstract_pkg_t *old_abpkg = ensure_abstract_pkg_by_name(hash, pkg->replaces_str[i]); ++ ++ pkg->replaces[i] = old_abpkg; ++ ++ j = 0; ++ if (!old_abpkg->replaced_by) ++ old_abpkg->replaced_by = abstract_pkg_vec_alloc(); ++ if ( old_abpkg->replaced_by == NULL ){ ++ return -1; ++ } ++ /* if a package pkg both replaces and conflicts old_abpkg, ++ * then add it to the replaced_by vector so that old_abpkg ++ * will be upgraded to ab_pkg automatically */ ++ if (pkg_conflicts_abstract(pkg, old_abpkg)) ++ abstract_pkg_vec_insert(old_abpkg->replaced_by, ab_pkg); ++ } ++ return 0; ++} ++ ++int buildDepends(hash_table_t * hash, pkg_t * pkg) ++{ ++ int count; ++ register int i; ++ compound_depend_t * depends; ++ ++ if(!(count = pkg->pre_depends_count + pkg->depends_count + pkg->recommends_count + pkg->suggests_count)) ++ return 0; ++ ++ if (0 && pkg->pre_depends_count) ++ fprintf(stderr, "pkg=%s pre_depends_count=%d depends_count=%d\n", ++ pkg->name, pkg->pre_depends_count, pkg->depends_count); ++ depends = pkg->depends = malloc(sizeof(compound_depend_t) * count); ++ if (depends == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return -1; ++ } ++ ++ ++ for(i = 0; i < pkg->pre_depends_count; i++){ ++ parseDepends(depends, hash, pkg->pre_depends_str[i]); ++ if (0 && pkg->pre_depends_count) ++ fprintf(stderr, " pre_depends_str=%s depends=%p possibility_count=%x\n", ++ pkg->pre_depends_str[i], depends, depends->possibility_count); ++ depends->type = PREDEPEND; ++ depends++; ++ } ++ ++ for(i = 0; i < pkg->recommends_count; i++){ ++ parseDepends(depends, hash, pkg->recommends_str[i]); ++ if (0 && pkg->recommends_count) ++ fprintf(stderr, " recommends_str=%s depends=%p possibility_count=%x\n", ++ pkg->recommends_str[i], depends, depends->possibility_count); ++ depends->type = RECOMMEND; ++ depends++; ++ } ++ ++ for(i = 0; i < pkg->suggests_count; i++){ ++ parseDepends(depends, hash, pkg->suggests_str[i]); ++ if (0 && pkg->suggests_count) ++ fprintf(stderr, " suggests_str=%s depends=%p possibility_count=%x\n", ++ pkg->suggests_str[i], depends, depends->possibility_count); ++ depends->type = SUGGEST; ++ depends++; ++ } ++ ++ for(i = 0; i < pkg->depends_count; i++){ ++ parseDepends(depends, hash, pkg->depends_str[i]); ++ if (0 && pkg->depends_count) ++ fprintf(stderr, " depends_str=%s depends=%p possibility_count=%x\n", ++ pkg->depends_str[i], depends, depends->possibility_count); ++ depends++; ++ } ++ return 0; ++} ++ ++/* ++ * pkg_depend_string: returns the depends string specified by index_. ++ * All 4 kinds of dependences: dependence, pre-dependence, recommend, and suggest are number starting from 0. ++ * [0,npredepends) -> returns pre_depends_str[index_] ++ * [npredepends,npredepends+nrecommends) -> returns recommends_str[index_] ++ * [npredepends+nrecommends,npredepends+nrecommends+nsuggests) -> returns recommends_str[index_] ++ * [npredepends+nrecommends+nsuggests,npredepends+nrecommends+nsuggests+ndepends) -> returns depends_str[index_] ++ */ ++char *pkg_depend_str(pkg_t *pkg, int index_) ++{ ++ if (index_ < pkg->pre_depends_count) { ++ return pkg->pre_depends_str[index_]; ++ } ++ index_ -= pkg->pre_depends_count; ++ ++ if (index_ < pkg->recommends_count) { ++ return pkg->recommends_str[index_]; ++ } ++ index_ -= pkg->recommends_count; ++ ++ if (index_ < pkg->suggests_count) { ++ return pkg->suggests_str[index_]; ++ } ++ index_ -= pkg->suggests_count; ++ ++ if (index_ < pkg->depends_count) { ++ return pkg->depends_str[index_]; ++ } ++ fprintf(stderr, "pkg_depend_str: index_ %d out of range for pkg=%s\n", index_, pkg->name); ++ return NULL; ++} ++ ++void freeDepends(pkg_t *pkg) ++{ ++ int i; ++ ++ if (pkg == NULL || pkg->depends == NULL) { ++ return; ++ } ++ ++ fprintf(stderr, "Freeing depends=%p\n", pkg->depends); ++ for (i=0; i < pkg->depends->possibility_count; i++) { ++ depend_deinit(pkg->depends->possibilities[i]); ++ } ++ free(pkg->depends->possibilities); ++ free(pkg->depends); ++ pkg->depends = NULL; ++} ++ ++void buildDependedUponBy(pkg_t * pkg, abstract_pkg_t * ab_pkg) ++{ ++ compound_depend_t * depends; ++ int count, othercount; ++ register int i, j; ++ abstract_pkg_t * ab_depend; ++ abstract_pkg_t ** temp; ++ ++ count = pkg->pre_depends_count + pkg->depends_count; ++ depends = pkg->depends; ++ ++ if (0 && pkg->pre_depends_count) ++ fprintf(stderr, "pkg=%s pre_depends_count=%d depends_count=%d\n", ++ pkg->name, pkg->pre_depends_count, pkg->depends_count); ++ for (i = 0; i < count; i++) { ++ if (0 && pkg->pre_depends_count) ++ fprintf(stderr, " i=%d possibility_count=%x depends=%p\n", i, depends->possibility_count, depends); ++ for (j = 0; j < depends->possibility_count; j++){ ++ ab_depend = depends->possibilities[j]->pkg; ++ if(!ab_depend->depended_upon_by) ++ ab_depend->depended_upon_by = (abstract_pkg_t **)calloc(1, sizeof(abstract_pkg_t *)); ++ ++ temp = ab_depend->depended_upon_by; ++ othercount = 1; ++ while(*temp){ ++ temp++; ++ othercount++; ++ } ++ *temp = ab_pkg; ++ ++ ab_depend->depended_upon_by = (abstract_pkg_t **)realloc(ab_depend->depended_upon_by, ++ (othercount + 1) * sizeof(abstract_pkg_t *)); ++ /* the array may have moved */ ++ temp = ab_depend->depended_upon_by + othercount; ++ *temp = NULL; ++ } ++ depends++; ++ } ++} ++ ++static depend_t * depend_init(void) ++{ ++ depend_t * d = (depend_t *)malloc(sizeof(depend_t)); ++ if ( d==NULL ){ ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ d->constraint = NONE; ++ d->version = NULL; ++ d->pkg = NULL; ++ ++ return d; ++} ++ ++static void depend_deinit(depend_t *d) ++{ ++ free(d); ++} ++ ++static int parseDepends(compound_depend_t *compound_depend, ++ hash_table_t * hash, char * depend_str) ++{ ++ char * pkg_name, buffer[2048]; ++ int num_of_ors = 0; ++ register int i; ++ register char * src, * dest; ++ depend_t ** possibilities; ++ ++ /* first count the number of ored possibilities for satisfying dependency */ ++ src = depend_str; ++ while(*src) ++ if(*src++ == '|') ++ num_of_ors++; ++ ++ compound_depend->type = DEPEND; ++ ++ compound_depend->possibility_count = num_of_ors + 1; ++ possibilities = (depend_t **)malloc(sizeof(depend_t *) * (num_of_ors + 1)); ++ if (!possibilities) ++ return -ENOMEM; ++ compound_depend->possibilities = possibilities; ++ ++ src = depend_str; ++ for(i = 0; i < num_of_ors + 1; i++){ ++ possibilities[i] = depend_init(); ++ if (!possibilities[i]) ++ return -ENOMEM; ++ /* gobble up just the name first */ ++ dest = buffer; ++ while(*src && ++ !isspace(*src) && ++ (*src != '(') && ++ (*src != '*') && ++ (*src != '|')) ++ *dest++ = *src++; ++ *dest = '\0'; ++ pkg_name = trim_alloc(buffer); ++ if (pkg_name == NULL ) ++ return -ENOMEM; ++ ++ /* now look at possible version info */ ++ ++ /* skip to next chars */ ++ if(isspace(*src)) ++ while(*src && isspace(*src)) src++; ++ ++ /* extract constraint and version */ ++ if(*src == '('){ ++ src++; ++ if(!strncmp(src, "<<", 2)){ ++ possibilities[i]->constraint = EARLIER; ++ src += 2; ++ } ++ else if(!strncmp(src, "<=", 2)){ ++ possibilities[i]->constraint = EARLIER_EQUAL; ++ src += 2; ++ } ++ else if(!strncmp(src, ">=", 2)){ ++ possibilities[i]->constraint = LATER_EQUAL; ++ src += 2; ++ } ++ else if(!strncmp(src, ">>", 2)){ ++ possibilities[i]->constraint = LATER; ++ src += 2; ++ } ++ else if(!strncmp(src, "=", 1)){ ++ possibilities[i]->constraint = EQUAL; ++ src++; ++ } ++ /* should these be here to support deprecated designations; dpkg does */ ++ else if(!strncmp(src, "<", 1)){ ++ possibilities[i]->constraint = EARLIER_EQUAL; ++ src++; ++ } ++ else if(!strncmp(src, ">", 1)){ ++ possibilities[i]->constraint = LATER_EQUAL; ++ src++; ++ } ++ ++ /* now we have any constraint, pass space to version string */ ++ while(isspace(*src)) src++; ++ ++ /* this would be the version string */ ++ dest = buffer; ++ while(*src && *src != ')') ++ *dest++ = *src++; ++ *dest = '\0'; ++ ++ possibilities[i]->version = trim_alloc(buffer); ++ /* fprintf(stderr, "let's print the depends version string:"); ++ fprintf(stderr, "version %s\n", possibilities[i]->version);*/ ++ if (possibilities[i]->version == NULL ) ++ return -ENOMEM; ++ ++ ++ } ++ /* hook up the dependency to its abstract pkg */ ++ possibilities[i]->pkg = ensure_abstract_pkg_by_name(hash, pkg_name); ++ ++ free(pkg_name); ++ ++ /* now get past the ) and any possible | chars */ ++ while(*src && ++ (isspace(*src) || ++ (*src == ')') || ++ (*src == '|'))) ++ src++; ++ if (*src == '*') ++ { ++ compound_depend->type = GREEDY_DEPEND; ++ src++; ++ } ++ } ++ ++ return 0; ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_depends.h busybox-1.12.1/archival/libipkg/pkg_depends.h +--- busybox-1.12.1.orig/archival/libipkg/pkg_depends.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_depends.h 2008-10-23 15:05:54.000000000 +0200 +@@ -0,0 +1,105 @@ ++/* pkg_depends.h - the itsy package management system ++ ++ Steven M. Ayer ++ ++ Copyright (C) 2002 Compaq Computer Corporation ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef PKG_DEPENDS_H ++#define PKG_DEPENDS_H ++ ++#include "pkg.h" ++#include "pkg_hash.h" ++ ++enum depend_type { ++ PREDEPEND, ++ DEPEND, ++ CONFLICTS, ++ GREEDY_DEPEND, ++ RECOMMEND, ++ SUGGEST ++}; ++typedef enum depend_type depend_type_t; ++ ++enum version_constraint { ++ NONE, ++ EARLIER, ++ EARLIER_EQUAL, ++ EQUAL, ++ LATER_EQUAL, ++ LATER ++}; ++typedef enum version_constraint version_constraint_t; ++ ++struct depend{ ++ version_constraint_t constraint; ++ char * version; ++ abstract_pkg_t * pkg; ++}; ++typedef struct depend depend_t; ++ ++struct compound_depend{ ++ depend_type_t type; ++ int possibility_count; ++ struct depend ** possibilities; ++}; ++typedef struct compound_depend compound_depend_t; ++ ++#include "hash_table.h" ++ ++int buildProvides(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg); ++int buildConflicts(hash_table_t * hash, pkg_t * pkg); ++int buildReplaces(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg); ++int buildDepends(hash_table_t * hash, pkg_t * pkg); ++ ++/** ++ * pkg_has_common_provides returns 1 if pkg and replacee both provide ++ * the same abstract package and 0 otherwise. ++ */ ++int pkg_has_common_provides(pkg_t *pkg, pkg_t *replacee); ++ ++/** ++ * pkg_provides returns 1 if pkg->provides contains providee and 0 ++ * otherwise. ++ */ ++int pkg_provides_abstract(pkg_t *pkg, abstract_pkg_t *providee); ++ ++/** ++ * pkg_replaces returns 1 if pkg->replaces contains one of replacee's provides and 0 ++ * otherwise. ++ */ ++int pkg_replaces(pkg_t *pkg, pkg_t *replacee); ++ ++/** ++ * pkg_conflicts_abstract returns 1 if pkg->conflicts contains conflictee provides and 0 ++ * otherwise. ++ */ ++int pkg_conflicts_abstract(pkg_t *pkg, abstract_pkg_t *conflicts); ++ ++/** ++ * pkg_conflicts returns 1 if pkg->conflicts contains one of conflictee's provides and 0 ++ * otherwise. ++ */ ++int pkg_conflicts(pkg_t *pkg, pkg_t *conflicts); ++ ++char *pkg_depend_str(pkg_t *pkg, int index_); ++void buildDependedUponBy(pkg_t * pkg, abstract_pkg_t * ab_pkg); ++void freeDepends(pkg_t *pkg); ++void printDepends(pkg_t * pkg); ++int version_constraints_satisfied(depend_t * depends, pkg_t * pkg); ++int pkg_hash_fetch_unsatisfied_dependencies(ipkg_conf_t *conf, pkg_t * pkg, pkg_vec_t *depends, char *** unresolved); ++pkg_vec_t * pkg_hash_fetch_conflicts(pkg_t * pkg); ++int pkg_dependence_satisfiable(depend_t *depend); ++int pkg_dependence_satisfied(depend_t *depend); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_dest.c busybox-1.12.1/archival/libipkg/pkg_dest.c +--- busybox-1.12.1.orig/archival/libipkg/pkg_dest.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_dest.c 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,92 @@ ++/* pkg_dest.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++ ++#include "pkg_dest.h" ++#include "file_util.h" ++#include "str_util.h" ++#include "sprintf_alloc.h" ++ ++int pkg_dest_init(pkg_dest_t *dest, const char *name, const char *root_dir,const char * lists_dir) ++{ ++ dest->name = strdup(name); ++ ++ /* Guarantee that dest->root_dir ends with a '/' */ ++ if (str_ends_with(root_dir, "/")) { ++ dest->root_dir = strdup(root_dir); ++ } else { ++ sprintf_alloc(&dest->root_dir, "%s/", root_dir); ++ } ++ file_mkdir_hier(dest->root_dir, 0755); ++ ++ sprintf_alloc(&dest->ipkg_dir, "%s%s", ++ dest->root_dir, IPKG_STATE_DIR_PREFIX); ++ file_mkdir_hier(dest->ipkg_dir, 0755); ++ ++ if (str_starts_with (lists_dir, "/")) ++ sprintf_alloc(&dest->lists_dir, "%s", lists_dir); ++ else ++ sprintf_alloc(&dest->lists_dir, "/%s", lists_dir); ++ ++ file_mkdir_hier(dest->lists_dir, 0755); ++ ++ sprintf_alloc(&dest->info_dir, "%s/%s", ++ dest->ipkg_dir, IPKG_INFO_DIR_SUFFIX); ++ file_mkdir_hier(dest->info_dir, 0755); ++ ++ sprintf_alloc(&dest->status_file_name, "%s/%s", ++ dest->ipkg_dir, IPKG_STATUS_FILE_SUFFIX); ++ ++ sprintf_alloc(&dest->status_file_tmp_name, "%s/%s.tmp", ++ dest->ipkg_dir, IPKG_STATUS_FILE_SUFFIX); ++ ++ dest->status_file = NULL; ++ ++ return 0; ++} ++ ++void pkg_dest_deinit(pkg_dest_t *dest) ++{ ++ free(dest->name); ++ dest->name = NULL; ++ ++ free(dest->root_dir); ++ dest->root_dir = NULL; ++ ++ free(dest->ipkg_dir); ++ dest->ipkg_dir = NULL; ++ ++ free(dest->lists_dir); ++ dest->lists_dir = NULL; ++ ++ free(dest->info_dir); ++ dest->info_dir = NULL; ++ ++ free(dest->status_file_name); ++ dest->status_file_name = NULL; ++ ++ free(dest->status_file_tmp_name); ++ dest->status_file_tmp_name = NULL; ++ ++ if (dest->status_file) { ++ fclose(dest->status_file); ++ } ++ dest->status_file = NULL; ++ ++ dest->root_dir = NULL; ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_dest.h busybox-1.12.1/archival/libipkg/pkg_dest.h +--- busybox-1.12.1.orig/archival/libipkg/pkg_dest.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_dest.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,38 @@ ++/* pkg_dest.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef PKG_DEST_H ++#define PKG_DEST_H ++ ++typedef struct pkg_dest pkg_dest_t; ++struct pkg_dest ++{ ++ char *name; ++ char *root_dir; ++ char *ipkg_dir; ++ char *lists_dir; ++ char *info_dir; ++ char *status_file_name; ++ char *status_file_tmp_name; ++ FILE *status_file; ++}; ++ ++int pkg_dest_init(pkg_dest_t *dest, const char *name, const char *root_dir,const char *lists_dir); ++void pkg_dest_deinit(pkg_dest_t *dest); ++ ++#endif ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_dest_list.c busybox-1.12.1/archival/libipkg/pkg_dest_list.c +--- busybox-1.12.1.orig/archival/libipkg/pkg_dest_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_dest_list.c 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,85 @@ ++/* pkg_dest_list.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++ ++#include "pkg_dest.h" ++#include "void_list.h" ++#include "pkg_dest_list.h" ++ ++int pkg_dest_list_elt_init(pkg_dest_list_elt_t *elt, pkg_dest_t *data) ++{ ++ return void_list_elt_init((void_list_elt_t *) elt, data); ++} ++ ++void pkg_dest_list_elt_deinit(pkg_dest_list_elt_t *elt) ++{ ++ void_list_elt_deinit((void_list_elt_t *) elt); ++} ++ ++int pkg_dest_list_init(pkg_dest_list_t *list) ++{ ++ return void_list_init((void_list_t *) list); ++} ++ ++void pkg_dest_list_deinit(pkg_dest_list_t *list) ++{ ++ pkg_dest_list_elt_t *iter; ++ pkg_dest_t *pkg_dest; ++ ++ for (iter = list->head; iter; iter = iter->next) { ++ pkg_dest = iter->data; ++ pkg_dest_deinit(pkg_dest); ++ ++ /* malloced in pkg_dest_list_append */ ++ free(pkg_dest); ++ iter->data = NULL; ++ } ++ void_list_deinit((void_list_t *) list); ++} ++ ++pkg_dest_t *pkg_dest_list_append(pkg_dest_list_t *list, const char *name, ++ const char *root_dir,const char *lists_dir) ++{ ++ int err; ++ pkg_dest_t *pkg_dest; ++ ++ /* freed in plg_dest_list_deinit */ ++ pkg_dest = malloc(sizeof(pkg_dest_t)); ++ if (pkg_dest == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ ++ pkg_dest_init(pkg_dest, name, root_dir,lists_dir); ++ err = void_list_append((void_list_t *) list, pkg_dest); ++ if (err) { ++ return NULL; ++ } ++ ++ return pkg_dest; ++} ++ ++int pkg_dest_list_push(pkg_dest_list_t *list, pkg_dest_t *data) ++{ ++ return void_list_push((void_list_t *) list, data); ++} ++ ++pkg_dest_list_elt_t *pkg_dest_list_pop(pkg_dest_list_t *list) ++{ ++ return (pkg_dest_list_elt_t *) void_list_pop((void_list_t *) list); ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_dest_list.h busybox-1.12.1/archival/libipkg/pkg_dest_list.h +--- busybox-1.12.1.orig/archival/libipkg/pkg_dest_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_dest_list.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,50 @@ ++/* pkg_dest_list.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef PKG_DEST_LIST_H ++#define PKG_DEST_LIST_H ++ ++#include "pkg_dest.h" ++ ++typedef struct pkg_dest_list_elt pkg_dest_list_elt_t; ++struct pkg_dest_list_elt ++{ ++ pkg_dest_list_elt_t *next; ++ pkg_dest_t *data; ++}; ++ ++typedef struct pkg_dest_list pkg_dest_list_t; ++struct pkg_dest_list ++{ ++ pkg_dest_list_elt_t pre_head; ++ pkg_dest_list_elt_t *head; ++ pkg_dest_list_elt_t *tail; ++}; ++ ++int pkg_dest_list_elt_init(pkg_dest_list_elt_t *elt, pkg_dest_t *data); ++void pkg_dest_list_elt_deinit(pkg_dest_list_elt_t *elt); ++ ++int pkg_dest_list_init(pkg_dest_list_t *list); ++void pkg_dest_list_deinit(pkg_dest_list_t *list); ++ ++pkg_dest_t *pkg_dest_list_append(pkg_dest_list_t *list, const char *name, ++ const char *root_dir,const char* lists_dir); ++int pkg_dest_list_push(pkg_dest_list_t *list, pkg_dest_t *data); ++pkg_dest_list_elt_t *pkg_dest_list_pop(pkg_dest_list_t *list); ++ ++#endif ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_extract.c busybox-1.12.1/archival/libipkg/pkg_extract.c +--- busybox-1.12.1.orig/archival/libipkg/pkg_extract.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_extract.c 2008-10-23 15:21:22.000000000 +0200 +@@ -0,0 +1,225 @@ ++/* pkg_extract.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++#include ++#include ++#include ++ ++#include "pkg_extract.h" ++ ++#include "libbb.h" ++#include "file_util.h" ++#include "sprintf_alloc.h" ++#include "unarchive.h" ++ ++#define IPKG_CONTROL_ARCHIVE "control.tar.gz" ++#define IPKG_DATA_ARCHIVE "data.tar.gz" ++#define IPKG_CONTROL_FILE "control" ++ ++static void extract_ipkg_file_to_dir(pkg_t *pkg, const char *dir, const char *filename) ++{ ++ archive_handle_t *archive; ++ char *path; ++ ++ sprintf_alloc(&path, "%s/", dir); ++ archive = init_handle(); ++ archive->src_fd = xopen(pkg->local_filename, O_RDONLY); ++ archive->filter = filter_accept_list; ++ llist_add_to(&(archive->accept), (char *)filename); ++ archive->buffer = path; ++ archive->action_data = data_extract_all_prefix; ++ archive->ah_flags |= ARCHIVE_EXTRACT_UNCONDITIONAL; ++ while( get_header_tar_gz(archive) == EXIT_SUCCESS ); ++ close(archive->src_fd); ++ free(archive->accept); ++ free(archive); ++ free(path); ++} ++ ++static void FAST_FUNC data_extract_file_name_to_buffer(archive_handle_t *archive) ++{ ++ unsigned int size = strlen(archive->file_header->name) + 2; ++ ++ if (archive->buffer == NULL) { ++ archive->buffer = xmalloc(size); ++ strcpy(archive->buffer, archive->file_header->name); ++ } else { ++ size += strlen(archive->buffer); ++ archive->buffer = xrealloc(archive->buffer, size); ++ strcat(archive->buffer, archive->file_header->name); ++ } ++ strcat(archive->buffer, "\n"); ++ data_skip(archive); ++} ++ ++int pkg_extract_control_file_to_stream(pkg_t *pkg, FILE *stream) ++{ ++ archive_handle_t *archive; ++ char *name; ++ const char *filename = "./" IPKG_CONTROL_FILE; ++ ++ extract_ipkg_file_to_dir(pkg, global_conf->tmp_dir, "./" IPKG_CONTROL_ARCHIVE); ++ sprintf_alloc(&name, "%s/%s", global_conf->tmp_dir, IPKG_CONTROL_ARCHIVE); ++ archive = init_handle(); ++ archive->src_fd = xopen(name, O_RDONLY); ++ archive->filter = filter_accept_list; ++ llist_add_to(&(archive->accept), (char *)filename); ++ archive->action_data = data_extract_to_buffer; ++ while( get_header_tar_gz(archive) == EXIT_SUCCESS ); ++ close(archive->src_fd); ++ fputs(archive->buffer, stream); ++ free(archive->buffer); ++ free(archive->accept); ++ free(archive); ++ free(name); ++ ++ return 0; ++} ++ ++int pkg_extract_control_files_to_dir(pkg_t *pkg, const char *dir) ++{ ++ return pkg_extract_control_files_to_dir_with_prefix(pkg, dir, ""); ++} ++ ++int pkg_extract_control_files_to_dir_with_prefix(pkg_t *pkg, const char *dir, const char *prefix) ++{ ++ archive_handle_t *archive; ++ char *name; ++ char *path; ++ ++ extract_ipkg_file_to_dir(pkg, global_conf->tmp_dir, "./" IPKG_CONTROL_ARCHIVE); ++ sprintf_alloc(&name, "%s/%s", global_conf->tmp_dir, IPKG_CONTROL_ARCHIVE); ++ sprintf_alloc(&path, "%s/%s", dir, prefix); ++ archive = init_handle(); ++ archive->src_fd = xopen(name, O_RDONLY); ++ archive->filter = filter_accept_all; ++ archive->buffer = path; ++ archive->action_data = data_extract_all_prefix; ++ archive->ah_flags |= ARCHIVE_CREATE_LEADING_DIRS | ARCHIVE_PRESERVE_DATE | ARCHIVE_EXTRACT_UNCONDITIONAL; ++ while( get_header_tar_gz(archive) == EXIT_SUCCESS ); ++ close(archive->src_fd); ++ free(archive); ++ free(path); ++ free(name); ++ ++ return 0; ++} ++ ++int pkg_extract_data_files_to_dir(pkg_t *pkg, const char *dir) ++{ ++ archive_handle_t *archive; ++ char *name; ++ char *path; ++ ++ extract_ipkg_file_to_dir(pkg, global_conf->tmp_dir, "./" IPKG_DATA_ARCHIVE); ++ sprintf_alloc(&name, "%s/%s", global_conf->tmp_dir, IPKG_DATA_ARCHIVE); ++ sprintf_alloc(&path, "%s/", dir); ++ archive = init_handle(); ++ archive->src_fd = xopen(name, O_RDONLY); ++ archive->filter = filter_accept_all; ++ archive->buffer = path; ++ archive->action_data = data_extract_all_prefix; ++ archive->ah_flags |= ARCHIVE_CREATE_LEADING_DIRS | ARCHIVE_PRESERVE_DATE | ARCHIVE_EXTRACT_UNCONDITIONAL; ++ while( get_header_tar_gz(archive) == EXIT_SUCCESS ); ++ close(archive->src_fd); ++ free(archive); ++ free(path); ++ free(name); ++ ++ return 0; ++} ++ ++int pkg_extract_data_file_names_to_file(pkg_t *pkg, const char *file_name) ++{ ++ int err=0; ++ char *line, *data_file; ++ FILE *file; ++ FILE *tmp; ++ ++ file = fopen(file_name, "w"); ++ if (file == NULL) { ++ fprintf(stderr, "%s: ERROR: Failed to open %s for writing.\n", ++ __FUNCTION__, file_name); ++ return EINVAL; ++ } ++ ++ tmp = tmpfile(); ++ if (pkg->installed_files) { ++ str_list_elt_t *elt; ++ for (elt = pkg->installed_files->head; elt; elt = elt->next) { ++ fprintf(file, "%s\n", elt->data); ++ } ++ } else { ++ err = pkg_extract_data_file_names_to_stream(pkg, tmp); ++ if (err) { ++ fclose(file); ++ fclose(tmp); ++ return err; ++ } ++ ++ /* Fixup data file names by removing the initial '.' */ ++ rewind(tmp); ++ while (1) { ++ line = file_read_line_alloc(tmp); ++ if (line == NULL) { ++ break; ++ } ++ ++ data_file = line; ++ if (*data_file == '.') { ++ data_file++; ++ } ++ ++ if (*data_file != '/') { ++ fputs("/", file); ++ } ++ ++ /* I have no idea why, but this is what dpkg does */ ++ if (strcmp(data_file, "/\n") == 0) { ++ fputs("/.\n", file); ++ } else { ++ fputs(data_file, file); ++ } ++ } ++ } ++ fclose(tmp); ++ fclose(file); ++ ++ return err; ++} ++ ++int pkg_extract_data_file_names_to_stream(pkg_t *pkg, FILE *file) ++{ ++ archive_handle_t *archive; ++ char *name; ++ ++ extract_ipkg_file_to_dir(pkg, global_conf->tmp_dir, "./" IPKG_DATA_ARCHIVE); ++ sprintf_alloc(&name, "%s/%s", global_conf->tmp_dir, IPKG_DATA_ARCHIVE); ++ archive = init_handle(); ++ archive->src_fd = xopen(name, O_RDONLY); ++ archive->filter = filter_accept_all; ++ archive->action_data = data_extract_file_name_to_buffer; ++ while( get_header_tar_gz(archive) == EXIT_SUCCESS ); ++ close(archive->src_fd); ++ fputs(archive->buffer, file); ++ free(archive->buffer); ++ free(archive); ++ free(name); ++ ++ return 0; ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_extract.h busybox-1.12.1/archival/libipkg/pkg_extract.h +--- busybox-1.12.1.orig/archival/libipkg/pkg_extract.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_extract.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,32 @@ ++/* pkg_extract.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef PKG_EXTRACT_H ++#define PKG_EXTRACT_H ++ ++#include "pkg.h" ++ ++int pkg_extract_control_file_to_stream(pkg_t *pkg, FILE *stream); ++int pkg_extract_control_files_to_dir(pkg_t *pkg, const char *dir); ++int pkg_extract_control_files_to_dir_with_prefix(pkg_t *pkg, ++ const char *dir, ++ const char *prefix); ++int pkg_extract_data_files_to_dir(pkg_t *pkg, const char *dir); ++int pkg_extract_data_file_names_to_file(pkg_t *pkg, const char *file_name); ++int pkg_extract_data_file_names_to_stream(pkg_t *pkg, FILE *file); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg.h busybox-1.12.1/archival/libipkg/pkg.h +--- busybox-1.12.1.orig/archival/libipkg/pkg.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg.h 2008-10-23 15:27:11.000000000 +0200 +@@ -0,0 +1,229 @@ ++/* pkg.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef PKG_H ++#define PKG_H ++ ++#include ++#include ++#include ++ ++#include "pkg_vec.h" ++#include "str_list.h" ++#include "pkg_src.h" ++#include "pkg_dest.h" ++#include "ipkg_conf.h" ++#include "conffile_list.h" ++ ++struct ipkg_conf; ++ ++/* I think "Size" is currently the shortest field name */ ++#define PKG_MINIMUM_FIELD_NAME_LEN 4 ++ ++enum pkg_state_want ++{ ++ SW_UNKNOWN = 1, ++ SW_INSTALL, ++ SW_DEINSTALL, ++ SW_PURGE, ++ SW_LAST_STATE_WANT ++}; ++typedef enum pkg_state_want pkg_state_want_t; ++ ++enum pkg_state_flag ++{ ++ SF_OK = 0, ++ SF_REINSTREQ = 1, ++ SF_HOLD = 2, /* do not upgrade version */ ++ SF_REPLACE = 4, /* replace this package */ ++ SF_NOPRUNE = 8, /* do not remove obsolete files */ ++ SF_PREFER = 16, /* prefer this version */ ++ SF_OBSOLETE = 32, /* old package in upgrade pair */ ++ SF_MARKED = 64, /* temporary mark */ ++ SF_FILELIST_CHANGED = 128, /* needs filelist written */ ++ SF_USER = 256, ++ SF_LAST_STATE_FLAG ++}; ++typedef enum pkg_state_flag pkg_state_flag_t; ++#define SF_NONVOLATILE_FLAGS (SF_HOLD|SF_NOPRUNE|SF_PREFER|SF_OBSOLETE|SF_USER) ++ ++enum pkg_state_status ++{ ++ SS_NOT_INSTALLED = 1, ++ SS_UNPACKED, ++ SS_HALF_CONFIGURED, ++ SS_INSTALLED, ++ SS_HALF_INSTALLED, ++ SS_CONFIG_FILES, ++ SS_POST_INST_FAILED, ++ SS_REMOVAL_FAILED, ++ SS_LAST_STATE_STATUS ++}; ++typedef enum pkg_state_status pkg_state_status_t; ++ ++struct abstract_pkg{ ++ char * name; ++ int dependencies_checked; ++ pkg_vec_t * pkgs; ++ pkg_state_status_t state_status; ++ pkg_state_flag_t state_flag; ++ struct abstract_pkg ** depended_upon_by; /* @@@@ this should be abstract_pkg_vec_t -Jamey */ ++ abstract_pkg_vec_t * provided_by; ++ abstract_pkg_vec_t * replaced_by; ++}; ++ ++#include "pkg_depends.h" ++ ++/* XXX: CLEANUP: I'd like to clean up pkg_t in several ways: ++ ++ The 3 version fields should go into a single version struct. (This ++ is especially important since, currently, pkg->version can easily ++ be mistaken for pkg_verson_str_alloc(pkg) although they are very ++ distinct. This has been the source of multiple bugs. ++ ++ The 3 state fields could possibly also go into their own struct. ++ ++ All fields which deal with lists of packages, (Depends, ++ Pre-Depends, Provides, Suggests, Recommends, Enhances), should each ++ be handled by a single struct in pkg_t ++ ++ All string fields for which there is a small set of possible ++ values, (section, maintainer, architecture, maybe version?), that ++ are reused among different packages -- for all such packages we ++ should move from "char *"s to some atom datatype to share data ++ storage and use less memory. We might even do reference counting, ++ but probably not since most often we only create new pkg_t structs, ++ we don't often free them. */ ++struct pkg ++{ ++ char *name; ++ unsigned long epoch; ++ char *version; ++ char *revision; ++ char *familiar_revision; ++ pkg_src_t *src; ++ pkg_dest_t *dest; ++ char *architecture; ++ char *section; ++ char *maintainer; ++ char *description; ++ pkg_state_want_t state_want; ++ pkg_state_flag_t state_flag; ++ pkg_state_status_t state_status; ++ char **depends_str; ++ int depends_count; ++ char **pre_depends_str; ++ int pre_depends_count; ++ char **recommends_str; ++ int recommends_count; ++ char **suggests_str; ++ int suggests_count; ++ compound_depend_t * depends; ++ ++ /* Abhaya: new conflicts */ ++ char **conflicts_str; ++ compound_depend_t * conflicts; ++ int conflicts_count; ++ ++ char **replaces_str; ++ int replaces_count; ++ abstract_pkg_t ** replaces; ++ ++ char **provides_str; ++ int provides_count; ++ abstract_pkg_t ** provides; ++ ++ abstract_pkg_t *parent; ++ ++ pkg_t *old_pkg; /* during upgrade, points from installee to previously installed */ ++ ++ char *filename; ++ char *local_filename; ++ char *url; ++ char *tmp_unpack_dir; ++ char *md5sum; ++ char *size; ++ char *installed_size; ++ char *priority; ++ char *source; ++ conffile_list_t conffiles; ++ time_t installed_time; ++ /* As pointer for lazy evaluation */ ++ str_list_t *installed_files; ++ /* XXX: CLEANUP: I'd like to perhaps come up with a better ++ mechanism to avoid the problem here, (which is that the ++ installed_files list was being freed from an inner loop while ++ still being used within an outer loop. */ ++ int installed_files_ref_cnt; ++ int essential; ++ int arch_priority; ++/* Adding this flag, to "force" ipkg to choose a "provided_by_hand" package, if there are multiple choice */ ++ int provided_by_hand; ++}; ++ ++pkg_t *pkg_new(void); ++int pkg_init(pkg_t *pkg); ++void pkg_deinit(pkg_t *pkg); ++int pkg_init_from_file(pkg_t *pkg, const char *filename); ++abstract_pkg_t *abstract_pkg_new(void); ++int abstract_pkg_init(abstract_pkg_t *ab_pkg); ++ ++/* ++ * merges fields from newpkg into oldpkg. ++ * Forcibly sets oldpkg state_status, state_want and state_flags if set_status is nonzero ++ */ ++int pkg_merge(pkg_t *oldpkg, pkg_t *newpkg, int set_status); ++ ++char *pkg_version_str_alloc(pkg_t *pkg); ++ ++int pkg_compare_versions(const pkg_t *pkg, const pkg_t *ref_pkg); ++int pkg_name_version_and_architecture_compare(pkg_t *a, pkg_t *b); ++int abstract_pkg_name_compare(abstract_pkg_t *a, abstract_pkg_t *b); ++ ++char * pkg_formatted_info(pkg_t *pkg ); ++char * pkg_formatted_field(pkg_t *pkg, const char *field ); ++ ++void set_flags_from_control(ipkg_conf_t *conf, pkg_t *pkg); ++ ++void pkg_print_info(pkg_t *pkg, FILE *file); ++void pkg_print_status(pkg_t * pkg, FILE * file); ++void pkg_print_field(pkg_t *pkg, FILE *file, const char *field); ++str_list_t *pkg_get_installed_files(pkg_t *pkg); ++int pkg_free_installed_files(pkg_t *pkg); ++int pkg_remove_installed_files_list(ipkg_conf_t *conf, pkg_t *pkg); ++conffile_t *pkg_get_conffile(pkg_t *pkg, const char *file_name); ++int pkg_run_script(struct ipkg_conf *conf, pkg_t *pkg, ++ const char *script, const char *args); ++ ++/* enum mappings */ ++char *pkg_state_want_to_str(pkg_state_want_t sw); ++pkg_state_want_t pkg_state_want_from_str(char *str); ++char *pkg_state_flag_to_str(pkg_state_flag_t sf); ++pkg_state_flag_t pkg_state_flag_from_str(char *str); ++char *pkg_state_status_to_str(pkg_state_status_t ss); ++pkg_state_status_t pkg_state_status_from_str(char *str); ++ ++int pkg_version_satisfied(pkg_t *it, pkg_t *ref, const char *op); ++ ++int pkg_arch_supported(ipkg_conf_t *conf, pkg_t *pkg); ++int pkg_info_preinstall_check(ipkg_conf_t *conf); ++int pkg_free_installed_files(pkg_t *pkg); ++ ++int pkg_write_filelist(ipkg_conf_t *conf, pkg_t *pkg); ++int pkg_write_changed_filelists(ipkg_conf_t *conf); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_hash.c busybox-1.12.1/archival/libipkg/pkg_hash.c +--- busybox-1.12.1.orig/archival/libipkg/pkg_hash.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_hash.c 2008-10-23 16:21:09.000000000 +0200 +@@ -0,0 +1,623 @@ ++/* ipkg_hash.c - the itsy package management system ++ ++ Steven M. Ayer ++ ++ Copyright (C) 2002 Compaq Computer Corporation ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++#include ++#include ++#include ++#include ++ ++#include "hash_table.h" ++#include "pkg.h" ++#include "ipkg_message.h" ++#include "pkg_vec.h" ++#include "pkg_hash.h" ++#include "pkg_parse.h" ++#include "ipkg_utils.h" ++ ++static abstract_pkg_t * add_new_abstract_pkg_by_name(hash_table_t * hash, const char * pkg_name); ++ ++/* ++ * this will talk to both feeds-lists files and installed status files ++ * example api: ++ * ++ * hash_table_t hash; ++ * pkg_hash_init(name, &hash, 1000); ++ * pkg_hash_add_from_file(); ++ * ++ * the query function is just there as a shell to prove to me that this ++ * sort of works, but isn't far from doing something useful ++ * ++ * -sma, 12/21/01 ++ * modified: CDW 3 Jan. 2002 ++ */ ++ ++ ++ ++int pkg_hash_init(const char *name, hash_table_t *hash, int len) ++{ ++ return hash_table_init(name, hash, len); ++} ++ ++void pkg_hash_deinit(hash_table_t *hash) ++{ ++ hash_table_deinit(hash); ++} ++ ++ ++/* Find the default arch for a given package status file if none is given. */ ++static char *pkg_get_default_arch(ipkg_conf_t *conf) ++{ ++ nv_pair_list_elt_t *l; ++ const char *def_arch = HOST_CPU_STR; /* Default arch */ ++ int def_prio = 0; /* Other archs override this */ ++ ++ l = conf->arch_list.head; ++ ++ while (l) { ++ nv_pair_t *nv = l->data; ++ int priority = strtol(nv->value, NULL, 0); ++ ++ /* Check if this arch has higher priority, and is valid */ ++ if ((priority > def_prio) && ++ (strcmp(nv->name, "all")) && (strcmp(nv->name, "noarch"))) { ++ /* Our new default */ ++ def_prio = priority; ++ def_arch = nv->name; ++ } ++ l = l->next; ++ } ++ ++ return strdup(def_arch); ++} ++ ++int pkg_hash_add_from_file(ipkg_conf_t *conf, const char *file_name, ++ pkg_src_t *src, pkg_dest_t *dest, int is_status_file) ++{ ++ hash_table_t *hash = &conf->pkg_hash; ++ char **raw; ++ char **raw_start; ++ pkg_t *pkg; ++ ++ raw = raw_start = read_raw_pkgs_from_file(file_name); ++ if (!raw) ++ return -ENOMEM; ++ ++ while(*raw){ /* don't worry, we'll increment raw in the parsing function */ ++ pkg = pkg_new(); ++ if (!pkg) ++ return -ENOMEM; ++ ++ if (pkg_parse_raw(pkg, &raw, src, dest) == 0) { ++ if (!pkg->architecture) { ++ char *version_str = pkg_version_str_alloc(pkg); ++ pkg->architecture = pkg_get_default_arch(conf); ++ ipkg_message(conf, IPKG_ERROR, "Package %s version %s has no architecture specified, defaulting to %s.\n", ++ pkg->name, version_str, pkg->architecture); ++ free(version_str); ++ } ++ hash_insert_pkg(hash, pkg, is_status_file,conf); ++ } else { ++ free(pkg); ++ } ++ } ++ ++ /* XXX: CLEANUP: I'd like a cleaner interface for cleaning up ++ memory after read_raw_pkgs_from_file */ ++ raw = raw_start; ++ while (*raw) { ++ free(*raw++); ++ } ++ free(raw_start); ++ return 0; ++} ++ ++abstract_pkg_t * abstract_pkg_fetch_by_name(hash_table_t * hash, const char * pkg_name) ++{ ++ return (abstract_pkg_t *)hash_table_get(hash, pkg_name); ++} ++ ++abstract_pkg_vec_t *pkg_hash_fetch_all_installation_candidates(hash_table_t *hash, const char *name) ++{ ++ abstract_pkg_t *apkg = abstract_pkg_fetch_by_name(hash, name); ++ if (apkg) ++ return NULL; ++ return apkg->provided_by; ++} ++ ++ ++pkg_t *pkg_hash_fetch_best_installation_candidate(ipkg_conf_t *conf, abstract_pkg_t *apkg, ++ int (*constraint_fcn)(pkg_t *pkg, void *cdata), void *cdata, int quiet) ++{ ++ int i; ++ int nprovides = 0; ++ int nmatching = 0; ++ pkg_vec_t *matching_pkgs = pkg_vec_alloc(); ++ abstract_pkg_vec_t *matching_apkgs = abstract_pkg_vec_alloc(); ++ abstract_pkg_vec_t *provided_apkg_vec; ++ abstract_pkg_t **provided_apkgs; ++ abstract_pkg_vec_t *providers = abstract_pkg_vec_alloc(); ++ pkg_t *latest_installed_parent = NULL; ++ pkg_t *latest_matching = NULL; ++ pkg_t *held_pkg = NULL; ++ pkg_t *good_pkg_by_name = NULL; ++ ++ if (matching_apkgs == NULL || providers == NULL || ++ apkg == NULL || apkg->provided_by == NULL || (apkg->provided_by->len == 0)) ++ return NULL; ++ ++ ipkg_message(conf, IPKG_DEBUG, "best installation candidate for %s\n", apkg->name); ++ ++ provided_apkg_vec = apkg->provided_by; ++ nprovides = provided_apkg_vec->len; ++ provided_apkgs = provided_apkg_vec->pkgs; ++ if (nprovides > 1) ++ ipkg_message(conf, IPKG_DEBUG, " apkg=%s nprovides=%d\n", apkg->name, nprovides); ++ ++ /* accumulate all the providers */ ++ for (i = 0; i < nprovides; i++) { ++ abstract_pkg_t *provider_apkg = provided_apkgs[i]; ++ ipkg_message(conf, IPKG_DEBUG, " adding %s to providers\n", provider_apkg->name); ++ abstract_pkg_vec_insert(providers, provider_apkg); ++ } ++ nprovides = providers->len; ++ ++ for (i = 0; i < nprovides; i++) { ++ abstract_pkg_t *provider_apkg = abstract_pkg_vec_get(providers, i); ++ abstract_pkg_t *replacement_apkg = NULL; ++ pkg_vec_t *vec; ++ ++ if (provider_apkg->replaced_by && provider_apkg->replaced_by->len) { ++ replacement_apkg = provider_apkg->replaced_by->pkgs[0]; ++ if (provider_apkg->replaced_by->len > 1) { ++ ipkg_message(conf, IPKG_NOTICE, "Multiple replacers for %s, using first one (%s)\n", ++ provider_apkg->name, replacement_apkg->name); ++ } ++ } ++ ++ if (replacement_apkg) ++ ipkg_message(conf, IPKG_DEBUG, " replacement_apkg=%s for provider_apkg=%s\n", ++ replacement_apkg->name, provider_apkg->name); ++ ++ if (replacement_apkg && (replacement_apkg != provider_apkg)) { ++ if (abstract_pkg_vec_contains(providers, replacement_apkg)) ++ continue; ++ else ++ provider_apkg = replacement_apkg; ++ } ++ ++ if (!(vec = provider_apkg->pkgs)) { ++ ipkg_message(conf, IPKG_DEBUG, " no pkgs for provider_apkg %s\n", provider_apkg->name); ++ continue; ++ } ++ ++ ++ /* now check for supported architecture */ ++ { ++ int max_count = 0; ++ int j; ++ ++ /* count packages matching max arch priority and keep track of last one */ ++ for (j = 0; j < vec->len; j++) { ++ pkg_t *maybe = vec->pkgs[j]; ++ ipkg_message(conf, IPKG_DEBUG, " %s arch=%s arch_priority=%d version=%s \n", ++ maybe->name, maybe->architecture, maybe->arch_priority, maybe->version); ++ if (maybe->arch_priority > 0) { ++ max_count++; ++ abstract_pkg_vec_insert(matching_apkgs, maybe->parent); ++ pkg_vec_insert(matching_pkgs, maybe); ++ } ++ } ++ } ++ } ++ ++ if (matching_pkgs->len > 1) ++ pkg_vec_sort(matching_pkgs, pkg_name_version_and_architecture_compare); ++ if (matching_apkgs->len > 1) ++ abstract_pkg_vec_sort(matching_pkgs, abstract_pkg_name_compare); ++ ++/* Here it is usefull, if ( matching_apkgs->len > 1 ), to test if one of this matching packages has the same name of the ++ needed package. In this case, I would return it for install, otherwise I will continue with the procedure */ ++/* The problem is what to do when there are more than a mathing package, with the same name and several version ? ++ Until now I always got the latest, but that breaks the downgrade option. ++ If I stop at the first one, I would probably miss the new ones ++ Maybe the way is to have some kind of flag somewhere, to see if the package been asked to install is from a file, ++ or from a Packages feed. ++ It it is from a file it always need to be checked whatever version I have in feeds or everywhere, according to force-down or whatever options*/ ++/*Pigi*/ ++ ++ for (i = 0; i < matching_pkgs->len; i++) { ++ pkg_t *matching = matching_pkgs->pkgs[i]; ++ if (constraint_fcn(matching, cdata)) { /* We found it */ ++ ipkg_message(conf, IPKG_DEBUG, " Found a valid candidate for the install: %s %s \n", matching->name, matching->version) ; ++ good_pkg_by_name = matching; ++ if ( matching->provided_by_hand == 1 ) /* It has been provided by hand, so it is what user want */ ++ break; ++ } ++ } ++ ++ ++ for (i = 0; i < matching_pkgs->len; i++) { ++ pkg_t *matching = matching_pkgs->pkgs[i]; ++ latest_matching = matching; ++ if (matching->parent->state_status == SS_INSTALLED || matching->parent->state_status == SS_UNPACKED) ++ latest_installed_parent = matching; ++ if (matching->state_flag & (SF_HOLD|SF_PREFER)) { ++ if (held_pkg) ++ ipkg_message(conf, IPKG_ERROR, "Multiple packages (%s and %s) providing same name marked HOLD or PREFER. Using latest.\n", ++ held_pkg->name, matching->name); ++ held_pkg = matching; ++ } ++ } ++ ++ if (!good_pkg_by_name && !held_pkg && !latest_installed_parent && matching_apkgs->len > 1 && !quiet) { ++ ipkg_message(conf, IPKG_ERROR, "Package=%s, %d matching providers\n", ++ apkg->name, matching_apkgs->len); ++ for (i = 0; i < matching_apkgs->len; i++) { ++ abstract_pkg_t *matching = matching_apkgs->pkgs[i]; ++ ipkg_message(conf, IPKG_ERROR, " %s\n", matching->name); ++ } ++ ipkg_message(conf, IPKG_ERROR, "Please select one with ipkg install or ipkg flag prefer\n"); ++ } ++ ++ if (matching_apkgs->len > 1 && conf->verbosity > 1) { ++ ipkg_message(conf, IPKG_NOTICE, "%s: for apkg=%s, %d matching pkgs\n", ++ __FUNCTION__, apkg->name, matching_pkgs->len); ++ for (i = 0; i < matching_pkgs->len; i++) { ++ pkg_t *matching = matching_pkgs->pkgs[i]; ++ ipkg_message(conf, IPKG_INFO, " %s %s %s\n", ++ matching->name, matching->version, matching->architecture); ++ } ++ } ++ ++ nmatching = matching_apkgs->len; ++ ++ pkg_vec_free(matching_pkgs); ++ abstract_pkg_vec_free(matching_apkgs); ++ abstract_pkg_vec_free(providers); ++ ++ if (good_pkg_by_name) { /* We found a good candidate, we will install it */ ++ return good_pkg_by_name; ++ } ++ if (held_pkg) { ++ ipkg_message(conf, IPKG_INFO, " using held package %s\n", held_pkg->name); ++ return held_pkg; ++ } ++ if (latest_installed_parent) { ++ ipkg_message(conf, IPKG_INFO, " using latest version of installed package %s\n", latest_installed_parent->name); ++ return latest_installed_parent; ++ } ++ if (nmatching > 1) { ++ ipkg_message(conf, IPKG_INFO, " no matching pkg out of matching_apkgs=%d\n", nmatching); ++ return NULL; ++ } ++ if (latest_matching) { ++ ipkg_message(conf, IPKG_INFO, " using latest matching %s %s %s\n", ++ latest_matching->name, latest_matching->version, latest_matching->architecture); ++ return latest_matching; ++ } ++ return NULL; ++} ++ ++static int pkg_name_constraint_fcn(pkg_t *pkg, void *cdata) ++{ ++ const char *name = (const char *)cdata; ++ if (strcmp(pkg->name, name) == 0) ++ return 1; ++ else ++ return 0; ++} ++ ++pkg_t *pkg_hash_fetch_best_installation_candidate_by_name(ipkg_conf_t *conf, const char *name) ++{ ++ hash_table_t *hash = &conf->pkg_hash; ++ abstract_pkg_t *apkg = NULL; ++ ++ if (!(apkg = abstract_pkg_fetch_by_name(hash, name))) ++ return NULL; ++ ++ return pkg_hash_fetch_best_installation_candidate(conf, apkg, pkg_name_constraint_fcn, apkg->name, 0); ++} ++ ++ ++pkg_t * pkg_hash_fetch_by_name_version(hash_table_t *hash, ++ const char *pkg_name, ++ const char * version) ++{ ++ pkg_vec_t * vec; ++ register int i; ++ char *version_str = NULL; ++ ++ if(!(vec = pkg_vec_fetch_by_name(hash, pkg_name))) ++ return NULL; ++ ++ for(i = 0; i < vec->len; i++) { ++ version_str = pkg_version_str_alloc(vec->pkgs[i]); ++ if(!strcmp(version_str, version)) { ++ free(version_str); ++ break; ++ } ++ free(version_str); ++ } ++ ++ if(i == vec->len) ++ return NULL; ++ ++ return vec->pkgs[i]; ++} ++ ++pkg_t *pkg_hash_fetch_installed_by_name_dest(hash_table_t *hash, ++ const char *pkg_name, ++ pkg_dest_t *dest) ++{ ++ pkg_vec_t * vec; ++ register int i; ++ ++ if(!(vec = pkg_vec_fetch_by_name(hash, pkg_name))) { ++ return NULL; ++ } ++ ++ for(i = 0; i < vec->len; i++) ++ if((vec->pkgs[i]->state_status == SS_INSTALLED || vec->pkgs[i]->state_status == SS_UNPACKED) && vec->pkgs[i]->dest == dest) { ++ return vec->pkgs[i]; ++ } ++ return NULL; ++} ++ ++pkg_t *pkg_hash_fetch_installed_by_name(hash_table_t *hash, ++ const char *pkg_name) ++{ ++ pkg_vec_t * vec; ++ register int i; ++ ++ if(!(vec = pkg_vec_fetch_by_name(hash, pkg_name))){ ++ return NULL; ++ } ++ ++ for(i = 0; i < vec->len; i++) ++ if (vec->pkgs[i]->state_status == SS_INSTALLED || vec->pkgs[i]->state_status == SS_UNPACKED){ ++ return vec->pkgs[i]; ++ } ++ ++ return NULL; ++} ++ ++pkg_vec_t *pkg_vec_fetch_by_name(hash_table_t *hash, const char *pkg_name) ++{ ++ abstract_pkg_t * ab_pkg; ++ ++ if(!(ab_pkg = abstract_pkg_fetch_by_name(hash, pkg_name))){ ++ return NULL; ++ } ++ ++ if (ab_pkg->pkgs) { ++ return ab_pkg->pkgs; ++ } else if (ab_pkg->provided_by) { ++ abstract_pkg_t *abpkg = abstract_pkg_vec_get(ab_pkg->provided_by, 0); ++ if (abpkg != NULL){ ++ return abpkg->pkgs; ++ } else { ++ return ab_pkg->pkgs; ++ } ++ } else { ++ return NULL; ++ } ++} ++ ++static int pkg_compare_names(const void *p1, const void *p2) ++{ ++ const pkg_t *pkg1 = *(const pkg_t **)p1; ++ const pkg_t *pkg2 = *(const pkg_t **)p2; ++ if (pkg1->name == NULL) ++ return 1; ++ if (pkg2->name == NULL) ++ return -1; ++ return(strcmp(pkg1->name, pkg2->name)); ++} ++ ++ ++static void pkg_hash_fetch_available_helper(const char *pkg_name, void *entry, void *data) ++{ ++ int j; ++ const char *name; ++ abstract_pkg_t *ab_pkg = (abstract_pkg_t *)entry; ++ pkg_vec_t *all = (pkg_vec_t *)data; ++ pkg_vec_t *pkg_vec = ab_pkg->pkgs; ++ name = pkg_name; ++ if (pkg_vec) { ++ for (j = 0; j < pkg_vec->len; j++) { ++ pkg_t *pkg = pkg_vec->pkgs[j]; ++ pkg_vec_insert(all, pkg); ++ } ++ } ++} ++ ++void pkg_hash_fetch_available(hash_table_t *hash, pkg_vec_t *all) ++{ ++ hash_table_foreach(hash, pkg_hash_fetch_available_helper, all); ++ qsort(all->pkgs, all->len, sizeof(pkg_t *), pkg_compare_names); ++} ++ ++static void pkg_hash_fetch_all_installed_helper(const char *pkg_name, void *entry, void *data) ++{ ++ const char *name; ++ abstract_pkg_t *ab_pkg = (abstract_pkg_t *)entry; ++ pkg_vec_t *all = (pkg_vec_t *)data; ++ pkg_vec_t *pkg_vec = ab_pkg->pkgs; ++ int j; ++ name = pkg_name; ++ if (pkg_vec) { ++ for (j = 0; j < pkg_vec->len; j++) { ++ pkg_t *pkg = pkg_vec->pkgs[j]; ++ if (pkg->state_status == SS_INSTALLED || pkg->state_status == SS_UNPACKED) { ++ pkg_vec_insert(all, pkg); ++ } ++ } ++ } ++} ++void pkg_hash_fetch_all_installed(hash_table_t *hash, pkg_vec_t *all) ++{ ++ hash_table_foreach(hash, pkg_hash_fetch_all_installed_helper, all); ++ qsort(all->pkgs, all->len, sizeof(void*), pkg_compare_names); ++} ++ ++static void pkg_hash_dump_helper(const char *pkg_name, void *entry, void *data) ++{ ++ int i; ++ pkg_t *pkg; ++ const char *name; ++ abstract_pkg_t *ab_pkg = (abstract_pkg_t *)entry; ++ ipkg_conf_t *conf = (ipkg_conf_t *)data; ++ abstract_pkg_t ** dependents = ab_pkg->depended_upon_by; ++ name = pkg_name; ++ fprintf(stdout, "%s\n", ab_pkg->name); ++ i = 0; ++ if (dependents != NULL) ++ while (dependents [i] != NULL) ++ printf ("\tdepended upon by - %s\n", dependents [i ++]->name); ++ dependents = ab_pkg->provided_by->pkgs; ++ i = 0; ++ if (dependents != NULL) ++ while (dependents [i] != NULL && i < ab_pkg->provided_by->len) ++ printf ("\tprovided by - %s\n", dependents [i ++]->name); ++ pkg = pkg_hash_fetch_best_installation_candidate_by_name (conf, ab_pkg->name); ++ if (pkg) { ++ i = 0; ++ while (i < pkg->depends_count) ++ printf ("\tdepends on - %s\n", pkg->depends_str [i ++]); ++ } ++} ++void pkg_hash_dump(hash_table_t *hash, void *data) ++{ ++ ++ printf ("\n\n+=+%s+=+\n\n", __FUNCTION__); ++ hash_table_foreach(hash, pkg_hash_dump_helper, data); ++ printf ("\n+=+%s+=+\n\n", __FUNCTION__); ++} ++ ++abstract_pkg_t * ensure_abstract_pkg_by_name(hash_table_t * hash, const char * pkg_name) ++{ ++ abstract_pkg_t * ab_pkg; ++ ++ if(!(ab_pkg = abstract_pkg_fetch_by_name(hash, pkg_name))) ++ ab_pkg = add_new_abstract_pkg_by_name(hash, pkg_name); ++ ++ return ab_pkg; ++} ++ ++pkg_t *hash_insert_pkg(hash_table_t *hash, pkg_t *pkg, int set_status,ipkg_conf_t *conf) ++{ ++ abstract_pkg_t * ab_pkg; ++ int arch_priority; ++ ++ if(!pkg) ++ return pkg; ++ ++ arch_priority = pkg->arch_priority; ++ ++ if (buildDepends(hash, pkg)<0){ ++ fprintf(stderr, "%s : This should never happen. Report this Bug in bugzilla please \n ",__FUNCTION__); ++ return NULL; ++ } ++ ab_pkg = ensure_abstract_pkg_by_name(hash, pkg->name); ++ ++ if (set_status) { ++ if (pkg->state_status == SS_INSTALLED) { ++ ab_pkg->state_status = SS_INSTALLED; ++ } else if (pkg->state_status == SS_UNPACKED) { ++ ab_pkg->state_status = SS_UNPACKED; ++ } ++ } ++ ++ if(!ab_pkg->pkgs) ++ ab_pkg->pkgs = pkg_vec_alloc(); ++ ++ /* pkg_vec_insert_merge might munge package, but it returns an unmunged pkg */ ++ pkg = pkg_vec_insert_merge(ab_pkg->pkgs, pkg, set_status,conf ); ++ pkg->parent = ab_pkg; ++ ++ if (buildProvides(hash, ab_pkg, pkg)<0){ ++ fprintf(stderr, "%s : This should never happen. Report this Bug in bugzilla please \n ",__FUNCTION__); ++ return NULL; ++ } ++ /* need to build the conflicts graph before replaces for correct calculation of replaced_by relation */ ++ if (buildConflicts(hash, pkg)<0){ ++ fprintf(stderr, "%s : This should never happen. Report this Bug in bugzilla please \n ",__FUNCTION__); ++ return NULL; ++ } ++ if (buildReplaces(hash, ab_pkg, pkg)<0) { ++ fprintf(stderr, "%s : This should never happen. Report this Bug in bugzilla please \n ",__FUNCTION__); ++ return NULL; ++ } ++ ++ buildDependedUponBy(pkg, ab_pkg); ++ return pkg; ++} ++ ++/* ++ * this will assume that we've already determined that ++ * the abstract pkg doesn't exist, 'cause we should know these things... ++ */ ++static abstract_pkg_t * add_new_abstract_pkg_by_name(hash_table_t * hash, const char * pkg_name) ++{ ++ abstract_pkg_t * ab_pkg; ++ ++ ab_pkg = abstract_pkg_new(); ++ if (ab_pkg == NULL) { return NULL; } ++ ++ ab_pkg->name = strdup(pkg_name); ++ hash_table_insert(hash, pkg_name, ab_pkg); ++ ++ return ab_pkg; ++} ++ ++ ++pkg_t *file_hash_get_file_owner(ipkg_conf_t *conf, const char *file_name) ++{ ++ hash_table_t *file_hash = &conf->file_hash; ++ ++ return hash_table_get(file_hash, file_name); ++} ++ ++int file_hash_set_file_owner(ipkg_conf_t *conf, const char *file_name, pkg_t *owning_pkg) ++{ ++ hash_table_t *file_hash = &conf->file_hash; ++ pkg_t *old_owning_pkg = hash_table_get(file_hash, file_name); ++ int file_name_len = strlen(file_name); ++ ++ if (file_name[file_name_len -1] == '/') ++ return 0; ++ ++ if (conf->offline_root) { ++ int len = strlen(conf->offline_root); ++ if (strncmp(file_name, conf->offline_root, len) == 0) { ++ file_name += len; ++ } ++ } ++ ++ // ipkg_message(conf, IPKG_DEBUG2, "owning_pkg=%s filename=%s\n", owning_pkg->name, file_name); ++ hash_table_insert(file_hash, file_name, owning_pkg); ++ if (old_owning_pkg) { ++ str_list_remove_elt(old_owning_pkg->installed_files, file_name); ++ /* mark this package to have its filelist written */ ++ old_owning_pkg->state_flag |= SF_FILELIST_CHANGED; ++ owning_pkg->state_flag |= SF_FILELIST_CHANGED; ++ } ++ return 0; ++} ++ ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_hash.h busybox-1.12.1/archival/libipkg/pkg_hash.h +--- busybox-1.12.1.orig/archival/libipkg/pkg_hash.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_hash.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,61 @@ ++/* pkg_hash.h - the itsy package management system ++ ++ Steven M. Ayer ++ ++ Copyright (C) 2002 Compaq Computer Corporation ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef PKG_HASH_H ++#define PKG_HASH_H ++ ++#include "pkg.h" ++#include "pkg_vec.h" ++#include "hash_table.h" ++ ++ ++int pkg_hash_init(const char *name, hash_table_t *hash, int len); ++void pkg_hash_deinit(hash_table_t *hash); ++void pkg_hash_map(hash_table_t *hash, void (*f)(void *data, void *entry), void *data); ++ ++void pkg_hash_dump(hash_table_t *hash, void *data); ++void pkg_hash_fetch_available(hash_table_t *hash, pkg_vec_t *available); ++ ++int pkg_hash_add_from_file(ipkg_conf_t *conf, const char *file_name, ++ pkg_src_t *src, pkg_dest_t *dest, int is_status_file); ++pkg_t *hash_insert_pkg(hash_table_t *hash, pkg_t *pkg, int set_status,ipkg_conf_t *conf); ++ ++abstract_pkg_t * ensure_abstract_pkg_by_name(hash_table_t * hash, const char * pkg_name); ++abstract_pkg_t * abstract_pkg_fetch_by_name(hash_table_t * hash, const char * pkg_name); ++pkg_vec_t *pkg_hash_fetch_by_name(hash_table_t *hash, const char *pkg_name); ++void pkg_hash_fetch_all_installed(hash_table_t *hash, pkg_vec_t *installed); ++pkg_t * pkg_hash_fetch_by_name_version(hash_table_t *hash, ++ const char *pkg_name, ++ const char * version); ++abstract_pkg_vec_t *pkg_hash_fetch_all_installation_candidates(hash_table_t *hash, const char *name); ++pkg_t *pkg_hash_fetch_best_installation_candidate(ipkg_conf_t *conf, abstract_pkg_t *apkg, ++ int (*constraint_fcn)(pkg_t *pkg, void *data), void *cdata, int quiet); ++pkg_t *pkg_hash_fetch_best_installation_candidate_by_name(ipkg_conf_t *conf, const char *name); ++pkg_t *pkg_hash_fetch_installed_by_name(hash_table_t *hash, ++ const char *pkg_name); ++pkg_t *pkg_hash_fetch_installed_by_name_dest(hash_table_t *hash, ++ const char *pkg_name, ++ pkg_dest_t *dest); ++ ++pkg_t *file_hash_get_file_owner(ipkg_conf_t *conf, const char *file_name); ++int file_hash_set_file_owner(ipkg_conf_t *conf, const char *file_name, pkg_t *pkg); ++ ++/* XXX: shouldn't this go in pkg_vec.[ch]? */ ++pkg_vec_t *pkg_vec_fetch_by_name(hash_table_t *hash, const char *pkg_name); ++ ++#endif ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_parse.c busybox-1.12.1/archival/libipkg/pkg_parse.c +--- busybox-1.12.1.orig/archival/libipkg/pkg_parse.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_parse.c 2008-10-23 15:49:10.000000000 +0200 +@@ -0,0 +1,368 @@ ++/* pkg_parse.c - the itsy package management system ++ ++ Steven M. Ayer ++ ++ Copyright (C) 2002 Compaq Computer Corporation ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++#include ++#include ++ ++#include "pkg.h" ++#include "ipkg_utils.h" ++#include "pkg_parse.h" ++ ++int alterProvidesLine(char *raw, char *temp); ++ ++int isGenericFieldType(char * type, char * line) ++{ ++ if(!strncmp(line, type, strlen(type))) ++ return 1; ++ return 0; ++} ++ ++char * parseGenericFieldType(char * type, char * raw) ++{ ++ char * field_value = raw + (strlen(type) + 1); ++ return trim_alloc(field_value); ++} ++ ++void parseStatus(pkg_t *pkg, char * raw) ++{ ++ char sw_str[64], sf_str[64], ss_str[64]; ++ ++ sscanf(raw, "Status: %s %s %s", sw_str, sf_str, ss_str); ++ pkg->state_want = pkg_state_want_from_str(sw_str); ++ pkg->state_flag = pkg_state_flag_from_str(sf_str); ++ pkg->state_status = pkg_state_status_from_str(ss_str); ++} ++ ++char ** parseDependsString(char * raw, int * depends_count) ++{ ++ char ** depends = NULL; ++ int line_count = 0; ++ char buff[2048], * dest; ++ ++ while(raw && *raw && !isspace(*raw)) { ++ raw++; ++ } ++ ++ if(line_is_blank(raw)){ ++ *depends_count = line_count; ++ return NULL; ++ } ++ while(raw && *raw){ ++ depends = (char **)realloc(depends, sizeof(char *) * (line_count + 1)); ++ ++ while(isspace(*raw)) raw++; ++ ++ dest = buff; ++ while((*raw != ',') && *raw) ++ *dest++ = *raw++; ++ ++ *dest = '\0'; ++ depends[line_count] = trim_alloc(buff); ++ if(depends[line_count] ==NULL) ++ return NULL; ++ line_count++; ++ if(*raw == ',') ++ raw++; ++ } ++ *depends_count = line_count; ++ return depends; ++} ++ ++void parseConffiles(pkg_t * pkg, char * raw) ++{ ++ char file_name[1048], md5sum[1048]; /* please tell me there aren't any longer that 1k */ ++ ++ if(!strncmp(raw, "Conffiles:", 10)) ++ raw += strlen("Conffiles:"); ++ ++ while(*raw && (sscanf(raw, "%s%s", file_name, md5sum) == 2)){ ++ conffile_list_append(&pkg->conffiles, file_name, md5sum); ++ /* fprintf(stderr, "%s %s ", file_name, md5sum);*/ ++ while (*raw && isspace(*raw)) { ++ raw++; ++ } ++ raw += strlen(file_name); ++ while (*raw && isspace(*raw)) { ++ raw++; ++ } ++ raw += strlen(md5sum); ++ } ++} ++ ++int parseVersion(pkg_t *pkg, char *raw) ++{ ++ char *colon, *eepochcolon; ++#ifdef USE_DEBVERSION ++ char *hyphen; ++#endif ++ unsigned long epoch; ++ ++ if (!*raw) { ++ fprintf(stderr, "%s: ERROR: version string is empty", __FUNCTION__); ++ return EINVAL; ++ } ++ ++ if (strncmp(raw, "Version:", 8) == 0) { ++ raw += 8; ++ } ++ while (*raw && isspace(*raw)) { ++ raw++; ++ } ++ ++ colon= strchr(raw,':'); ++ if (colon) { ++ epoch= strtoul(raw,&eepochcolon,10); ++ if (colon != eepochcolon) { ++ fprintf(stderr, "%s: ERROR: epoch in version is not number", __FUNCTION__); ++ return EINVAL; ++ } ++ if (!*++colon) { ++ fprintf(stderr, "%s: ERROR: nothing after colon in version number", __FUNCTION__); ++ return EINVAL; ++ } ++ raw= colon; ++ pkg->epoch= epoch; ++ } else { ++ pkg->epoch= 0; ++ } ++ ++ pkg->revision = (char *)""; ++ pkg->familiar_revision = (char *)""; ++ ++ pkg->version= malloc(strlen(raw)+1); ++ if ( pkg->version == NULL ) { ++ fprintf(stderr, "%s: out of memory \n", __FUNCTION__); ++ return ENOMEM; ++ } ++ strcpy(pkg->version, raw); ++ ++#ifdef USE_DEBVERSION ++ hyphen= strrchr(pkg->version,'-'); ++ ++ if (hyphen) { ++ *hyphen++= 0; ++ if (strncmp("fam", hyphen, 3) == 0) { ++ pkg->familiar_revision=hyphen+3; ++ hyphen= strrchr(pkg->version,'-'); ++ if (hyphen) { ++ *hyphen++= 0; ++ pkg->revision = hyphen; ++ } ++ } else { ++ pkg->revision = hyphen; ++ } ++ } ++#endif ++ ++/* ++ fprintf(stderr,"Parsed version: %lu, %s, %s, %s\n", ++ pkg->epoch, ++ pkg->version, ++ pkg->revision, ++ pkg->familiar_revision); ++*/ ++ ++ return 0; ++} ++ ++ ++/* This code is needed to insert in first position the keyword for the aligning bug */ ++ ++int alterProvidesLine(char *raw, char *temp) ++{ ++ ++ ++ if (!*raw) { ++ fprintf(stderr, "%s: ERROR: Provides string is empty", __FUNCTION__); ++ return -EINVAL; ++ } ++ ++ if ( temp == NULL ) { ++ fprintf(stderr, "%s: out of memory \n", __FUNCTION__); ++ return -ENOMEM; ++ } ++ ++ if (strncmp(raw, "Provides:", 9) == 0) { ++ raw += 9; ++ } ++ while (*raw && isspace(*raw)) { ++ raw++; ++ } ++ ++ snprintf ( temp, 35, "Provides: ipkg_internal_use_only, "); /* First part of the line */ ++ while (*raw) { ++ strncat( temp, raw++, 1); ++ } ++ return 0; ++ ++} ++ ++/* Some random thoughts from Carl: ++ ++ This function could be considerably simplified if we just kept ++ an array of all the generic string-valued field names, and looped ++ through those looking for a match. Also, these fields could perhaps ++ be stored in the package as an array as well, (or, probably better, ++ as an nv_pair_list_t). ++ ++ Fields which require special parsing or storage, (such as Depends: ++ and Status:) could be handled as they are now. ++*/ ++/* XXX: FEATURE: The Suggests: field needs to be changed from a string ++ to a dependency list. And, since we already have ++ Depends/Pre-Depends and need to add Conflicts, Recommends, and ++ Enhances, perhaps we could generalize all of these and save some ++ code duplication. ++*/ ++int pkg_parse_raw(pkg_t *pkg, char ***raw, pkg_src_t *src, pkg_dest_t *dest) ++{ ++ int reading_conffiles, reading_description; ++ int pkg_false_provides=1; ++ char ** lines; ++ char * provide=NULL; ++ ++ pkg->src = src; ++ pkg->dest = dest; ++ ++ reading_conffiles = reading_description = 0; ++ ++ for (lines = *raw; *lines; lines++) { ++ /* fprintf(stderr, "PARSING %s\n", *lines);*/ ++ if(isGenericFieldType((char *)"Package:", *lines)) ++ pkg->name = parseGenericFieldType((char *)"Package", *lines); ++ else if(isGenericFieldType((char *)"Architecture:", *lines)) ++ pkg->architecture = parseGenericFieldType((char *)"Architecture", *lines); ++ else if(isGenericFieldType((char *)"Filename:", *lines)) ++ pkg->filename = parseGenericFieldType((char *)"Filename", *lines); ++ else if(isGenericFieldType((char *)"Section:", *lines)) ++ pkg->section = parseGenericFieldType((char *)"Section", *lines); ++ else if(isGenericFieldType((char *)"MD5sum:", *lines)) ++ pkg->md5sum = parseGenericFieldType((char *)"MD5sum", *lines); ++ /* The old ipkg wrote out status files with the wrong case for MD5sum, ++ let's parse it either way */ ++ else if(isGenericFieldType((char *)"MD5Sum:", *lines)) ++ pkg->md5sum = parseGenericFieldType((char *)"MD5Sum", *lines); ++ else if(isGenericFieldType((char *)"Size:", *lines)) ++ pkg->size = parseGenericFieldType((char *)"Size", *lines); ++ else if(isGenericFieldType((char *)"Source:", *lines)) ++ pkg->source = parseGenericFieldType((char *)"Source", *lines); ++ else if(isGenericFieldType((char *)"Installed-Size:", *lines)) ++ pkg->installed_size = parseGenericFieldType((char *)"Installed-Size", *lines); ++ else if(isGenericFieldType((char *)"Installed-Time:", *lines)) { ++ char *time_str = parseGenericFieldType((char *)"Installed-Time", *lines); ++ pkg->installed_time = strtoul(time_str, NULL, 0); ++ } else if(isGenericFieldType((char *)"Priority:", *lines)) ++ pkg->priority = parseGenericFieldType((char *)"Priority", *lines); ++ else if(isGenericFieldType((char *)"Essential:", *lines)) { ++ char *essential_value; ++ essential_value = parseGenericFieldType((char *)"Essential", *lines); ++ if (strcmp(essential_value, "yes") == 0) { ++ pkg->essential = 1; ++ } ++ free(essential_value); ++ } ++ else if(isGenericFieldType((char *)"Status", *lines)) ++ parseStatus(pkg, *lines); ++ else if(isGenericFieldType((char *)"Version", *lines)) ++ parseVersion(pkg, *lines); ++ else if(isGenericFieldType((char *)"Maintainer", *lines)) ++ pkg->maintainer = parseGenericFieldType((char *)"Maintainer", *lines); ++ else if(isGenericFieldType((char *)"Conffiles", *lines)){ ++ parseConffiles(pkg, *lines); ++ reading_conffiles = 1; ++ } ++ else if(isGenericFieldType((char *)"Description", *lines)) { ++ pkg->description = parseGenericFieldType((char *)"Description", *lines); ++ reading_conffiles = 0; ++ reading_description = 1; ++ } ++ ++ else if(isGenericFieldType((char *)"Provides", *lines)){ ++/* Here we add the internal_use to align the off by one problem between provides_str and provides */ ++ provide = (char * ) malloc(strlen(*lines)+ 35 ); /* Preparing the space for the new ipkg_internal_use_only */ ++ if ( alterProvidesLine(*lines,provide) ){ ++ return EINVAL; ++ } ++ pkg->provides_str = parseDependsString( provide, &pkg->provides_count); ++/* Let's try to hack a bit here. ++ The idea is that if a package has no Provides, we would add one generic, to permit the check of dependencies ++ in alot of other places. We will remove it before writing down the status database */ ++ pkg_false_provides=0; ++ free(provide); ++ } ++ ++ else if(isGenericFieldType((char *)"Depends", *lines)) ++ pkg->depends_str = parseDependsString(*lines, &pkg->depends_count); ++ else if(isGenericFieldType((char *)"Pre-Depends", *lines)) ++ pkg->pre_depends_str = parseDependsString(*lines, &pkg->pre_depends_count); ++ else if(isGenericFieldType((char *)"Recommends", *lines)) ++ pkg->recommends_str = parseDependsString(*lines, &pkg->recommends_count); ++ else if(isGenericFieldType((char *)"Suggests", *lines)) ++ pkg->suggests_str = parseDependsString(*lines, &pkg->suggests_count); ++ /* Abhaya: support for conflicts */ ++ else if(isGenericFieldType((char *)"Conflicts", *lines)) ++ pkg->conflicts_str = parseDependsString(*lines, &pkg->conflicts_count); ++ else if(isGenericFieldType((char *)"Replaces", *lines)) ++ pkg->replaces_str = parseDependsString(*lines, &pkg->replaces_count); ++ else if(line_is_blank(*lines)) { ++ lines++; ++ break; ++ } ++ else if(**lines == ' '){ ++ if(reading_description) { ++ /* we already know it's not blank, so the rest of description */ ++ pkg->description = realloc(pkg->description, ++ strlen(pkg->description) ++ + 1 + strlen(*lines) + 1); ++ strcat(pkg->description, "\n"); ++ strcat(pkg->description, (*lines)); ++ } ++ else if(reading_conffiles) ++ parseConffiles(pkg, *lines); ++ } ++ } ++ *raw = lines; ++/* If the ipk has not a Provides line, we insert our false line */ ++ if ( pkg_false_provides==1) ++ pkg->provides_str = parseDependsString ((char *)"Provides: ipkg_internal_use_only ", &pkg->provides_count); ++ ++ if (pkg->name) { ++ return 0; ++ } else { ++ return EINVAL; ++ } ++} ++ ++int pkg_valorize_other_field(pkg_t *pkg, char ***raw) ++{ ++ char ** lines; ++ ++ for (lines = *raw; *lines; lines++) { ++ if(isGenericFieldType((char *)"Essential:", *lines)) { ++ char *essential_value; ++ essential_value = parseGenericFieldType((char *)"Essential", *lines); ++ if (strcmp(essential_value, "yes") == 0) { ++ pkg->essential = 1; ++ } ++ free(essential_value); ++ } ++ } ++ *raw = lines; ++ ++ return 0; ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_parse.h busybox-1.12.1/archival/libipkg/pkg_parse.h +--- busybox-1.12.1.orig/archival/libipkg/pkg_parse.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_parse.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,31 @@ ++/* pkg_parse.h - the itsy package management system ++ ++ Steven M. Ayer ++ ++ Copyright (C) 2002 Compaq Computer Corporation ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef PKG_PARSE_H ++#define PKG_PARSE_H ++ ++int isGenericFieldType(char * type, char * line); ++char * parseGenericFieldType(char * type, char * raw); ++void parseStatus(pkg_t *pkg, char * raw); ++int parseVersion(pkg_t *pkg, char *raw); ++char ** parseDependsString(char * raw, int * depends_count); ++int parseVersion(pkg_t *pkg, char *raw); ++void parseConffiles(pkg_t * pkg, char * raw); ++int pkg_parse_raw(pkg_t *pkg, char ***raw, pkg_src_t *src, pkg_dest_t *dest); ++int pkg_valorize_other_field(pkg_t *pkg, char ***raw); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_src.c busybox-1.12.1/archival/libipkg/pkg_src.c +--- busybox-1.12.1.orig/archival/libipkg/pkg_src.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_src.c 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,43 @@ ++/* pkg_src.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++ ++#include "pkg_src.h" ++#include "str_util.h" ++ ++int pkg_src_init(pkg_src_t *src, const char *name, const char *base_url, const char *extra_data, int gzip) ++{ ++ src->gzip = gzip; ++ src->name = str_dup_safe (name); ++ src->value = str_dup_safe (base_url); ++ if (extra_data) ++ src->extra_data = str_dup_safe (extra_data); ++ else ++ src->extra_data = NULL; ++ return 0; ++} ++ ++void pkg_src_deinit(pkg_src_t *src) ++{ ++ free (src->name); ++ free (src->value); ++ if (src->extra_data) ++ free (src->extra_data); ++} ++ ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_src.h busybox-1.12.1/archival/libipkg/pkg_src.h +--- busybox-1.12.1.orig/archival/libipkg/pkg_src.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_src.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,34 @@ ++/* pkg_src.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef PKG_SRC_H ++#define PKG_SRC_H ++ ++#include "nv_pair.h" ++ ++typedef struct ++{ ++ char *name; ++ char *value; ++ char *extra_data; ++ int gzip; ++} pkg_src_t; ++ ++int pkg_src_init(pkg_src_t *src, const char *name, const char *base_url, const char *extra_data, int gzip); ++void pkg_src_deinit(pkg_src_t *src); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_src_list.c busybox-1.12.1/archival/libipkg/pkg_src_list.c +--- busybox-1.12.1.orig/archival/libipkg/pkg_src_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_src_list.c 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,75 @@ ++/* pkg_src_list.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++ ++#include "pkg_src_list.h" ++#include "void_list.h" ++ ++int pkg_src_list_init(pkg_src_list_t *list) ++{ ++ return void_list_init((void_list_t *) list); ++} ++ ++void pkg_src_list_deinit(pkg_src_list_t *list) ++{ ++ pkg_src_list_elt_t *iter; ++ pkg_src_t *pkg_src; ++ ++ for (iter = list->head; iter; iter = iter->next) { ++ pkg_src = iter->data; ++ pkg_src_deinit(pkg_src); ++ ++ /* malloced in pkg_src_list_append */ ++ free(pkg_src); ++ iter->data = NULL; ++ } ++ void_list_deinit((void_list_t *) list); ++} ++ ++pkg_src_t *pkg_src_list_append(pkg_src_list_t *list, ++ const char *name, const char *base_url, const char *extra_data, ++ int gzip) ++{ ++ int err; ++ ++ /* freed in pkg_src_list_deinit */ ++ pkg_src_t *pkg_src = malloc(sizeof(pkg_src_t)); ++ ++ if (pkg_src == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ pkg_src_init(pkg_src, name, base_url, extra_data, gzip); ++ ++ err = void_list_append((void_list_t *) list, pkg_src); ++ if (err) { ++ return NULL; ++ } ++ ++ return pkg_src; ++} ++ ++int pkg_src_list_push(pkg_src_list_t *list, pkg_src_t *data) ++{ ++ return void_list_push((void_list_t *) list, data); ++} ++ ++pkg_src_list_elt_t *pkg_src_list_pop(pkg_src_list_t *list) ++{ ++ return (pkg_src_list_elt_t *) void_list_pop((void_list_t *) list); ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_src_list.h busybox-1.12.1/archival/libipkg/pkg_src_list.h +--- busybox-1.12.1.orig/archival/libipkg/pkg_src_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_src_list.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,57 @@ ++/* pkg_src_list.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef PKG_SRC_LIST_H ++#define PKG_SRC_LIST_H ++ ++#include "pkg_src.h" ++ ++typedef struct pkg_src_list_elt pkg_src_list_elt_t; ++struct pkg_src_list_elt ++{ ++ pkg_src_list_elt_t *next; ++ pkg_src_t *data; ++}; ++ ++typedef struct pkg_src_list pkg_src_list_t; ++struct pkg_src_list ++{ ++ pkg_src_list_elt_t pre_head; ++ pkg_src_list_elt_t *head; ++ pkg_src_list_elt_t *tail; ++}; ++ ++static inline int pkg_src_list_empty(pkg_src_list_t *list) ++{ ++ if (list->head == NULL) ++ return 1; ++ else ++ return 0; ++} ++ ++int pkg_src_list_elt_init(pkg_src_list_elt_t *elt, nv_pair_t *data); ++void pkg_src_list_elt_deinit(pkg_src_list_elt_t *elt); ++ ++int pkg_src_list_init(pkg_src_list_t *list); ++void pkg_src_list_deinit(pkg_src_list_t *list); ++ ++pkg_src_t *pkg_src_list_append(pkg_src_list_t *list, const char *name, const char *root_dir, const char *extra_data, int gzip); ++int pkg_src_list_push(pkg_src_list_t *list, pkg_src_t *data); ++pkg_src_list_elt_t *pkg_src_list_pop(pkg_src_list_t *list); ++ ++#endif ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_vec.c busybox-1.12.1/archival/libipkg/pkg_vec.c +--- busybox-1.12.1.orig/archival/libipkg/pkg_vec.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_vec.c 2008-10-23 13:09:31.000000000 +0200 +@@ -0,0 +1,231 @@ ++/* pkg_vec.c - the itsy package management system ++ ++ Steven M. Ayer ++ ++ Copyright (C) 2002 Compaq Computer Corporation ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include ++#include ++#include "libbb.h" ++#include "xregex.h" ++#include "ipkg.h" ++#include "pkg.h" ++ ++pkg_vec_t * pkg_vec_alloc(void) ++{ ++ pkg_vec_t * vec = (pkg_vec_t *)malloc(sizeof(pkg_vec_t)); ++ if (!vec) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ vec->pkgs = NULL; ++ vec->len = 0; ++ ++ return vec; ++} ++ ++void pkg_vec_free(pkg_vec_t *vec) ++{ ++ free(vec->pkgs); ++ free(vec); ++} ++ ++/* ++ * assumption: all names in a vector are identical ++ * assumption: all version strings are trimmed, ++ * so identical versions have identical version strings, ++ * implying identical packages; let's marry these ++ */ ++pkg_t *pkg_vec_insert_merge(pkg_vec_t *vec, pkg_t *pkg, int set_status,ipkg_conf_t *conf) ++{ ++ int i; ++ int found = 0; ++ ++ /* look for a duplicate pkg by name, version, and architecture */ ++ for (i = 0; i < vec->len; i++){ ++ ipkg_message(conf, IPKG_DEBUG2, "Function: %s. Found pkg=%s version=%s arch=%s cmp=%s version=%s arch=%s \n", ++ __FUNCTION__, pkg->name, pkg->version, pkg->architecture, ++ vec->pkgs[i]->name, vec->pkgs[i]->version,vec->pkgs[i]->architecture ); ++ if ((strcmp(pkg->name, vec->pkgs[i]->name) == 0) ++ && (pkg_compare_versions(pkg, vec->pkgs[i]) == 0) ++ && (strcmp(pkg->architecture, vec->pkgs[i]->architecture) == 0)) { ++ found = 1; ++ ipkg_message(conf, IPKG_DEBUG2, "Function: %s. Found duplicate for pkg=%s version=%s arch=%s\n", ++ __FUNCTION__, pkg->name, pkg->version, pkg->architecture); ++ break; ++ } ++ } ++ ++ /* we didn't find one, add it */ ++ if (!found){ ++ ipkg_message(conf, IPKG_DEBUG2, "Function: %s. Adding new pkg=%s version=%s arch=%s\n", ++ __FUNCTION__, pkg->name, pkg->version, pkg->architecture); ++ ++ vec->pkgs = (pkg_t **)realloc(vec->pkgs, (vec->len + 1) * sizeof(pkg_t *)); ++ vec->pkgs[vec->len] = pkg; ++ vec->len++; ++ return pkg; ++ } ++ /* update the one that we have */ ++ else { ++ ipkg_message(conf, IPKG_DEBUG2, "Function: %s. calling pkg_merge for pkg=%s version=%s arch=%s", ++ __FUNCTION__, pkg->name, pkg->version, pkg->architecture); ++ if (set_status) { ++ /* this is from the status file, so need to merge with existing database */ ++ ipkg_message(conf, IPKG_DEBUG2, " with set_status\n"); ++ pkg_merge(vec->pkgs[i], pkg, set_status); ++ /* XXX: CLEANUP: It's not so polite to free something here ++ that was passed in from above. */ ++ pkg_deinit(pkg); ++ free(pkg); ++ } else { ++ ipkg_message(conf, IPKG_DEBUG2, " WITHOUT set_status\n"); ++ /* just overwrite the old one */ ++ pkg_deinit(vec->pkgs[i]); ++ free(vec->pkgs[i]); ++ vec->pkgs[i] = pkg; ++ } ++ return vec->pkgs[i]; ++ } ++} ++ ++void pkg_vec_insert(pkg_vec_t *vec, const pkg_t *pkg) ++{ ++ int i; ++ int found = 0; ++ ++ /* look for a duplicate pkg by name, version, and architecture */ ++ for (i = 0; i < vec->len; i++) ++ if ((strcmp(pkg->name, vec->pkgs[i]->name) == 0) ++ && (pkg_compare_versions(pkg, vec->pkgs[i]) == 0) ++ && (strcmp(pkg->architecture, vec->pkgs[i]->name) == 0)) { ++ found = 1; ++ break; ++ } ++ ++ /* we didn't find one, add it */ ++ if(!found){ ++ vec->pkgs = (pkg_t **)realloc(vec->pkgs, (vec->len + 1) * sizeof(pkg_t *)); ++ *(const pkg_t **)&vec->pkgs[vec->len] = pkg; ++ vec->len++; ++ } ++} ++ ++int pkg_vec_contains(pkg_vec_t *vec, pkg_t *apkg) ++{ ++ int i; ++ for (i = 0; i < vec->len; i++) ++ if (vec->pkgs[i] == apkg) ++ return 1; ++ return 0; ++} ++ ++typedef int (*compare_fcn_t)(const void *, const void *); ++void pkg_vec_sort(pkg_vec_t *vec, int (*compar)(pkg_t *, pkg_t *)) ++{ ++ qsort(vec->pkgs, vec->len, sizeof(pkg_t *), (compare_fcn_t)compar); ++} ++ ++int pkg_vec_clear_marks(pkg_vec_t *vec) ++{ ++ int npkgs = vec->len; ++ int i; ++ for (i = 0; i < npkgs; i++) { ++ pkg_t *pkg = vec->pkgs[i]; ++ pkg->state_flag &= ~SF_MARKED; ++ } ++ return 0; ++} ++ ++int pkg_vec_mark_if_matches(pkg_vec_t *vec, const char *pattern) ++{ ++ int matching_count = 0; ++ pkg_t **pkgs = vec->pkgs; ++ int npkgs = vec->len; ++ int i; ++ for (i = 0; i < npkgs; i++) { ++ pkg_t *pkg = pkgs[i]; ++ if (fnmatch(pattern, pkg->name, 0)==0) { ++ pkg->state_flag |= SF_MARKED; ++ matching_count++; ++ } ++ } ++ return matching_count; ++} ++ ++ ++abstract_pkg_vec_t * abstract_pkg_vec_alloc(void) ++{ ++ abstract_pkg_vec_t * vec ; ++ vec = (abstract_pkg_vec_t *)malloc(sizeof(abstract_pkg_vec_t)); ++ if (!vec) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return NULL; ++ } ++ vec->pkgs = NULL; ++ vec->len = 0; ++ ++ return vec; ++} ++ ++void abstract_pkg_vec_free(abstract_pkg_vec_t *vec) ++{ ++ free(vec->pkgs); ++ free(vec); ++} ++ ++/* ++ * assumption: all names in a vector are unique ++ */ ++void abstract_pkg_vec_insert(abstract_pkg_vec_t *vec, abstract_pkg_t *pkg) ++{ ++ int i; ++ ++ /* look for a duplicate pkg by name */ ++ for(i = 0; i < vec->len; i++) ++ if (strcmp(pkg->name, vec->pkgs[i]->name) == 0) ++ break; ++ ++ /* we didn't find one, add it */ ++ if(i == vec->len){ ++ vec->pkgs = ++ (abstract_pkg_t **) ++ realloc(vec->pkgs, (vec->len + 1) * sizeof(abstract_pkg_t *)); ++ vec->pkgs[vec->len] = pkg; ++ vec->len++; ++ } ++} ++ ++abstract_pkg_t * abstract_pkg_vec_get(abstract_pkg_vec_t *vec, int i) ++{ ++ if (vec->len > i) ++ return vec->pkgs[i]; ++ else ++ return NULL; ++} ++ ++int abstract_pkg_vec_contains(abstract_pkg_vec_t *vec, abstract_pkg_t *apkg) ++{ ++ int i; ++ for (i = 0; i < vec->len; i++) ++ if (vec->pkgs[i] == apkg) ++ return 1; ++ return 0; ++} ++ ++void abstract_pkg_vec_sort(pkg_vec_t *vec, int (*compar)(abstract_pkg_t *, abstract_pkg_t *)) ++{ ++ qsort(vec->pkgs, vec->len, sizeof(pkg_t *), (compare_fcn_t)compar); ++} ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/pkg_vec.h busybox-1.12.1/archival/libipkg/pkg_vec.h +--- busybox-1.12.1.orig/archival/libipkg/pkg_vec.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/pkg_vec.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,62 @@ ++/* pkg_vec.h - the itsy package management system ++ ++ Steven M. Ayer ++ ++ Copyright (C) 2002 Compaq Computer Corporation ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef PKG_VEC_H ++#define PKG_VEC_H ++ ++typedef struct pkg pkg_t; ++typedef struct abstract_pkg abstract_pkg_t; ++ ++struct pkg_vec ++{ ++ pkg_t **pkgs; ++ int len; ++}; ++typedef struct pkg_vec pkg_vec_t; ++ ++struct abstract_pkg_vec ++{ ++ abstract_pkg_t **pkgs; ++ int len; ++}; ++typedef struct abstract_pkg_vec abstract_pkg_vec_t; ++ ++ ++pkg_vec_t * pkg_vec_alloc(void); ++void pkg_vec_free(pkg_vec_t *vec); ++void marry_two_packages(pkg_t * newpkg, pkg_t * oldpkg); ++ ++void pkg_vec_add(pkg_vec_t *vec, pkg_t *pkg); ++/* pkg_vec_insert_merge: might munge pkg. ++* returns the pkg that is in the pkg graph */ ++pkg_t *pkg_vec_insert_merge(pkg_vec_t *vec, pkg_t *pkg, int set_status, ipkg_conf_t *conf); ++/* this one never munges pkg */ ++void pkg_vec_insert(pkg_vec_t *vec, const pkg_t *pkg); ++int pkg_vec_contains(pkg_vec_t *vec, pkg_t *apkg); ++void pkg_vec_sort(pkg_vec_t *vec, int (*compar)(pkg_t *, pkg_t *)); ++ ++int pkg_vec_clear_marks(pkg_vec_t *vec); ++int pkg_vec_mark_if_matches(pkg_vec_t *vec, const char *pattern); ++ ++abstract_pkg_vec_t * abstract_pkg_vec_alloc(void); ++void abstract_pkg_vec_free(abstract_pkg_vec_t *vec); ++void abstract_pkg_vec_insert(abstract_pkg_vec_t *vec, abstract_pkg_t *pkg); ++abstract_pkg_t * abstract_pkg_vec_get(abstract_pkg_vec_t *vec, int i); ++int abstract_pkg_vec_contains(abstract_pkg_vec_t *vec, abstract_pkg_t *apkg); ++void abstract_pkg_vec_sort(pkg_vec_t *vec, int (*compar)(abstract_pkg_t *, abstract_pkg_t *)); ++#endif ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/sprintf_alloc.h busybox-1.12.1/archival/libipkg/sprintf_alloc.h +--- busybox-1.12.1.orig/archival/libipkg/sprintf_alloc.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/sprintf_alloc.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,25 @@ ++/* sprintf_alloca.c -- like sprintf with memory allocation ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2, or (at your option) ++ any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++*/ ++ ++#ifndef SPRINTF_ALLOC_H ++#define SPRINTF_ALLOC_H ++ ++#include "libbb.h" ++ ++#define sprintf_alloc(str, fmt, args...) *str = xasprintf(fmt, ## args) ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/str_list.c busybox-1.12.1/archival/libipkg/str_list.c +--- busybox-1.12.1.orig/archival/libipkg/str_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/str_list.c 2008-10-23 15:53:09.000000000 +0200 +@@ -0,0 +1,76 @@ ++/* str_list.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++ ++#include "str_list.h" ++ ++int str_list_elt_init(str_list_elt_t *elt, char *data) ++{ ++ return void_list_elt_init((void_list_elt_t *) elt, data); ++} ++ ++void str_list_elt_deinit(str_list_elt_t *elt) ++{ ++ void_list_elt_deinit((void_list_elt_t *) elt); ++} ++ ++str_list_t *str_list_alloc(void) ++{ ++ str_list_t *list = (str_list_t *)malloc(sizeof(str_list_t)); ++ if (list) ++ str_list_init(list); ++ return list; ++} ++ ++int str_list_init(str_list_t *list) ++{ ++ return void_list_init((void_list_t *) list); ++} ++ ++void str_list_deinit(str_list_t *list) ++{ ++ void_list_deinit((void_list_t *) list); ++} ++ ++int str_list_append(str_list_t *list, char *data) ++{ ++ return void_list_append((void_list_t *) list, data); ++} ++ ++int str_list_push(str_list_t *list, char *data) ++{ ++ return void_list_push((void_list_t *) list, data); ++} ++ ++str_list_elt_t *str_list_pop(str_list_t *list) ++{ ++ return (str_list_elt_t *) void_list_pop((void_list_t *) list); ++} ++ ++str_list_elt_t *str_list_remove(str_list_t *list, str_list_elt_t **iter) ++{ ++ return (str_list_elt_t *) void_list_remove((void_list_t *) list, ++ (void_list_elt_t **) iter); ++} ++ ++char *str_list_remove_elt(str_list_t *list, const char *target_str) ++{ ++ return (char *)void_list_remove_elt((void_list_t *) list, ++ (void *)target_str, ++ (void_list_cmp_t)strcmp); ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/str_list.h busybox-1.12.1/archival/libipkg/str_list.h +--- busybox-1.12.1.orig/archival/libipkg/str_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/str_list.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,51 @@ ++/* str_list.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef STR_LIST_H ++#define STR_LIST_H ++ ++#include "void_list.h" ++ ++typedef struct str_list_elt str_list_elt_t; ++struct str_list_elt ++{ ++ str_list_elt_t *next; ++ char *data; ++}; ++ ++typedef struct xstr_list str_list_t; ++struct xstr_list ++{ ++ str_list_elt_t pre_head; ++ str_list_elt_t *head; ++ str_list_elt_t *tail; ++}; ++ ++int str_list_elt_init(str_list_elt_t *elt, char *data); ++void str_list_elt_deinit(str_list_elt_t *elt); ++ ++str_list_t *str_list_alloc(void); ++int str_list_init(str_list_t *list); ++void str_list_deinit(str_list_t *list); ++ ++int str_list_append(str_list_t *list, char *data); ++int str_list_push(str_list_t *list, char *data); ++str_list_elt_t *str_list_pop(str_list_t *list); ++str_list_elt_t *str_list_remove(str_list_t *list, str_list_elt_t **iter); ++char *str_list_remove_elt(str_list_t *list, const char *target_str); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/str_util.c busybox-1.12.1/archival/libipkg/str_util.c +--- busybox-1.12.1.orig/archival/libipkg/str_util.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/str_util.c 2008-10-23 16:01:50.000000000 +0200 +@@ -0,0 +1,69 @@ ++/* str_utils.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++ ++int str_starts_with(const char *str, const char *prefix); ++int str_ends_with(const char *str, const char *suffix); ++int str_chomp(char *str); ++int str_toupper(char *str); ++char *str_dup_safe(const char *str); ++ ++int str_starts_with(const char *str, const char *prefix) ++{ ++ return (strncmp(str, prefix, strlen(prefix)) == 0); ++} ++ ++int str_ends_with(const char *str, const char *suffix) ++{ ++ int suffix_len; ++ int str_len; ++ ++ str_len = strlen(str); ++ suffix_len = strlen(suffix); ++ ++ if (str_len < suffix_len) { ++ return 0; ++ } ++ ++ return (strcmp(str + str_len - suffix_len, suffix) == 0); ++} ++ ++int str_chomp(char *str) ++{ ++ if (str[strlen(str) - 1] == '\n') { ++ str[strlen(str) - 1] = '\0'; ++ return 1; ++ } ++ return 0; ++} ++ ++int str_toupper(char *str) ++{ ++ while (*str) { ++ *str = toupper(*str); ++ str++; ++ } ++ ++ return 0; ++} ++ ++char *str_dup_safe(const char *str) ++{ ++ return str ? strdup(str) : NULL; ++} ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/str_util.h busybox-1.12.1/archival/libipkg/str_util.h +--- busybox-1.12.1.orig/archival/libipkg/str_util.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/str_util.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,27 @@ ++/* str_utils.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef STR_UTILS_H ++#define STR_UTILS_H ++ ++int str_starts_with(const char *str, const char *prefix); ++int str_ends_with(const char *str, const char *suffix); ++int str_chomp(char *str); ++int str_toupper(char *str); ++char *str_dup_safe(const char *str); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/user.c busybox-1.12.1/archival/libipkg/user.c +--- busybox-1.12.1.orig/archival/libipkg/user.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/user.c 2008-10-23 16:02:33.000000000 +0200 +@@ -0,0 +1,61 @@ ++/* user.c - the itsy package management system ++ ++ Jamey Hicks ++ ++ Copyright (C) 2002 Hewlett Packard Company ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include ++#include ++#include "libbb.h" ++#include "file_util.h" ++#include "str_util.h" ++#ifdef IPKG_LIB ++#include "libipkg.h" ++#endif ++ ++char *get_user_response(const char *format, ...); ++ ++ ++#ifdef IPKG_LIB ++static char *question = NULL; ++static int question_len = 255; ++#endif ++char *get_user_response(const char *format, ...) ++{ ++ int len = question_len; ++ va_list ap; ++ char *response; ++ va_start(ap, format); ++ ++#ifndef IPKG_LIB ++ vprintf(format, ap); ++ do { ++ response = file_read_line_alloc(stdin); ++ } while (response == NULL); ++#else ++ do { ++ if (question == NULL || len > question_len) { ++ question = realloc(question, len + 1); ++ question_len = len; ++ } ++ len = vsnprintf(question,question_len,format,ap); ++ } while (len > question_len); ++ response = strdup(ipkg_cb_response(question)); ++#endif ++ str_chomp(response); ++ str_tolower(response); ++ ++ return response; ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/user.h busybox-1.12.1/archival/libipkg/user.h +--- busybox-1.12.1.orig/archival/libipkg/user.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/user.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,23 @@ ++/* user.c - the itsy package management system ++ ++ Jamey Hicks ++ ++ Copyright (C) 2002 Hewlett Packard Company ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include ++#include ++ ++char *get_user_response(const char *format, ...); ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/void_list.c busybox-1.12.1/archival/libipkg/void_list.c +--- busybox-1.12.1.orig/archival/libipkg/void_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/void_list.c 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,194 @@ ++/* void_list.c - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++#include ++ ++#include "void_list.h" ++ ++int void_list_elt_init(void_list_elt_t *elt, void *data) ++{ ++ elt->next = NULL; ++ elt->data = data; ++ ++ return 0; ++} ++ ++void void_list_elt_deinit(void_list_elt_t *elt) ++{ ++ void_list_elt_init(elt, NULL); ++} ++ ++int void_list_init(void_list_t *list) ++{ ++ void_list_elt_init(&list->pre_head, NULL); ++ list->head = NULL; ++ list->pre_head.next = list->head; ++ list->tail = NULL; ++ ++ return 0; ++} ++ ++void void_list_deinit(void_list_t *list) ++{ ++ void_list_elt_t *elt; ++ ++ while (list->head) { ++ elt = void_list_pop(list); ++ void_list_elt_deinit(elt); ++ /* malloced in void_list_append */ ++ free(elt); ++ } ++} ++ ++int void_list_append(void_list_t *list, void *data) ++{ ++ void_list_elt_t *elt; ++ ++ /* freed in void_list_deinit */ ++ elt = malloc(sizeof(void_list_elt_t)); ++ if (elt == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return ENOMEM; ++ } ++ ++ void_list_elt_init(elt, data); ++ ++ if (list->tail) { ++ list->tail->next = elt; ++ list->tail = elt; ++ } else { ++ list->head = elt; ++ list->pre_head.next = list->head; ++ list->tail = elt; ++ } ++ ++ return 0; ++} ++ ++int void_list_push(void_list_t *list, void *data) ++{ ++ void_list_elt_t *elt; ++ ++ elt = malloc(sizeof(void_list_elt_t)); ++ if (elt == NULL) { ++ fprintf(stderr, "%s: out of memory\n", __FUNCTION__); ++ return ENOMEM; ++ } ++ ++ void_list_elt_init(elt, data); ++ ++ elt->next = list->head; ++ list->head->next = elt; ++ if (list->tail == NULL) { ++ list->tail = list->head; ++ } ++ ++ return 0; ++} ++ ++void_list_elt_t *void_list_pop(void_list_t *list) ++{ ++ void_list_elt_t *elt; ++ ++ elt = list->head; ++ ++ if (list->head) { ++ list->head = list->head->next; ++ list->pre_head.next = list->head; ++ if (list->head == NULL) { ++ list->tail = NULL; ++ } ++ } ++ ++ return elt; ++} ++ ++void *void_list_remove(void_list_t *list, void_list_elt_t **iter) ++{ ++ void_list_elt_t *prior; ++ void_list_elt_t *old_elt; ++ void *old_data; ++ ++ old_elt = *iter; ++ old_data = old_elt->data; ++ ++ if (old_elt == list->head) { ++ prior = &list->pre_head; ++ void_list_pop(list); ++ } else { ++ for (prior = list->head; prior; prior = prior->next) { ++ if (prior->next == old_elt) { ++ break; ++ } ++ } ++ if (prior == NULL || prior->next != old_elt) { ++ fprintf(stderr, "%s: ERROR: element not found in list\n", __FUNCTION__); ++ return NULL; ++ } ++ prior->next = old_elt->next; ++ ++ if (old_elt == list->tail) { ++ list->tail = prior; ++ } ++ } ++ ++ void_list_elt_deinit(old_elt); ++ *iter = prior; ++ ++ return old_data; ++} ++ ++/* remove element containing elt data, using cmp(elt->data, target_data) == 0. */ ++void *void_list_remove_elt(void_list_t *list, const void *target_data, void_list_cmp_t cmp) ++{ ++ void_list_elt_t *prior; ++ void_list_elt_t *old_elt = NULL; ++ void *old_data = NULL; ++ ++ /* first element */ ++ if (list->head && list->head->data && (cmp(list->head->data, target_data) == 0)) { ++ old_elt = list->head; ++ old_data = list->head->data; ++ void_list_pop(list); ++ } else { ++ int found = 0; ++ for (prior = list->head; prior && prior->next; prior = prior->next) { ++ if (prior->next->data && (cmp(prior->next->data, target_data) == 0)) { ++ old_elt = prior->next; ++ old_data = old_elt->data; ++ found = 1; ++ break; ++ } ++ } ++ if (!found) { ++ return NULL; ++ } ++ prior->next = old_elt->next; ++ ++ if (old_elt == list->tail) { ++ list->tail = prior; ++ } ++ } ++ if (old_elt) ++ void_list_elt_deinit(old_elt); ++ ++ if (old_data) ++ return old_data; ++ else ++ return NULL; ++} +diff -Nur busybox-1.12.1.orig/archival/libipkg/void_list.h busybox-1.12.1/archival/libipkg/void_list.h +--- busybox-1.12.1.orig/archival/libipkg/void_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/void_list.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,59 @@ ++/* void_list.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef VOID_LIST_H ++#define VOID_LIST_H ++ ++typedef struct void_list_elt void_list_elt_t; ++struct void_list_elt ++{ ++ void_list_elt_t *next; ++ void *data; ++}; ++ ++typedef struct void_list void_list_t; ++struct void_list ++{ ++ void_list_elt_t pre_head; ++ void_list_elt_t *head; ++ void_list_elt_t *tail; ++}; ++ ++static inline int void_list_empty(void_list_t *list) ++{ ++ if (list->head == NULL) ++ return 1; ++ else ++ return 0; ++} ++ ++int void_list_elt_init(void_list_elt_t *elt, void *data); ++void void_list_elt_deinit(void_list_elt_t *elt); ++ ++int void_list_init(void_list_t *list); ++void void_list_deinit(void_list_t *list); ++ ++int void_list_append(void_list_t *list, void *data); ++int void_list_push(void_list_t *list, void *data); ++void_list_elt_t *void_list_pop(void_list_t *list); ++ ++void *void_list_remove(void_list_t *list, void_list_elt_t **iter); ++/* remove element containing elt data, using cmp(elt->data, target_data) == 0. */ ++typedef int (*void_list_cmp_t)(const void *, const void *); ++void *void_list_remove_elt(void_list_t *list, const void *target_data, void_list_cmp_t cmp); ++ ++#endif +diff -Nur busybox-1.12.1.orig/archival/libipkg/xsystem.c busybox-1.12.1/archival/libipkg/xsystem.c +--- busybox-1.12.1.orig/archival/libipkg/xsystem.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/xsystem.c 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,64 @@ ++/* xsystem.c - system(3) with error messages ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#include "ipkg.h" ++#include ++ ++#include "xsystem.h" ++ ++/* XXX: FEATURE: I shouldn't actually use system(3) at all. I don't ++ really need the /bin/sh invocation which takes resources and ++ introduces security problems. I should switch all of this to a sort ++ of execl() or execv() interface/implementation. ++*/ ++ ++/* Like system(3), but with error messages printed if the fork fails ++ or if the child process dies due to an uncaught signal. Also, the ++ return value is a bit simpler: ++ ++ -1 if there was any problem ++ Otherwise, the 8-bit return value of the program ala WEXITSTATUS ++ as defined in . ++*/ ++int xsystem(const char *cmd) ++{ ++ int err; ++ ++ err = system(cmd); ++ ++ if (err == -1) { ++ fprintf(stderr, "%s: ERROR: fork failed before execution: `%s'\n", ++ __FUNCTION__, cmd); ++ return -1; ++ } ++ ++ if (WIFSIGNALED(err)) { ++ fprintf(stderr, "%s: ERROR: Child process died due to signal %d: `%s'\n", ++ __FUNCTION__, WTERMSIG(err), cmd); ++ return -1; ++ } ++ ++ if (WIFEXITED(err)) { ++ /* Normal child exit */ ++ return WEXITSTATUS(err); ++ } ++ ++ fprintf(stderr, "%s: ERROR: Received unintelligible return value from system: %d", ++ __FUNCTION__, err); ++ return -1; ++} ++ +diff -Nur busybox-1.12.1.orig/archival/libipkg/xsystem.h busybox-1.12.1/archival/libipkg/xsystem.h +--- busybox-1.12.1.orig/archival/libipkg/xsystem.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.12.1/archival/libipkg/xsystem.h 2008-10-23 11:41:37.000000000 +0200 +@@ -0,0 +1,34 @@ ++/* xsystem.h - system(3) with error messages ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++*/ ++ ++#ifndef XSYSTEM_H ++#define XSYSTEM_H ++ ++#include ++ ++/* Like system(3), but with error messages printed if the fork fails ++ or if the child process dies due to an uncaught signal. Also, the ++ return value is a bit simpler: ++ ++ -1 if there was any problem ++ Otherwise, the 8-bit return value of the program ala WEXITSTATUS ++ as defined in . ++*/ ++int xsystem(const char *cmd); ++ ++#endif ++ +diff -Nur busybox-1.12.1.orig/archival/libunarchive/data_extract_all.c busybox-1.12.1/archival/libunarchive/data_extract_all.c +--- busybox-1.12.1.orig/archival/libunarchive/data_extract_all.c 2008-09-28 20:04:15.000000000 +0200 ++++ busybox-1.12.1/archival/libunarchive/data_extract_all.c 2008-10-23 11:53:34.000000000 +0200 +@@ -144,3 +144,16 @@ + } + } + } ++ ++extern void FAST_FUNC data_extract_all_prefix(archive_handle_t *archive_handle) ++{ ++ char *name_ptr = archive_handle->file_header->name; ++ ++ name_ptr += strspn(name_ptr, "./"); ++ if (name_ptr[0] != '\0') { ++ archive_handle->file_header->name = xmalloc(strlen(archive_handle->buffer) + 1 + strlen(name_ptr) + 1); ++ strcpy(archive_handle->file_header->name, archive_handle->buffer); ++ strcat(archive_handle->file_header->name, name_ptr); ++ data_extract_all(archive_handle); ++ } ++} +diff -Nur busybox-1.12.1.orig/archival/libunarchive/Kbuild busybox-1.12.1/archival/libunarchive/Kbuild +--- busybox-1.12.1.orig/archival/libunarchive/Kbuild 2008-09-28 20:04:15.000000000 +0200 ++++ busybox-1.12.1/archival/libunarchive/Kbuild 2008-10-23 16:28:14.000000000 +0200 +@@ -39,6 +39,7 @@ + lib-$(CONFIG_DPKG) += $(DPKG_FILES) + lib-$(CONFIG_DPKG_DEB) += $(DPKG_FILES) + lib-$(CONFIG_GUNZIP) += decompress_unzip.o ++lib-$(CONFIG_IPKG) += open_transformer.o get_header_tar.o get_header_tar_gz.o + lib-$(CONFIG_RPM2CPIO) += decompress_unzip.o get_header_cpio.o + lib-$(CONFIG_RPM) += open_transformer.o decompress_unzip.o get_header_cpio.o + lib-$(CONFIG_TAR) += get_header_tar.o +diff -Nur busybox-1.12.1.orig/coreutils/md5_sha1_sum.c busybox-1.12.1/coreutils/md5_sha1_sum.c +--- busybox-1.12.1.orig/coreutils/md5_sha1_sum.c 2008-09-28 20:04:18.000000000 +0200 ++++ busybox-1.12.1/coreutils/md5_sha1_sum.c 2008-10-23 11:41:37.000000000 +0200 +@@ -8,14 +8,12 @@ + + #include "libbb.h" + +-typedef enum { HASH_SHA1, HASH_MD5 } hash_algo_t; +- + #define FLAG_SILENT 1 + #define FLAG_CHECK 2 + #define FLAG_WARN 4 + + /* This might be useful elsewhere */ +-static unsigned char *hash_bin_to_hex(unsigned char *hash_value, ++unsigned char *hash_bin_to_hex(unsigned char *hash_value, + unsigned hash_length) + { + /* xzalloc zero-terminates */ +@@ -24,7 +22,7 @@ + return (unsigned char *)hex_value; + } + +-static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo) ++uint8_t *hash_file(const char *filename, hash_algo_t hash_algo) + { + int src_fd, hash_len, count; + union _ctx_ { +diff -Nur busybox-1.12.1.orig/include/applets.h busybox-1.12.1/include/applets.h +--- busybox-1.12.1.orig/include/applets.h 2008-09-28 20:04:26.000000000 +0200 ++++ busybox-1.12.1/include/applets.h 2008-10-23 11:41:37.000000000 +0200 +@@ -202,6 +202,7 @@ + USE_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) + USE_IPCS(APPLET(ipcs, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) ++USE_IPKG(APPLET(ipkg, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_IPLINK(APPLET(iplink, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_IPRULE(APPLET(iprule, _BB_DIR_BIN, _BB_SUID_NEVER)) +diff -Nur busybox-1.12.1.orig/include/libbb.h busybox-1.12.1/include/libbb.h +--- busybox-1.12.1.orig/include/libbb.h 2008-09-28 20:04:26.000000000 +0200 ++++ busybox-1.12.1/include/libbb.h 2008-10-23 11:47:15.000000000 +0200 +@@ -1264,6 +1264,7 @@ + extern const char bb_uuenc_tbl_std[]; + void bb_uuencode(char *store, const void *s, int length, const char *tbl) FAST_FUNC; + ++typedef enum { HASH_SHA1, HASH_MD5 } hash_algo_t; + typedef struct sha1_ctx_t { + uint32_t count[2]; + uint32_t hash[5]; +@@ -1272,6 +1273,8 @@ + void sha1_begin(sha1_ctx_t *ctx) FAST_FUNC; + void sha1_hash(const void *data, size_t length, sha1_ctx_t *ctx) FAST_FUNC; + void *sha1_end(void *resbuf, sha1_ctx_t *ctx) FAST_FUNC; ++unsigned char *hash_bin_to_hex(unsigned char *hash_value, unsigned hash_length); ++uint8_t *hash_file(const char *filename, hash_algo_t hash_algo); + + typedef struct md5_ctx_t { + uint32_t A; +diff -Nur busybox-1.12.1.orig/include/unarchive.h busybox-1.12.1/include/unarchive.h +--- busybox-1.12.1.orig/include/unarchive.h 2008-09-28 20:04:26.000000000 +0200 ++++ busybox-1.12.1/include/unarchive.h 2008-10-23 11:48:04.000000000 +0200 +@@ -88,6 +88,7 @@ + + extern void data_skip(archive_handle_t *archive_handle) FAST_FUNC; + extern void data_extract_all(archive_handle_t *archive_handle) FAST_FUNC; ++extern void data_extract_all_prefix(archive_handle_t *archive_handle) FAST_FUNC; + extern void data_extract_to_stdout(archive_handle_t *archive_handle) FAST_FUNC; + extern void data_extract_to_buffer(archive_handle_t *archive_handle) FAST_FUNC; + +diff -Nur busybox-1.12.1.orig/include/usage.h busybox-1.12.1/include/usage.h +--- busybox-1.12.1.orig/include/usage.h 2008-09-28 20:04:26.000000000 +0200 ++++ busybox-1.12.1/include/usage.h 2008-10-23 11:41:37.000000000 +0200 +@@ -1419,6 +1419,82 @@ + "$ ls -la /tmp/busybox*\n" \ + "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n" + ++#define ipkg_trivial_usage \ ++ "[options]... sub-command [arguments]..." ++#define ipkg_full_usage \ ++ "ipkg is an utility to install, remove and manage .ipk packages.\n" \ ++ "\n" \ ++ "Sub-commands:\n" \ ++ "\nPackage Manipulation:\n" \ ++ "\tupdate Update list of available packages\n" \ ++ "\tupgrade Upgrade all installed packages to latest version\n" \ ++ "\tinstall Download and install (and dependencies)\n" \ ++ "\tinstall Install package \n" \ ++ "\tconfigure [] Configure unpacked packages\n" \ ++ "\tremove Remove package \n" \ ++ "\tflag ... Flag package(s) \n" \ ++ "\t =hold|noprune|user|ok|installed|unpacked (one per invocation) \n" \ ++ "\n" \ ++ "Informational Commands:\n" \ ++ "\tlist List available packages and descriptions\n" \ ++ "\tlist_installed List all and only the installed packages and description \n" \ ++ "\tfiles List all files belonging to \n" \ ++ "\tsearch Search for a package providing \n" \ ++ "\tinfo [pkg|regexp []] Display all/some info fields for or all\n" \ ++ "\tstatus [pkg|regexp []] Display all/some status fields for or all\n" \ ++ "\tdownload Download to current directory.\n" \ ++ "\tcompare_versions \n" \ ++ "\t compare versions using <= < > >= = << >>\n" \ ++ "\tprint_architecture prints the architecture.\n" \ ++ "\tprint_installation_architecture\n" \ ++ "\twhatdepends [-A] [pkgname|pat]+\n" \ ++ "\twhatdependsrec [-A] [pkgname|pat]+\n" \ ++ "\twhatprovides [-A] [pkgname|pat]+\n" \ ++ "\twhatconflicts [-A] [pkgname|pat]+\n" \ ++ "\twhatreplaces [-A] [pkgname|pat]+\n" \ ++ "\t prints the installation architecture.\n" \ ++ "\n" \ ++ "\nOptions:\n" \ ++ "\t-A Query all packages with whatdepends, whatprovides, whatreplaces, whatconflicts\n" \ ++ "\t-V Set verbosity level to . If no value is\n" \ ++ "\t--verbosity provided increase verbosity by one. Verbosity levels:\n" \ ++ "\t 0 errors only\n" \ ++ "\t 1 normal messages (default)\n" \ ++ "\t 2 informative messages\n" \ ++ "\t 3 debug output\n" \ ++ "\t-f Use as the ipkg configuration file\n" \ ++ "\t-conf Default configuration file location\n" \ ++ " is /etc/ipkg.conf\n" \ ++ "\t-d Use as the the root directory for\n" \ ++ "\t-dest package installation, removal, upgrading.\n" \ ++ " should be a defined dest name from\n" \ ++ " the configuration file, (but can also be a\n" \ ++ " directory name in a pinch).\n" \ ++ "\t-o Use as the root directory for\n" \ ++ "\t-offline offline installation of packages.\n" \ ++ "\t-verbose_wget more wget messages\n" \ ++ "\n" \ ++ "Force Options (use when ipkg is too smart for its own good):\n" \ ++ "\t-force-depends Make dependency checks warnings instead of errors\n" \ ++ "\t Install/remove package in spite of failed dependences\n" \ ++ "\t-force-defaults Use default options for questions asked by ipkg.\n" \ ++ " (no prompts). Note that this will not prevent\n" \ ++ " package installation scripts from prompting.\n" \ ++ "\t-force-reinstall Allow ipkg to reinstall a package.\n" \ ++ "\t-force-overwrite Allow ipkg to overwrite files from another package during an install.\n" \ ++ "\t-force-downgrade Allow ipkg to downgrade packages.\n" \ ++ "\t-force_space Install even if there does not seem to be enough space.\n" \ ++ "\t-noaction No action -- test only\n" \ ++ "\t-nodeps Do not follow dependences\n" \ ++ "\t-force-removal-of-dependent-packages\n" \ ++ "\t-recursive Allow ipkg to remove package and all that depend on it.\n" \ ++ "\t-test No action -- test only\n" \ ++ "\t-t Specify tmp-dir.\n" \ ++ "\t--tmp-dir Specify tmp-dir.\n" \ ++ "\n" \ ++ "\tregexp could be something like 'pkgname*' '*file*' or similar\n" \ ++ "\teg: ipkg info 'libstd*' or ipkg search '*libop*' or ipkg remove 'libncur*'\n" ++ + #define halt_trivial_usage \ + "[-d delay] [-n] [-f]" + #define halt_full_usage "\n\n" \ +diff -Nur busybox-1.12.1.orig/Makefile busybox-1.12.1/Makefile +--- busybox-1.12.1.orig/Makefile 2008-09-28 20:04:30.000000000 +0200 ++++ busybox-1.12.1/Makefile 2008-10-23 11:41:37.000000000 +0200 +@@ -444,6 +444,7 @@ + + libs-y := \ + archival/ \ ++ archival/libipkg/ \ + archival/libunarchive/ \ + console-tools/ \ + coreutils/ \ diff --git a/package/busybox/patches/002-find-empty.patch b/package/busybox/patches/002-find-empty.patch new file mode 100644 index 000000000..4e0cc67fa --- /dev/null +++ b/package/busybox/patches/002-find-empty.patch @@ -0,0 +1,105 @@ +diff -Nur busybox-1.12.3/findutils/Config.in busybox-1.12.3-find/findutils/Config.in +--- busybox-1.12.3/findutils/Config.in 2008-09-28 20:04:28.000000000 +0200 ++++ busybox-1.12.3-find/findutils/Config.in 2009-01-06 22:24:46.086215240 +0100 +@@ -81,6 +81,14 @@ + help + Support the 'find -inum' option for searching by inode number. + ++config FEATURE_FIND_EMPTY ++ bool "Enable -empty option matching empty files and directories" ++ default y ++ depends on FIND ++ help ++ Support the 'find -empty' option for searching empty files ++ and directories. ++ + config FEATURE_FIND_EXEC + bool "Enable -exec option allowing execution of commands" + default y +diff -Nur busybox-1.12.3/findutils/find.c busybox-1.12.3-find/findutils/find.c +--- busybox-1.12.3/findutils/find.c 2008-09-28 20:04:28.000000000 +0200 ++++ busybox-1.12.3-find/findutils/find.c 2009-01-06 23:33:53.201386585 +0100 +@@ -93,6 +93,7 @@ + USE_FEATURE_FIND_CONTEXT(ACTS(context, security_context_t context;)) + USE_FEATURE_FIND_PAREN( ACTS(paren, action ***subexpr;)) + USE_FEATURE_FIND_PRUNE( ACTS(prune)) ++USE_FEATURE_FIND_EMPTY( ACTS(empty)) + USE_FEATURE_FIND_DELETE( ACTS(delete)) + USE_FEATURE_FIND_EXEC( ACTS(exec, char **exec_argv; unsigned *subst_count; int exec_argc;)) + USE_FEATURE_FIND_GROUP( ACTS(group, gid_t gid;)) +@@ -318,6 +319,34 @@ + return exec_actions(ap->subexpr, fileName, statbuf); + } + #endif ++#if ENABLE_FEATURE_FIND_EMPTY ++ACTF(empty) ++{ ++ DIR *d; ++ struct dirent *dp; ++ bool empty = TRUE; ++ ++ if (S_ISDIR(statbuf->st_mode)) { ++ d = opendir(fileName); ++ if (d == NULL) ++ bb_simple_perror_msg(fileName); ++ for (dp = readdir(d); dp; dp = readdir(d)) { ++ if (dp->d_name[0] != '.' || ++ (dp->d_name[1] != '\0' && ++ (dp->d_name[1] != '.' || ++ dp->d_name[2] != '\0'))) { ++ empty = FALSE; ++ break; ++ } ++ } ++ closedir(d); ++ return(empty); ++ } else if (S_ISREG(statbuf->st_mode)) ++ return (statbuf->st_size == 0); ++ else ++ return FALSE; ++} ++#endif + #if ENABLE_FEATURE_FIND_SIZE + ACTF(size) + { +@@ -459,6 +488,7 @@ + USE_FEATURE_FIND_PRINT0( PARM_print0 ,) + USE_FEATURE_FIND_DEPTH( PARM_depth ,) + USE_FEATURE_FIND_PRUNE( PARM_prune ,) ++ USE_FEATURE_FIND_EMPTY( PARM_empty ,) + USE_FEATURE_FIND_DELETE( PARM_delete ,) + USE_FEATURE_FIND_EXEC( PARM_exec ,) + USE_FEATURE_FIND_PAREN( PARM_char_brace,) +@@ -492,6 +522,7 @@ + USE_FEATURE_FIND_PRINT0( "-print0\0" ) + USE_FEATURE_FIND_DEPTH( "-depth\0" ) + USE_FEATURE_FIND_PRUNE( "-prune\0" ) ++ USE_FEATURE_FIND_EMPTY( "-empty\0" ) + USE_FEATURE_FIND_DELETE( "-delete\0" ) + USE_FEATURE_FIND_EXEC( "-exec\0" ) + USE_FEATURE_FIND_PAREN( "(\0" ) +@@ -610,6 +641,12 @@ + (void) ALLOC_ACTION(prune); + } + #endif ++#if ENABLE_FEATURE_FIND_EMPTY ++ else if (parm == PARM_empty) { ++ USE_FEATURE_FIND_NOT( invert_flag = 0; ) ++ (void) ALLOC_ACTION(empty); ++ } ++#endif + #if ENABLE_FEATURE_FIND_DELETE + else if (parm == PARM_delete) { + need_print = 0; +diff -Nur busybox-1.12.3/include/usage.h busybox-1.12.3-find/include/usage.h +--- busybox-1.12.3/include/usage.h 2008-09-28 20:04:26.000000000 +0200 ++++ busybox-1.12.3-find/include/usage.h 2009-01-07 00:07:49.832669156 +0100 +@@ -1140,6 +1140,8 @@ + "\n -group NAME File belongs to group NAME (numeric group ID allowed)") \ + USE_FEATURE_FIND_DEPTH( \ + "\n -depth Process directory name after traversing it") \ ++ USE_FEATURE_FIND_EMPTY( \ ++ "\n -empty File or directory is empty") \ + USE_FEATURE_FIND_SIZE( \ + "\n -size N[bck] File size is N (c:bytes,k:kbytes,b:512 bytes(def.))." \ + "\n +/-N: file size is bigger/smaller than N") \ diff --git a/package/busybox/patches/patch-Makefile b/package/busybox/patches/patch-Makefile new file mode 100644 index 000000000..45b8f75a9 --- /dev/null +++ b/package/busybox/patches/patch-Makefile @@ -0,0 +1,12 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- busybox-1.13.4.orig/Makefile 2009-04-15 02:11:01.000000000 +0200 ++++ busybox-1.13.4/Makefile 2009-05-06 20:30:25.953125000 +0200 +@@ -277,7 +277,7 @@ HOSTCXXFLAGS := + # We need some generic definitions + include $(srctree)/scripts/Kbuild.include + +-HOSTCFLAGS += $(call hostcc-option,-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer,) ++HOSTCFLAGS += $(call hostcc-option,-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DHOSTCOMPILE=1,) + HOSTCXXFLAGS += -O2 + + # For maximum performance (+ possibly random breakage, uncomment diff --git a/package/busybox/patches/patch-Makefile_flags b/package/busybox/patches/patch-Makefile_flags new file mode 100644 index 000000000..72eb6b709 --- /dev/null +++ b/package/busybox/patches/patch-Makefile_flags @@ -0,0 +1,21 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- busybox-1.12.3.orig/Makefile.flags 2008-09-28 20:04:30.000000000 +0200 ++++ busybox-1.12.3/Makefile.flags 2008-12-25 20:27:43.092824157 +0100 +@@ -46,15 +46,12 @@ CFLAGS += $(call cc-option,-falign-funct + # be fixed.. + #CFLAGS += $(call cc-option,-Wconversion,) + +-ifneq ($(CONFIG_DEBUG),y) +-CFLAGS += $(call cc-option,-Os,) +-else ++ifeq ($(CONFIG_DEBUG),y) + CFLAGS += $(call cc-option,-g,) ++else + #CFLAGS += "-D_FORTIFY_SOURCE=2" + ifeq ($(CONFIG_DEBUG_PESSIMIZE),y) + CFLAGS += $(call cc-option,-O0,) +-else +-CFLAGS += $(call cc-option,-Os,) + endif + endif + diff --git a/package/busybox/patches/patch-include_libbb_h b/package/busybox/patches/patch-include_libbb_h new file mode 100644 index 000000000..37c500bdc --- /dev/null +++ b/package/busybox/patches/patch-include_libbb_h @@ -0,0 +1,80 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- busybox-1.13.4.orig/include/libbb.h 2009-04-15 02:09:42.000000000 +0200 ++++ busybox-1.13.4/include/libbb.h 2009-05-09 02:06:09.000000000 +0200 +@@ -44,6 +44,7 @@ + #define PATH_MAX 256 + #endif + ++#if !(defined __APPLE__ || defined __FreeBSD__) + #ifdef HAVE_MNTENT_H + #include + #endif +@@ -58,6 +59,7 @@ + #include + #include + #endif ++#endif + + #if ENABLE_LOCALE_SUPPORT + #include +@@ -71,9 +73,11 @@ + + #include + #include ++#ifndef HOSTCOMPILE + #if ENABLE_FEATURE_SHADOWPASSWDS + # include + #endif ++#endif + + /* Some libc's forget to declare these, do it ourself */ + +@@ -409,7 +413,9 @@ struct BUG_too_small { + char BUG_family_t_too_small[(0 + | AF_UNSPEC + | AF_INET ++#ifndef HOSTCOMPILE + | AF_INET6 ++#endif + | AF_UNIX + #ifdef AF_PACKET + | AF_PACKET +@@ -810,7 +816,9 @@ enum { + # define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags) + # define bb_daemonize(flags) bb_daemonize_or_rexec(flags, bogus) + #else ++#ifndef HOSTCOMPILE + void re_exec(char **argv) NORETURN FAST_FUNC; ++#endif + void forkexit_or_rexec(char **argv) FAST_FUNC; + extern bool re_execed; + int BUG_fork_is_unavailable_on_nommu(void) FAST_FUNC; +@@ -1003,10 +1011,12 @@ extern void run_applet_and_exit(const ch + extern void run_applet_no_and_exit(int a, char **argv) NORETURN FAST_FUNC; + #endif + ++#if !(defined __APPLE__ || defined __FreeBSD__) + #ifdef HAVE_MNTENT_H + extern int match_fstype(const struct mntent *mt, const char *fstypes) FAST_FUNC; + extern struct mntent *find_mount_point(const char *name, const char *table) FAST_FUNC; + #endif ++#endif + extern void erase_mtab(const char * name) FAST_FUNC; + extern unsigned int tty_baud_to_value(speed_t speed) FAST_FUNC; + extern speed_t tty_value_to_baud(unsigned int value) FAST_FUNC; +@@ -1084,6 +1094,7 @@ extern void bb_do_delay(int seconds) FAS + extern void change_identity(const struct passwd *pw) FAST_FUNC; + extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) NORETURN FAST_FUNC; + extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) FAST_FUNC; ++#if !(defined __APPLE__ || defined __FreeBSD__) + #if ENABLE_SELINUX + extern void renew_current_security_context(void) FAST_FUNC; + extern void set_current_security_context(security_context_t sid) FAST_FUNC; +@@ -1094,6 +1105,7 @@ extern void selinux_preserve_fcontext(in + #else + #define selinux_preserve_fcontext(fdesc) ((void)0) + #endif ++#endif + extern void selinux_or_die(void) FAST_FUNC; + extern int restricted_shell(const char *shell) FAST_FUNC; + diff --git a/package/busybox/patches/patch-include_platform_h b/package/busybox/patches/patch-include_platform_h new file mode 100644 index 000000000..b3c9ffd7f --- /dev/null +++ b/package/busybox/patches/patch-include_platform_h @@ -0,0 +1,30 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- busybox-1.13.4.orig/include/platform.h 2008-11-09 18:28:17.000000000 +0100 ++++ busybox-1.13.4/include/platform.h 2009-05-08 22:48:50.000000000 +0200 +@@ -116,7 +116,7 @@ + # include + # define __BIG_ENDIAN__ (BYTE_ORDER == BIG_ENDIAN) + # define __BYTE_ORDER BYTE_ORDER +-#elif !defined __APPLE__ ++#elif !(defined __APPLE__ || defined __FreeBSD__) + # include + # include + #endif +@@ -162,7 +162,7 @@ + + /* ---- Networking ------------------------------------------ */ + +-#ifndef __APPLE__ ++#if !(defined __APPLE__ || defined __FreeBSD__) + # include + # ifndef __socklen_t_defined + typedef int socklen_t; +@@ -210,7 +210,7 @@ __extension__ typedef unsigned long long + #define HAVE_FEATURES_H + #include + #define HAVE_STDINT_H +-#elif !defined __APPLE__ ++#elif !(defined __APPLE__ || defined __FreeBSD__) + /* Largest integral types. */ + #if __BIG_ENDIAN__ + typedef long intmax_t; diff --git a/package/busybox/patches/patch-networking_traceroute_c b/package/busybox/patches/patch-networking_traceroute_c new file mode 100644 index 000000000..081bf9232 --- /dev/null +++ b/package/busybox/patches/patch-networking_traceroute_c @@ -0,0 +1,12 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- busybox-1.13.4.orig/networking/traceroute.c 2008-11-09 18:27:59.000000000 +0100 ++++ busybox-1.13.4/networking/traceroute.c 2009-05-12 16:26:08.000000000 +0200 +@@ -273,7 +273,7 @@ typedef struct outdata { + unsigned char seq; /* sequence number of this packet */ + unsigned char ttl; /* ttl packet left with */ + // UNUSED. Retaining to have the same packet size. +- struct timeval tv_UNUSED PACKED; /* time packet left */ ++ struct timeval tv_UNUSED; /* time packet left */ + } outdata_t; + + struct IFADDRLIST { diff --git a/package/busybox/patches/patch-networking_udhcp_dhcpd_c b/package/busybox/patches/patch-networking_udhcp_dhcpd_c new file mode 100644 index 000000000..26b6590c3 --- /dev/null +++ b/package/busybox/patches/patch-networking_udhcp_dhcpd_c @@ -0,0 +1,11 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- busybox-1.13.4.orig/networking/udhcp/dhcpd.c 2008-11-09 18:27:58.000000000 +0100 ++++ busybox-1.13.4/networking/udhcp/dhcpd.c 2009-05-12 16:32:40.000000000 +0200 +@@ -196,7 +196,6 @@ int udhcpd_main(int argc UNUSED_PARAM, c + if (lease) { + if (server_id) { + /* SELECTING State */ +- DEBUG("server_id = %08x", ntohl(server_id_align)); + if (server_id_align == server_config.server && requested + && requested_align == lease->yiaddr + ) { diff --git a/package/busybox/patches/patch-runit_runit_lib_h b/package/busybox/patches/patch-runit_runit_lib_h new file mode 100644 index 000000000..da6327854 --- /dev/null +++ b/package/busybox/patches/patch-runit_runit_lib_h @@ -0,0 +1,16 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- busybox-1.13.4.orig/runit/runit_lib.h 2008-11-09 18:28:19.000000000 +0100 ++++ busybox-1.13.4/runit/runit_lib.h 2009-05-12 16:34:56.000000000 +0200 +@@ -88,9 +88,9 @@ extern unsigned pmatch(const char *, con + * runsv / supervise / sv stuff + */ + typedef struct svstatus_t { +- uint64_t time_be64 PACKED; +- uint32_t time_nsec_be32 PACKED; +- uint32_t pid_le32 PACKED; ++ uint64_t time_be64; ++ uint32_t time_nsec_be32; ++ uint32_t pid_le32; + uint8_t paused; + uint8_t want; + uint8_t got_term; diff --git a/package/busybox/patches/patch-util-linux_fdisk_osf_c b/package/busybox/patches/patch-util-linux_fdisk_osf_c new file mode 100644 index 000000000..75c8a858a --- /dev/null +++ b/package/busybox/patches/patch-util-linux_fdisk_osf_c @@ -0,0 +1,12 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- busybox-1.13.4.orig/util-linux/fdisk_osf.c 2008-11-09 18:28:22.000000000 +0100 ++++ busybox-1.13.4/util-linux/fdisk_osf.c 2009-05-12 16:39:12.000000000 +0200 +@@ -45,7 +45,7 @@ + + #if defined(i386) || defined(__sparc__) || defined(__arm__) \ + || defined(__m68k__) || defined(__mips__) || defined(__s390__) \ +- || defined(__sh__) || defined(__x86_64__) ++ || defined(__sh__) || defined(__x86_64__) || defined(__cris__) + #define BSD_LABELSECTOR 1 + #define BSD_LABELOFFSET 0 + #elif defined(__alpha__) || defined(__powerpc__) || defined(__ia64__) \ diff --git a/package/bwm/Config.in b/package/bwm/Config.in new file mode 100644 index 000000000..be25ed48a --- /dev/null +++ b/package/bwm/Config.in @@ -0,0 +1,8 @@ +config ADK_PACKAGE_BWM + prompt "bwm............................... A very tiny BandWidth Monitor" + tristate + default n + help + Continually displays data transfer rates (received, transmitted, and + total) for each interface, measured in KiB/sec. Works by sampling + values from /proc/net/dev and calculating deltas. diff --git a/package/bwm/Makefile b/package/bwm/Makefile new file mode 100644 index 000000000..9d5fa7df0 --- /dev/null +++ b/package/bwm/Makefile @@ -0,0 +1,27 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= bwm +PKG_VERSION:= 1.1.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 51021a036acb92d2bda0c0c0483f9552 +DISTFILES:= ${PKG_NAME}_${PKG_VERSION}.orig.tar.gz +MASTER_SITES:= http://ftp.debian.org/debian/pool/main/b/bwm/ +WRKDIST= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION}.orig + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,BWM,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +do-build: + ${TARGET_CC} ${TARGET_CFLAGS} ${WRKBUILD}/bwm.c -o ${WRKBUILD}/bwm + +do-install: + ${INSTALL_DIR} ${IDIR_BWM}/usr/bin + ${INSTALL_BIN} ${WRKBUILD}/bwm ${IDIR_BWM}/usr/bin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/bwm/ipkg/bwm.control b/package/bwm/ipkg/bwm.control new file mode 100644 index 000000000..4851a2deb --- /dev/null +++ b/package/bwm/ipkg/bwm.control @@ -0,0 +1,4 @@ +Package: bwm +Priority: optional +Section: net +Description: A very tiny bandwidth monitor diff --git a/package/cbtt/Config.in b/package/cbtt/Config.in new file mode 100644 index 000000000..25b51c6da --- /dev/null +++ b/package/cbtt/Config.in @@ -0,0 +1,18 @@ +config ADK_PACKAGE_CBTT + prompt "cbtt.............................. a C BitTorrent Tracker" + tristate + default n + select ADK_PACKAGE_ZLIB + depends on ADK_CXX + help + A C BitTorrent Tracker + +config ADK_PACKAGE_CBTT_MYSQL + prompt "cbtt-mysql........................ a C BitTorrent Tracker (mysql)" + tristate + default n + select ADK_PACKAGE_ZLIB + select ADK_PACKAGE_LIBMYSQLCLIENT + depends on ADK_CXX + help + A C BitTorrent Tracker diff --git a/package/cbtt/Makefile b/package/cbtt/Makefile new file mode 100644 index 000000000..a7119ff4b --- /dev/null +++ b/package/cbtt/Makefile @@ -0,0 +1,36 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= cbtt +PKG_VERSION:= 20060211 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 19abea2817c49ccc9438e9671c402984 +DISTFILES:= ${PKG_NAME}80-${PKG_VERSION}-src.tar.gz +MASTER_SITES:= ${MASTER_SITE_SOURCEFORGE:=bnbtusermods/} +WRKDIST= ${WRKDIR}/${PKG_NAME}80-${PKG_VERSION}-src + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,CBTT,cbtt,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,CBTT_MYSQL,cbtt-mysql,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +BUILD_STYLE= auto +TLDFLAGS+= -shared -L. -L${STAGING_DIR}/usr/lib/mysql \ + -lmysqlclient -lz -lpthread -lm -lgcc +ifeq ($(ADK_TARGET_LIB_UCLIBCXX),y) +TLDFLAGS+= -nodefaultlibs -lz -lpthread \ + -luClibc++ -lc -lm -lgcc +TCFLAGS+= -fno-builtin -nostdinc++ +endif + +do-install: + ${INSTALL_DIR} ${IDIR_CBTT}/usr/bin + ${INSTALL_BIN} ${WRKBUILD}/bnbt ${IDIR_CBTT}/usr/bin/ + ${INSTALL_DIR} ${IDIR_CBTT_MYSQL}/usr/bin + ${INSTALL_BIN} ${WRKBUILD}/bnbtmysql ${IDIR_CBTT_MYSQL}/usr/bin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/cbtt/ipkg/cbtt-mysql.control b/package/cbtt/ipkg/cbtt-mysql.control new file mode 100644 index 000000000..ef8b52a32 --- /dev/null +++ b/package/cbtt/ipkg/cbtt-mysql.control @@ -0,0 +1,5 @@ +Package: cbtt-mysql +Priority: optional +Section: net +Depends: zlib, libmysqlclient, uclibc++ +Description: Bittorrent tracker with mysql support diff --git a/package/cbtt/ipkg/cbtt.control b/package/cbtt/ipkg/cbtt.control new file mode 100644 index 000000000..bc8b844ad --- /dev/null +++ b/package/cbtt/ipkg/cbtt.control @@ -0,0 +1,5 @@ +Package: cbtt +Priority: optional +Section: net +Depends: zlib, uclibc++ +Description: Bittorrent tracker diff --git a/package/cbtt/patches/100-compile.patch b/package/cbtt/patches/100-compile.patch new file mode 100644 index 000000000..86fdb7ca2 --- /dev/null +++ b/package/cbtt/patches/100-compile.patch @@ -0,0 +1,57 @@ +diff -Nur cbtt80-20060211-src/Makefile cbtt80-20060211-src.patched/Makefile +--- cbtt80-20060211-src.orig/Makefile 2006-02-07 18:44:58.000000000 +0100 ++++ cbtt80-20060211-src/Makefile 2009-05-09 16:11:42.000000000 +0200 +@@ -1,10 +1,9 @@ +-SHELL = /bin/sh +-SYSTEM = $(shell uname) +-C++ = g++ ++SHELL ?= /bin/bash ++SYSTEM = Linux + DFLAGS = +-OFLAGS = -O2 -w ++#OFLAGS = -O2 -w + LFLAGS = -L. -lz +-CFLAGS = ++CFLAGS ?= + + ifeq ($(SYSTEM),Linux) + DFLAGS += -D__LINUX__ +@@ -30,6 +29,7 @@ CFLAGS = + endif + + CFLAGS += $(OFLAGS) $(DFLAGS) -I. ++LDFLAGS += $(LFLAGS) + + OBJS = atom.o base64.o bencode.o client.o config.o link.o md5.o server.o sha1.o sort.o tracker_admin.o tracker_comments.o tracker_file.o tracker_index.o tracker_info.o tracker_login.o tracker_signup.o tracker_stats.o tracker_torrent.o tracker_upload.o tracker_users.o util.o + OBJS_BNBT = bnbt.o tracker.o tracker_announce.o tracker_scrape.o +@@ -40,19 +40,19 @@ PROGS = ./bnbt ./bnbtmysql + all: $(OBJS) $(OBJS_BNBT) $(OBJS_BNBTMYSQL) $(PROGS) + + ./bnbt: $(OBJS) $(OBJS_BNBT) +- $(C++) -o ./bnbt $(OBJS) $(OBJS_BNBT) $(LFLAGS) ++ $(CXX) -o ./bnbt $(OBJS) $(OBJS_BNBT) $(LDFLAGS) + + ./bnbtmysql: $(OBJS) $(OBJS_BNBTMYSQL) +- $(C++) -o ./bnbtmysql $(OBJS) $(OBJS_BNBTMYSQL) $(LFLAGS) -L/usr/lib/mysql -lmysqlclient ++ $(CXX) -o ./bnbtmysql $(OBJS) $(OBJS_BNBTMYSQL) $(LDFLAGS) + + clean: + rm -f $(OBJS) $(OBJS_BNBT) $(OBJS_BNBTMYSQL) $(PROGS) + + %.o: %.cpp +- $(C++) -o $@ $(CFLAGS) -c $< ++ $(CXX) -o $@ $(CPPFLAGS) $(CFLAGS) -c $< + + %.mysql.o: %.cpp +- $(C++) -o $@ $(CFLAGS) -DBNBT_MYSQL -c $< ++ $(CXX) -o $@ $(CPPFLAGS) $(CFLAGS) -DBNBT_MYSQL -c $< + + ./bnbt: $(OBJS) $(OBJS_BNBT) + +@@ -91,4 +91,4 @@ bnbt.mysql.o: bnbt.h bnbt_mysql.h config + bnbt_mysql.mysql.o: bnbt.h bnbt_mysql.h util.h + tracker.mysql.o: bnbt.h bnbt_mysql.h atom.h bencode.h config.h md5.h server.h sort.h tracker.h util.h + tracker_announce.mysql.o: bnbt.h bnbt_mysql.h atom.h bencode.h link.h tracker.h util.h +-tracker_scrape.mysql.o: bnbt.h bnbt_mysql.h atom.h bencode.h tracker.h util.h +\ No newline at end of file ++tracker_scrape.mysql.o: bnbt.h bnbt_mysql.h atom.h bencode.h tracker.h util.h diff --git a/package/cbtt/patches/patch-bnbt_h b/package/cbtt/patches/patch-bnbt_h new file mode 100644 index 000000000..6169a027c --- /dev/null +++ b/package/cbtt/patches/patch-bnbt_h @@ -0,0 +1,11 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- cbtt80-20060211-src.orig/bnbt.h 2006-02-07 18:44:58.000000000 +0100 ++++ cbtt80-20060211-src/bnbt.h 2009-05-09 16:17:54.000000000 +0200 +@@ -5,6 +5,7 @@ + #ifndef BNBT_H + #define BNBT_H + ++#include + #include + #include + diff --git a/package/cfgfs/Config.in b/package/cfgfs/Config.in new file mode 100644 index 000000000..78051901b --- /dev/null +++ b/package/cfgfs/Config.in @@ -0,0 +1,10 @@ +config ADK_PACKAGE_CFGFS + prompt "cfgfs................................ compressed config filesystem" + tristate + select BUSYBOX_COMM + select BUSYBOX_MD5SUM + select BUSYBOX_FEATURE_SORT_BIG + depends on ADK_LINUX_X86_ALIX1C || ADK_LINUX_CRIS_FOXBOARD + default y + help + Adopted from FreeWRT fwcf diff --git a/package/cfgfs/Makefile b/package/cfgfs/Makefile new file mode 100644 index 000000000..4a521a1b4 --- /dev/null +++ b/package/cfgfs/Makefile @@ -0,0 +1,39 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= cfgfs +PKG_VERSION:= 1.0.6 +PKG_RELEASE:= 2 +WRKDIST= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION} +NO_DISTFILES:= 1 + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,CFGFS,cfgfs,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +BUILD_STYLE:= auto + +do-configure: + mkdir -p ${WRKBUILD} + ${CP} ./src/* ${WRKBUILD} + ${TARGET_CC} ${TCPPFLAGS} ${TCFLAGS} -o ${WRKBUILD}/mtd ${WRKBUILD}/mtd.c + +do-install: + ${INSTALL_DIR} ${IDIR_CFGFS}/sbin + ${INSTALL_BIN} ${WRKBUILD}/fwcf.sh ${IDIR_CFGFS}/sbin/cfgfs + ${INSTALL_BIN} ${WRKBUILD}/fwcf.helper.out ${IDIR_CFGFS}/sbin/cfgfs.helper +ifeq ($(ARCH),cris) + ${INSTALL_BIN} ${WRKBUILD}/mtd ${IDIR_CFGFS}/sbin/mtd + echo '#!/bin/sh' > ${IDIR_CFGFS}/sbin/cfgfs.write + echo 'mtd -F write - cfgfs' >> ${IDIR_CFGFS}/sbin/cfgfs.write +else + echo '#!/bin/sh' > ${IDIR_CFGFS}/sbin/cfgfs.write + echo 'cat > /dev/sda2' >> ${IDIR_CFGFS}/sbin/cfgfs.write +endif + chmod 755 ${IDIR_CFGFS}/sbin/cfgfs.write + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/cfgfs/ipkg/cfgfs.control b/package/cfgfs/ipkg/cfgfs.control new file mode 100644 index 000000000..8ae5a7917 --- /dev/null +++ b/package/cfgfs/ipkg/cfgfs.control @@ -0,0 +1,5 @@ +Package: cfgfs +Priority: optional +Section: base +Description: compressed config filesystem + diff --git a/package/cfgfs/src/BSDmakefile b/package/cfgfs/src/BSDmakefile new file mode 100644 index 000000000..4d3bf7a11 --- /dev/null +++ b/package/cfgfs/src/BSDmakefile @@ -0,0 +1,32 @@ +# $MirOS: contrib/hosted/fwcf/BSDmakefile,v 1.8 2007/03/13 18:14:30 tg Exp $ +#- +# This file is part of the FreeWRT project. FreeWRT is copyrighted +# material, please see the LICENCE file in the top-level directory +# or at http://www.freewrt.org/licence for details. + + SUBDIR+= lib + SUBDIR+= mkfwcf + SUBDIR+= unfwcf + SUBDIR+= tool + SUBDIR+= fwcf.helper + +test: _SUBDIRUSE + +.include +COPTS?= # for OpenBSD +.if !${COPTS:M-fhonour-copts} || !${CFLAGS:M-fhonour-copts} +CFLAGS+= ${COPTS} +.endif + +gmake: + -rm -rf gmake_test + mkdir -p gmake_test + cd gmake_test && lndir -e gmake_test ${.CURDIR} + cd gmake_test && CC=${CC:Q} CFLAGS=${CFLAGS:M*:Q} gmake + +clean_gmake: + -rm -rf gmake_test + +.include + +clean cleandir: clean_gmake diff --git a/package/cfgfs/src/LICENCE b/package/cfgfs/src/LICENCE new file mode 100644 index 000000000..af7542c91 --- /dev/null +++ b/package/cfgfs/src/LICENCE @@ -0,0 +1,35 @@ +FWCF is licenced material and developed for the FreeWRT Project by +the following authors and contributors: + +Copyright © 2006, 2007 + Thorsten Glaser (initial author) + +For more information on FreeWRT please visit http://freewrt.org/ + +Provided that these terms and disclaimer and all copyright notices +are retained or reproduced in an accompanying document, permission +is granted to deal in this work without restriction, including un- +limited rights to use, publicly perform, distribute, sell, modify, +merge, give away, or sublicence. + +This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to +the utmost extent permitted by applicable law, neither express nor +implied; without malicious intent or gross negligence. In no event +may a licensor, author or contributor be held liable for indirect, +direct, other damage, loss, or other issues arising in any way out +of dealing in the work, even if advised of the possibility of such +damage or existence of a defect, except proven that it results out +of said person's immediate fault when using the work as intended. + +The initial author would really appreciate users to credit his na- +me and that of the FreeWRT Project and/or add links to the CVS re- +pository of the original source in derived works. + +The FWCF specification is licenced under different terms. Also the +c_lzo1x plug-in is covered by the GNU General Public License, Ver- +sion 1 or higher. The files in the bundled/ subdirectory are not a +part of FWCF and covered by their own licenced. The version 1.0 of +FWCF bundles MiniLZO from lzo-2.02 under the GPL 2 or higher only. + +⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼ +$MirOS: contrib/hosted/fwcf/LICENCE,v 1.5 2007/03/13 18:31:07 tg Exp $ diff --git a/package/cfgfs/src/Makefile b/package/cfgfs/src/Makefile new file mode 100644 index 000000000..7ab068c69 --- /dev/null +++ b/package/cfgfs/src/Makefile @@ -0,0 +1,40 @@ +# $MirOS: contrib/hosted/fwcf/GNUmakefile,v 1.8 2007/03/09 23:09:34 tg Exp $ +#- +# This file is part of the FreeWRT project. FreeWRT is copyrighted +# material, please see the LICENCE file in the top-level directory +# or at http://www.freewrt.org/licence for details. + +SRCS+= tool.c +SRCS+= sys_linux.c +SRCS+= replace.c +SRCS+= compress.c +#SRCS+= fts_debg.c +SRCS+= cpr_get.c +SRCS+= cpr_list.c +SRCS+= cpr_lsth.c +SRCS+= ft_creat.c +SRCS+= ft_pack.c +SRCS+= ft_packm.c +SRCS+= fts_subs.c +SRCS+= header.c +SRCS+= minilzop.c +SRCS+= unwraps.c +SRCS+= wraps.c + +# the compressor +SRCS+= c_lzo1x1.c +CPPFLAGS+= -Ibundled + +OBJS= ${SRCS:.c=.o} + +# build for the target +CPPFLAGS+= -DSMALL -D__USE_GNU + +# missing in uClibc +SRCS+= fts.c +CPPFLAGS+= -I. + +all: fwcf.helper.out + +fwcf.helper.out: ${OBJS} + ${CC} -o $@ ${OBJS} ${LDFLAGS} diff --git a/package/cfgfs/src/Makefile.inc b/package/cfgfs/src/Makefile.inc new file mode 100644 index 000000000..82f7eb8f9 --- /dev/null +++ b/package/cfgfs/src/Makefile.inc @@ -0,0 +1,45 @@ +# $MirOS: contrib/hosted/fwcf/Makefile.inc,v 1.10 2007/05/08 21:52:53 tg Exp $ +#- +# This file is part of the FreeWRT project. FreeWRT is copyrighted +# material, please see the LICENCE file in the top-level directory +# or at http://www.freewrt.org/licence for details. + +__CRAZY= Yes +MKC_DEBG= cpp + +UNAME_S!= uname -s + +.ifndef LIB +. if exists(${.CURDIR}/../lib/${__objdir}) +DPADD+= ${.CURDIR}/../lib/${__objdir}/libfwcf.a +LDADD+= -L${.CURDIR}/../lib/${__objdir} -lfwcf +. else +DPADD+= ${.CURDIR}/../lib/libfwcf.a +LDADD+= -L${.CURDIR}/../lib -lfwcf +. endif +.endif + +CPPFLAGS+= -I${.CURDIR}/.. +.PATH: ${.CURDIR}/.. + +test: .NOTMAIN all + +COMPRESSORS+= c_null.c +COMPRESSORS+= c_zlib.c +CPPFLAGS+= -DZCONST=const + +COMPRESSORS+= c_lzo1x1.c +MKDEP+= -I${.CURDIR}/../bundled +CFLAGS_c_lzo1x1.o+= -I${.CURDIR}/../bundled -Wno-undef +_CFLADD+= c_lzo1x1.o + +.if make(test) +CFLAGS_sys_bsd.o+= -DRND_DISABLE +_CFLADD+= sys_bsd.o +.endif + +.if ${UNAME_S} == "OpenBSD" +. for _i in ${_CFLADD} +CFLAGS+= ${CFLAGS_${_i}} +. endfor +.endif diff --git a/package/cfgfs/src/adler.h b/package/cfgfs/src/adler.h new file mode 100644 index 000000000..a1608705f --- /dev/null +++ b/package/cfgfs/src/adler.h @@ -0,0 +1,60 @@ +/* $MirOS: contrib/hosted/fwcf/adler.h,v 1.10 2007/05/07 16:15:56 tg Exp $ */ + +/*- + * Copyright (c) 2006, 2007 + * Thorsten Glaser + * The adler32 algorithm is + * Copyright (C) 1995 Mark Adler + * + * Provided that these terms and disclaimer and all copyright notices + * are retained or reproduced in an accompanying document, permission + * is granted to deal in this work without restriction, including un- + * limited rights to use, publicly perform, distribute, sell, modify, + * merge, give away, or sublicence. + * + * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to + * the utmost extent permitted by applicable law, neither express nor + * implied; without malicious intent or gross negligence. In no event + * may a licensor, author or contributor be held liable for indirect, + * direct, other damage, loss, or other issues arising in any way out + * of dealing in the work, even if advised of the possibility of such + * damage or existence of a defect, except proven that it results out + * of said person's immediate fault when using the work as intended. + *- + * See also: + * contrib/hosted/fwcf/adler.h + * src/lib/libc/hash/adh32.c + * src/kern/z/adler32s.c + * src/kern/z/adler32_i386.S + */ + +#ifndef ADLER_H +#define ADLER_H "$MirOS: contrib/hosted/fwcf/adler.h,v 1.10 2007/05/07 16:15:56 tg Exp $" + +/* + * ADLER-32 implementation + */ + +#define ADLER_BASE 65521 /* largest prime smaller than 65536 */ +#define ADLER_NMAX 5552 /* largest n: 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ + +/* declare everything needed by the adler32 routine */ +#define ADLER_DECL unsigned s1 = 1, s2 = 0, n + +/* calculate the adler32 crc of the data pointed to + by the 'buffer' argument, size expected in 'len' + which is TRASHED; stores the result in s1 and s2 */ +#define ADLER_CALC(buffer) do { \ + const uint8_t *adler_buf = (const uint8_t *)(buffer); \ + while (len) { \ + len -= (n = MIN(len, ADLER_NMAX)); \ + while (n--) { \ + s1 += *adler_buf++; \ + s2 += s1; \ + } \ + s1 %= ADLER_BASE; \ + s2 %= ADLER_BASE; \ + } \ + } while (0) + +#endif diff --git a/package/cfgfs/src/bundled/README.LZO b/package/cfgfs/src/bundled/README.LZO new file mode 100644 index 000000000..2601baed0 --- /dev/null +++ b/package/cfgfs/src/bundled/README.LZO @@ -0,0 +1,123 @@ + + ============================================================================ + miniLZO -- mini subset of the LZO real-time data compression library + ============================================================================ + + Author : Markus Franz Xaver Johannes Oberhumer + + http://www.oberhumer.com/opensource/lzo/ + Version : 2.02 + Date : 17 Oct 2005 + + I've created miniLZO for projects where it is inconvenient to + include (or require) the full LZO source code just because you + want to add a little bit of data compression to your application. + + miniLZO implements the LZO1X-1 compressor and both the standard and + safe LZO1X decompressor. Apart from fast compression it also useful + for situations where you want to use pre-compressed data files (which + must have been compressed with LZO1X-999). + + miniLZO consists of one C source file and three header files: + minilzo.c + minilzo.h, lzoconf.h, lzodefs.h + + To use miniLZO just copy these files into your source directory, add + minilzo.c to your Makefile and #include minilzo.h from your program. + Note: you also must distribute this file (`README.LZO') with your project. + + minilzo.o compiles to about 6 kB (using gcc or Visual C on a i386), and + the sources are about 30 kB when packed with zip - so there's no more + excuse that your application doesn't support data compression :-) + + For more information, documentation, example programs and other support + files (like Makefiles and build scripts) please download the full LZO + package from + http://www.oberhumer.com/opensource/lzo/ + + Have fun, + Markus + + + P.S. minilzo.c is generated automatically from the LZO sources and + therefore functionality is completely identical + + + Appendix A: building miniLZO + ---------------------------- + miniLZO is written such a way that it should compile and run + out-of-the-box on most machines. + + If you are running on a very unusual architecture and lzo_init() fails then + you should first recompile with `-DLZO_DEBUG' to see what causes the failure. + The most probable case is something like `sizeof(char *) != sizeof(long)'. + After identifying the problem you can compile by adding some defines + like `-DSIZEOF_CHAR_P=8' to your Makefile. + + The best solution is (of course) using Autoconf - if your project uses + Autoconf anyway just add `-DMINILZO_HAVE_CONFIG_H' to your compiler + flags when compiling minilzo.c. See the LZO distribution for an example + how to set up configure.in. + + + Appendix B: list of public functions available in miniLZO + --------------------------------------------------------- + Library initialization + lzo_init() + + Compression + lzo1x_1_compress() + + Decompression + lzo1x_decompress() + lzo1x_decompress_safe() + + Checksum functions + lzo_adler32() + + Version functions + lzo_version() + lzo_version_string() + lzo_version_date() + + Portable (but slow) string functions + lzo_memcmp() + lzo_memcpy() + lzo_memmove() + lzo_memset() + + + Appendix C: suggested macros for `configure.in' when using Autoconf + ------------------------------------------------------------------- + Checks for typedefs and structures + AC_CHECK_TYPE(ptrdiff_t,long) + AC_TYPE_SIZE_T + AC_CHECK_SIZEOF(short) + AC_CHECK_SIZEOF(int) + AC_CHECK_SIZEOF(long) + AC_CHECK_SIZEOF(long long) + AC_CHECK_SIZEOF(__int64) + AC_CHECK_SIZEOF(void *) + AC_CHECK_SIZEOF(size_t) + AC_CHECK_SIZEOF(ptrdiff_t) + + Checks for compiler characteristics + AC_C_CONST + + Checks for library functions + AC_CHECK_FUNCS(memcmp memcpy memmove memset) + + + Appendix D: Copyright + --------------------- + LZO and miniLZO are Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, + 2003, 2004, 2005 Markus Franz Xaver Johannes Oberhumer + + LZO and miniLZO are distributed under the terms of the GNU General + Public License (GPL). See the file COPYING. + + Special licenses for commercial and other applications which + are not willing to accept the GNU General Public License + are available by contacting the author. + + diff --git a/package/cfgfs/src/bundled/lzoconf.h b/package/cfgfs/src/bundled/lzoconf.h new file mode 100644 index 000000000..7a745ad51 --- /dev/null +++ b/package/cfgfs/src/bundled/lzoconf.h @@ -0,0 +1,413 @@ +/* lzoconf.h -- configuration for the LZO real-time data compression library + + This file is part of the LZO real-time data compression library. + + Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + All Rights Reserved. + + The LZO library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License, + version 2, as published by the Free Software Foundation. + + The LZO library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the LZO library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Markus F.X.J. Oberhumer + + http://www.oberhumer.com/opensource/lzo/ + */ + + +#ifndef __LZOCONF_H_INCLUDED +#define __LZOCONF_H_INCLUDED + +#define LZO_VERSION 0x2020 +#define LZO_VERSION_STRING "2.02" +#define LZO_VERSION_DATE "Oct 17 2005" + +/* internal Autoconf configuration file - only used when building LZO */ +#if defined(LZO_HAVE_CONFIG_H) +# include +#endif +#include +#include + + +/*********************************************************************** +// LZO requires a conforming +************************************************************************/ + +#if !defined(CHAR_BIT) || (CHAR_BIT != 8) +# error "invalid CHAR_BIT" +#endif +#if !defined(UCHAR_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX) +# error "check your compiler installation" +#endif +#if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1) +# error "your limits.h macros are broken" +#endif + +/* get OS and architecture defines */ +#ifndef __LZODEFS_H_INCLUDED +#include "lzodefs.h" +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +/*********************************************************************** +// some core defines +************************************************************************/ + +#if !defined(LZO_UINT32_C) +# if (UINT_MAX < LZO_0xffffffffL) +# define LZO_UINT32_C(c) c ## UL +# else +# define LZO_UINT32_C(c) ((c) + 0U) +# endif +#endif + +/* memory checkers */ +#if !defined(__LZO_CHECKER) +# if defined(__BOUNDS_CHECKING_ON) +# define __LZO_CHECKER 1 +# elif defined(__CHECKER__) +# define __LZO_CHECKER 1 +# elif defined(__INSURE__) +# define __LZO_CHECKER 1 +# elif defined(__PURIFY__) +# define __LZO_CHECKER 1 +# endif +#endif + + +/*********************************************************************** +// integral and pointer types +************************************************************************/ + +/* lzo_uint should match size_t */ +#if !defined(LZO_UINT_MAX) +# if defined(LZO_ABI_LLP64) /* WIN64 */ +# if defined(LZO_OS_WIN64) + typedef unsigned __int64 lzo_uint; + typedef __int64 lzo_int; +# else + typedef unsigned long long lzo_uint; + typedef long long lzo_int; +# endif +# define LZO_UINT_MAX 0xffffffffffffffffull +# define LZO_INT_MAX 9223372036854775807LL +# define LZO_INT_MIN (-1LL - LZO_INT_MAX) +# elif defined(LZO_ABI_IP32L64) /* MIPS R5900 */ + typedef unsigned int lzo_uint; + typedef int lzo_int; +# define LZO_UINT_MAX UINT_MAX +# define LZO_INT_MAX INT_MAX +# define LZO_INT_MIN INT_MIN +# elif (ULONG_MAX >= LZO_0xffffffffL) + typedef unsigned long lzo_uint; + typedef long lzo_int; +# define LZO_UINT_MAX ULONG_MAX +# define LZO_INT_MAX LONG_MAX +# define LZO_INT_MIN LONG_MIN +# else +# error "lzo_uint" +# endif +#endif + +/* Integral types with 32 bits or more. */ +#if !defined(LZO_UINT32_MAX) +# if (UINT_MAX >= LZO_0xffffffffL) + typedef unsigned int lzo_uint32; + typedef int lzo_int32; +# define LZO_UINT32_MAX UINT_MAX +# define LZO_INT32_MAX INT_MAX +# define LZO_INT32_MIN INT_MIN +# elif (ULONG_MAX >= LZO_0xffffffffL) + typedef unsigned long lzo_uint32; + typedef long lzo_int32; +# define LZO_UINT32_MAX ULONG_MAX +# define LZO_INT32_MAX LONG_MAX +# define LZO_INT32_MIN LONG_MIN +# else +# error "lzo_uint32" +# endif +#endif + +/* The larger type of lzo_uint and lzo_uint32. */ +#if (LZO_UINT_MAX >= LZO_UINT32_MAX) +# define lzo_xint lzo_uint +#else +# define lzo_xint lzo_uint32 +#endif + +/* Memory model that allows to access memory at offsets of lzo_uint. */ +#if !defined(__LZO_MMODEL) +# if (LZO_UINT_MAX <= UINT_MAX) +# define __LZO_MMODEL +# elif defined(LZO_HAVE_MM_HUGE_PTR) +# define __LZO_MMODEL_HUGE 1 +# define __LZO_MMODEL __huge +# else +# define __LZO_MMODEL +# endif +#endif + +/* no typedef here because of const-pointer issues */ +#define lzo_bytep unsigned char __LZO_MMODEL * +#define lzo_charp char __LZO_MMODEL * +#define lzo_voidp void __LZO_MMODEL * +#define lzo_shortp short __LZO_MMODEL * +#define lzo_ushortp unsigned short __LZO_MMODEL * +#define lzo_uint32p lzo_uint32 __LZO_MMODEL * +#define lzo_int32p lzo_int32 __LZO_MMODEL * +#define lzo_uintp lzo_uint __LZO_MMODEL * +#define lzo_intp lzo_int __LZO_MMODEL * +#define lzo_xintp lzo_xint __LZO_MMODEL * +#define lzo_voidpp lzo_voidp __LZO_MMODEL * +#define lzo_bytepp lzo_bytep __LZO_MMODEL * +/* deprecated - use `lzo_bytep' instead of `lzo_byte *' */ +#define lzo_byte unsigned char __LZO_MMODEL + +typedef int lzo_bool; + + +/*********************************************************************** +// function types +************************************************************************/ + +/* name mangling */ +#if !defined(__LZO_EXTERN_C) +# ifdef __cplusplus +# define __LZO_EXTERN_C extern "C" +# else +# define __LZO_EXTERN_C extern +# endif +#endif + +/* calling convention */ +#if !defined(__LZO_CDECL) +# define __LZO_CDECL __lzo_cdecl +#endif + +/* DLL export information */ +#if !defined(__LZO_EXPORT1) +# define __LZO_EXPORT1 +#endif +#if !defined(__LZO_EXPORT2) +# define __LZO_EXPORT2 +#endif + +/* __cdecl calling convention for public C and assembly functions */ +#if !defined(LZO_PUBLIC) +# define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL +#endif +#if !defined(LZO_EXTERN) +# define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype) +#endif +#if !defined(LZO_PRIVATE) +# define LZO_PRIVATE(_rettype) static _rettype __LZO_CDECL +#endif + +/* function types */ +typedef int +(__LZO_CDECL *lzo_compress_t) ( const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem ); + +typedef int +(__LZO_CDECL *lzo_decompress_t) ( const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem ); + +typedef int +(__LZO_CDECL *lzo_optimize_t) ( lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem ); + +typedef int +(__LZO_CDECL *lzo_compress_dict_t)(const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem, + const lzo_bytep dict, lzo_uint dict_len ); + +typedef int +(__LZO_CDECL *lzo_decompress_dict_t)(const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem, + const lzo_bytep dict, lzo_uint dict_len ); + + +/* Callback interface. Currently only the progress indicator ("nprogress") + * is used, but this may change in a future release. */ + +struct lzo_callback_t; +typedef struct lzo_callback_t lzo_callback_t; +#define lzo_callback_p lzo_callback_t __LZO_MMODEL * + +/* malloc & free function types */ +typedef lzo_voidp (__LZO_CDECL *lzo_alloc_func_t) + (lzo_callback_p self, lzo_uint items, lzo_uint size); +typedef void (__LZO_CDECL *lzo_free_func_t) + (lzo_callback_p self, lzo_voidp ptr); + +/* a progress indicator callback function */ +typedef void (__LZO_CDECL *lzo_progress_func_t) + (lzo_callback_p, lzo_uint, lzo_uint, int); + +struct lzo_callback_t +{ + /* custom allocators (set to 0 to disable) */ + lzo_alloc_func_t nalloc; /* [not used right now] */ + lzo_free_func_t nfree; /* [not used right now] */ + + /* a progress indicator callback function (set to 0 to disable) */ + lzo_progress_func_t nprogress; + + /* NOTE: the first parameter "self" of the nalloc/nfree/nprogress + * callbacks points back to this struct, so you are free to store + * some extra info in the following variables. */ + lzo_voidp user1; + lzo_xint user2; + lzo_xint user3; +}; + + +/*********************************************************************** +// error codes and prototypes +************************************************************************/ + +/* Error codes for the compression/decompression functions. Negative + * values are errors, positive values will be used for special but + * normal events. + */ +#define LZO_E_OK 0 +#define LZO_E_ERROR (-1) +#define LZO_E_OUT_OF_MEMORY (-2) /* [not used right now] */ +#define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */ +#define LZO_E_INPUT_OVERRUN (-4) +#define LZO_E_OUTPUT_OVERRUN (-5) +#define LZO_E_LOOKBEHIND_OVERRUN (-6) +#define LZO_E_EOF_NOT_FOUND (-7) +#define LZO_E_INPUT_NOT_CONSUMED (-8) +#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */ + + +#ifndef lzo_sizeof_dict_t +# define lzo_sizeof_dict_t ((unsigned)sizeof(lzo_bytep)) +#endif + +/* lzo_init() should be the first function you call. + * Check the return code ! + * + * lzo_init() is a macro to allow checking that the library and the + * compiler's view of various types are consistent. + */ +#define lzo_init() __lzo_init_v2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\ + (int)sizeof(long),(int)sizeof(lzo_uint32),(int)sizeof(lzo_uint),\ + (int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\ + (int)sizeof(lzo_callback_t)) +LZO_EXTERN(int) __lzo_init_v2(unsigned,int,int,int,int,int,int,int,int,int); + +/* version functions (useful for shared libraries) */ +LZO_EXTERN(unsigned) lzo_version(void); +LZO_EXTERN(const char *) lzo_version_string(void); +LZO_EXTERN(const char *) lzo_version_date(void); +LZO_EXTERN(const lzo_charp) _lzo_version_string(void); +LZO_EXTERN(const lzo_charp) _lzo_version_date(void); + +/* string functions */ +LZO_EXTERN(int) +lzo_memcmp(const lzo_voidp _s1, const lzo_voidp _s2, lzo_uint _len); +LZO_EXTERN(lzo_voidp) +lzo_memcpy(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len); +LZO_EXTERN(lzo_voidp) +lzo_memmove(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len); +LZO_EXTERN(lzo_voidp) +lzo_memset(lzo_voidp _s, int _c, lzo_uint _len); + +/* checksum functions */ +LZO_EXTERN(lzo_uint32) +lzo_adler32(lzo_uint32 _adler, const lzo_bytep _buf, lzo_uint _len); +LZO_EXTERN(lzo_uint32) +lzo_crc32(lzo_uint32 _c, const lzo_bytep _buf, lzo_uint _len); +LZO_EXTERN(const lzo_uint32p) +lzo_get_crc32_table(void); + +/* misc. */ +LZO_EXTERN(int) _lzo_config_check(void); +typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u; +typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u; +typedef union { void *vp; lzo_bytep bp; lzo_uint32 u32; long l; } lzo_align_t; + +/* align a char pointer on a boundary that is a multiple of `size' */ +LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size); +#define LZO_PTR_ALIGN_UP(_ptr,_size) \ + ((_ptr) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(_ptr),(lzo_uint)(_size))) + + +/*********************************************************************** +// deprecated macros - only for backward compatibility with LZO v1.xx +************************************************************************/ + +#if defined(LZO_CFG_COMPAT) + +#define __LZOCONF_H 1 + +#if defined(LZO_ARCH_I086) +# define __LZO_i386 1 +#elif defined(LZO_ARCH_I386) +# define __LZO_i386 1 +#endif + +#if defined(LZO_OS_DOS16) +# define __LZO_DOS 1 +# define __LZO_DOS16 1 +#elif defined(LZO_OS_DOS32) +# define __LZO_DOS 1 +#elif defined(LZO_OS_WIN16) +# define __LZO_WIN 1 +# define __LZO_WIN16 1 +#elif defined(LZO_OS_WIN32) +# define __LZO_WIN 1 +#endif + +#define __LZO_CMODEL +#define __LZO_DMODEL +#define __LZO_ENTRY __LZO_CDECL +#define LZO_EXTERN_CDECL LZO_EXTERN +#define LZO_ALIGN LZO_PTR_ALIGN_UP + +#define lzo_compress_asm_t lzo_compress_t +#define lzo_decompress_asm_t lzo_decompress_t + +#endif /* LZO_CFG_COMPAT */ + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* already included */ + + +/* vim:set ts=4 et: */ diff --git a/package/cfgfs/src/bundled/lzodefs.h b/package/cfgfs/src/bundled/lzodefs.h new file mode 100644 index 000000000..59d18a751 --- /dev/null +++ b/package/cfgfs/src/bundled/lzodefs.h @@ -0,0 +1,1545 @@ +/* lzodefs.h -- architecture, OS and compiler specific defines + + This file is part of the LZO real-time data compression library. + + Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + All Rights Reserved. + + The LZO library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License, + version 2, as published by the Free Software Foundation. + + The LZO library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the LZO library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Markus F.X.J. Oberhumer + + http://www.oberhumer.com/opensource/lzo/ + */ + + +#ifndef __LZODEFS_H_INCLUDED +#define __LZODEFS_H_INCLUDED 1 + +#if defined(__CYGWIN32__) && !defined(__CYGWIN__) +# define __CYGWIN__ __CYGWIN32__ +#endif +#if defined(__IBMCPP__) && !defined(__IBMC__) +# define __IBMC__ __IBMCPP__ +#endif +#if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER) +# define __INTEL_COMPILER __ICL +#endif +#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) +# define _ALL_SOURCE 1 +#endif +#if defined(__mips__) && defined(__R5900__) +# if !defined(__LONG_MAX__) +# define __LONG_MAX__ 9223372036854775807L +# endif +#endif +#if defined(__INTEL_COMPILER) && defined(__linux__) +# pragma warning(disable: 193) +#endif +#if defined(__KEIL__) && defined(__C166__) +# pragma warning disable = 322 +#elif 0 && defined(__C251__) +# pragma warning disable = 322 +#endif +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) +# if (_MSC_VER >= 1300) +# pragma warning(disable: 4668) +# endif +#endif +#if 0 && defined(__WATCOMC__) +# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) +# pragma warning 203 9 +# endif +#endif +#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) +# pragma option -h +#endif +#if 0 +#define LZO_0xffffL 0xfffful +#define LZO_0xffffffffL 0xfffffffful +#else +#define LZO_0xffffL 65535ul +#define LZO_0xffffffffL 4294967295ul +#endif +#if (LZO_0xffffL == LZO_0xffffffffL) +# error "your preprocessor is broken 1" +#endif +#if (16ul * 16384ul != 262144ul) +# error "your preprocessor is broken 2" +#endif +#if 0 +#if (32767 >= 4294967295ul) +# error "your preprocessor is broken 3" +#endif +#if (65535u >= 4294967295ul) +# error "your preprocessor is broken 4" +#endif +#endif +#if (UINT_MAX == LZO_0xffffL) +#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) +# if !defined(MSDOS) +# define MSDOS 1 +# endif +# if !defined(_MSDOS) +# define _MSDOS 1 +# endif +#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) +# if (__VERSION == 520) && (MB_LEN_MAX == 1) +# if !defined(__AZTEC_C__) +# define __AZTEC_C__ __VERSION +# endif +# if !defined(__DOS__) +# define __DOS__ 1 +# endif +# endif +#endif +#endif +#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL) +# define ptrdiff_t long +# define _PTRDIFF_T_DEFINED +#endif +#if (UINT_MAX == LZO_0xffffL) +# undef __LZO_RENAME_A +# undef __LZO_RENAME_B +# if defined(__AZTEC_C__) && defined(__DOS__) +# define __LZO_RENAME_A 1 +# elif defined(_MSC_VER) && defined(MSDOS) +# if (_MSC_VER < 600) +# define __LZO_RENAME_A 1 +# elif (_MSC_VER < 700) +# define __LZO_RENAME_B 1 +# endif +# elif defined(__TSC__) && defined(__OS2__) +# define __LZO_RENAME_A 1 +# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) +# define __LZO_RENAME_A 1 +# elif defined(__PACIFIC__) && defined(DOS) +# if !defined(__far) +# define __far far +# endif +# if !defined(__near) +# define __near near +# endif +# endif +# if defined(__LZO_RENAME_A) +# if !defined(__cdecl) +# define __cdecl cdecl +# endif +# if !defined(__far) +# define __far far +# endif +# if !defined(__huge) +# define __huge huge +# endif +# if !defined(__near) +# define __near near +# endif +# if !defined(__pascal) +# define __pascal pascal +# endif +# if !defined(__huge) +# define __huge huge +# endif +# elif defined(__LZO_RENAME_B) +# if !defined(__cdecl) +# define __cdecl _cdecl +# endif +# if !defined(__far) +# define __far _far +# endif +# if !defined(__huge) +# define __huge _huge +# endif +# if !defined(__near) +# define __near _near +# endif +# if !defined(__pascal) +# define __pascal _pascal +# endif +# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +# if !defined(__cdecl) +# define __cdecl cdecl +# endif +# if !defined(__pascal) +# define __pascal pascal +# endif +# endif +# undef __LZO_RENAME_A +# undef __LZO_RENAME_B +#endif +#if (UINT_MAX == LZO_0xffffL) +#if defined(__AZTEC_C__) && defined(__DOS__) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +#elif defined(_MSC_VER) && defined(MSDOS) +# if (_MSC_VER < 600) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +# endif +# if (_MSC_VER < 700) +# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +# define LZO_BROKEN_SIZEOF 1 +# endif +#elif defined(__PACIFIC__) && defined(DOS) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +#elif defined(__TURBOC__) && defined(__MSDOS__) +# if (__TURBOC__ < 0x0150) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +# endif +# if (__TURBOC__ < 0x0200) +# define LZO_BROKEN_SIZEOF 1 +# endif +# if (__TURBOC__ < 0x0400) && defined(__cplusplus) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# endif +#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# define LZO_BROKEN_SIZEOF 1 +#endif +#endif +#if defined(__WATCOMC__) && (__WATCOMC__ < 900) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +#endif +#define LZO_CPP_STRINGIZE(x) #x +#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) +#define LZO_CPP_CONCAT2(a,b) a ## b +#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c +#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d +#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e +#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) +#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) +#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) +#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) +#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o)) +#if 1 && defined(__cplusplus) +# if !defined(__STDC_CONSTANT_MACROS) +# define __STDC_CONSTANT_MACROS 1 +# endif +# if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +# endif +#endif +#if defined(__cplusplus) +# define LZO_EXTERN_C extern "C" +#else +# define LZO_EXTERN_C extern +#endif +#if !defined(__LZO_OS_OVERRIDE) +#if defined(LZO_OS_FREESTANDING) +# define LZO_INFO_OS "freestanding" +#elif defined(LZO_OS_EMBEDDED) +# define LZO_INFO_OS "embedded" +#elif defined(__CYGWIN__) && defined(__GNUC__) +# define LZO_OS_CYGWIN 1 +# define LZO_INFO_OS "cygwin" +#elif defined(__EMX__) && defined(__GNUC__) +# define LZO_OS_EMX 1 +# define LZO_INFO_OS "emx" +#elif defined(__BEOS__) +# define LZO_OS_BEOS 1 +# define LZO_INFO_OS "beos" +#elif defined(__Lynx__) +# define LZO_OS_LYNXOS 1 +# define LZO_INFO_OS "lynxos" +#elif defined(__OS400__) +# define LZO_OS_OS400 1 +# define LZO_INFO_OS "os400" +#elif defined(__QNX__) +# define LZO_OS_QNX 1 +# define LZO_INFO_OS "qnx" +#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +#elif defined(__BORLANDC__) && defined(__DPMI16__) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +#elif defined(__ZTC__) && defined(DOS386) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +#elif defined(__OS2__) || defined(__OS2V2__) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_OS216 1 +# define LZO_INFO_OS "os216" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_OS2 1 +# define LZO_INFO_OS "os2" +# else +# error "check your limits.h header" +# endif +#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) +# define LZO_OS_WIN64 1 +# define LZO_INFO_OS "win64" +#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +#elif defined(__MWERKS__) && defined(__INTEL__) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_WIN16 1 +# define LZO_INFO_OS "win16" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +# else +# error "check your limits.h header" +# endif +#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +# else +# error "check your limits.h header" +# endif +#elif defined(__WATCOMC__) +# if defined(__NT__) && (UINT_MAX == LZO_0xffffL) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +# elif defined(__NT__) && (__WATCOMC__ < 1100) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +# else +# error "please specify a target using the -bt compiler option" +# endif +#elif defined(__palmos__) +# define LZO_OS_PALMOS 1 +# define LZO_INFO_OS "palmos" +#elif defined(__TOS__) || defined(__atarist__) +# define LZO_OS_TOS 1 +# define LZO_INFO_OS "tos" +#elif defined(macintosh) && !defined(__ppc__) +# define LZO_OS_MACCLASSIC 1 +# define LZO_INFO_OS "macclassic" +#elif defined(__VMS) +# define LZO_OS_VMS 1 +# define LZO_INFO_OS "vms" +#elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +# define LZO_OS_CONSOLE 1 +# define LZO_OS_CONSOLE_PS2 1 +# define LZO_INFO_OS "console" +# define LZO_INFO_OS_CONSOLE "ps2" +#elif (defined(__mips__) && defined(__psp__)) +# define LZO_OS_CONSOLE 1 +# define LZO_OS_CONSOLE_PSP 1 +# define LZO_INFO_OS "console" +# define LZO_INFO_OS_CONSOLE "psp" +#else +# define LZO_OS_POSIX 1 +# define LZO_INFO_OS "posix" +#endif +#if (LZO_OS_POSIX) +# if defined(_AIX) || defined(__AIX__) || defined(__aix__) +# define LZO_OS_POSIX_AIX 1 +# define LZO_INFO_OS_POSIX "aix" +# elif defined(__FreeBSD__) +# define LZO_OS_POSIX_FREEBSD 1 +# define LZO_INFO_OS_POSIX "freebsd" +# elif defined(__hpux__) || defined(__hpux) +# define LZO_OS_POSIX_HPUX 1 +# define LZO_INFO_OS_POSIX "hpux" +# elif defined(__INTERIX) +# define LZO_OS_POSIX_INTERIX 1 +# define LZO_INFO_OS_POSIX "interix" +# elif defined(__IRIX__) || defined(__irix__) +# define LZO_OS_POSIX_IRIX 1 +# define LZO_INFO_OS_POSIX "irix" +# elif defined(__linux__) || defined(__linux) +# define LZO_OS_POSIX_LINUX 1 +# define LZO_INFO_OS_POSIX "linux" +# elif defined(__APPLE__) || defined(__MACOS__) +# define LZO_OS_POSIX_MACOSX 1 +# define LZO_INFO_OS_POSIX "macosx" +# elif defined(__NetBSD__) +# define LZO_OS_POSIX_NETBSD 1 +# define LZO_INFO_OS_POSIX "netbsd" +# elif defined(__OpenBSD__) +# define LZO_OS_POSIX_OPENBSD 1 +# define LZO_INFO_OS_POSIX "openbsd" +# elif defined(__osf__) +# define LZO_OS_POSIX_OSF 1 +# define LZO_INFO_OS_POSIX "osf" +# elif defined(__solaris__) || defined(__sun) +# if defined(__SVR4) || defined(__svr4__) +# define LZO_OS_POSIX_SOLARIS 1 +# define LZO_INFO_OS_POSIX "solaris" +# else +# define LZO_OS_POSIX_SUNOS 1 +# define LZO_INFO_OS_POSIX "sunos" +# endif +# elif defined(__ultrix__) || defined(__ultrix) +# define LZO_OS_POSIX_ULTRIX 1 +# define LZO_INFO_OS_POSIX "ultrix" +# else +# define LZO_OS_POSIX_UNKNOWN 1 +# define LZO_INFO_OS_POSIX "unknown" +# endif +#endif +#endif +#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +# if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (UINT_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) +# define LZO_CC_CILLY 1 +# define LZO_INFO_CC "Cilly" +# if defined(__CILLY__) +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__CILLY__) +# else +# define LZO_INFO_CCVER "unknown" +# endif +#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) +# define LZO_CC_SDCC 1 +# define LZO_INFO_CC "sdcc" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(SDCC) +#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) +# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__) +# define LZO_INFO_CC "Pathscale C" +# define LZO_INFO_CCVER __PATHSCALE__ +#elif defined(__INTEL_COMPILER) +# define LZO_CC_INTELC 1 +# define LZO_INFO_CC "Intel C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__INTEL_COMPILER) +#elif defined(__POCC__) && defined(_WIN32) +# define LZO_CC_PELLESC 1 +# define LZO_INFO_CC "Pelles C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__POCC__) +#elif defined(__llvm__) && defined(__GNUC__) && defined(__VERSION__) +# define LZO_CC_LLVM 1 +# define LZO_INFO_CC "llvm-gcc" +# define LZO_INFO_CCVER __VERSION__ +#elif defined(__GNUC__) && defined(__VERSION__) +# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) +# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +# elif defined(__GNUC_MINOR__) +# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +# else +# define LZO_CC_GNUC (__GNUC__ * 0x10000L) +# endif +# define LZO_INFO_CC "gcc" +# define LZO_INFO_CCVER __VERSION__ +#elif defined(__AZTEC_C__) +# define LZO_CC_AZTECC 1 +# define LZO_INFO_CC "Aztec C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__AZTEC_C__) +#elif defined(__BORLANDC__) +# define LZO_CC_BORLANDC 1 +# define LZO_INFO_CC "Borland C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__BORLANDC__) +#elif defined(__DMC__) && defined(__SC__) +# define LZO_CC_DMC 1 +# define LZO_INFO_CC "Digital Mars C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__DMC__) +#elif defined(__DECC) +# define LZO_CC_DECC 1 +# define LZO_INFO_CC "DEC C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__DECC) +#elif defined(__HIGHC__) +# define LZO_CC_HIGHC 1 +# define LZO_INFO_CC "MetaWare High C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__IBMC__) +# define LZO_CC_IBMC 1 +# define LZO_INFO_CC "IBM C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__IBMC__) +#elif defined(__KEIL__) && defined(__C166__) +# define LZO_CC_KEILC 1 +# define LZO_INFO_CC "Keil C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__C166__) +#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) +# define LZO_CC_LCCWIN32 1 +# define LZO_INFO_CC "lcc-win32" +# define LZO_INFO_CCVER "unknown" +#elif defined(__LCC__) +# define LZO_CC_LCC 1 +# define LZO_INFO_CC "lcc" +# if defined(__LCC_VERSION__) +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__LCC_VERSION__) +# else +# define LZO_INFO_CCVER "unknown" +# endif +#elif defined(_MSC_VER) +# define LZO_CC_MSC 1 +# define LZO_INFO_CC "Microsoft C" +# if defined(_MSC_FULL_VER) +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(_MSC_VER) "." LZO_CPP_MACRO_EXPAND(_MSC_FULL_VER) +# else +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(_MSC_VER) +# endif +#elif defined(__MWERKS__) +# define LZO_CC_MWERKS 1 +# define LZO_INFO_CC "Metrowerks C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__MWERKS__) +#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) +# define LZO_CC_NDPC 1 +# define LZO_INFO_CC "Microway NDP C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__PACIFIC__) +# define LZO_CC_PACIFICC 1 +# define LZO_INFO_CC "Pacific C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__PACIFIC__) +#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) +# define LZO_CC_PGI 1 +# define LZO_INFO_CC "Portland Group PGI C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__PUREC__) && defined(__TOS__) +# define LZO_CC_PUREC 1 +# define LZO_INFO_CC "Pure C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__PUREC__) +#elif defined(__SC__) && defined(__ZTC__) +# define LZO_CC_SYMANTECC 1 +# define LZO_INFO_CC "Symantec C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__SC__) +#elif defined(__SUNPRO_C) +# define LZO_CC_SUNPROC 1 +# define LZO_INFO_CC "Sun C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__TINYC__) +# define LZO_CC_TINYC 1 +# define LZO_INFO_CC "Tiny C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__TINYC__) +#elif defined(__TSC__) +# define LZO_CC_TOPSPEEDC 1 +# define LZO_INFO_CC "TopSpeed C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__TSC__) +#elif defined(__WATCOMC__) +# define LZO_CC_WATCOMC 1 +# define LZO_INFO_CC "Watcom C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__WATCOMC__) +#elif defined(__TURBOC__) +# define LZO_CC_TURBOC 1 +# define LZO_INFO_CC "Turbo C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__TURBOC__) +#elif defined(__ZTC__) +# define LZO_CC_ZORTECHC 1 +# define LZO_INFO_CC "Zortech C" +# if (__ZTC__ == 0x310) +# define LZO_INFO_CCVER "0x310" +# else +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__ZTC__) +# endif +#else +# define LZO_CC_UNKNOWN 1 +# define LZO_INFO_CC "unknown" +# define LZO_INFO_CCVER "unknown" +#endif +#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) +# error "LZO_CC_MSC: _MSC_FULL_VER is not defined" +#endif +#if !defined(__LZO_ARCH_OVERRIDE) +#if defined(LZO_ARCH_GENERIC) +# define LZO_INFO_ARCH "generic" +#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +# define LZO_ARCH_I086 1 +# define LZO_ARCH_IA16 1 +# define LZO_INFO_ARCH "i086" +#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) +# define LZO_ARCH_ALPHA 1 +# define LZO_INFO_ARCH "alpha" +#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) +# define LZO_ARCH_AMD64 1 +# define LZO_INFO_ARCH "amd64" +#elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB)) +# define LZO_ARCH_ARM 1 +# define LZO_ARCH_ARM_THUMB 1 +# define LZO_INFO_ARCH "arm_thumb" +#elif defined(__arm__) || defined(_M_ARM) +# define LZO_ARCH_ARM 1 +# define LZO_INFO_ARCH "arm" +#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) +# define LZO_ARCH_AVR 1 +# define LZO_INFO_ARCH "avr" +#elif defined(__bfin__) +# define LZO_ARCH_BLACKFIN 1 +# define LZO_INFO_ARCH "blackfin" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C166__) +# define LZO_ARCH_C166 1 +# define LZO_INFO_ARCH "c166" +#elif defined(__cris__) +# define LZO_ARCH_CRIS 1 +# define LZO_INFO_ARCH "cris" +#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +# define LZO_ARCH_H8300 1 +# define LZO_INFO_ARCH "h8300" +#elif defined(__hppa__) || defined(__hppa) +# define LZO_ARCH_HPPA 1 +# define LZO_INFO_ARCH "hppa" +#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif (LZO_CC_ZORTECHC && defined(__I86__)) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64) +# define LZO_ARCH_IA64 1 +# define LZO_INFO_ARCH "ia64" +#elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__) +# define LZO_ARCH_M16C 1 +# define LZO_INFO_ARCH "m16c" +#elif defined(__m32r__) +# define LZO_ARCH_M32R 1 +# define LZO_INFO_ARCH "m32r" +#elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(_M_M68K) +# define LZO_ARCH_M68K 1 +# define LZO_INFO_ARCH "m68k" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C251__) +# define LZO_ARCH_MCS251 1 +# define LZO_INFO_ARCH "mcs251" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C51__) +# define LZO_ARCH_MCS51 1 +# define LZO_INFO_ARCH "mcs51" +#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) +# define LZO_ARCH_MIPS 1 +# define LZO_INFO_ARCH "mips" +#elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__) +# define LZO_ARCH_MSP430 1 +# define LZO_INFO_ARCH "msp430" +#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) +# define LZO_ARCH_POWERPC 1 +# define LZO_INFO_ARCH "powerpc" +#elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) +# define LZO_ARCH_S390 1 +# define LZO_INFO_ARCH "s390" +#elif defined(__sh__) || defined(_M_SH) +# define LZO_ARCH_SH 1 +# define LZO_INFO_ARCH "sh" +#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8) +# define LZO_ARCH_SPARC 1 +# define LZO_INFO_ARCH "sparc" +#elif (UINT_MAX == LZO_0xffffL) && defined(__z80) +# define LZO_ARCH_Z80 1 +# define LZO_INFO_ARCH "z80" +#else +# define LZO_ARCH_UNKNOWN 1 +# define LZO_INFO_ARCH "unknown" +#endif +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) +# error "FIXME - missing define for CPU architecture" +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32) +# error "FIXME - missing WIN32 define for CPU architecture" +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64) +# error "FIXME - missing WIN64 define for CPU architecture" +#endif +#if (LZO_OS_OS216 || LZO_OS_WIN16) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && defined(BLX286)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#endif +#if defined(LZO_ARCH_ARM_THUMB) && !defined(LZO_ARCH_ARM) +# error "this should not happen" +#endif +#if defined(LZO_ARCH_I086PM) && !defined(LZO_ARCH_I086) +# error "this should not happen" +#endif +#if (LZO_ARCH_I086) +# if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if (LZO_ARCH_I386) +# if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__) +# error "this should not happen" +# endif +# if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if !defined(__LZO_MM_OVERRIDE) +#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +#if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +#endif +#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) +# define LZO_MM_TINY 1 +#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM) +# define LZO_MM_HUGE 1 +#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL) +# define LZO_MM_SMALL 1 +#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM) +# define LZO_MM_MEDIUM 1 +#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM) +# define LZO_MM_COMPACT 1 +#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL) +# define LZO_MM_LARGE 1 +#elif (LZO_CC_AZTECC) +# if defined(_LARGE_CODE) && defined(_LARGE_DATA) +# define LZO_MM_LARGE 1 +# elif defined(_LARGE_CODE) +# define LZO_MM_MEDIUM 1 +# elif defined(_LARGE_DATA) +# define LZO_MM_COMPACT 1 +# else +# define LZO_MM_SMALL 1 +# endif +#elif (LZO_CC_ZORTECHC && defined(__VCM__)) +# define LZO_MM_LARGE 1 +#else +# error "unknown memory model" +#endif +#define LZO_HAVE_MM_HUGE_PTR 1 +#define LZO_HAVE_MM_HUGE_ARRAY 1 +#if (LZO_MM_TINY) +# undef LZO_HAVE_MM_HUGE_ARRAY +#endif +#if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC) +# undef LZO_HAVE_MM_HUGE_PTR +# undef LZO_HAVE_MM_HUGE_ARRAY +#elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +# undef LZO_HAVE_MM_HUGE_ARRAY +#elif (LZO_CC_MSC && defined(_QC)) +# undef LZO_HAVE_MM_HUGE_ARRAY +# if (_MSC_VER < 600) +# undef LZO_HAVE_MM_HUGE_PTR +# endif +#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) +# undef LZO_HAVE_MM_HUGE_ARRAY +#endif +#if (LZO_ARCH_I086PM) && !defined(LZO_HAVE_MM_HUGE_PTR) +# if (LZO_OS_DOS16) +# error "this should not happen" +# elif (LZO_CC_ZORTECHC) +# else +# error "this should not happen" +# endif +#endif +#ifdef __cplusplus +extern "C" { +#endif +#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295)) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16) +# define LZO_MM_AHSHIFT 12 +#elif (LZO_CC_WATCOMC) + extern unsigned char _HShift; +# define LZO_MM_AHSHIFT ((unsigned) _HShift) +#else +# error "FIXME - implement LZO_MM_AHSHIFT" +#endif +#ifdef __cplusplus +} +#endif +#elif (LZO_ARCH_C166) +#if !defined(__MODEL__) +# error "FIXME - C166 __MODEL__" +#elif ((__MODEL__) == 0) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 1) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - C166 __MODEL__" +#endif +#elif (LZO_ARCH_MCS251) +#if !defined(__MODEL__) +# error "FIXME - MCS251 __MODEL__" +#elif ((__MODEL__) == 0) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - MCS251 __MODEL__" +#endif +#elif (LZO_ARCH_MCS51) +#if !defined(__MODEL__) +# error "FIXME - MCS51 __MODEL__" +#elif ((__MODEL__) == 1) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - MCS51 __MODEL__" +#endif +#else +# define LZO_MM_FLAT 1 +#endif +#if (LZO_MM_FLAT) +# define LZO_INFO_MM "flat" +#elif (LZO_MM_TINY) +# define LZO_INFO_MM "tiny" +#elif (LZO_MM_SMALL) +# define LZO_INFO_MM "small" +#elif (LZO_MM_MEDIUM) +# define LZO_INFO_MM "medium" +#elif (LZO_MM_COMPACT) +# define LZO_INFO_MM "compact" +#elif (LZO_MM_LARGE) +# define LZO_INFO_MM "large" +#elif (LZO_MM_HUGE) +# define LZO_INFO_MM "huge" +#else +# error "unknown memory model" +#endif +#endif +#if defined(SIZEOF_SHORT) +# define LZO_SIZEOF_SHORT (SIZEOF_SHORT) +#endif +#if defined(SIZEOF_INT) +# define LZO_SIZEOF_INT (SIZEOF_INT) +#endif +#if defined(SIZEOF_LONG) +# define LZO_SIZEOF_LONG (SIZEOF_LONG) +#endif +#if defined(SIZEOF_LONG_LONG) +# define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) +#endif +#if defined(SIZEOF___INT16) +# define LZO_SIZEOF___INT16 (SIZEOF___INT16) +#endif +#if defined(SIZEOF___INT32) +# define LZO_SIZEOF___INT32 (SIZEOF___INT32) +#endif +#if defined(SIZEOF___INT64) +# define LZO_SIZEOF___INT64 (SIZEOF___INT64) +#endif +#if defined(SIZEOF_VOID_P) +# define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P) +#endif +#if defined(SIZEOF_SIZE_T) +# define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T) +#endif +#if defined(SIZEOF_PTRDIFF_T) +# define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) +#endif +#define __LZO_LSR(x,b) (((x)+0ul) >> (b)) +#if !defined(LZO_SIZEOF_SHORT) +# if (USHRT_MAX == LZO_0xffffL) +# define LZO_SIZEOF_SHORT 2 +# elif (__LZO_LSR(USHRT_MAX,7) == 1) +# define LZO_SIZEOF_SHORT 1 +# elif (__LZO_LSR(USHRT_MAX,15) == 1) +# define LZO_SIZEOF_SHORT 2 +# elif (__LZO_LSR(USHRT_MAX,31) == 1) +# define LZO_SIZEOF_SHORT 4 +# elif (__LZO_LSR(USHRT_MAX,63) == 1) +# define LZO_SIZEOF_SHORT 8 +# elif (__LZO_LSR(USHRT_MAX,127) == 1) +# define LZO_SIZEOF_SHORT 16 +# else +# error "LZO_SIZEOF_SHORT" +# endif +#endif +#if !defined(LZO_SIZEOF_INT) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_SIZEOF_INT 2 +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_SIZEOF_INT 4 +# elif (__LZO_LSR(UINT_MAX,7) == 1) +# define LZO_SIZEOF_INT 1 +# elif (__LZO_LSR(UINT_MAX,15) == 1) +# define LZO_SIZEOF_INT 2 +# elif (__LZO_LSR(UINT_MAX,31) == 1) +# define LZO_SIZEOF_INT 4 +# elif (__LZO_LSR(UINT_MAX,63) == 1) +# define LZO_SIZEOF_INT 8 +# elif (__LZO_LSR(UINT_MAX,127) == 1) +# define LZO_SIZEOF_INT 16 +# else +# error "LZO_SIZEOF_INT" +# endif +#endif +#if !defined(LZO_SIZEOF_LONG) +# if (ULONG_MAX == LZO_0xffffffffL) +# define LZO_SIZEOF_LONG 4 +# elif (__LZO_LSR(ULONG_MAX,7) == 1) +# define LZO_SIZEOF_LONG 1 +# elif (__LZO_LSR(ULONG_MAX,15) == 1) +# define LZO_SIZEOF_LONG 2 +# elif (__LZO_LSR(ULONG_MAX,31) == 1) +# define LZO_SIZEOF_LONG 4 +# elif (__LZO_LSR(ULONG_MAX,63) == 1) +# define LZO_SIZEOF_LONG 8 +# elif (__LZO_LSR(ULONG_MAX,127) == 1) +# define LZO_SIZEOF_LONG 16 +# else +# error "LZO_SIZEOF_LONG" +# endif +#endif +#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +# if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) +# if (LZO_CC_GNUC >= 0x030300ul) +# if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0) +# define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG +# endif +# endif +# endif +#endif +#endif +#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +#if (LZO_ARCH_I086 && LZO_CC_DMC) +#elif (LZO_CC_CILLY) && defined(__GNUC__) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define LZO_SIZEOF_LONG_LONG 8 +#elif ((LZO_OS_WIN32 || LZO_OS_WIN64) && LZO_CC_MSC && (_MSC_VER >= 1400)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_OS_WIN64) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_DMC)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700))) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__))) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_OS_WIN32 && (LZO_CC_MSC)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520))) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100))) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_OS_OS400) && defined(__LLP64_IFC__) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2) +#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +# define LZO_SIZEOF_LONG_LONG 8 +#endif +#endif +#endif +#if defined(__cplusplus) && defined(LZO_CC_GNUC) +# if (LZO_CC_GNUC < 0x020800ul) +# undef LZO_SIZEOF_LONG_LONG +# endif +#endif +#if defined(LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG) +# undef LZO_SIZEOF_LONG_LONG +#endif +#if !defined(LZO_SIZEOF_VOID_P) +#if (LZO_ARCH_I086) +# define __LZO_WORDSIZE 2 +# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) +# define LZO_SIZEOF_VOID_P 2 +# elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) +# define LZO_SIZEOF_VOID_P 4 +# else +# error "LZO_MM" +# endif +#elif (LZO_ARCH_AVR || LZO_ARCH_Z80) +# define __LZO_WORDSIZE 1 +# define LZO_SIZEOF_VOID_P 2 +#elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430) +# define LZO_SIZEOF_VOID_P 2 +#elif (LZO_ARCH_H8300) +# if defined(__NORMAL_MODE__) +# define __LZO_WORDSIZE 4 +# define LZO_SIZEOF_VOID_P 2 +# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +# define __LZO_WORDSIZE 4 +# define LZO_SIZEOF_VOID_P 4 +# else +# define __LZO_WORDSIZE 2 +# define LZO_SIZEOF_VOID_P 2 +# endif +# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4) +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT +# endif +#elif (LZO_ARCH_M16C) +# define __LZO_WORDSIZE 2 +# if defined(__m32c_cpu__) || defined(__m32cm_cpu__) +# define LZO_SIZEOF_VOID_P 4 +# else +# define LZO_SIZEOF_VOID_P 2 +# endif +#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +# define __LZO_WORDSIZE 8 +# define LZO_SIZEOF_VOID_P 4 +#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) +# define __LZO_WORDSIZE 8 +# define LZO_SIZEOF_VOID_P 8 +#elif (LZO_OS_OS400) && defined(__LLP64_IFC__) +# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#elif (LZO_OS_OS400) +# define __LZO_WORDSIZE LZO_SIZEOF_LONG +# define LZO_SIZEOF_VOID_P 16 +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +# define LZO_SIZEOF_VOID_P 8 +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#else +# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +#endif +#endif +#if !defined(LZO_WORDSIZE) +# if defined(__LZO_WORDSIZE) +# define LZO_WORDSIZE __LZO_WORDSIZE +# else +# define LZO_WORDSIZE LZO_SIZEOF_VOID_P +# endif +#endif +#if !defined(LZO_SIZEOF_SIZE_T) +#if (LZO_ARCH_I086 || LZO_ARCH_M16C) +# define LZO_SIZEOF_SIZE_T 2 +#else +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P +#endif +#endif +#if !defined(LZO_SIZEOF_PTRDIFF_T) +#if (LZO_ARCH_I086) +# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE) +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P +# elif (LZO_MM_COMPACT || LZO_MM_LARGE) +# if (LZO_CC_BORLANDC || LZO_CC_TURBOC) +# define LZO_SIZEOF_PTRDIFF_T 4 +# else +# define LZO_SIZEOF_PTRDIFF_T 2 +# endif +# else +# error "LZO_MM" +# endif +#else +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T +#endif +#endif +#if !defined(LZO_ABI_BIG_ENDIAN) && !defined(LZO_ABI_LITTLE_ENDIAN) && !defined(LZO_ABI_NEUTRAL_ENDIAN) +#if (LZO_ARCH_AMD64 || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430) +# define LZO_ABI_LITTLE_ENDIAN 1 +#elif (LZO_ARCH_M68K || LZO_ARCH_S390) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) +# define LZO_ABI_LITTLE_ENDIAN 1 +#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) +# define LZO_ABI_LITTLE_ENDIAN 1 +#endif +#endif +#if defined(LZO_ABI_BIG_ENDIAN) && defined(LZO_ABI_LITTLE_ENDIAN) +# error "this should not happen" +#endif +#if defined(LZO_ABI_BIG_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "be" +#elif defined(LZO_ABI_LITTLE_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "le" +#elif defined(LZO_ABI_NEUTRAL_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "neutral" +#endif +#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +# define LZO_ABI_I8LP16 1 +# define LZO_INFO_ABI_PM "i8lp16" +#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +# define LZO_ABI_ILP16 1 +# define LZO_INFO_ABI_PM "ilp16" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) +# define LZO_ABI_ILP32 1 +# define LZO_INFO_ABI_PM "ilp32" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8) +# define LZO_ABI_LLP64 1 +# define LZO_INFO_ABI_PM "llp64" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +# define LZO_ABI_LP64 1 +# define LZO_INFO_ABI_PM "lp64" +#elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +# define LZO_ABI_ILP64 1 +# define LZO_INFO_ABI_PM "ilp64" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4) +# define LZO_ABI_IP32L64 1 +# define LZO_INFO_ABI_PM "ip32l64" +#endif +#if !defined(__LZO_LIBC_OVERRIDE) +#if defined(LZO_LIBC_NAKED) +# define LZO_INFO_LIBC "naked" +#elif defined(LZO_LIBC_FREESTANDING) +# define LZO_INFO_LIBC "freestanding" +#elif defined(LZO_LIBC_MOSTLY_FREESTANDING) +# define LZO_INFO_LIBC "mfreestanding" +#elif defined(LZO_LIBC_ISOC90) +# define LZO_INFO_LIBC "isoc90" +#elif defined(LZO_LIBC_ISOC99) +# define LZO_INFO_LIBC "isoc99" +#elif defined(__dietlibc__) +# define LZO_LIBC_DIETLIBC 1 +# define LZO_INFO_LIBC "dietlibc" +#elif defined(_NEWLIB_VERSION) +# define LZO_LIBC_NEWLIB 1 +# define LZO_INFO_LIBC "newlib" +#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) +# if defined(__UCLIBC_SUBLEVEL__) +# define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__) +# else +# define LZO_LIBC_UCLIBC 0x00090bL +# endif +# define LZO_INFO_LIBC "uclibc" +#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) +# define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100) +# define LZO_INFO_LIBC "glibc" +#elif (LZO_CC_MWERKS) && defined(__MSL__) +# define LZO_LIBC_MSL __MSL__ +# define LZO_INFO_LIBC "msl" +#else +# define LZO_LIBC_DEFAULT 1 +# define LZO_INFO_LIBC "default" +#endif +#endif +#if (LZO_CC_GNUC >= 0x020800ul) +# define __lzo_gnuc_extension__ __extension__ +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_gnuc_extension__ __extension__ +#else +# define __lzo_gnuc_extension__ +#endif +#if (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +# define lzo_alignof(e) __alignof__(e) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) +# define lzo_alignof(e) __alignof__(e) +#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +# define lzo_alignof(e) __alignof(e) +#endif +#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295)) +#elif defined(__cplusplus) +# define __lzo_inline inline +#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) +# define __lzo_inline __inline +#elif (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +# define __lzo_inline __inline__ +#elif (LZO_CC_DMC) +# define __lzo_inline __inline +#elif (LZO_CC_INTELC) +# define __lzo_inline __inline +#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405)) +# define __lzo_inline __inline +#elif (LZO_CC_MSC && (_MSC_VER >= 900)) +# define __lzo_inline __inline +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +# define __lzo_inline inline +#endif +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# define __lzo_forceinline __forceinline +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +# define __lzo_forceinline __forceinline +#endif +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# define __lzo_noinline __declspec(noinline) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +# define __lzo_noinline __declspec(noinline) +#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# if defined(__cplusplus) +# else +# define __lzo_noinline __declspec(noinline) +# endif +#endif +#if (defined(__lzo_forceinline) || defined(__lzo_noinline)) && !defined(__lzo_inline) +# error "this should not happen" +#endif +#if (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# define __lzo_noreturn __declspec(noreturn) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && (LZO_OS_POSIX)) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +# define __lzo_noreturn __declspec(noreturn) +#endif +#if (LZO_CC_GNUC >= 0x030400ul) +# define __lzo_constructor __attribute__((__constructor__,__used__)) +#elif (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_constructor __attribute__((__constructor__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_constructor __attribute__((__constructor__)) +#endif +#if (LZO_CC_GNUC >= 0x030400ul) +# define __lzo_destructor __attribute__((__destructor__,__used__)) +#elif (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_destructor __attribute__((__destructor__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_destructor __attribute__((__destructor__)) +#endif +#if defined(__lzo_destructor) && !defined(__lzo_constructor) +# error "this should not happen" +#endif +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#else +# define __lzo_likely(e) (e) +# define __lzo_unlikely(e) (e) +#endif +#if !defined(LZO_UNUSED) +# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +# define LZO_UNUSED(var) ((void) &var) +# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) +# define LZO_UNUSED(var) if (&var) ; else +# elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define LZO_UNUSED(var) ((void) var) +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_UNUSED(var) if (&var) ; else +# elif (LZO_CC_KEILC) +# define LZO_UNUSED(var) {extern int __lzo_unused[1-2*!(sizeof(var)>0)];} +# elif (LZO_CC_PACIFICC) +# define LZO_UNUSED(var) ((void) sizeof(var)) +# elif (LZO_CC_WATCOMC) && defined(__cplusplus) +# define LZO_UNUSED(var) ((void) var) +# else +# define LZO_UNUSED(var) ((void) &var) +# endif +#endif +#if !defined(LZO_UNUSED_FUNC) +# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +# define LZO_UNUSED_FUNC(func) ((void) func) +# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) +# define LZO_UNUSED_FUNC(func) if (func) ; else +# elif (LZO_CC_LLVM) +# define LZO_UNUSED_FUNC(func) ((void) &func) +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_UNUSED_FUNC(func) if (func) ; else +# elif (LZO_CC_MSC) +# define LZO_UNUSED_FUNC(func) ((void) &func) +# elif (LZO_CC_KEILC || LZO_CC_PELLESC) +# define LZO_UNUSED_FUNC(func) {extern int __lzo_unused[1-2*!(sizeof((int)func)>0)];} +# else +# define LZO_UNUSED_FUNC(func) ((void) func) +# endif +#endif +#if !defined(LZO_UNUSED_LABEL) +# if (LZO_CC_WATCOMC) && defined(__cplusplus) +# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +# elif (LZO_CC_INTELC || LZO_CC_WATCOMC) +# define LZO_UNUSED_LABEL(l) if (0) goto l +# else +# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +# endif +#endif +#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) +# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +# elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1u-2*!(e)]; +# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +# else +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-2*!(e)]; +# endif +#endif +#if !defined(LZO_COMPILE_TIME_ASSERT) +# if (LZO_CC_AZTECC) +# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-!(e)];} +# elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# else +# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-2*!(e)];} +# endif +#endif +#if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) +# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +# define __lzo_cdecl __cdecl +# define __lzo_cdecl_atexit +# define __lzo_cdecl_main __cdecl +# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +# define __lzo_cdecl_qsort __pascal +# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +# define __lzo_cdecl_qsort _stdcall +# else +# define __lzo_cdecl_qsort __cdecl +# endif +# elif (LZO_CC_WATCOMC) +# define __lzo_cdecl __cdecl +# else +# define __lzo_cdecl __cdecl +# define __lzo_cdecl_atexit __cdecl +# define __lzo_cdecl_main __cdecl +# define __lzo_cdecl_qsort __cdecl +# endif +# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC) +# elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +# define __lzo_cdecl_sighandler __pascal +# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +# define __lzo_cdecl_sighandler _stdcall +# elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) +# define __lzo_cdecl_sighandler __clrcall +# elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) +# if defined(_DLL) +# define __lzo_cdecl_sighandler _far _cdecl _loadds +# elif defined(_MT) +# define __lzo_cdecl_sighandler _far _cdecl +# else +# define __lzo_cdecl_sighandler _cdecl +# endif +# else +# define __lzo_cdecl_sighandler __cdecl +# endif +#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) +# define __lzo_cdecl cdecl +#endif +#if !defined(__lzo_cdecl) +# define __lzo_cdecl +#endif +#if !defined(__lzo_cdecl_atexit) +# define __lzo_cdecl_atexit +#endif +#if !defined(__lzo_cdecl_main) +# define __lzo_cdecl_main +#endif +#if !defined(__lzo_cdecl_qsort) +# define __lzo_cdecl_qsort +#endif +#if !defined(__lzo_cdecl_sighandler) +# define __lzo_cdecl_sighandler +#endif +#if !defined(__lzo_cdecl_va) +# define __lzo_cdecl_va __lzo_cdecl +#endif +#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) +# elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) +# elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) +# else +# define LZO_HAVE_WINDOWS_H 1 +# endif +#endif +#if (LZO_ARCH_ALPHA) +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_AVOID_SHORT 1 +# define LZO_OPT_AVOID_USHORT 1 +#elif (LZO_ARCH_AMD64) +# define LZO_OPT_AVOID_INT_INDEX 1 +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# define LZO_OPT_UNALIGNED64 1 +#elif (LZO_ARCH_ARM && LZO_ARCH_ARM_THUMB) +#elif (LZO_ARCH_ARM) +# define LZO_OPT_AVOID_SHORT 1 +# define LZO_OPT_AVOID_USHORT 1 +#elif (LZO_ARCH_CRIS) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +#elif (LZO_ARCH_I386) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +#elif (LZO_ARCH_IA64) +# define LZO_OPT_AVOID_INT_INDEX 1 +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_PREFER_POSTINC 1 +#elif (LZO_ARCH_M68K) +# define LZO_OPT_PREFER_POSTINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +# if defined(__mc68020__) && !defined(__mcoldfire__) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# endif +#elif (LZO_ARCH_MIPS) +# define LZO_OPT_AVOID_UINT_INDEX 1 +#elif (LZO_ARCH_POWERPC) +# define LZO_OPT_PREFER_PREINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +# if defined(LZO_ABI_BIG_ENDIAN) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# endif +#elif (LZO_ARCH_S390) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# if (LZO_SIZEOF_SIZE_T == 8) +# define LZO_OPT_UNALIGNED64 1 +# endif +#elif (LZO_ARCH_SH) +# define LZO_OPT_PREFER_POSTINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +#endif +#if !defined(LZO_CFG_NO_INLINE_ASM) +#if defined(LZO_CC_LLVM) +# define LZO_CFG_NO_INLINE_ASM 1 +#endif +#endif +#if !defined(LZO_CFG_NO_UNALIGNED) +#if defined(LZO_ABI_NEUTRAL_ENDIAN) || defined(LZO_ARCH_GENERIC) +# define LZO_CFG_NO_UNALIGNED 1 +#endif +#endif +#if defined(LZO_CFG_NO_UNALIGNED) +# undef LZO_OPT_UNALIGNED16 +# undef LZO_OPT_UNALIGNED32 +# undef LZO_OPT_UNALIGNED64 +#endif +#if defined(LZO_CFG_NO_INLINE_ASM) +#elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +# define LZO_ASM_SYNTAX_MSC 1 +#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +#elif (LZO_ARCH_I386 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +# define LZO_ASM_SYNTAX_GNUC 1 +#elif (LZO_ARCH_AMD64 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +# define LZO_ASM_SYNTAX_GNUC 1 +#endif +#if (LZO_ASM_SYNTAX_GNUC) +#if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) +# define __LZO_ASM_CLOBBER "ax" +#elif (LZO_CC_INTELC) +# define __LZO_ASM_CLOBBER "memory" +#else +# define __LZO_ASM_CLOBBER "cc", "memory" +#endif +#endif +#if defined(__LZO_INFOSTR_MM) +#elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM)) +# define __LZO_INFOSTR_MM "" +#elif defined(LZO_INFO_MM) +# define __LZO_INFOSTR_MM "." LZO_INFO_MM +#else +# define __LZO_INFOSTR_MM "" +#endif +#if defined(__LZO_INFOSTR_PM) +#elif defined(LZO_INFO_ABI_PM) +# define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM +#else +# define __LZO_INFOSTR_PM "" +#endif +#if defined(__LZO_INFOSTR_ENDIAN) +#elif defined(LZO_INFO_ABI_ENDIAN) +# define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN +#else +# define __LZO_INFOSTR_ENDIAN "" +#endif +#if defined(__LZO_INFOSTR_OSNAME) +#elif defined(LZO_INFO_OS_CONSOLE) +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE +#elif defined(LZO_INFO_OS_POSIX) +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX +#else +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS +#endif +#if defined(__LZO_INFOSTR_LIBC) +#elif defined(LZO_INFO_LIBC) +# define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC +#else +# define __LZO_INFOSTR_LIBC "" +#endif +#if defined(__LZO_INFOSTR_CCVER) +#elif defined(LZO_INFO_CCVER) +# define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER +#else +# define __LZO_INFOSTR_CCVER "" +#endif +#define LZO_INFO_STRING \ + LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \ + " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER + +#endif /* already included */ + +/* vim:set ts=4 et: */ diff --git a/package/cfgfs/src/bundled/minilzo.c b/package/cfgfs/src/bundled/minilzo.c new file mode 100644 index 000000000..b21fcf39c --- /dev/null +++ b/package/cfgfs/src/bundled/minilzo.c @@ -0,0 +1,3826 @@ +/* minilzo.c -- mini subset of the LZO real-time data compression library + + This file is part of the LZO real-time data compression library. + + Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + All Rights Reserved. + + The LZO library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License, + version 2, as published by the Free Software Foundation. + + The LZO library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the LZO library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Markus F.X.J. Oberhumer + + http://www.oberhumer.com/opensource/lzo/ + */ + +/* + * NOTE: + * the full LZO package can be found at + * http://www.oberhumer.com/opensource/lzo/ + */ + +#define __LZO_IN_MINILZO +#define LZO_BUILD + +#if defined(LZO_CFG_FREESTANDING) +# undef MINILZO_HAVE_CONFIG_H +# define LZO_LIBC_FREESTANDING 1 +# define LZO_OS_FREESTANDING 1 +#endif + +#ifdef MINILZO_HAVE_CONFIG_H +# include +#endif +#include +#include +#if defined(MINILZO_CFG_USE_INTERNAL_LZODEFS) + +#ifndef __LZODEFS_H_INCLUDED +#define __LZODEFS_H_INCLUDED 1 + +#if defined(__CYGWIN32__) && !defined(__CYGWIN__) +# define __CYGWIN__ __CYGWIN32__ +#endif +#if defined(__IBMCPP__) && !defined(__IBMC__) +# define __IBMC__ __IBMCPP__ +#endif +#if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER) +# define __INTEL_COMPILER __ICL +#endif +#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) +# define _ALL_SOURCE 1 +#endif +#if defined(__mips__) && defined(__R5900__) +# if !defined(__LONG_MAX__) +# define __LONG_MAX__ 9223372036854775807L +# endif +#endif +#if defined(__INTEL_COMPILER) && defined(__linux__) +# pragma warning(disable: 193) +#endif +#if defined(__KEIL__) && defined(__C166__) +# pragma warning disable = 322 +#elif 0 && defined(__C251__) +# pragma warning disable = 322 +#endif +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) +# if (_MSC_VER >= 1300) +# pragma warning(disable: 4668) +# endif +#endif +#if 0 && defined(__WATCOMC__) +# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) +# pragma warning 203 9 +# endif +#endif +#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) +# pragma option -h +#endif +#if 0 +#define LZO_0xffffL 0xfffful +#define LZO_0xffffffffL 0xfffffffful +#else +#define LZO_0xffffL 65535ul +#define LZO_0xffffffffL 4294967295ul +#endif +#if (LZO_0xffffL == LZO_0xffffffffL) +# error "your preprocessor is broken 1" +#endif +#if (16ul * 16384ul != 262144ul) +# error "your preprocessor is broken 2" +#endif +#if 0 +#if (32767 >= 4294967295ul) +# error "your preprocessor is broken 3" +#endif +#if (65535u >= 4294967295ul) +# error "your preprocessor is broken 4" +#endif +#endif +#if (UINT_MAX == LZO_0xffffL) +#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) +# if !defined(MSDOS) +# define MSDOS 1 +# endif +# if !defined(_MSDOS) +# define _MSDOS 1 +# endif +#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) +# if (__VERSION == 520) && (MB_LEN_MAX == 1) +# if !defined(__AZTEC_C__) +# define __AZTEC_C__ __VERSION +# endif +# if !defined(__DOS__) +# define __DOS__ 1 +# endif +# endif +#endif +#endif +#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL) +# define ptrdiff_t long +# define _PTRDIFF_T_DEFINED +#endif +#if (UINT_MAX == LZO_0xffffL) +# undef __LZO_RENAME_A +# undef __LZO_RENAME_B +# if defined(__AZTEC_C__) && defined(__DOS__) +# define __LZO_RENAME_A 1 +# elif defined(_MSC_VER) && defined(MSDOS) +# if (_MSC_VER < 600) +# define __LZO_RENAME_A 1 +# elif (_MSC_VER < 700) +# define __LZO_RENAME_B 1 +# endif +# elif defined(__TSC__) && defined(__OS2__) +# define __LZO_RENAME_A 1 +# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) +# define __LZO_RENAME_A 1 +# elif defined(__PACIFIC__) && defined(DOS) +# if !defined(__far) +# define __far far +# endif +# if !defined(__near) +# define __near near +# endif +# endif +# if defined(__LZO_RENAME_A) +# if !defined(__cdecl) +# define __cdecl cdecl +# endif +# if !defined(__far) +# define __far far +# endif +# if !defined(__huge) +# define __huge huge +# endif +# if !defined(__near) +# define __near near +# endif +# if !defined(__pascal) +# define __pascal pascal +# endif +# if !defined(__huge) +# define __huge huge +# endif +# elif defined(__LZO_RENAME_B) +# if !defined(__cdecl) +# define __cdecl _cdecl +# endif +# if !defined(__far) +# define __far _far +# endif +# if !defined(__huge) +# define __huge _huge +# endif +# if !defined(__near) +# define __near _near +# endif +# if !defined(__pascal) +# define __pascal _pascal +# endif +# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +# if !defined(__cdecl) +# define __cdecl cdecl +# endif +# if !defined(__pascal) +# define __pascal pascal +# endif +# endif +# undef __LZO_RENAME_A +# undef __LZO_RENAME_B +#endif +#if (UINT_MAX == LZO_0xffffL) +#if defined(__AZTEC_C__) && defined(__DOS__) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +#elif defined(_MSC_VER) && defined(MSDOS) +# if (_MSC_VER < 600) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +# endif +# if (_MSC_VER < 700) +# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +# define LZO_BROKEN_SIZEOF 1 +# endif +#elif defined(__PACIFIC__) && defined(DOS) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +#elif defined(__TURBOC__) && defined(__MSDOS__) +# if (__TURBOC__ < 0x0150) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +# endif +# if (__TURBOC__ < 0x0200) +# define LZO_BROKEN_SIZEOF 1 +# endif +# if (__TURBOC__ < 0x0400) && defined(__cplusplus) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# endif +#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# define LZO_BROKEN_SIZEOF 1 +#endif +#endif +#if defined(__WATCOMC__) && (__WATCOMC__ < 900) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +#endif +#define LZO_CPP_STRINGIZE(x) #x +#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) +#define LZO_CPP_CONCAT2(a,b) a ## b +#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c +#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d +#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e +#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) +#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) +#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) +#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) +#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o)) +#if 1 && defined(__cplusplus) +# if !defined(__STDC_CONSTANT_MACROS) +# define __STDC_CONSTANT_MACROS 1 +# endif +# if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +# endif +#endif +#if defined(__cplusplus) +# define LZO_EXTERN_C extern "C" +#else +# define LZO_EXTERN_C extern +#endif +#if !defined(__LZO_OS_OVERRIDE) +#if defined(LZO_OS_FREESTANDING) +# define LZO_INFO_OS "freestanding" +#elif defined(LZO_OS_EMBEDDED) +# define LZO_INFO_OS "embedded" +#elif defined(__CYGWIN__) && defined(__GNUC__) +# define LZO_OS_CYGWIN 1 +# define LZO_INFO_OS "cygwin" +#elif defined(__EMX__) && defined(__GNUC__) +# define LZO_OS_EMX 1 +# define LZO_INFO_OS "emx" +#elif defined(__BEOS__) +# define LZO_OS_BEOS 1 +# define LZO_INFO_OS "beos" +#elif defined(__Lynx__) +# define LZO_OS_LYNXOS 1 +# define LZO_INFO_OS "lynxos" +#elif defined(__OS400__) +# define LZO_OS_OS400 1 +# define LZO_INFO_OS "os400" +#elif defined(__QNX__) +# define LZO_OS_QNX 1 +# define LZO_INFO_OS "qnx" +#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +#elif defined(__BORLANDC__) && defined(__DPMI16__) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +#elif defined(__ZTC__) && defined(DOS386) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +#elif defined(__OS2__) || defined(__OS2V2__) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_OS216 1 +# define LZO_INFO_OS "os216" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_OS2 1 +# define LZO_INFO_OS "os2" +# else +# error "check your limits.h header" +# endif +#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) +# define LZO_OS_WIN64 1 +# define LZO_INFO_OS "win64" +#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +#elif defined(__MWERKS__) && defined(__INTEL__) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_WIN16 1 +# define LZO_INFO_OS "win16" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +# else +# error "check your limits.h header" +# endif +#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +# else +# error "check your limits.h header" +# endif +#elif defined(__WATCOMC__) +# if defined(__NT__) && (UINT_MAX == LZO_0xffffL) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +# elif defined(__NT__) && (__WATCOMC__ < 1100) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +# else +# error "please specify a target using the -bt compiler option" +# endif +#elif defined(__palmos__) +# define LZO_OS_PALMOS 1 +# define LZO_INFO_OS "palmos" +#elif defined(__TOS__) || defined(__atarist__) +# define LZO_OS_TOS 1 +# define LZO_INFO_OS "tos" +#elif defined(macintosh) && !defined(__ppc__) +# define LZO_OS_MACCLASSIC 1 +# define LZO_INFO_OS "macclassic" +#elif defined(__VMS) +# define LZO_OS_VMS 1 +# define LZO_INFO_OS "vms" +#elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +# define LZO_OS_CONSOLE 1 +# define LZO_OS_CONSOLE_PS2 1 +# define LZO_INFO_OS "console" +# define LZO_INFO_OS_CONSOLE "ps2" +#elif (defined(__mips__) && defined(__psp__)) +# define LZO_OS_CONSOLE 1 +# define LZO_OS_CONSOLE_PSP 1 +# define LZO_INFO_OS "console" +# define LZO_INFO_OS_CONSOLE "psp" +#else +# define LZO_OS_POSIX 1 +# define LZO_INFO_OS "posix" +#endif +#if (LZO_OS_POSIX) +# if defined(_AIX) || defined(__AIX__) || defined(__aix__) +# define LZO_OS_POSIX_AIX 1 +# define LZO_INFO_OS_POSIX "aix" +# elif defined(__FreeBSD__) +# define LZO_OS_POSIX_FREEBSD 1 +# define LZO_INFO_OS_POSIX "freebsd" +# elif defined(__hpux__) || defined(__hpux) +# define LZO_OS_POSIX_HPUX 1 +# define LZO_INFO_OS_POSIX "hpux" +# elif defined(__INTERIX) +# define LZO_OS_POSIX_INTERIX 1 +# define LZO_INFO_OS_POSIX "interix" +# elif defined(__IRIX__) || defined(__irix__) +# define LZO_OS_POSIX_IRIX 1 +# define LZO_INFO_OS_POSIX "irix" +# elif defined(__linux__) || defined(__linux) +# define LZO_OS_POSIX_LINUX 1 +# define LZO_INFO_OS_POSIX "linux" +# elif defined(__APPLE__) || defined(__MACOS__) +# define LZO_OS_POSIX_MACOSX 1 +# define LZO_INFO_OS_POSIX "macosx" +# elif defined(__NetBSD__) +# define LZO_OS_POSIX_NETBSD 1 +# define LZO_INFO_OS_POSIX "netbsd" +# elif defined(__OpenBSD__) +# define LZO_OS_POSIX_OPENBSD 1 +# define LZO_INFO_OS_POSIX "openbsd" +# elif defined(__osf__) +# define LZO_OS_POSIX_OSF 1 +# define LZO_INFO_OS_POSIX "osf" +# elif defined(__solaris__) || defined(__sun) +# if defined(__SVR4) || defined(__svr4__) +# define LZO_OS_POSIX_SOLARIS 1 +# define LZO_INFO_OS_POSIX "solaris" +# else +# define LZO_OS_POSIX_SUNOS 1 +# define LZO_INFO_OS_POSIX "sunos" +# endif +# elif defined(__ultrix__) || defined(__ultrix) +# define LZO_OS_POSIX_ULTRIX 1 +# define LZO_INFO_OS_POSIX "ultrix" +# else +# define LZO_OS_POSIX_UNKNOWN 1 +# define LZO_INFO_OS_POSIX "unknown" +# endif +#endif +#endif +#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +# if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (UINT_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) +# define LZO_CC_CILLY 1 +# define LZO_INFO_CC "Cilly" +# if defined(__CILLY__) +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__CILLY__) +# else +# define LZO_INFO_CCVER "unknown" +# endif +#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) +# define LZO_CC_SDCC 1 +# define LZO_INFO_CC "sdcc" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(SDCC) +#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) +# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__) +# define LZO_INFO_CC "Pathscale C" +# define LZO_INFO_CCVER __PATHSCALE__ +#elif defined(__INTEL_COMPILER) +# define LZO_CC_INTELC 1 +# define LZO_INFO_CC "Intel C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__INTEL_COMPILER) +#elif defined(__POCC__) && defined(_WIN32) +# define LZO_CC_PELLESC 1 +# define LZO_INFO_CC "Pelles C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__POCC__) +#elif defined(__llvm__) && defined(__GNUC__) && defined(__VERSION__) +# define LZO_CC_LLVM 1 +# define LZO_INFO_CC "llvm-gcc" +# define LZO_INFO_CCVER __VERSION__ +#elif defined(__GNUC__) && defined(__VERSION__) +# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) +# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +# elif defined(__GNUC_MINOR__) +# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +# else +# define LZO_CC_GNUC (__GNUC__ * 0x10000L) +# endif +# define LZO_INFO_CC "gcc" +# define LZO_INFO_CCVER __VERSION__ +#elif defined(__AZTEC_C__) +# define LZO_CC_AZTECC 1 +# define LZO_INFO_CC "Aztec C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__AZTEC_C__) +#elif defined(__BORLANDC__) +# define LZO_CC_BORLANDC 1 +# define LZO_INFO_CC "Borland C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__BORLANDC__) +#elif defined(__DMC__) && defined(__SC__) +# define LZO_CC_DMC 1 +# define LZO_INFO_CC "Digital Mars C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__DMC__) +#elif defined(__DECC) +# define LZO_CC_DECC 1 +# define LZO_INFO_CC "DEC C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__DECC) +#elif defined(__HIGHC__) +# define LZO_CC_HIGHC 1 +# define LZO_INFO_CC "MetaWare High C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__IBMC__) +# define LZO_CC_IBMC 1 +# define LZO_INFO_CC "IBM C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__IBMC__) +#elif defined(__KEIL__) && defined(__C166__) +# define LZO_CC_KEILC 1 +# define LZO_INFO_CC "Keil C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__C166__) +#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) +# define LZO_CC_LCCWIN32 1 +# define LZO_INFO_CC "lcc-win32" +# define LZO_INFO_CCVER "unknown" +#elif defined(__LCC__) +# define LZO_CC_LCC 1 +# define LZO_INFO_CC "lcc" +# if defined(__LCC_VERSION__) +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__LCC_VERSION__) +# else +# define LZO_INFO_CCVER "unknown" +# endif +#elif defined(_MSC_VER) +# define LZO_CC_MSC 1 +# define LZO_INFO_CC "Microsoft C" +# if defined(_MSC_FULL_VER) +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(_MSC_VER) "." LZO_CPP_MACRO_EXPAND(_MSC_FULL_VER) +# else +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(_MSC_VER) +# endif +#elif defined(__MWERKS__) +# define LZO_CC_MWERKS 1 +# define LZO_INFO_CC "Metrowerks C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__MWERKS__) +#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) +# define LZO_CC_NDPC 1 +# define LZO_INFO_CC "Microway NDP C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__PACIFIC__) +# define LZO_CC_PACIFICC 1 +# define LZO_INFO_CC "Pacific C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__PACIFIC__) +#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) +# define LZO_CC_PGI 1 +# define LZO_INFO_CC "Portland Group PGI C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__PUREC__) && defined(__TOS__) +# define LZO_CC_PUREC 1 +# define LZO_INFO_CC "Pure C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__PUREC__) +#elif defined(__SC__) && defined(__ZTC__) +# define LZO_CC_SYMANTECC 1 +# define LZO_INFO_CC "Symantec C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__SC__) +#elif defined(__SUNPRO_C) +# define LZO_CC_SUNPROC 1 +# define LZO_INFO_CC "Sun C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__TINYC__) +# define LZO_CC_TINYC 1 +# define LZO_INFO_CC "Tiny C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__TINYC__) +#elif defined(__TSC__) +# define LZO_CC_TOPSPEEDC 1 +# define LZO_INFO_CC "TopSpeed C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__TSC__) +#elif defined(__WATCOMC__) +# define LZO_CC_WATCOMC 1 +# define LZO_INFO_CC "Watcom C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__WATCOMC__) +#elif defined(__TURBOC__) +# define LZO_CC_TURBOC 1 +# define LZO_INFO_CC "Turbo C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__TURBOC__) +#elif defined(__ZTC__) +# define LZO_CC_ZORTECHC 1 +# define LZO_INFO_CC "Zortech C" +# if (__ZTC__ == 0x310) +# define LZO_INFO_CCVER "0x310" +# else +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__ZTC__) +# endif +#else +# define LZO_CC_UNKNOWN 1 +# define LZO_INFO_CC "unknown" +# define LZO_INFO_CCVER "unknown" +#endif +#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) +# error "LZO_CC_MSC: _MSC_FULL_VER is not defined" +#endif +#if !defined(__LZO_ARCH_OVERRIDE) +#if defined(LZO_ARCH_GENERIC) +# define LZO_INFO_ARCH "generic" +#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +# define LZO_ARCH_I086 1 +# define LZO_ARCH_IA16 1 +# define LZO_INFO_ARCH "i086" +#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) +# define LZO_ARCH_ALPHA 1 +# define LZO_INFO_ARCH "alpha" +#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) +# define LZO_ARCH_AMD64 1 +# define LZO_INFO_ARCH "amd64" +#elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB)) +# define LZO_ARCH_ARM 1 +# define LZO_ARCH_ARM_THUMB 1 +# define LZO_INFO_ARCH "arm_thumb" +#elif defined(__arm__) || defined(_M_ARM) +# define LZO_ARCH_ARM 1 +# define LZO_INFO_ARCH "arm" +#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) +# define LZO_ARCH_AVR 1 +# define LZO_INFO_ARCH "avr" +#elif defined(__bfin__) +# define LZO_ARCH_BLACKFIN 1 +# define LZO_INFO_ARCH "blackfin" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C166__) +# define LZO_ARCH_C166 1 +# define LZO_INFO_ARCH "c166" +#elif defined(__cris__) +# define LZO_ARCH_CRIS 1 +# define LZO_INFO_ARCH "cris" +#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +# define LZO_ARCH_H8300 1 +# define LZO_INFO_ARCH "h8300" +#elif defined(__hppa__) || defined(__hppa) +# define LZO_ARCH_HPPA 1 +# define LZO_INFO_ARCH "hppa" +#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif (LZO_CC_ZORTECHC && defined(__I86__)) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64) +# define LZO_ARCH_IA64 1 +# define LZO_INFO_ARCH "ia64" +#elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__) +# define LZO_ARCH_M16C 1 +# define LZO_INFO_ARCH "m16c" +#elif defined(__m32r__) +# define LZO_ARCH_M32R 1 +# define LZO_INFO_ARCH "m32r" +#elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(_M_M68K) +# define LZO_ARCH_M68K 1 +# define LZO_INFO_ARCH "m68k" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C251__) +# define LZO_ARCH_MCS251 1 +# define LZO_INFO_ARCH "mcs251" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C51__) +# define LZO_ARCH_MCS51 1 +# define LZO_INFO_ARCH "mcs51" +#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) +# define LZO_ARCH_MIPS 1 +# define LZO_INFO_ARCH "mips" +#elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__) +# define LZO_ARCH_MSP430 1 +# define LZO_INFO_ARCH "msp430" +#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) +# define LZO_ARCH_POWERPC 1 +# define LZO_INFO_ARCH "powerpc" +#elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) +# define LZO_ARCH_S390 1 +# define LZO_INFO_ARCH "s390" +#elif defined(__sh__) || defined(_M_SH) +# define LZO_ARCH_SH 1 +# define LZO_INFO_ARCH "sh" +#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8) +# define LZO_ARCH_SPARC 1 +# define LZO_INFO_ARCH "sparc" +#elif (UINT_MAX == LZO_0xffffL) && defined(__z80) +# define LZO_ARCH_Z80 1 +# define LZO_INFO_ARCH "z80" +#else +# define LZO_ARCH_UNKNOWN 1 +# define LZO_INFO_ARCH "unknown" +#endif +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) +# error "FIXME - missing define for CPU architecture" +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32) +# error "FIXME - missing WIN32 define for CPU architecture" +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64) +# error "FIXME - missing WIN64 define for CPU architecture" +#endif +#if (LZO_OS_OS216 || LZO_OS_WIN16) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && defined(BLX286)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#endif +#if defined(LZO_ARCH_ARM_THUMB) && !defined(LZO_ARCH_ARM) +# error "this should not happen" +#endif +#if defined(LZO_ARCH_I086PM) && !defined(LZO_ARCH_I086) +# error "this should not happen" +#endif +#if (LZO_ARCH_I086) +# if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if (LZO_ARCH_I386) +# if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__) +# error "this should not happen" +# endif +# if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if !defined(__LZO_MM_OVERRIDE) +#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +#if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +#endif +#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) +# define LZO_MM_TINY 1 +#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM) +# define LZO_MM_HUGE 1 +#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL) +# define LZO_MM_SMALL 1 +#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM) +# define LZO_MM_MEDIUM 1 +#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM) +# define LZO_MM_COMPACT 1 +#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL) +# define LZO_MM_LARGE 1 +#elif (LZO_CC_AZTECC) +# if defined(_LARGE_CODE) && defined(_LARGE_DATA) +# define LZO_MM_LARGE 1 +# elif defined(_LARGE_CODE) +# define LZO_MM_MEDIUM 1 +# elif defined(_LARGE_DATA) +# define LZO_MM_COMPACT 1 +# else +# define LZO_MM_SMALL 1 +# endif +#elif (LZO_CC_ZORTECHC && defined(__VCM__)) +# define LZO_MM_LARGE 1 +#else +# error "unknown memory model" +#endif +#define LZO_HAVE_MM_HUGE_PTR 1 +#define LZO_HAVE_MM_HUGE_ARRAY 1 +#if (LZO_MM_TINY) +# undef LZO_HAVE_MM_HUGE_ARRAY +#endif +#if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC) +# undef LZO_HAVE_MM_HUGE_PTR +# undef LZO_HAVE_MM_HUGE_ARRAY +#elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +# undef LZO_HAVE_MM_HUGE_ARRAY +#elif (LZO_CC_MSC && defined(_QC)) +# undef LZO_HAVE_MM_HUGE_ARRAY +# if (_MSC_VER < 600) +# undef LZO_HAVE_MM_HUGE_PTR +# endif +#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) +# undef LZO_HAVE_MM_HUGE_ARRAY +#endif +#if (LZO_ARCH_I086PM) && !defined(LZO_HAVE_MM_HUGE_PTR) +# if (LZO_OS_DOS16) +# error "this should not happen" +# elif (LZO_CC_ZORTECHC) +# else +# error "this should not happen" +# endif +#endif +#ifdef __cplusplus +extern "C" { +#endif +#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295)) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16) +# define LZO_MM_AHSHIFT 12 +#elif (LZO_CC_WATCOMC) + extern unsigned char _HShift; +# define LZO_MM_AHSHIFT ((unsigned) _HShift) +#else +# error "FIXME - implement LZO_MM_AHSHIFT" +#endif +#ifdef __cplusplus +} +#endif +#elif (LZO_ARCH_C166) +#if !defined(__MODEL__) +# error "FIXME - C166 __MODEL__" +#elif ((__MODEL__) == 0) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 1) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - C166 __MODEL__" +#endif +#elif (LZO_ARCH_MCS251) +#if !defined(__MODEL__) +# error "FIXME - MCS251 __MODEL__" +#elif ((__MODEL__) == 0) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - MCS251 __MODEL__" +#endif +#elif (LZO_ARCH_MCS51) +#if !defined(__MODEL__) +# error "FIXME - MCS51 __MODEL__" +#elif ((__MODEL__) == 1) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - MCS51 __MODEL__" +#endif +#else +# define LZO_MM_FLAT 1 +#endif +#if (LZO_MM_FLAT) +# define LZO_INFO_MM "flat" +#elif (LZO_MM_TINY) +# define LZO_INFO_MM "tiny" +#elif (LZO_MM_SMALL) +# define LZO_INFO_MM "small" +#elif (LZO_MM_MEDIUM) +# define LZO_INFO_MM "medium" +#elif (LZO_MM_COMPACT) +# define LZO_INFO_MM "compact" +#elif (LZO_MM_LARGE) +# define LZO_INFO_MM "large" +#elif (LZO_MM_HUGE) +# define LZO_INFO_MM "huge" +#else +# error "unknown memory model" +#endif +#endif +#if defined(SIZEOF_SHORT) +# define LZO_SIZEOF_SHORT (SIZEOF_SHORT) +#endif +#if defined(SIZEOF_INT) +# define LZO_SIZEOF_INT (SIZEOF_INT) +#endif +#if defined(SIZEOF_LONG) +# define LZO_SIZEOF_LONG (SIZEOF_LONG) +#endif +#if defined(SIZEOF_LONG_LONG) +# define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) +#endif +#if defined(SIZEOF___INT16) +# define LZO_SIZEOF___INT16 (SIZEOF___INT16) +#endif +#if defined(SIZEOF___INT32) +# define LZO_SIZEOF___INT32 (SIZEOF___INT32) +#endif +#if defined(SIZEOF___INT64) +# define LZO_SIZEOF___INT64 (SIZEOF___INT64) +#endif +#if defined(SIZEOF_VOID_P) +# define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P) +#endif +#if defined(SIZEOF_SIZE_T) +# define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T) +#endif +#if defined(SIZEOF_PTRDIFF_T) +# define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) +#endif +#define __LZO_LSR(x,b) (((x)+0ul) >> (b)) +#if !defined(LZO_SIZEOF_SHORT) +# if (USHRT_MAX == LZO_0xffffL) +# define LZO_SIZEOF_SHORT 2 +# elif (__LZO_LSR(USHRT_MAX,7) == 1) +# define LZO_SIZEOF_SHORT 1 +# elif (__LZO_LSR(USHRT_MAX,15) == 1) +# define LZO_SIZEOF_SHORT 2 +# elif (__LZO_LSR(USHRT_MAX,31) == 1) +# define LZO_SIZEOF_SHORT 4 +# elif (__LZO_LSR(USHRT_MAX,63) == 1) +# define LZO_SIZEOF_SHORT 8 +# elif (__LZO_LSR(USHRT_MAX,127) == 1) +# define LZO_SIZEOF_SHORT 16 +# else +# error "LZO_SIZEOF_SHORT" +# endif +#endif +#if !defined(LZO_SIZEOF_INT) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_SIZEOF_INT 2 +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_SIZEOF_INT 4 +# elif (__LZO_LSR(UINT_MAX,7) == 1) +# define LZO_SIZEOF_INT 1 +# elif (__LZO_LSR(UINT_MAX,15) == 1) +# define LZO_SIZEOF_INT 2 +# elif (__LZO_LSR(UINT_MAX,31) == 1) +# define LZO_SIZEOF_INT 4 +# elif (__LZO_LSR(UINT_MAX,63) == 1) +# define LZO_SIZEOF_INT 8 +# elif (__LZO_LSR(UINT_MAX,127) == 1) +# define LZO_SIZEOF_INT 16 +# else +# error "LZO_SIZEOF_INT" +# endif +#endif +#if !defined(LZO_SIZEOF_LONG) +# if (ULONG_MAX == LZO_0xffffffffL) +# define LZO_SIZEOF_LONG 4 +# elif (__LZO_LSR(ULONG_MAX,7) == 1) +# define LZO_SIZEOF_LONG 1 +# elif (__LZO_LSR(ULONG_MAX,15) == 1) +# define LZO_SIZEOF_LONG 2 +# elif (__LZO_LSR(ULONG_MAX,31) == 1) +# define LZO_SIZEOF_LONG 4 +# elif (__LZO_LSR(ULONG_MAX,63) == 1) +# define LZO_SIZEOF_LONG 8 +# elif (__LZO_LSR(ULONG_MAX,127) == 1) +# define LZO_SIZEOF_LONG 16 +# else +# error "LZO_SIZEOF_LONG" +# endif +#endif +#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +# if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) +# if (LZO_CC_GNUC >= 0x030300ul) +# if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0) +# define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG +# endif +# endif +# endif +#endif +#endif +#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +#if (LZO_ARCH_I086 && LZO_CC_DMC) +#elif (LZO_CC_CILLY) && defined(__GNUC__) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define LZO_SIZEOF_LONG_LONG 8 +#elif ((LZO_OS_WIN32 || LZO_OS_WIN64) && LZO_CC_MSC && (_MSC_VER >= 1400)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_OS_WIN64) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_DMC)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700))) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__))) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_OS_WIN32 && (LZO_CC_MSC)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520))) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100))) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_OS_OS400) && defined(__LLP64_IFC__) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2) +#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +# define LZO_SIZEOF_LONG_LONG 8 +#endif +#endif +#endif +#if defined(__cplusplus) && defined(LZO_CC_GNUC) +# if (LZO_CC_GNUC < 0x020800ul) +# undef LZO_SIZEOF_LONG_LONG +# endif +#endif +#if defined(LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG) +# undef LZO_SIZEOF_LONG_LONG +#endif +#if !defined(LZO_SIZEOF_VOID_P) +#if (LZO_ARCH_I086) +# define __LZO_WORDSIZE 2 +# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) +# define LZO_SIZEOF_VOID_P 2 +# elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) +# define LZO_SIZEOF_VOID_P 4 +# else +# error "LZO_MM" +# endif +#elif (LZO_ARCH_AVR || LZO_ARCH_Z80) +# define __LZO_WORDSIZE 1 +# define LZO_SIZEOF_VOID_P 2 +#elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430) +# define LZO_SIZEOF_VOID_P 2 +#elif (LZO_ARCH_H8300) +# if defined(__NORMAL_MODE__) +# define __LZO_WORDSIZE 4 +# define LZO_SIZEOF_VOID_P 2 +# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +# define __LZO_WORDSIZE 4 +# define LZO_SIZEOF_VOID_P 4 +# else +# define __LZO_WORDSIZE 2 +# define LZO_SIZEOF_VOID_P 2 +# endif +# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4) +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT +# endif +#elif (LZO_ARCH_M16C) +# define __LZO_WORDSIZE 2 +# if defined(__m32c_cpu__) || defined(__m32cm_cpu__) +# define LZO_SIZEOF_VOID_P 4 +# else +# define LZO_SIZEOF_VOID_P 2 +# endif +#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +# define __LZO_WORDSIZE 8 +# define LZO_SIZEOF_VOID_P 4 +#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) +# define __LZO_WORDSIZE 8 +# define LZO_SIZEOF_VOID_P 8 +#elif (LZO_OS_OS400) && defined(__LLP64_IFC__) +# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#elif (LZO_OS_OS400) +# define __LZO_WORDSIZE LZO_SIZEOF_LONG +# define LZO_SIZEOF_VOID_P 16 +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +# define LZO_SIZEOF_VOID_P 8 +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#else +# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +#endif +#endif +#if !defined(LZO_WORDSIZE) +# if defined(__LZO_WORDSIZE) +# define LZO_WORDSIZE __LZO_WORDSIZE +# else +# define LZO_WORDSIZE LZO_SIZEOF_VOID_P +# endif +#endif +#if !defined(LZO_SIZEOF_SIZE_T) +#if (LZO_ARCH_I086 || LZO_ARCH_M16C) +# define LZO_SIZEOF_SIZE_T 2 +#else +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P +#endif +#endif +#if !defined(LZO_SIZEOF_PTRDIFF_T) +#if (LZO_ARCH_I086) +# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE) +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P +# elif (LZO_MM_COMPACT || LZO_MM_LARGE) +# if (LZO_CC_BORLANDC || LZO_CC_TURBOC) +# define LZO_SIZEOF_PTRDIFF_T 4 +# else +# define LZO_SIZEOF_PTRDIFF_T 2 +# endif +# else +# error "LZO_MM" +# endif +#else +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T +#endif +#endif +#if !defined(LZO_ABI_BIG_ENDIAN) && !defined(LZO_ABI_LITTLE_ENDIAN) && !defined(LZO_ABI_NEUTRAL_ENDIAN) +#if (LZO_ARCH_AMD64 || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430) +# define LZO_ABI_LITTLE_ENDIAN 1 +#elif (LZO_ARCH_M68K || LZO_ARCH_S390) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) +# define LZO_ABI_LITTLE_ENDIAN 1 +#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) +# define LZO_ABI_LITTLE_ENDIAN 1 +#endif +#endif +#if defined(LZO_ABI_BIG_ENDIAN) && defined(LZO_ABI_LITTLE_ENDIAN) +# error "this should not happen" +#endif +#if defined(LZO_ABI_BIG_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "be" +#elif defined(LZO_ABI_LITTLE_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "le" +#elif defined(LZO_ABI_NEUTRAL_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "neutral" +#endif +#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +# define LZO_ABI_I8LP16 1 +# define LZO_INFO_ABI_PM "i8lp16" +#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +# define LZO_ABI_ILP16 1 +# define LZO_INFO_ABI_PM "ilp16" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) +# define LZO_ABI_ILP32 1 +# define LZO_INFO_ABI_PM "ilp32" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8) +# define LZO_ABI_LLP64 1 +# define LZO_INFO_ABI_PM "llp64" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +# define LZO_ABI_LP64 1 +# define LZO_INFO_ABI_PM "lp64" +#elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +# define LZO_ABI_ILP64 1 +# define LZO_INFO_ABI_PM "ilp64" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4) +# define LZO_ABI_IP32L64 1 +# define LZO_INFO_ABI_PM "ip32l64" +#endif +#if !defined(__LZO_LIBC_OVERRIDE) +#if defined(LZO_LIBC_NAKED) +# define LZO_INFO_LIBC "naked" +#elif defined(LZO_LIBC_FREESTANDING) +# define LZO_INFO_LIBC "freestanding" +#elif defined(LZO_LIBC_MOSTLY_FREESTANDING) +# define LZO_INFO_LIBC "mfreestanding" +#elif defined(LZO_LIBC_ISOC90) +# define LZO_INFO_LIBC "isoc90" +#elif defined(LZO_LIBC_ISOC99) +# define LZO_INFO_LIBC "isoc99" +#elif defined(__dietlibc__) +# define LZO_LIBC_DIETLIBC 1 +# define LZO_INFO_LIBC "dietlibc" +#elif defined(_NEWLIB_VERSION) +# define LZO_LIBC_NEWLIB 1 +# define LZO_INFO_LIBC "newlib" +#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) +# if defined(__UCLIBC_SUBLEVEL__) +# define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__) +# else +# define LZO_LIBC_UCLIBC 0x00090bL +# endif +# define LZO_INFO_LIBC "uclibc" +#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) +# define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100) +# define LZO_INFO_LIBC "glibc" +#elif (LZO_CC_MWERKS) && defined(__MSL__) +# define LZO_LIBC_MSL __MSL__ +# define LZO_INFO_LIBC "msl" +#else +# define LZO_LIBC_DEFAULT 1 +# define LZO_INFO_LIBC "default" +#endif +#endif +#if (LZO_CC_GNUC >= 0x020800ul) +# define __lzo_gnuc_extension__ __extension__ +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_gnuc_extension__ __extension__ +#else +# define __lzo_gnuc_extension__ +#endif +#if (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +# define lzo_alignof(e) __alignof__(e) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) +# define lzo_alignof(e) __alignof__(e) +#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +# define lzo_alignof(e) __alignof(e) +#endif +#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295)) +#elif defined(__cplusplus) +# define __lzo_inline inline +#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) +# define __lzo_inline __inline +#elif (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +# define __lzo_inline __inline__ +#elif (LZO_CC_DMC) +# define __lzo_inline __inline +#elif (LZO_CC_INTELC) +# define __lzo_inline __inline +#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405)) +# define __lzo_inline __inline +#elif (LZO_CC_MSC && (_MSC_VER >= 900)) +# define __lzo_inline __inline +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +# define __lzo_inline inline +#endif +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# define __lzo_forceinline __forceinline +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +# define __lzo_forceinline __forceinline +#endif +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# define __lzo_noinline __declspec(noinline) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +# define __lzo_noinline __declspec(noinline) +#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# if defined(__cplusplus) +# else +# define __lzo_noinline __declspec(noinline) +# endif +#endif +#if (defined(__lzo_forceinline) || defined(__lzo_noinline)) && !defined(__lzo_inline) +# error "this should not happen" +#endif +#if (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# define __lzo_noreturn __declspec(noreturn) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && (LZO_OS_POSIX)) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +# define __lzo_noreturn __declspec(noreturn) +#endif +#if (LZO_CC_GNUC >= 0x030400ul) +# define __lzo_constructor __attribute__((__constructor__,__used__)) +#elif (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_constructor __attribute__((__constructor__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_constructor __attribute__((__constructor__)) +#endif +#if (LZO_CC_GNUC >= 0x030400ul) +# define __lzo_destructor __attribute__((__destructor__,__used__)) +#elif (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_destructor __attribute__((__destructor__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_destructor __attribute__((__destructor__)) +#endif +#if defined(__lzo_destructor) && !defined(__lzo_constructor) +# error "this should not happen" +#endif +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#else +# define __lzo_likely(e) (e) +# define __lzo_unlikely(e) (e) +#endif +#if !defined(LZO_UNUSED) +# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +# define LZO_UNUSED(var) ((void) &var) +# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) +# define LZO_UNUSED(var) if (&var) ; else +# elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define LZO_UNUSED(var) ((void) var) +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_UNUSED(var) if (&var) ; else +# elif (LZO_CC_KEILC) +# define LZO_UNUSED(var) {extern int __lzo_unused[1-2*!(sizeof(var)>0)];} +# elif (LZO_CC_PACIFICC) +# define LZO_UNUSED(var) ((void) sizeof(var)) +# elif (LZO_CC_WATCOMC) && defined(__cplusplus) +# define LZO_UNUSED(var) ((void) var) +# else +# define LZO_UNUSED(var) ((void) &var) +# endif +#endif +#if !defined(LZO_UNUSED_FUNC) +# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +# define LZO_UNUSED_FUNC(func) ((void) func) +# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) +# define LZO_UNUSED_FUNC(func) if (func) ; else +# elif (LZO_CC_LLVM) +# define LZO_UNUSED_FUNC(func) ((void) &func) +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_UNUSED_FUNC(func) if (func) ; else +# elif (LZO_CC_MSC) +# define LZO_UNUSED_FUNC(func) ((void) &func) +# elif (LZO_CC_KEILC || LZO_CC_PELLESC) +# define LZO_UNUSED_FUNC(func) {extern int __lzo_unused[1-2*!(sizeof((int)func)>0)];} +# else +# define LZO_UNUSED_FUNC(func) ((void) func) +# endif +#endif +#if !defined(LZO_UNUSED_LABEL) +# if (LZO_CC_WATCOMC) && defined(__cplusplus) +# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +# elif (LZO_CC_INTELC || LZO_CC_WATCOMC) +# define LZO_UNUSED_LABEL(l) if (0) goto l +# else +# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +# endif +#endif +#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) +# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +# elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1u-2*!(e)]; +# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +# else +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-2*!(e)]; +# endif +#endif +#if !defined(LZO_COMPILE_TIME_ASSERT) +# if (LZO_CC_AZTECC) +# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-!(e)];} +# elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# else +# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-2*!(e)];} +# endif +#endif +#if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) +# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +# define __lzo_cdecl __cdecl +# define __lzo_cdecl_atexit +# define __lzo_cdecl_main __cdecl +# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +# define __lzo_cdecl_qsort __pascal +# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +# define __lzo_cdecl_qsort _stdcall +# else +# define __lzo_cdecl_qsort __cdecl +# endif +# elif (LZO_CC_WATCOMC) +# define __lzo_cdecl __cdecl +# else +# define __lzo_cdecl __cdecl +# define __lzo_cdecl_atexit __cdecl +# define __lzo_cdecl_main __cdecl +# define __lzo_cdecl_qsort __cdecl +# endif +# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC) +# elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +# define __lzo_cdecl_sighandler __pascal +# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +# define __lzo_cdecl_sighandler _stdcall +# elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) +# define __lzo_cdecl_sighandler __clrcall +# elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) +# if defined(_DLL) +# define __lzo_cdecl_sighandler _far _cdecl _loadds +# elif defined(_MT) +# define __lzo_cdecl_sighandler _far _cdecl +# else +# define __lzo_cdecl_sighandler _cdecl +# endif +# else +# define __lzo_cdecl_sighandler __cdecl +# endif +#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) +# define __lzo_cdecl cdecl +#endif +#if !defined(__lzo_cdecl) +# define __lzo_cdecl +#endif +#if !defined(__lzo_cdecl_atexit) +# define __lzo_cdecl_atexit +#endif +#if !defined(__lzo_cdecl_main) +# define __lzo_cdecl_main +#endif +#if !defined(__lzo_cdecl_qsort) +# define __lzo_cdecl_qsort +#endif +#if !defined(__lzo_cdecl_sighandler) +# define __lzo_cdecl_sighandler +#endif +#if !defined(__lzo_cdecl_va) +# define __lzo_cdecl_va __lzo_cdecl +#endif +#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) +# elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) +# elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) +# else +# define LZO_HAVE_WINDOWS_H 1 +# endif +#endif +#if (LZO_ARCH_ALPHA) +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_AVOID_SHORT 1 +# define LZO_OPT_AVOID_USHORT 1 +#elif (LZO_ARCH_AMD64) +# define LZO_OPT_AVOID_INT_INDEX 1 +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# define LZO_OPT_UNALIGNED64 1 +#elif (LZO_ARCH_ARM && LZO_ARCH_ARM_THUMB) +#elif (LZO_ARCH_ARM) +# define LZO_OPT_AVOID_SHORT 1 +# define LZO_OPT_AVOID_USHORT 1 +#elif (LZO_ARCH_CRIS) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +#elif (LZO_ARCH_I386) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +#elif (LZO_ARCH_IA64) +# define LZO_OPT_AVOID_INT_INDEX 1 +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_PREFER_POSTINC 1 +#elif (LZO_ARCH_M68K) +# define LZO_OPT_PREFER_POSTINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +# if defined(__mc68020__) && !defined(__mcoldfire__) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# endif +#elif (LZO_ARCH_MIPS) +# define LZO_OPT_AVOID_UINT_INDEX 1 +#elif (LZO_ARCH_POWERPC) +# define LZO_OPT_PREFER_PREINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +# if defined(LZO_ABI_BIG_ENDIAN) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# endif +#elif (LZO_ARCH_S390) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# if (LZO_SIZEOF_SIZE_T == 8) +# define LZO_OPT_UNALIGNED64 1 +# endif +#elif (LZO_ARCH_SH) +# define LZO_OPT_PREFER_POSTINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +#endif +#if !defined(LZO_CFG_NO_INLINE_ASM) +#if defined(LZO_CC_LLVM) +# define LZO_CFG_NO_INLINE_ASM 1 +#endif +#endif +#if !defined(LZO_CFG_NO_UNALIGNED) +#if defined(LZO_ABI_NEUTRAL_ENDIAN) || defined(LZO_ARCH_GENERIC) +# define LZO_CFG_NO_UNALIGNED 1 +#endif +#endif +#if defined(LZO_CFG_NO_UNALIGNED) +# undef LZO_OPT_UNALIGNED16 +# undef LZO_OPT_UNALIGNED32 +# undef LZO_OPT_UNALIGNED64 +#endif +#if defined(LZO_CFG_NO_INLINE_ASM) +#elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +# define LZO_ASM_SYNTAX_MSC 1 +#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +#elif (LZO_ARCH_I386 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +# define LZO_ASM_SYNTAX_GNUC 1 +#elif (LZO_ARCH_AMD64 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +# define LZO_ASM_SYNTAX_GNUC 1 +#endif +#if (LZO_ASM_SYNTAX_GNUC) +#if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) +# define __LZO_ASM_CLOBBER "ax" +#elif (LZO_CC_INTELC) +# define __LZO_ASM_CLOBBER "memory" +#else +# define __LZO_ASM_CLOBBER "cc", "memory" +#endif +#endif +#if defined(__LZO_INFOSTR_MM) +#elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM)) +# define __LZO_INFOSTR_MM "" +#elif defined(LZO_INFO_MM) +# define __LZO_INFOSTR_MM "." LZO_INFO_MM +#else +# define __LZO_INFOSTR_MM "" +#endif +#if defined(__LZO_INFOSTR_PM) +#elif defined(LZO_INFO_ABI_PM) +# define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM +#else +# define __LZO_INFOSTR_PM "" +#endif +#if defined(__LZO_INFOSTR_ENDIAN) +#elif defined(LZO_INFO_ABI_ENDIAN) +# define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN +#else +# define __LZO_INFOSTR_ENDIAN "" +#endif +#if defined(__LZO_INFOSTR_OSNAME) +#elif defined(LZO_INFO_OS_CONSOLE) +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE +#elif defined(LZO_INFO_OS_POSIX) +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX +#else +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS +#endif +#if defined(__LZO_INFOSTR_LIBC) +#elif defined(LZO_INFO_LIBC) +# define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC +#else +# define __LZO_INFOSTR_LIBC "" +#endif +#if defined(__LZO_INFOSTR_CCVER) +#elif defined(LZO_INFO_CCVER) +# define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER +#else +# define __LZO_INFOSTR_CCVER "" +#endif +#define LZO_INFO_STRING \ + LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \ + " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER + +#endif + +#endif + +#undef LZO_HAVE_CONFIG_H +#include "minilzo.h" + +#if !defined(MINILZO_VERSION) || (MINILZO_VERSION != 0x2020) +# error "version mismatch in miniLZO source files" +#endif + +#ifdef MINILZO_HAVE_CONFIG_H +# define LZO_HAVE_CONFIG_H +#endif + +#ifndef __LZO_CONF_H +#define __LZO_CONF_H + +#if !defined(__LZO_IN_MINILZO) +#if defined(LZO_CFG_FREESTANDING) +# define LZO_LIBC_FREESTANDING 1 +# define LZO_OS_FREESTANDING 1 +# define ACC_LIBC_FREESTANDING 1 +# define ACC_OS_FREESTANDING 1 +#endif +#if defined(LZO_CFG_NO_UNALIGNED) +# define ACC_CFG_NO_UNALIGNED 1 +#endif +#if defined(LZO_HAVE_CONFIG_H) +# define ACC_CONFIG_NO_HEADER 1 +#endif +#if defined(__LZOCONF_H) || defined(__LZOCONF_H_INCLUDED) +# error "include this file first" +#endif +#include "lzo/lzoconf.h" +#endif + +#if (LZO_VERSION < 0x02000) || !defined(__LZOCONF_H_INCLUDED) +# error "version mismatch" +#endif + +#if (LZO_CC_BORLANDC && LZO_ARCH_I086) +# pragma option -h +#endif + +#if (LZO_CC_MSC && (_MSC_VER >= 1000)) +# pragma warning(disable: 4127 4701) +#endif +#if (LZO_CC_MSC && (_MSC_VER >= 1300)) +# pragma warning(disable: 4820) +# pragma warning(disable: 4514 4710 4711) +#endif + +#if defined(__LZO_MMODEL_HUGE) && (!LZO_HAVE_MM_HUGE_PTR) +# error "this should not happen - check defines for __huge" +#endif + +#if defined(__LZO_IN_MINILZO) || defined(LZO_CFG_FREESTANDING) +#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +# define ACC_WANT_ACC_INCD_H 1 +# define ACC_WANT_ACC_INCE_H 1 +# define ACC_WANT_ACC_INCI_H 1 +#elif 1 +# include +#else +# define ACC_WANT_ACC_INCD_H 1 +#endif + +#if (LZO_ARCH_I086) +# define ACC_MM_AHSHIFT LZO_MM_AHSHIFT +# define ACC_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0]) +# define ACC_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1]) +# define ACC_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o))) +#endif + +#if !defined(lzo_uintptr_t) +# if defined(__LZO_MMODEL_HUGE) +# define lzo_uintptr_t unsigned long +# elif 1 && defined(LZO_OS_OS400) && (LZO_SIZEOF_VOID_P == 16) +# define __LZO_UINTPTR_T_IS_POINTER 1 + typedef char* lzo_uintptr_t; +# define lzo_uintptr_t lzo_uintptr_t +# elif (LZO_SIZEOF_SIZE_T == LZO_SIZEOF_VOID_P) +# define lzo_uintptr_t size_t +# elif (LZO_SIZEOF_LONG == LZO_SIZEOF_VOID_P) +# define lzo_uintptr_t unsigned long +# elif (LZO_SIZEOF_INT == LZO_SIZEOF_VOID_P) +# define lzo_uintptr_t unsigned int +# elif (LZO_SIZEOF_LONG_LONG == LZO_SIZEOF_VOID_P) +# define lzo_uintptr_t unsigned long long +# else +# define lzo_uintptr_t size_t +# endif +#endif +LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uintptr_t) >= sizeof(lzo_voidp)) + +#if 1 && !defined(LZO_CFG_FREESTANDING) +#if 1 && !defined(HAVE_STRING_H) +#define HAVE_STRING_H 1 +#endif +#if 1 && !defined(HAVE_MEMCMP) +#define HAVE_MEMCMP 1 +#endif +#if 1 && !defined(HAVE_MEMCPY) +#define HAVE_MEMCPY 1 +#endif +#if 1 && !defined(HAVE_MEMMOVE) +#define HAVE_MEMMOVE 1 +#endif +#if 1 && !defined(HAVE_MEMSET) +#define HAVE_MEMSET 1 +#endif +#endif + +#if 1 && defined(HAVE_STRING_H) +#include +#endif + +#if defined(LZO_CFG_FREESTANDING) +# undef HAVE_MEMCMP +# undef HAVE_MEMCPY +# undef HAVE_MEMMOVE +# undef HAVE_MEMSET +#endif + +#if !defined(HAVE_MEMCMP) +# undef memcmp +# define memcmp(a,b,c) lzo_memcmp(a,b,c) +#elif !defined(__LZO_MMODEL_HUGE) +# define lzo_memcmp(a,b,c) memcmp(a,b,c) +#endif +#if !defined(HAVE_MEMCPY) +# undef memcpy +# define memcpy(a,b,c) lzo_memcpy(a,b,c) +#elif !defined(__LZO_MMODEL_HUGE) +# define lzo_memcpy(a,b,c) memcpy(a,b,c) +#endif +#if !defined(HAVE_MEMMOVE) +# undef memmove +# define memmove(a,b,c) lzo_memmove(a,b,c) +#elif !defined(__LZO_MMODEL_HUGE) +# define lzo_memmove(a,b,c) memmove(a,b,c) +#endif +#if !defined(HAVE_MEMSET) +# undef memset +# define memset(a,b,c) lzo_memset(a,b,c) +#elif !defined(__LZO_MMODEL_HUGE) +# define lzo_memset(a,b,c) memset(a,b,c) +#endif + +#undef NDEBUG +#if defined(LZO_CFG_FREESTANDING) +# undef LZO_DEBUG +# define NDEBUG 1 +# undef assert +# define assert(e) ((void)0) +#else +# if !defined(LZO_DEBUG) +# define NDEBUG 1 +# endif +# include +#endif + +#if 0 && defined(__BOUNDS_CHECKING_ON) +# include +#else +# define BOUNDS_CHECKING_OFF_DURING(stmt) stmt +# define BOUNDS_CHECKING_OFF_IN_EXPR(expr) (expr) +#endif + +#if !defined(__lzo_inline) +# define __lzo_inline +#endif +#if !defined(__lzo_forceinline) +# define __lzo_forceinline +#endif +#if !defined(__lzo_noinline) +# define __lzo_noinline +#endif + +#if 1 +# define LZO_BYTE(x) ((unsigned char) (x)) +#else +# define LZO_BYTE(x) ((unsigned char) ((x) & 0xff)) +#endif + +#define LZO_MAX(a,b) ((a) >= (b) ? (a) : (b)) +#define LZO_MIN(a,b) ((a) <= (b) ? (a) : (b)) +#define LZO_MAX3(a,b,c) ((a) >= (b) ? LZO_MAX(a,c) : LZO_MAX(b,c)) +#define LZO_MIN3(a,b,c) ((a) <= (b) ? LZO_MIN(a,c) : LZO_MIN(b,c)) + +#define lzo_sizeof(type) ((lzo_uint) (sizeof(type))) + +#define LZO_HIGH(array) ((lzo_uint) (sizeof(array)/sizeof(*(array)))) + +#define LZO_SIZE(bits) (1u << (bits)) +#define LZO_MASK(bits) (LZO_SIZE(bits) - 1) + +#define LZO_LSIZE(bits) (1ul << (bits)) +#define LZO_LMASK(bits) (LZO_LSIZE(bits) - 1) + +#define LZO_USIZE(bits) ((lzo_uint) 1 << (bits)) +#define LZO_UMASK(bits) (LZO_USIZE(bits) - 1) + +#if !defined(DMUL) +#if 0 + +# define DMUL(a,b) ((lzo_xint) ((lzo_uint32)(a) * (lzo_uint32)(b))) +#else +# define DMUL(a,b) ((lzo_xint) ((a) * (b))) +#endif +#endif + +#if 1 && !defined(LZO_CFG_NO_UNALIGNED) +#if 1 && (LZO_ARCH_AMD64 || LZO_ARCH_I386) +# if (LZO_SIZEOF_SHORT == 2) +# define LZO_UNALIGNED_OK_2 +# endif +# if (LZO_SIZEOF_INT == 4) +# define LZO_UNALIGNED_OK_4 +# endif +#endif +#endif + +#if defined(LZO_UNALIGNED_OK_2) + LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(short) == 2) +#endif +#if defined(LZO_UNALIGNED_OK_4) + LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4) +#elif defined(LZO_ALIGNED_OK_4) + LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4) +#endif + +#define MEMCPY8_DS(dest,src,len) \ + lzo_memcpy(dest,src,len); dest += len; src += len + +#define BZERO8_PTR(s,l,n) \ + lzo_memset((lzo_voidp)(s),0,(lzo_uint)(l)*(n)) + +#define MEMCPY_DS(dest,src,len) \ + do *dest++ = *src++; while (--len > 0) + +__LZO_EXTERN_C int __lzo_init_done; +__LZO_EXTERN_C const char __lzo_copyright[]; +LZO_EXTERN(const lzo_bytep) lzo_copyright(void); + +#ifndef __LZO_PTR_H +#define __LZO_PTR_H + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(lzo_uintptr_t) +# if defined(__LZO_MMODEL_HUGE) +# define lzo_uintptr_t unsigned long +# else +# define lzo_uintptr_t acc_uintptr_t +# ifdef __ACC_INTPTR_T_IS_POINTER +# define __LZO_UINTPTR_T_IS_POINTER 1 +# endif +# endif +#endif + +#if (LZO_ARCH_I086) +#define PTR(a) ((lzo_bytep) (a)) +#define PTR_ALIGNED_4(a) ((ACC_PTR_FP_OFF(a) & 3) == 0) +#define PTR_ALIGNED2_4(a,b) (((ACC_PTR_FP_OFF(a) | ACC_PTR_FP_OFF(b)) & 3) == 0) +#else +#define PTR(a) ((lzo_uintptr_t) (a)) +#define PTR_LINEAR(a) PTR(a) +#define PTR_ALIGNED_4(a) ((PTR_LINEAR(a) & 3) == 0) +#define PTR_ALIGNED_8(a) ((PTR_LINEAR(a) & 7) == 0) +#define PTR_ALIGNED2_4(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 3) == 0) +#define PTR_ALIGNED2_8(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 7) == 0) +#endif + +#define PTR_LT(a,b) (PTR(a) < PTR(b)) +#define PTR_GE(a,b) (PTR(a) >= PTR(b)) +#define PTR_DIFF(a,b) (PTR(a) - PTR(b)) +#define pd(a,b) ((lzo_uint) ((a)-(b))) + +LZO_EXTERN(lzo_uintptr_t) +__lzo_ptr_linear(const lzo_voidp ptr); + +typedef union +{ + char a_char; + unsigned char a_uchar; + short a_short; + unsigned short a_ushort; + int a_int; + unsigned int a_uint; + long a_long; + unsigned long a_ulong; + lzo_int a_lzo_int; + lzo_uint a_lzo_uint; + lzo_int32 a_lzo_int32; + lzo_uint32 a_lzo_uint32; + ptrdiff_t a_ptrdiff_t; + lzo_uintptr_t a_lzo_uintptr_t; + lzo_voidp a_lzo_voidp; + void * a_void_p; + lzo_bytep a_lzo_bytep; + lzo_bytepp a_lzo_bytepp; + lzo_uintp a_lzo_uintp; + lzo_uint * a_lzo_uint_p; + lzo_uint32p a_lzo_uint32p; + lzo_uint32 * a_lzo_uint32_p; + unsigned char * a_uchar_p; + char * a_char_p; +} +lzo_full_align_t; + +#ifdef __cplusplus +} +#endif + +#endif + +#define LZO_DETERMINISTIC + +#define LZO_DICT_USE_PTR +#if 0 && (LZO_ARCH_I086) +# undef LZO_DICT_USE_PTR +#endif + +#if defined(LZO_DICT_USE_PTR) +# define lzo_dict_t const lzo_bytep +# define lzo_dict_p lzo_dict_t __LZO_MMODEL * +#else +# define lzo_dict_t lzo_uint +# define lzo_dict_p lzo_dict_t __LZO_MMODEL * +#endif + +#endif + +#if !defined(MINILZO_CFG_SKIP_LZO_PTR) + +LZO_PUBLIC(lzo_uintptr_t) +__lzo_ptr_linear(const lzo_voidp ptr) +{ + lzo_uintptr_t p; + +#if (LZO_ARCH_I086) + p = (((lzo_uintptr_t)(ACC_PTR_FP_SEG(ptr))) << (16 - ACC_MM_AHSHIFT)) + (ACC_PTR_FP_OFF(ptr)); +#else + p = (lzo_uintptr_t) PTR_LINEAR(ptr); +#endif + + return p; +} + +LZO_PUBLIC(unsigned) +__lzo_align_gap(const lzo_voidp ptr, lzo_uint size) +{ +#if defined(__LZO_UINTPTR_T_IS_POINTER) + size_t n = (size_t) ptr; + n = (((n + size - 1) / size) * size) - n; +#else + lzo_uintptr_t p, n; + p = __lzo_ptr_linear(ptr); + n = (((p + size - 1) / size) * size) - p; +#endif + + assert(size > 0); + assert((long)n >= 0); + assert(n <= s); + return (unsigned)n; +} + +#endif + +/* If you use the LZO library in a product, you *must* keep this + * copyright string in the executable of your product. + */ + +const char __lzo_copyright[] = +#if !defined(__LZO_IN_MINLZO) + LZO_VERSION_STRING; +#else + "\r\n\n" + "LZO data compression library.\n" + "$Copyright: LZO (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Markus Franz Xaver Johannes Oberhumer\n" + "\n" + "http://www.oberhumer.com $\n\n" + "$Id: LZO version: v" LZO_VERSION_STRING ", " LZO_VERSION_DATE " $\n" + "$Built: " __DATE__ " " __TIME__ " $\n" + "$Info: " LZO_INFO_STRING " $\n"; +#endif + +LZO_PUBLIC(const lzo_bytep) +lzo_copyright(void) +{ +#if (LZO_OS_DOS16 && LZO_CC_TURBOC) + return (lzo_voidp) __lzo_copyright; +#else + return (const lzo_bytep) __lzo_copyright; +#endif +} + +LZO_PUBLIC(unsigned) +lzo_version(void) +{ + return LZO_VERSION; +} + +LZO_PUBLIC(const char *) +lzo_version_string(void) +{ + return LZO_VERSION_STRING; +} + +LZO_PUBLIC(const char *) +lzo_version_date(void) +{ + return LZO_VERSION_DATE; +} + +LZO_PUBLIC(const lzo_charp) +_lzo_version_string(void) +{ + return LZO_VERSION_STRING; +} + +LZO_PUBLIC(const lzo_charp) +_lzo_version_date(void) +{ + return LZO_VERSION_DATE; +} + +#define LZO_BASE 65521u +#define LZO_NMAX 5552 + +#define LZO_DO1(buf,i) s1 += buf[i]; s2 += s1 +#define LZO_DO2(buf,i) LZO_DO1(buf,i); LZO_DO1(buf,i+1); +#define LZO_DO4(buf,i) LZO_DO2(buf,i); LZO_DO2(buf,i+2); +#define LZO_DO8(buf,i) LZO_DO4(buf,i); LZO_DO4(buf,i+4); +#define LZO_DO16(buf,i) LZO_DO8(buf,i); LZO_DO8(buf,i+8); + +LZO_PUBLIC(lzo_uint32) +lzo_adler32(lzo_uint32 adler, const lzo_bytep buf, lzo_uint len) +{ + lzo_uint32 s1 = adler & 0xffff; + lzo_uint32 s2 = (adler >> 16) & 0xffff; + unsigned k; + + if (buf == NULL) + return 1; + + while (len > 0) + { + k = len < LZO_NMAX ? (unsigned) len : LZO_NMAX; + len -= k; + if (k >= 16) do + { + LZO_DO16(buf,0); + buf += 16; + k -= 16; + } while (k >= 16); + if (k != 0) do + { + s1 += *buf++; + s2 += s1; + } while (--k > 0); + s1 %= LZO_BASE; + s2 %= LZO_BASE; + } + return (s2 << 16) | s1; +} + +#undef LZO_DO1 +#undef LZO_DO2 +#undef LZO_DO4 +#undef LZO_DO8 +#undef LZO_DO16 + +#if !defined(MINILZO_CFG_SKIP_LZO_STRING) +#undef lzo_memcmp +#undef lzo_memcpy +#undef lzo_memmove +#undef lzo_memset +#if !defined(__LZO_MMODEL_HUGE) +# undef LZO_HAVE_MM_HUGE_PTR +#endif +#define lzo_hsize_t lzo_uint +#define lzo_hvoid_p lzo_voidp +#define lzo_hbyte_p lzo_bytep +#define LZOLIB_PUBLIC(r,f) LZO_PUBLIC(r) f +#define lzo_hmemcmp lzo_memcmp +#define lzo_hmemcpy lzo_memcpy +#define lzo_hmemmove lzo_memmove +#define lzo_hmemset lzo_memset +#define __LZOLIB_HMEMCPY_CH_INCLUDED 1 +#if !defined(LZOLIB_PUBLIC) +# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) +#endif +LZOLIB_PUBLIC(int, lzo_hmemcmp) (const lzo_hvoid_p s1, const lzo_hvoid_p s2, lzo_hsize_t len) +{ +#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMCMP) + const lzo_hbyte_p p1 = (const lzo_hbyte_p) s1; + const lzo_hbyte_p p2 = (const lzo_hbyte_p) s2; + if __lzo_likely(len > 0) do + { + int d = *p1 - *p2; + if (d != 0) + return d; + p1++; p2++; + } while __lzo_likely(--len > 0); + return 0; +#else + return memcmp(s1, s2, len); +#endif +} +LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemcpy) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len) +{ +#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMCPY) + lzo_hbyte_p p1 = (lzo_hbyte_p) dest; + const lzo_hbyte_p p2 = (const lzo_hbyte_p) src; + if (len <= 0 || p1 == p2) + return dest; + do + *p1++ = *p2++; + while __lzo_likely(--len > 0); + return dest; +#else + return memcpy(dest, src, len); +#endif +} +LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemmove) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len) +{ +#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMMOVE) + lzo_hbyte_p p1 = (lzo_hbyte_p) dest; + const lzo_hbyte_p p2 = (const lzo_hbyte_p) src; + if (len <= 0 || p1 == p2) + return dest; + if (p1 < p2) + { + do + *p1++ = *p2++; + while __lzo_likely(--len > 0); + } + else + { + p1 += len; + p2 += len; + do + *--p1 = *--p2; + while __lzo_likely(--len > 0); + } + return dest; +#else + return memmove(dest, src, len); +#endif +} +LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemset) (lzo_hvoid_p s, int c, lzo_hsize_t len) +{ +#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMSET) + lzo_hbyte_p p = (lzo_hbyte_p) s; + if __lzo_likely(len > 0) do + *p++ = (unsigned char) c; + while __lzo_likely(--len > 0); + return s; +#else + return memset(s, c, len); +#endif +} +#undef LZOLIB_PUBLIC +#endif + +#if !defined(__LZO_IN_MINILZO) + +#define ACC_WANT_ACC_CHK_CH 1 +#undef ACCCHK_ASSERT + + ACCCHK_ASSERT_IS_SIGNED_T(lzo_int) + ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uint) + + ACCCHK_ASSERT_IS_SIGNED_T(lzo_int32) + ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uint32) + ACCCHK_ASSERT((LZO_UINT32_C(1) << (int)(8*sizeof(LZO_UINT32_C(1))-1)) > 0) + ACCCHK_ASSERT(sizeof(lzo_uint32) >= 4) + +#if !defined(__LZO_UINTPTR_T_IS_POINTER) + ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uintptr_t) +#endif + ACCCHK_ASSERT(sizeof(lzo_uintptr_t) >= sizeof(lzo_voidp)) + + ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_xint) + ACCCHK_ASSERT(sizeof(lzo_xint) >= sizeof(lzo_uint32)) + ACCCHK_ASSERT(sizeof(lzo_xint) >= sizeof(lzo_uint)) + ACCCHK_ASSERT(sizeof(lzo_xint) == sizeof(lzo_uint32) || sizeof(lzo_xint) == sizeof(lzo_uint)) + +#endif +#undef ACCCHK_ASSERT + +LZO_PUBLIC(int) +_lzo_config_check(void) +{ + lzo_bool r = 1; + union { unsigned char c[2*sizeof(lzo_xint)]; lzo_xint l[2]; } u; + +#if !defined(LZO_CFG_NO_CONFIG_CHECK) +#if defined(LZO_ABI_BIG_ENDIAN) + u.l[0] = u.l[1] = 0; u.c[sizeof(lzo_xint) - 1] = 128; + r &= (u.l[0] == 128); +#endif +#if defined(LZO_ABI_LITTLE_ENDIAN) + u.l[0] = u.l[1] = 0; u.c[0] = 128; + r &= (u.l[0] == 128); +#endif +#if defined(LZO_UNALIGNED_OK_2) + u.l[0] = u.l[1] = 0; + r &= ((* (const lzo_ushortp) (const lzo_voidp) &u.c[1]) == 0); +#endif +#if defined(LZO_UNALIGNED_OK_4) + u.l[0] = u.l[1] = 0; + r &= ((* (const lzo_uint32p) (const lzo_voidp) &u.c[1]) == 0); +#endif +#endif + + LZO_UNUSED(u); + return r == 1 ? LZO_E_OK : LZO_E_ERROR; +} + +int __lzo_init_done = 0; + +LZO_PUBLIC(int) +__lzo_init_v2(unsigned v, int s1, int s2, int s3, int s4, int s5, + int s6, int s7, int s8, int s9) +{ + int r; + +#if defined(__LZO_IN_MINILZO) +#elif (LZO_CC_MSC && ((_MSC_VER) < 700)) +#else +#define ACC_WANT_ACC_CHK_CH 1 +#undef ACCCHK_ASSERT +#define ACCCHK_ASSERT(expr) LZO_COMPILE_TIME_ASSERT(expr) +#endif +#undef ACCCHK_ASSERT + + __lzo_init_done = 1; + + if (v == 0) + return LZO_E_ERROR; + + r = (s1 == -1 || s1 == (int) sizeof(short)) && + (s2 == -1 || s2 == (int) sizeof(int)) && + (s3 == -1 || s3 == (int) sizeof(long)) && + (s4 == -1 || s4 == (int) sizeof(lzo_uint32)) && + (s5 == -1 || s5 == (int) sizeof(lzo_uint)) && + (s6 == -1 || s6 == (int) lzo_sizeof_dict_t) && + (s7 == -1 || s7 == (int) sizeof(char *)) && + (s8 == -1 || s8 == (int) sizeof(lzo_voidp)) && + (s9 == -1 || s9 == (int) sizeof(lzo_callback_t)); + if (!r) + return LZO_E_ERROR; + + r = _lzo_config_check(); + if (r != LZO_E_OK) + return r; + + return r; +} + +#if !defined(__LZO_IN_MINILZO) + +#if (LZO_OS_WIN16 && LZO_CC_WATCOMC) && defined(__SW_BD) + +#if 0 +BOOL FAR PASCAL LibMain ( HANDLE hInstance, WORD wDataSegment, + WORD wHeapSize, LPSTR lpszCmdLine ) +#else +int __far __pascal LibMain ( int a, short b, short c, long d ) +#endif +{ + LZO_UNUSED(a); LZO_UNUSED(b); LZO_UNUSED(c); LZO_UNUSED(d); + return 1; +} + +#endif + +#endif + +#define do_compress _lzo1x_1_do_compress + +#if !defined(MINILZO_CFG_SKIP_LZO1X_1_COMPRESS) + +#define LZO_NEED_DICT_H +#define D_BITS 14 +#define D_INDEX1(d,p) d = DM(DMUL(0x21,DX3(p,5,5,6)) >> 5) +#define D_INDEX2(d,p) d = (d & (D_MASK & 0x7ff)) ^ (D_HIGH | 0x1f) + +#ifndef __LZO_CONFIG1X_H +#define __LZO_CONFIG1X_H + +#if !defined(LZO1X) && !defined(LZO1Y) && !defined(LZO1Z) +# define LZO1X +#endif + +#if !defined(__LZO_IN_MINILZO) +#include "lzo/lzo1x.h" +#endif + +#define LZO_EOF_CODE +#undef LZO_DETERMINISTIC + +#define M1_MAX_OFFSET 0x0400 +#ifndef M2_MAX_OFFSET +#define M2_MAX_OFFSET 0x0800 +#endif +#define M3_MAX_OFFSET 0x4000 +#define M4_MAX_OFFSET 0xbfff + +#define MX_MAX_OFFSET (M1_MAX_OFFSET + M2_MAX_OFFSET) + +#define M1_MIN_LEN 2 +#define M1_MAX_LEN 2 +#define M2_MIN_LEN 3 +#ifndef M2_MAX_LEN +#define M2_MAX_LEN 8 +#endif +#define M3_MIN_LEN 3 +#define M3_MAX_LEN 33 +#define M4_MIN_LEN 3 +#define M4_MAX_LEN 9 + +#define M1_MARKER 0 +#define M2_MARKER 64 +#define M3_MARKER 32 +#define M4_MARKER 16 + +#ifndef MIN_LOOKAHEAD +#define MIN_LOOKAHEAD (M2_MAX_LEN + 1) +#endif + +#if defined(LZO_NEED_DICT_H) + +#ifndef LZO_HASH +#define LZO_HASH LZO_HASH_LZO_INCREMENTAL_B +#endif +#define DL_MIN_LEN M2_MIN_LEN + +#ifndef __LZO_DICT_H +#define __LZO_DICT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(D_BITS) && defined(DBITS) +# define D_BITS DBITS +#endif +#if !defined(D_BITS) +# error "D_BITS is not defined" +#endif +#if (D_BITS < 16) +# define D_SIZE LZO_SIZE(D_BITS) +# define D_MASK LZO_MASK(D_BITS) +#else +# define D_SIZE LZO_USIZE(D_BITS) +# define D_MASK LZO_UMASK(D_BITS) +#endif +#define D_HIGH ((D_MASK >> 1) + 1) + +#if !defined(DD_BITS) +# define DD_BITS 0 +#endif +#define DD_SIZE LZO_SIZE(DD_BITS) +#define DD_MASK LZO_MASK(DD_BITS) + +#if !defined(DL_BITS) +# define DL_BITS (D_BITS - DD_BITS) +#endif +#if (DL_BITS < 16) +# define DL_SIZE LZO_SIZE(DL_BITS) +# define DL_MASK LZO_MASK(DL_BITS) +#else +# define DL_SIZE LZO_USIZE(DL_BITS) +# define DL_MASK LZO_UMASK(DL_BITS) +#endif + +#if (D_BITS != DL_BITS + DD_BITS) +# error "D_BITS does not match" +#endif +#if (D_BITS < 8 || D_BITS > 18) +# error "invalid D_BITS" +#endif +#if (DL_BITS < 8 || DL_BITS > 20) +# error "invalid DL_BITS" +#endif +#if (DD_BITS < 0 || DD_BITS > 6) +# error "invalid DD_BITS" +#endif + +#if !defined(DL_MIN_LEN) +# define DL_MIN_LEN 3 +#endif +#if !defined(DL_SHIFT) +# define DL_SHIFT ((DL_BITS + (DL_MIN_LEN - 1)) / DL_MIN_LEN) +#endif + +#define LZO_HASH_GZIP 1 +#define LZO_HASH_GZIP_INCREMENTAL 2 +#define LZO_HASH_LZO_INCREMENTAL_A 3 +#define LZO_HASH_LZO_INCREMENTAL_B 4 + +#if !defined(LZO_HASH) +# error "choose a hashing strategy" +#endif + +#undef DM +#undef DX + +#if (DL_MIN_LEN == 3) +# define _DV2_A(p,shift1,shift2) \ + (((( (lzo_xint)((p)[0]) << shift1) ^ (p)[1]) << shift2) ^ (p)[2]) +# define _DV2_B(p,shift1,shift2) \ + (((( (lzo_xint)((p)[2]) << shift1) ^ (p)[1]) << shift2) ^ (p)[0]) +# define _DV3_B(p,shift1,shift2,shift3) \ + ((_DV2_B((p)+1,shift1,shift2) << (shift3)) ^ (p)[0]) +#elif (DL_MIN_LEN == 2) +# define _DV2_A(p,shift1,shift2) \ + (( (lzo_xint)(p[0]) << shift1) ^ p[1]) +# define _DV2_B(p,shift1,shift2) \ + (( (lzo_xint)(p[1]) << shift1) ^ p[2]) +#else +# error "invalid DL_MIN_LEN" +#endif +#define _DV_A(p,shift) _DV2_A(p,shift,shift) +#define _DV_B(p,shift) _DV2_B(p,shift,shift) +#define DA2(p,s1,s2) \ + (((((lzo_xint)((p)[2]) << (s2)) + (p)[1]) << (s1)) + (p)[0]) +#define DS2(p,s1,s2) \ + (((((lzo_xint)((p)[2]) << (s2)) - (p)[1]) << (s1)) - (p)[0]) +#define DX2(p,s1,s2) \ + (((((lzo_xint)((p)[2]) << (s2)) ^ (p)[1]) << (s1)) ^ (p)[0]) +#define DA3(p,s1,s2,s3) ((DA2((p)+1,s2,s3) << (s1)) + (p)[0]) +#define DS3(p,s1,s2,s3) ((DS2((p)+1,s2,s3) << (s1)) - (p)[0]) +#define DX3(p,s1,s2,s3) ((DX2((p)+1,s2,s3) << (s1)) ^ (p)[0]) +#define DMS(v,s) ((lzo_uint) (((v) & (D_MASK >> (s))) << (s))) +#define DM(v) DMS(v,0) + +#if (LZO_HASH == LZO_HASH_GZIP) +# define _DINDEX(dv,p) (_DV_A((p),DL_SHIFT)) + +#elif (LZO_HASH == LZO_HASH_GZIP_INCREMENTAL) +# define __LZO_HASH_INCREMENTAL +# define DVAL_FIRST(dv,p) dv = _DV_A((p),DL_SHIFT) +# define DVAL_NEXT(dv,p) dv = (((dv) << DL_SHIFT) ^ p[2]) +# define _DINDEX(dv,p) (dv) +# define DVAL_LOOKAHEAD DL_MIN_LEN + +#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_A) +# define __LZO_HASH_INCREMENTAL +# define DVAL_FIRST(dv,p) dv = _DV_A((p),5) +# define DVAL_NEXT(dv,p) \ + dv ^= (lzo_xint)(p[-1]) << (2*5); dv = (((dv) << 5) ^ p[2]) +# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5) +# define DVAL_LOOKAHEAD DL_MIN_LEN + +#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_B) +# define __LZO_HASH_INCREMENTAL +# define DVAL_FIRST(dv,p) dv = _DV_B((p),5) +# define DVAL_NEXT(dv,p) \ + dv ^= p[-1]; dv = (((dv) >> 5) ^ ((lzo_xint)(p[2]) << (2*5))) +# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5) +# define DVAL_LOOKAHEAD DL_MIN_LEN + +#else +# error "choose a hashing strategy" +#endif + +#ifndef DINDEX +#define DINDEX(dv,p) ((lzo_uint)((_DINDEX(dv,p)) & DL_MASK) << DD_BITS) +#endif +#if !defined(DINDEX1) && defined(D_INDEX1) +#define DINDEX1 D_INDEX1 +#endif +#if !defined(DINDEX2) && defined(D_INDEX2) +#define DINDEX2 D_INDEX2 +#endif + +#if !defined(__LZO_HASH_INCREMENTAL) +# define DVAL_FIRST(dv,p) ((void) 0) +# define DVAL_NEXT(dv,p) ((void) 0) +# define DVAL_LOOKAHEAD 0 +#endif + +#if !defined(DVAL_ASSERT) +#if defined(__LZO_HASH_INCREMENTAL) && !defined(NDEBUG) +static void DVAL_ASSERT(lzo_xint dv, const lzo_bytep p) +{ + lzo_xint df; + DVAL_FIRST(df,(p)); + assert(DINDEX(dv,p) == DINDEX(df,p)); +} +#else +# define DVAL_ASSERT(dv,p) ((void) 0) +#endif +#endif + +#if defined(LZO_DICT_USE_PTR) +# define DENTRY(p,in) (p) +# define GINDEX(m_pos,m_off,dict,dindex,in) m_pos = dict[dindex] +#else +# define DENTRY(p,in) ((lzo_uint) ((p)-(in))) +# define GINDEX(m_pos,m_off,dict,dindex,in) m_off = dict[dindex] +#endif + +#if (DD_BITS == 0) + +# define UPDATE_D(dict,drun,dv,p,in) dict[ DINDEX(dv,p) ] = DENTRY(p,in) +# define UPDATE_I(dict,drun,index,p,in) dict[index] = DENTRY(p,in) +# define UPDATE_P(ptr,drun,p,in) (ptr)[0] = DENTRY(p,in) + +#else + +# define UPDATE_D(dict,drun,dv,p,in) \ + dict[ DINDEX(dv,p) + drun++ ] = DENTRY(p,in); drun &= DD_MASK +# define UPDATE_I(dict,drun,index,p,in) \ + dict[ (index) + drun++ ] = DENTRY(p,in); drun &= DD_MASK +# define UPDATE_P(ptr,drun,p,in) \ + (ptr) [ drun++ ] = DENTRY(p,in); drun &= DD_MASK + +#endif + +#if defined(LZO_DICT_USE_PTR) + +#define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \ + (m_pos == NULL || (m_off = pd(ip, m_pos)) > max_offset) + +#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \ + (BOUNDS_CHECKING_OFF_IN_EXPR(( \ + m_pos = ip - (lzo_uint) PTR_DIFF(ip,m_pos), \ + PTR_LT(m_pos,in) || \ + (m_off = (lzo_uint) PTR_DIFF(ip,m_pos)) <= 0 || \ + m_off > max_offset ))) + +#else + +#define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \ + (m_off == 0 || \ + ((m_off = pd(ip, in) - m_off) > max_offset) || \ + (m_pos = (ip) - (m_off), 0) ) + +#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \ + (pd(ip, in) <= m_off || \ + ((m_off = pd(ip, in) - m_off) > max_offset) || \ + (m_pos = (ip) - (m_off), 0) ) + +#endif + +#if defined(LZO_DETERMINISTIC) +# define LZO_CHECK_MPOS LZO_CHECK_MPOS_DET +#else +# define LZO_CHECK_MPOS LZO_CHECK_MPOS_NON_DET +#endif + +#ifdef __cplusplus +} +#endif + +#endif + +#endif + +#endif + +#define DO_COMPRESS lzo1x_1_compress + +static __lzo_noinline lzo_uint +do_compress ( const lzo_bytep in , lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem ) +{ + register const lzo_bytep ip; + lzo_bytep op; + const lzo_bytep const in_end = in + in_len; + const lzo_bytep const ip_end = in + in_len - M2_MAX_LEN - 5; + const lzo_bytep ii; + lzo_dict_p const dict = (lzo_dict_p) wrkmem; + + op = out; + ip = in; + ii = ip; + + ip += 4; + for (;;) + { + register const lzo_bytep m_pos; + lzo_uint m_off; + lzo_uint m_len; + lzo_uint dindex; + + DINDEX1(dindex,ip); + GINDEX(m_pos,m_off,dict,dindex,in); + if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET)) + goto literal; +#if 1 + if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3]) + goto try_match; + DINDEX2(dindex,ip); +#endif + GINDEX(m_pos,m_off,dict,dindex,in); + if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET)) + goto literal; + if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3]) + goto try_match; + goto literal; + +try_match: +#if 1 && defined(LZO_UNALIGNED_OK_2) + if (* (const lzo_ushortp) m_pos != * (const lzo_ushortp) ip) +#else + if (m_pos[0] != ip[0] || m_pos[1] != ip[1]) +#endif + { + } + else + { + if __lzo_likely(m_pos[2] == ip[2]) + { +#if 0 + if (m_off <= M2_MAX_OFFSET) + goto match; + if (lit <= 3) + goto match; + if (lit == 3) + { + assert(op - 2 > out); op[-2] |= LZO_BYTE(3); + *op++ = *ii++; *op++ = *ii++; *op++ = *ii++; + goto code_match; + } + if (m_pos[3] == ip[3]) +#endif + goto match; + } + else + { +#if 0 +#if 0 + if (m_off <= M1_MAX_OFFSET && lit > 0 && lit <= 3) +#else + if (m_off <= M1_MAX_OFFSET && lit == 3) +#endif + { + register lzo_uint t; + + t = lit; + assert(op - 2 > out); op[-2] |= LZO_BYTE(t); + do *op++ = *ii++; while (--t > 0); + assert(ii == ip); + m_off -= 1; + *op++ = LZO_BYTE(M1_MARKER | ((m_off & 3) << 2)); + *op++ = LZO_BYTE(m_off >> 2); + ip += 2; + goto match_done; + } +#endif + } + } + +literal: + UPDATE_I(dict,0,dindex,ip,in); + ++ip; + if __lzo_unlikely(ip >= ip_end) + break; + continue; + +match: + UPDATE_I(dict,0,dindex,ip,in); + if (pd(ip,ii) > 0) + { + register lzo_uint t = pd(ip,ii); + + if (t <= 3) + { + assert(op - 2 > out); + op[-2] |= LZO_BYTE(t); + } + else if (t <= 18) + *op++ = LZO_BYTE(t - 3); + else + { + register lzo_uint tt = t - 18; + + *op++ = 0; + while (tt > 255) + { + tt -= 255; + *op++ = 0; + } + assert(tt > 0); + *op++ = LZO_BYTE(tt); + } + do *op++ = *ii++; while (--t > 0); + } + + assert(ii == ip); + ip += 3; + if (m_pos[3] != *ip++ || m_pos[4] != *ip++ || m_pos[5] != *ip++ || + m_pos[6] != *ip++ || m_pos[7] != *ip++ || m_pos[8] != *ip++ +#ifdef LZO1Y + || m_pos[ 9] != *ip++ || m_pos[10] != *ip++ || m_pos[11] != *ip++ + || m_pos[12] != *ip++ || m_pos[13] != *ip++ || m_pos[14] != *ip++ +#endif + ) + { + --ip; + m_len = pd(ip, ii); + assert(m_len >= 3); assert(m_len <= M2_MAX_LEN); + + if (m_off <= M2_MAX_OFFSET) + { + m_off -= 1; +#if defined(LZO1X) + *op++ = LZO_BYTE(((m_len - 1) << 5) | ((m_off & 7) << 2)); + *op++ = LZO_BYTE(m_off >> 3); +#elif defined(LZO1Y) + *op++ = LZO_BYTE(((m_len + 1) << 4) | ((m_off & 3) << 2)); + *op++ = LZO_BYTE(m_off >> 2); +#endif + } + else if (m_off <= M3_MAX_OFFSET) + { + m_off -= 1; + *op++ = LZO_BYTE(M3_MARKER | (m_len - 2)); + goto m3_m4_offset; + } + else +#if defined(LZO1X) + { + m_off -= 0x4000; + assert(m_off > 0); assert(m_off <= 0x7fff); + *op++ = LZO_BYTE(M4_MARKER | + ((m_off & 0x4000) >> 11) | (m_len - 2)); + goto m3_m4_offset; + } +#elif defined(LZO1Y) + goto m4_match; +#endif + } + else + { + { + const lzo_bytep end = in_end; + const lzo_bytep m = m_pos + M2_MAX_LEN + 1; + while (ip < end && *m == *ip) + m++, ip++; + m_len = pd(ip, ii); + } + assert(m_len > M2_MAX_LEN); + + if (m_off <= M3_MAX_OFFSET) + { + m_off -= 1; + if (m_len <= 33) + *op++ = LZO_BYTE(M3_MARKER | (m_len - 2)); + else + { + m_len -= 33; + *op++ = M3_MARKER | 0; + goto m3_m4_len; + } + } + else + { +#if defined(LZO1Y) +m4_match: +#endif + m_off -= 0x4000; + assert(m_off > 0); assert(m_off <= 0x7fff); + if (m_len <= M4_MAX_LEN) + *op++ = LZO_BYTE(M4_MARKER | + ((m_off & 0x4000) >> 11) | (m_len - 2)); + else + { + m_len -= M4_MAX_LEN; + *op++ = LZO_BYTE(M4_MARKER | ((m_off & 0x4000) >> 11)); +m3_m4_len: + while (m_len > 255) + { + m_len -= 255; + *op++ = 0; + } + assert(m_len > 0); + *op++ = LZO_BYTE(m_len); + } + } + +m3_m4_offset: + *op++ = LZO_BYTE((m_off & 63) << 2); + *op++ = LZO_BYTE(m_off >> 6); + } + +#if 0 +match_done: +#endif + ii = ip; + if __lzo_unlikely(ip >= ip_end) + break; + } + + *out_len = pd(op, out); + return pd(in_end,ii); +} + +LZO_PUBLIC(int) +DO_COMPRESS ( const lzo_bytep in , lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem ) +{ + lzo_bytep op = out; + lzo_uint t; + + if __lzo_unlikely(in_len <= M2_MAX_LEN + 5) + t = in_len; + else + { + t = do_compress(in,in_len,op,out_len,wrkmem); + op += *out_len; + } + + if (t > 0) + { + const lzo_bytep ii = in + in_len - t; + + if (op == out && t <= 238) + *op++ = LZO_BYTE(17 + t); + else if (t <= 3) + op[-2] |= LZO_BYTE(t); + else if (t <= 18) + *op++ = LZO_BYTE(t - 3); + else + { + lzo_uint tt = t - 18; + + *op++ = 0; + while (tt > 255) + { + tt -= 255; + *op++ = 0; + } + assert(tt > 0); + *op++ = LZO_BYTE(tt); + } + do *op++ = *ii++; while (--t > 0); + } + + *op++ = M4_MARKER | 1; + *op++ = 0; + *op++ = 0; + + *out_len = pd(op, out); + return LZO_E_OK; +} + +#endif + +#undef do_compress +#undef DO_COMPRESS +#undef LZO_HASH + +#undef LZO_TEST_OVERRUN +#undef DO_DECOMPRESS +#define DO_DECOMPRESS lzo1x_decompress + +#if !defined(MINILZO_CFG_SKIP_LZO1X_DECOMPRESS) + +#if defined(LZO_TEST_OVERRUN) +# if !defined(LZO_TEST_OVERRUN_INPUT) +# define LZO_TEST_OVERRUN_INPUT 2 +# endif +# if !defined(LZO_TEST_OVERRUN_OUTPUT) +# define LZO_TEST_OVERRUN_OUTPUT 2 +# endif +# if !defined(LZO_TEST_OVERRUN_LOOKBEHIND) +# define LZO_TEST_OVERRUN_LOOKBEHIND +# endif +#endif + +#undef TEST_IP +#undef TEST_OP +#undef TEST_LB +#undef TEST_LBO +#undef NEED_IP +#undef NEED_OP +#undef HAVE_TEST_IP +#undef HAVE_TEST_OP +#undef HAVE_NEED_IP +#undef HAVE_NEED_OP +#undef HAVE_ANY_IP +#undef HAVE_ANY_OP + +#if defined(LZO_TEST_OVERRUN_INPUT) +# if (LZO_TEST_OVERRUN_INPUT >= 1) +# define TEST_IP (ip < ip_end) +# endif +# if (LZO_TEST_OVERRUN_INPUT >= 2) +# define NEED_IP(x) \ + if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun +# endif +#endif + +#if defined(LZO_TEST_OVERRUN_OUTPUT) +# if (LZO_TEST_OVERRUN_OUTPUT >= 1) +# define TEST_OP (op <= op_end) +# endif +# if (LZO_TEST_OVERRUN_OUTPUT >= 2) +# undef TEST_OP +# define NEED_OP(x) \ + if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun +# endif +#endif + +#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +# define TEST_LB(m_pos) if (m_pos < out || m_pos >= op) goto lookbehind_overrun +# define TEST_LBO(m_pos,o) if (m_pos < out || m_pos >= op - (o)) goto lookbehind_overrun +#else +# define TEST_LB(m_pos) ((void) 0) +# define TEST_LBO(m_pos,o) ((void) 0) +#endif + +#if !defined(LZO_EOF_CODE) && !defined(TEST_IP) +# define TEST_IP (ip < ip_end) +#endif + +#if defined(TEST_IP) +# define HAVE_TEST_IP +#else +# define TEST_IP 1 +#endif +#if defined(TEST_OP) +# define HAVE_TEST_OP +#else +# define TEST_OP 1 +#endif + +#if defined(NEED_IP) +# define HAVE_NEED_IP +#else +# define NEED_IP(x) ((void) 0) +#endif +#if defined(NEED_OP) +# define HAVE_NEED_OP +#else +# define NEED_OP(x) ((void) 0) +#endif + +#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP) +# define HAVE_ANY_IP +#endif +#if defined(HAVE_TEST_OP) || defined(HAVE_NEED_OP) +# define HAVE_ANY_OP +#endif + +#undef __COPY4 +#define __COPY4(dst,src) * (lzo_uint32p)(dst) = * (const lzo_uint32p)(src) + +#undef COPY4 +#if defined(LZO_UNALIGNED_OK_4) +# define COPY4(dst,src) __COPY4(dst,src) +#elif defined(LZO_ALIGNED_OK_4) +# define COPY4(dst,src) __COPY4((lzo_uintptr_t)(dst),(lzo_uintptr_t)(src)) +#endif + +#if defined(DO_DECOMPRESS) +LZO_PUBLIC(int) +DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem ) +#endif +{ + register lzo_bytep op; + register const lzo_bytep ip; + register lzo_uint t; +#if defined(COPY_DICT) + lzo_uint m_off; + const lzo_bytep dict_end; +#else + register const lzo_bytep m_pos; +#endif + + const lzo_bytep const ip_end = in + in_len; +#if defined(HAVE_ANY_OP) + lzo_bytep const op_end = out + *out_len; +#endif +#if defined(LZO1Z) + lzo_uint last_m_off = 0; +#endif + + LZO_UNUSED(wrkmem); + +#if defined(COPY_DICT) + if (dict) + { + if (dict_len > M4_MAX_OFFSET) + { + dict += dict_len - M4_MAX_OFFSET; + dict_len = M4_MAX_OFFSET; + } + dict_end = dict + dict_len; + } + else + { + dict_len = 0; + dict_end = NULL; + } +#endif + + *out_len = 0; + + op = out; + ip = in; + + if (*ip > 17) + { + t = *ip++ - 17; + if (t < 4) + goto match_next; + assert(t > 0); NEED_OP(t); NEED_IP(t+1); + do *op++ = *ip++; while (--t > 0); + goto first_literal_run; + } + + while (TEST_IP && TEST_OP) + { + t = *ip++; + if (t >= 16) + goto match; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 15 + *ip++; + } + assert(t > 0); NEED_OP(t+3); NEED_IP(t+4); +#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if !defined(LZO_UNALIGNED_OK_4) + if (PTR_ALIGNED2_4(op,ip)) + { +#endif + COPY4(op,ip); + op += 4; ip += 4; + if (--t > 0) + { + if (t >= 4) + { + do { + COPY4(op,ip); + op += 4; ip += 4; t -= 4; + } while (t >= 4); + if (t > 0) do *op++ = *ip++; while (--t > 0); + } + else + do *op++ = *ip++; while (--t > 0); + } +#if !defined(LZO_UNALIGNED_OK_4) + } + else +#endif +#endif +#if !defined(LZO_UNALIGNED_OK_4) + { + *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; + do *op++ = *ip++; while (--t > 0); + } +#endif + +first_literal_run: + + t = *ip++; + if (t >= 16) + goto match; +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); + last_m_off = m_off; +#else + m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2); +#endif + NEED_OP(3); + t = 3; COPY_DICT(t,m_off) +#else +#if defined(LZO1Z) + t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); + m_pos = op - t; + last_m_off = t; +#else + m_pos = op - (1 + M2_MAX_OFFSET); + m_pos -= t >> 2; + m_pos -= *ip++ << 2; +#endif + TEST_LB(m_pos); NEED_OP(3); + *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; +#endif + goto match_done; + + do { +match: + if (t >= 64) + { +#if defined(COPY_DICT) +#if defined(LZO1X) + m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3); + t = (t >> 5) - 1; +#elif defined(LZO1Y) + m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2); + t = (t >> 4) - 3; +#elif defined(LZO1Z) + m_off = t & 0x1f; + if (m_off >= 0x1c) + m_off = last_m_off; + else + { + m_off = 1 + (m_off << 6) + (*ip++ >> 2); + last_m_off = m_off; + } + t = (t >> 5) - 1; +#endif +#else +#if defined(LZO1X) + m_pos = op - 1; + m_pos -= (t >> 2) & 7; + m_pos -= *ip++ << 3; + t = (t >> 5) - 1; +#elif defined(LZO1Y) + m_pos = op - 1; + m_pos -= (t >> 2) & 3; + m_pos -= *ip++ << 2; + t = (t >> 4) - 3; +#elif defined(LZO1Z) + { + lzo_uint off = t & 0x1f; + m_pos = op; + if (off >= 0x1c) + { + assert(last_m_off > 0); + m_pos -= last_m_off; + } + else + { + off = 1 + (off << 6) + (*ip++ >> 2); + m_pos -= off; + last_m_off = off; + } + } + t = (t >> 5) - 1; +#endif + TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); + goto copy_match; +#endif + } + else if (t >= 32) + { + t &= 31; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 31 + *ip++; + } +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = 1 + (ip[0] << 6) + (ip[1] >> 2); + last_m_off = m_off; +#else + m_off = 1 + (ip[0] >> 2) + (ip[1] << 6); +#endif +#else +#if defined(LZO1Z) + { + lzo_uint off = 1 + (ip[0] << 6) + (ip[1] >> 2); + m_pos = op - off; + last_m_off = off; + } +#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) + m_pos = op - 1; + m_pos -= (* (const lzo_ushortp) ip) >> 2; +#else + m_pos = op - 1; + m_pos -= (ip[0] >> 2) + (ip[1] << 6); +#endif +#endif + ip += 2; + } + else if (t >= 16) + { +#if defined(COPY_DICT) + m_off = (t & 8) << 11; +#else + m_pos = op; + m_pos -= (t & 8) << 11; +#endif + t &= 7; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 7 + *ip++; + } +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off += (ip[0] << 6) + (ip[1] >> 2); +#else + m_off += (ip[0] >> 2) + (ip[1] << 6); +#endif + ip += 2; + if (m_off == 0) + goto eof_found; + m_off += 0x4000; +#if defined(LZO1Z) + last_m_off = m_off; +#endif +#else +#if defined(LZO1Z) + m_pos -= (ip[0] << 6) + (ip[1] >> 2); +#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) + m_pos -= (* (const lzo_ushortp) ip) >> 2; +#else + m_pos -= (ip[0] >> 2) + (ip[1] << 6); +#endif + ip += 2; + if (m_pos == op) + goto eof_found; + m_pos -= 0x4000; +#if defined(LZO1Z) + last_m_off = pd((const lzo_bytep)op, m_pos); +#endif +#endif + } + else + { +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = 1 + (t << 6) + (*ip++ >> 2); + last_m_off = m_off; +#else + m_off = 1 + (t >> 2) + (*ip++ << 2); +#endif + NEED_OP(2); + t = 2; COPY_DICT(t,m_off) +#else +#if defined(LZO1Z) + t = 1 + (t << 6) + (*ip++ >> 2); + m_pos = op - t; + last_m_off = t; +#else + m_pos = op - 1; + m_pos -= t >> 2; + m_pos -= *ip++ << 2; +#endif + TEST_LB(m_pos); NEED_OP(2); + *op++ = *m_pos++; *op++ = *m_pos; +#endif + goto match_done; + } + +#if defined(COPY_DICT) + + NEED_OP(t+3-1); + t += 3-1; COPY_DICT(t,m_off) + +#else + + TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); +#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if !defined(LZO_UNALIGNED_OK_4) + if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos)) + { + assert((op - m_pos) >= 4); +#else + if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) + { +#endif + COPY4(op,m_pos); + op += 4; m_pos += 4; t -= 4 - (3 - 1); + do { + COPY4(op,m_pos); + op += 4; m_pos += 4; t -= 4; + } while (t >= 4); + if (t > 0) do *op++ = *m_pos++; while (--t > 0); + } + else +#endif + { +copy_match: + *op++ = *m_pos++; *op++ = *m_pos++; + do *op++ = *m_pos++; while (--t > 0); + } + +#endif + +match_done: +#if defined(LZO1Z) + t = ip[-1] & 3; +#else + t = ip[-2] & 3; +#endif + if (t == 0) + break; + +match_next: + assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1); +#if 0 + do *op++ = *ip++; while (--t > 0); +#else + *op++ = *ip++; + if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } +#endif + t = *ip++; + } while (TEST_IP && TEST_OP); + } + +#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP) + *out_len = pd(op, out); + return LZO_E_EOF_NOT_FOUND; +#endif + +eof_found: + assert(t == 1); + *out_len = pd(op, out); + return (ip == ip_end ? LZO_E_OK : + (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); + +#if defined(HAVE_NEED_IP) +input_overrun: + *out_len = pd(op, out); + return LZO_E_INPUT_OVERRUN; +#endif + +#if defined(HAVE_NEED_OP) +output_overrun: + *out_len = pd(op, out); + return LZO_E_OUTPUT_OVERRUN; +#endif + +#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +lookbehind_overrun: + *out_len = pd(op, out); + return LZO_E_LOOKBEHIND_OVERRUN; +#endif +} + +#endif + +#define LZO_TEST_OVERRUN +#undef DO_DECOMPRESS +#define DO_DECOMPRESS lzo1x_decompress_safe + +#if !defined(MINILZO_CFG_SKIP_LZO1X_DECOMPRESS_SAFE) + +#if defined(LZO_TEST_OVERRUN) +# if !defined(LZO_TEST_OVERRUN_INPUT) +# define LZO_TEST_OVERRUN_INPUT 2 +# endif +# if !defined(LZO_TEST_OVERRUN_OUTPUT) +# define LZO_TEST_OVERRUN_OUTPUT 2 +# endif +# if !defined(LZO_TEST_OVERRUN_LOOKBEHIND) +# define LZO_TEST_OVERRUN_LOOKBEHIND +# endif +#endif + +#undef TEST_IP +#undef TEST_OP +#undef TEST_LB +#undef TEST_LBO +#undef NEED_IP +#undef NEED_OP +#undef HAVE_TEST_IP +#undef HAVE_TEST_OP +#undef HAVE_NEED_IP +#undef HAVE_NEED_OP +#undef HAVE_ANY_IP +#undef HAVE_ANY_OP + +#if defined(LZO_TEST_OVERRUN_INPUT) +# if (LZO_TEST_OVERRUN_INPUT >= 1) +# define TEST_IP (ip < ip_end) +# endif +# if (LZO_TEST_OVERRUN_INPUT >= 2) +# define NEED_IP(x) \ + if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun +# endif +#endif + +#if defined(LZO_TEST_OVERRUN_OUTPUT) +# if (LZO_TEST_OVERRUN_OUTPUT >= 1) +# define TEST_OP (op <= op_end) +# endif +# if (LZO_TEST_OVERRUN_OUTPUT >= 2) +# undef TEST_OP +# define NEED_OP(x) \ + if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun +# endif +#endif + +#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +# define TEST_LB(m_pos) if (m_pos < out || m_pos >= op) goto lookbehind_overrun +# define TEST_LBO(m_pos,o) if (m_pos < out || m_pos >= op - (o)) goto lookbehind_overrun +#else +# define TEST_LB(m_pos) ((void) 0) +# define TEST_LBO(m_pos,o) ((void) 0) +#endif + +#if !defined(LZO_EOF_CODE) && !defined(TEST_IP) +# define TEST_IP (ip < ip_end) +#endif + +#if defined(TEST_IP) +# define HAVE_TEST_IP +#else +# define TEST_IP 1 +#endif +#if defined(TEST_OP) +# define HAVE_TEST_OP +#else +# define TEST_OP 1 +#endif + +#if defined(NEED_IP) +# define HAVE_NEED_IP +#else +# define NEED_IP(x) ((void) 0) +#endif +#if defined(NEED_OP) +# define HAVE_NEED_OP +#else +# define NEED_OP(x) ((void) 0) +#endif + +#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP) +# define HAVE_ANY_IP +#endif +#if defined(HAVE_TEST_OP) || defined(HAVE_NEED_OP) +# define HAVE_ANY_OP +#endif + +#undef __COPY4 +#define __COPY4(dst,src) * (lzo_uint32p)(dst) = * (const lzo_uint32p)(src) + +#undef COPY4 +#if defined(LZO_UNALIGNED_OK_4) +# define COPY4(dst,src) __COPY4(dst,src) +#elif defined(LZO_ALIGNED_OK_4) +# define COPY4(dst,src) __COPY4((lzo_uintptr_t)(dst),(lzo_uintptr_t)(src)) +#endif + +#if defined(DO_DECOMPRESS) +LZO_PUBLIC(int) +DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem ) +#endif +{ + register lzo_bytep op; + register const lzo_bytep ip; + register lzo_uint t; +#if defined(COPY_DICT) + lzo_uint m_off; + const lzo_bytep dict_end; +#else + register const lzo_bytep m_pos; +#endif + + const lzo_bytep const ip_end = in + in_len; +#if defined(HAVE_ANY_OP) + lzo_bytep const op_end = out + *out_len; +#endif +#if defined(LZO1Z) + lzo_uint last_m_off = 0; +#endif + + LZO_UNUSED(wrkmem); + +#if defined(COPY_DICT) + if (dict) + { + if (dict_len > M4_MAX_OFFSET) + { + dict += dict_len - M4_MAX_OFFSET; + dict_len = M4_MAX_OFFSET; + } + dict_end = dict + dict_len; + } + else + { + dict_len = 0; + dict_end = NULL; + } +#endif + + *out_len = 0; + + op = out; + ip = in; + + if (*ip > 17) + { + t = *ip++ - 17; + if (t < 4) + goto match_next; + assert(t > 0); NEED_OP(t); NEED_IP(t+1); + do *op++ = *ip++; while (--t > 0); + goto first_literal_run; + } + + while (TEST_IP && TEST_OP) + { + t = *ip++; + if (t >= 16) + goto match; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 15 + *ip++; + } + assert(t > 0); NEED_OP(t+3); NEED_IP(t+4); +#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if !defined(LZO_UNALIGNED_OK_4) + if (PTR_ALIGNED2_4(op,ip)) + { +#endif + COPY4(op,ip); + op += 4; ip += 4; + if (--t > 0) + { + if (t >= 4) + { + do { + COPY4(op,ip); + op += 4; ip += 4; t -= 4; + } while (t >= 4); + if (t > 0) do *op++ = *ip++; while (--t > 0); + } + else + do *op++ = *ip++; while (--t > 0); + } +#if !defined(LZO_UNALIGNED_OK_4) + } + else +#endif +#endif +#if !defined(LZO_UNALIGNED_OK_4) + { + *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; + do *op++ = *ip++; while (--t > 0); + } +#endif + +first_literal_run: + + t = *ip++; + if (t >= 16) + goto match; +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); + last_m_off = m_off; +#else + m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2); +#endif + NEED_OP(3); + t = 3; COPY_DICT(t,m_off) +#else +#if defined(LZO1Z) + t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); + m_pos = op - t; + last_m_off = t; +#else + m_pos = op - (1 + M2_MAX_OFFSET); + m_pos -= t >> 2; + m_pos -= *ip++ << 2; +#endif + TEST_LB(m_pos); NEED_OP(3); + *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; +#endif + goto match_done; + + do { +match: + if (t >= 64) + { +#if defined(COPY_DICT) +#if defined(LZO1X) + m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3); + t = (t >> 5) - 1; +#elif defined(LZO1Y) + m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2); + t = (t >> 4) - 3; +#elif defined(LZO1Z) + m_off = t & 0x1f; + if (m_off >= 0x1c) + m_off = last_m_off; + else + { + m_off = 1 + (m_off << 6) + (*ip++ >> 2); + last_m_off = m_off; + } + t = (t >> 5) - 1; +#endif +#else +#if defined(LZO1X) + m_pos = op - 1; + m_pos -= (t >> 2) & 7; + m_pos -= *ip++ << 3; + t = (t >> 5) - 1; +#elif defined(LZO1Y) + m_pos = op - 1; + m_pos -= (t >> 2) & 3; + m_pos -= *ip++ << 2; + t = (t >> 4) - 3; +#elif defined(LZO1Z) + { + lzo_uint off = t & 0x1f; + m_pos = op; + if (off >= 0x1c) + { + assert(last_m_off > 0); + m_pos -= last_m_off; + } + else + { + off = 1 + (off << 6) + (*ip++ >> 2); + m_pos -= off; + last_m_off = off; + } + } + t = (t >> 5) - 1; +#endif + TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); + goto copy_match; +#endif + } + else if (t >= 32) + { + t &= 31; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 31 + *ip++; + } +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = 1 + (ip[0] << 6) + (ip[1] >> 2); + last_m_off = m_off; +#else + m_off = 1 + (ip[0] >> 2) + (ip[1] << 6); +#endif +#else +#if defined(LZO1Z) + { + lzo_uint off = 1 + (ip[0] << 6) + (ip[1] >> 2); + m_pos = op - off; + last_m_off = off; + } +#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) + m_pos = op - 1; + m_pos -= (* (const lzo_ushortp) ip) >> 2; +#else + m_pos = op - 1; + m_pos -= (ip[0] >> 2) + (ip[1] << 6); +#endif +#endif + ip += 2; + } + else if (t >= 16) + { +#if defined(COPY_DICT) + m_off = (t & 8) << 11; +#else + m_pos = op; + m_pos -= (t & 8) << 11; +#endif + t &= 7; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 7 + *ip++; + } +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off += (ip[0] << 6) + (ip[1] >> 2); +#else + m_off += (ip[0] >> 2) + (ip[1] << 6); +#endif + ip += 2; + if (m_off == 0) + goto eof_found; + m_off += 0x4000; +#if defined(LZO1Z) + last_m_off = m_off; +#endif +#else +#if defined(LZO1Z) + m_pos -= (ip[0] << 6) + (ip[1] >> 2); +#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) + m_pos -= (* (const lzo_ushortp) ip) >> 2; +#else + m_pos -= (ip[0] >> 2) + (ip[1] << 6); +#endif + ip += 2; + if (m_pos == op) + goto eof_found; + m_pos -= 0x4000; +#if defined(LZO1Z) + last_m_off = pd((const lzo_bytep)op, m_pos); +#endif +#endif + } + else + { +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = 1 + (t << 6) + (*ip++ >> 2); + last_m_off = m_off; +#else + m_off = 1 + (t >> 2) + (*ip++ << 2); +#endif + NEED_OP(2); + t = 2; COPY_DICT(t,m_off) +#else +#if defined(LZO1Z) + t = 1 + (t << 6) + (*ip++ >> 2); + m_pos = op - t; + last_m_off = t; +#else + m_pos = op - 1; + m_pos -= t >> 2; + m_pos -= *ip++ << 2; +#endif + TEST_LB(m_pos); NEED_OP(2); + *op++ = *m_pos++; *op++ = *m_pos; +#endif + goto match_done; + } + +#if defined(COPY_DICT) + + NEED_OP(t+3-1); + t += 3-1; COPY_DICT(t,m_off) + +#else + + TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); +#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if !defined(LZO_UNALIGNED_OK_4) + if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos)) + { + assert((op - m_pos) >= 4); +#else + if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) + { +#endif + COPY4(op,m_pos); + op += 4; m_pos += 4; t -= 4 - (3 - 1); + do { + COPY4(op,m_pos); + op += 4; m_pos += 4; t -= 4; + } while (t >= 4); + if (t > 0) do *op++ = *m_pos++; while (--t > 0); + } + else +#endif + { +copy_match: + *op++ = *m_pos++; *op++ = *m_pos++; + do *op++ = *m_pos++; while (--t > 0); + } + +#endif + +match_done: +#if defined(LZO1Z) + t = ip[-1] & 3; +#else + t = ip[-2] & 3; +#endif + if (t == 0) + break; + +match_next: + assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1); +#if 0 + do *op++ = *ip++; while (--t > 0); +#else + *op++ = *ip++; + if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } +#endif + t = *ip++; + } while (TEST_IP && TEST_OP); + } + +#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP) + *out_len = pd(op, out); + return LZO_E_EOF_NOT_FOUND; +#endif + +eof_found: + assert(t == 1); + *out_len = pd(op, out); + return (ip == ip_end ? LZO_E_OK : + (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); + +#if defined(HAVE_NEED_IP) +input_overrun: + *out_len = pd(op, out); + return LZO_E_INPUT_OVERRUN; +#endif + +#if defined(HAVE_NEED_OP) +output_overrun: + *out_len = pd(op, out); + return LZO_E_OUTPUT_OVERRUN; +#endif + +#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +lookbehind_overrun: + *out_len = pd(op, out); + return LZO_E_LOOKBEHIND_OVERRUN; +#endif +} + +#endif + +/***** End of minilzo.c *****/ + diff --git a/package/cfgfs/src/bundled/minilzo.h b/package/cfgfs/src/bundled/minilzo.h new file mode 100644 index 000000000..04bf4e140 --- /dev/null +++ b/package/cfgfs/src/bundled/minilzo.h @@ -0,0 +1,102 @@ +/* minilzo.h -- mini subset of the LZO real-time data compression library + + This file is part of the LZO real-time data compression library. + + Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + All Rights Reserved. + + The LZO library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License, + version 2, as published by the Free Software Foundation. + + The LZO library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the LZO library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Markus F.X.J. Oberhumer + + http://www.oberhumer.com/opensource/lzo/ + */ + +/* + * NOTE: + * the full LZO package can be found at + * http://www.oberhumer.com/opensource/lzo/ + */ + + +#ifndef __MINILZO_H +#define __MINILZO_H + +#define MINILZO_VERSION 0x2020 + +#ifdef __LZOCONF_H +# error "you cannot use both LZO and miniLZO" +#endif + +#undef LZO_HAVE_CONFIG_H +#include "lzoconf.h" + +#if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION) +# error "version mismatch in header files" +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +/*********************************************************************** +// +************************************************************************/ + +/* Memory required for the wrkmem parameter. + * When the required size is 0, you can also pass a NULL pointer. + */ + +#define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS +#define LZO1X_1_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t)) +#define LZO1X_MEM_DECOMPRESS (0) + + +/* compression */ +LZO_EXTERN(int) +lzo1x_1_compress ( const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem ); + +/* decompression */ +LZO_EXTERN(int) +lzo1x_decompress ( const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem /* NOT USED */ ); + +/* safe decompression with overrun testing */ +LZO_EXTERN(int) +lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem /* NOT USED */ ); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* already included */ + diff --git a/package/cfgfs/src/c_lzo1x1.c b/package/cfgfs/src/c_lzo1x1.c new file mode 100644 index 000000000..570f8673c --- /dev/null +++ b/package/cfgfs/src/c_lzo1x1.c @@ -0,0 +1,126 @@ +/* $MirOS: contrib/hosted/fwcf/c_lzo1x1.c,v 1.5 2007/03/13 18:31:07 tg Exp $ */ + +/*- + * MiniLZO (LZO1X-1) compression plug-in for FWCF + * Copyright (c) 2006 + * Thorsten Glaser + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to + * the utmost extent permitted by applicable law, neither express nor + * implied; without malicious intent or gross negligence. In no event + * may a licensor, author or contributor be held liable for indirect, + * direct, other damage, loss, or other issues arising in any way out + * of dealing in the work, even if advised of the possibility of such + * damage or existence of a defect, except proven that it results out + * of said person's immediate fault when using the work as intended. + */ + +#include +#include +#include +#include + +#include "defs.h" +#include "compress.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/c_lzo1x1.c,v 1.5 2007/03/13 18:31:07 tg Exp $"); + +#define C_LZO1X1_T1(a,b) c_lzo1x1_ ## a ## _ ## b +#define C_LZO1X1_T2(a,b) C_LZO1X1_T1(a,b) +#define LZO_COMPILE_TIME_ASSERT_HEADER(e) \ + extern int C_LZO1X1_T2(__LINE__,__lzo_cta)[1-2*!(e)]; +#define MINILZO_CFG_SKIP_LZO1X_DECOMPRESS 1 +#define MINILZO_CFG_SKIP_LZO_PTR 1 +#define MINILZO_CFG_SKIP_LZO_STRING 1 +#include "minilzo.c" + +static void c_lzo1x1_load(void) __attribute__((constructor)); +static int c_init(void); +static int c_compress(char **, char *, size_t) + __attribute__((bounded (string, 2, 3))); +static int c_decompress(char *, size_t, char *, size_t) + __attribute__((bounded (string, 1, 2))) + __attribute__((bounded (string, 3, 4))); + +static fwcf_compressor c_lzo1x1 = { + c_init, /* init */ + c_compress, /* compress */ + c_decompress, /* decompress */ + "lzo1x1", /* name */ + 0x10 /* code */ +}; + +/* Work-memory needed for compression. Allocate memory in units + * of `lzo_align_t' (instead of `char') to make sure it is properly aligned. + */ + +#define HEAP_ALLOC(var,size) \ + lzo_align_t __LZO_MMODEL var [ ((size) + (sizeof(lzo_align_t) - 1)) / sizeof(lzo_align_t) ] + +static HEAP_ALLOC(wrkmem,LZO1X_1_MEM_COMPRESS); + +static void +c_lzo1x1_load(void) +{ + if (compress_register(&c_lzo1x1)) + fputs("warning: cannot register compressor 'lzo1x1'!\n", stderr); +} + +static int +c_init(void) +{ + return ((lzo_init() == LZO_E_OK) ? 0 : 1); +} + +static int +c_compress(char **dst, char *src, size_t len) +{ + lzo_bytep ldst; + lzo_uint ldlen = len + (len / 16) + 64 + 3; + + if ((ldst = malloc(ldlen)) == NULL) + return (-1); +#ifdef DEBUG + fprintf(stderr, "LZO1X-1 compress %lu bytes -> (%lu)", + (u_long)len, (u_long)ldlen); +#endif + lzo1x_1_compress((lzo_bytep)src, len, ldst, &ldlen, wrkmem); +#ifdef DEBUG + fprintf(stderr, " %lu bytes\n", (u_long)ldlen); +#endif + *dst = (char *)ldst; + return (ldlen); +} + +static int +c_decompress(char *dst, size_t dstlen, char *src, size_t srclen) +{ + lzo_uint ldlen = dstlen; + int i; + +#ifdef DEBUG + fprintf(stderr, "LZO1X decompress %lu -> %lu bytes\n", + (u_long)srclen, (u_long)dstlen); +#endif + if (((i = lzo1x_decompress_safe((lzo_bytep)src, srclen, (lzo_bytep)dst, + &ldlen, wrkmem)) == LZO_E_OK) || (i == LZO_E_INPUT_NOT_CONSUMED)) + return (ldlen); +#ifdef DEBUG + fprintf(stderr, "LZO1X decompress error code %d\n", i); +#endif + return (-1); +} diff --git a/package/cfgfs/src/c_null.c b/package/cfgfs/src/c_null.c new file mode 100644 index 000000000..4806ae261 --- /dev/null +++ b/package/cfgfs/src/c_null.c @@ -0,0 +1,78 @@ +/* $MirOS: contrib/hosted/fwcf/c_null.c,v 1.5 2006/09/23 23:46:35 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#include +#include + +#include "defs.h" +#include "compress.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/c_null.c,v 1.5 2006/09/23 23:46:35 tg Exp $"); + +static void c_null_load(void) __attribute__((constructor)); +static int c_init(void); +static int c_compress(char **, char *, size_t) + __attribute__((bounded (string, 2, 3))); +static int c_decompress(char *, size_t, char *, size_t) + __attribute__((bounded (string, 1, 2))) + __attribute__((bounded (string, 3, 4))); + +static fwcf_compressor c_null = { + c_init, /* init */ + c_compress, /* compress */ + c_decompress, /* decompress */ + "null", /* name */ + 0 /* code */ +}; + +static void +c_null_load(void) +{ + if (compress_register(&c_null)) + fputs("warning: cannot register compressor 'null'!\n", stderr); +} + +static int +c_init(void) +{ + return (0); +} + +static int +c_compress(char **dst, char *src, size_t len) +{ + if ((*dst = malloc(len)) == NULL) + return (-1); + memcpy(*dst, src, len); + return (len); +} + +static int +c_decompress(char *dst, size_t dstlen, char *src, size_t srclen) +{ + size_t len = MIN(srclen, dstlen); + memmove(dst, src, len); + return (len); +} diff --git a/package/cfgfs/src/c_zlib.c b/package/cfgfs/src/c_zlib.c new file mode 100644 index 000000000..2285f2eeb --- /dev/null +++ b/package/cfgfs/src/c_zlib.c @@ -0,0 +1,84 @@ +/* $MirOS: contrib/hosted/fwcf/c_zlib.c,v 1.4 2006/09/23 23:46:35 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#include +#include + +#include "defs.h" +#include "compress.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/c_zlib.c,v 1.4 2006/09/23 23:46:35 tg Exp $"); + +static void c_zlib_load(void) __attribute__((constructor)); +static int c_init(void); +static int c_compress(char **, char *, size_t) + __attribute__((bounded (string, 2, 3))); +static int c_decompress(char *, size_t, char *, size_t) + __attribute__((bounded (string, 1, 2))) + __attribute__((bounded (string, 3, 4))); + +static fwcf_compressor c_zlib = { + c_init, /* init */ + c_compress, /* compress */ + c_decompress, /* decompress */ + "zlib", /* name */ + 0x01 /* code */ +}; + +static void +c_zlib_load(void) +{ + if (compress_register(&c_zlib)) + fputs("warning: cannot register compressor 'zlib'!\n", stderr); +} + +static int +c_init(void) +{ + return (0); +} + +static int +c_compress(char **dst, char *src, size_t len) +{ + uLongf dstlen; + + if (dst == NULL) + return (-1); + dstlen = compressBound(len); + if ((*dst = malloc(dstlen)) == NULL) + return (-1); + return ((compress2((uint8_t *)*dst, &dstlen, (uint8_t *)src, len, + 9) == Z_OK) ? (int)dstlen : -1); +} + +static int +c_decompress(char *dst, size_t dstlen, char *src, size_t srclen) +{ + uLongf len = dstlen; + + return ((uncompress((uint8_t *)dst, &len, (uint8_t *)src, + srclen) == Z_OK) ? (int)len : -1); +} diff --git a/package/cfgfs/src/compress.c b/package/cfgfs/src/compress.c new file mode 100644 index 000000000..b75959c4e --- /dev/null +++ b/package/cfgfs/src/compress.c @@ -0,0 +1,78 @@ +/* $MirOS: contrib/hosted/fwcf/compress.c,v 1.7 2006/09/23 23:46:35 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#include + +#include "defs.h" +#include "compress.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/compress.c,v 1.7 2006/09/23 23:46:35 tg Exp $"); + +static void compress_initialise(void); + +static fwcf_compressor *fwcf_compressors = NULL; + +int +compress_register(fwcf_compressor *e) +{ + compress_initialise(); + if (e == NULL) + return (1); + + if ((e->init == NULL) || (e->compress == NULL) || + (e->decompress == NULL) || (e->name == NULL)) + return (1); + if (fwcf_compressors[e->code].name != NULL) + return (2); + + fwcf_compressors[e->code] = *e; + return (0); +} + +fwcf_compressor * +compress_enumerate(void) +{ + int i; + fwcf_compressor *rv = NULL; + + compress_initialise(); + for (i = 0; i < 256; ++i) + if (fwcf_compressors[i].name != NULL) { + if (fwcf_compressors[i].code == i) + rv = fwcf_compressors; + else + errx(1, "fwcf compressor registry invalid"); + } + return (rv); +} + +static void +compress_initialise(void) +{ + if (fwcf_compressors != NULL) + return; + if ((fwcf_compressors = calloc(256, sizeof (fwcf_compressor))) == NULL) + err(1, "calloc"); +} diff --git a/package/cfgfs/src/compress.h b/package/cfgfs/src/compress.h new file mode 100644 index 000000000..c421aca5c --- /dev/null +++ b/package/cfgfs/src/compress.h @@ -0,0 +1,52 @@ +/* $MirOS: contrib/hosted/fwcf/compress.h,v 1.10 2007/03/09 22:35:13 tg Exp $ */ + +/* + * This file is part of the FreeWRT project. FreeWRT is copyrighted + * material, please see the LICENCE file in the top-level directory + * or at http://www.freewrt.org/licence for details. + */ + +#ifndef COMPRESS_H +#define COMPRESS_H + +/* BEGIN of plug-in API description - hook yer proprietary modules here */ + +/* returns 0 on success, -1 on failure */ +typedef int (*fwcf_compress_init_func)(void); +/* in: *dst (malloc'd), src, size of source (max. INT_MAX) */ +/* returns size of destination on success, -1 on failure */ +typedef int (*fwcf_compress_work_func)(char **, char *, size_t) + __attribute__((bounded (string, 2, 3))); +/* in: dst, max size of dst, src, size of source (max. INT_MAX) */ +/* returns size of destination on success, -1 on failure */ +typedef int (*fwcf_compress_rev_func)(char *, size_t, char *, size_t) + __attribute__((bounded (string, 1, 2))) + __attribute__((bounded (string, 3, 4))); + +typedef struct FWCF_COMPRESSOR { + fwcf_compress_init_func init; + fwcf_compress_work_func compress; + fwcf_compress_rev_func decompress; + const char *name; + uint8_t code; +} fwcf_compressor; + +__BEGIN_DECLS +/* 0=success 1=EINVAL 2=slot already used */ +int compress_register(fwcf_compressor *); +__END_DECLS + +/* END of plug-in API description, version 1.0 */ + +__BEGIN_DECLS +/* low-level */ +fwcf_compressor *compress_enumerate(void); +int compress_list(void); + +/* high-level */ +fwcf_compressor *compressor_get(uint8_t); +int compressor_getbyname(const char *); +int list_compressors(void); +__END_DECLS + +#endif diff --git a/package/cfgfs/src/cpr_get.c b/package/cfgfs/src/cpr_get.c new file mode 100644 index 000000000..71e414130 --- /dev/null +++ b/package/cfgfs/src/cpr_get.c @@ -0,0 +1,63 @@ +/* $MirOS: contrib/hosted/fwcf/cpr_get.c,v 1.4 2007/03/09 22:35:13 tg Exp $ */ + +/*- + * Copyright (c) 2006, 2007 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#include +#include + +#include "defs.h" +#include "compress.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/cpr_get.c,v 1.4 2007/03/09 22:35:13 tg Exp $"); + +fwcf_compressor * +compressor_get(uint8_t algo) +{ + fwcf_compressor *list; + + if ((list = compress_enumerate()) == NULL) + errx(1, "compress_enumerate"); + if (list[algo].name == NULL) + errx(1, "compression algorithm %02Xh not loaded", algo); + if (list[algo].init()) + errx(1, "cannot initialise %s compression", list[algo].name); + + return (&(list[algo])); +} + +int +compressor_getbyname(const char *s) +{ + fwcf_compressor *cl; + int i; + + if ((cl = compress_enumerate()) == NULL) + errx(1, "no compression algorithms found"); + + for (i = 1; i < 256; ++i) + if (cl[i].name != NULL) + if (!strcasecmp(cl[i].name, s)) + return (i); + return (0); +} diff --git a/package/cfgfs/src/cpr_list.c b/package/cfgfs/src/cpr_list.c new file mode 100644 index 000000000..aafdf590c --- /dev/null +++ b/package/cfgfs/src/cpr_list.c @@ -0,0 +1,46 @@ +/* $MirOS: contrib/hosted/fwcf/cpr_list.c,v 1.4 2006/09/24 03:21:29 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include + +#include "defs.h" +#include "compress.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/cpr_list.c,v 1.4 2006/09/24 03:21:29 tg Exp $"); + +int +compress_list(void) +{ + fwcf_compressor *cl; + int i; + + if ((cl = compress_enumerate()) == NULL) + return (1); + + for (i = 0; i < 256; ++i) + if (cl[i].name != NULL) + printf("%02Xh = %s%s\n", cl[i].code, + (i < 0xE0 ? "" : "PRIVATE "), cl[i].name); + return (0); +} diff --git a/package/cfgfs/src/cpr_lsth.c b/package/cfgfs/src/cpr_lsth.c new file mode 100644 index 000000000..af5813b08 --- /dev/null +++ b/package/cfgfs/src/cpr_lsth.c @@ -0,0 +1,41 @@ +/* $MirOS: contrib/hosted/fwcf/cpr_lsth.c,v 1.3 2006/09/23 23:46:35 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include + +#include "defs.h" +#include "compress.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/cpr_lsth.c,v 1.3 2006/09/23 23:46:35 tg Exp $"); + +int +list_compressors(void) +{ + int rv; + + printf("List of registered compressors:\n"); + if ((rv = compress_list())) + printf("No compressor registered!\n"); + return (rv); +} diff --git a/package/cfgfs/src/defs.h b/package/cfgfs/src/defs.h new file mode 100644 index 000000000..33a31c848 --- /dev/null +++ b/package/cfgfs/src/defs.h @@ -0,0 +1,34 @@ +/* $MirOS: contrib/hosted/fwcf/defs.h,v 1.7 2007/03/13 18:28:20 tg Exp $ */ + +/* + * This file is part of the FreeWRT project. FreeWRT is copyrighted + * material, please see the LICENCE file in the top-level directory + * or at http://www.freewrt.org/licence for details. + */ + +#ifndef DEFS_H +#define DEFS_H + +#define DEF_FLASHBLOCK 65536 /* size of a flash block */ +#define DEF_FLASHPART 131072 /* size of the flash partition */ + +#define FWCF_VER 0x01 /* major version of spec used */ + +#ifndef __RCSID +#define __RCSID(x) static const char __rcsid[] __attribute__((used)) = (x) +#endif + +#ifndef BSD +#define uint8_t u_int8_t +#define uint16_t u_int16_t +#define uint32_t u_int32_t +#define uint64_t u_int64_t +#endif + +#ifndef __dead +#define __dead __attribute__((noreturn)) +#endif + +#include "replace.h" /* strlcpy/strlcat replacement for glibc */ + +#endif diff --git a/package/cfgfs/src/ft_creat.c b/package/cfgfs/src/ft_creat.c new file mode 100644 index 000000000..5838f8647 --- /dev/null +++ b/package/cfgfs/src/ft_creat.c @@ -0,0 +1,304 @@ +/* $MirOS: contrib/hosted/fwcf/ft_creat.c,v 1.2 2006/09/23 23:21:04 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "defs.h" +#include "pack.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/ft_creat.c,v 1.2 2006/09/23 23:21:04 tg Exp $"); + +static size_t ft_creat(char *); +static void make_directory(char *, uint32_t, uint32_t, uint32_t, time_t); +static void make_file(char *, uint8_t *, size_t); +static void make_symlink(char *, uint8_t *, size_t); +static void pop_directories(void); +static void do_chown(char *, uid_t, gid_t); +static void do_chmod(char *, mode_t); +static void do_mtime(char *, time_t); +static char *pfxname(const char *); + +static struct a_directory { + struct a_directory *next; + char *pathname; + uid_t owner; + gid_t group; + mode_t perms; + time_t mtime; +} *directories; + +static char basename[PATH_MAX]; +static size_t basename_len; + +void +ft_creatm(char *buf, const char *pathname) +{ + directories = NULL; + snprintf(basename, sizeof (basename), "%s/", pathname); + basename_len = strlen(basename); + while (*buf) + buf += ft_creat(buf); + if (directories != NULL) + pop_directories(); +} + +static size_t +ft_creat(char *buf) +{ + uint8_t c, *p; + char *fname; + size_t i, type = 0, size = 0; + uint32_t x_uid = 0, x_gid = 0, x_mode = 0; + time_t x_mtime = 0; + + i = strlen(buf) + 1; + p = (uint8_t *)buf + i; + fname = pfxname(buf); + while (*p) + switch (c = *p++) { + case 0x01: + /* block special device */ + type = 1; + break; + case 0x02: + /* character special device */ + type = 1; + break; + case 0x03: + /* symbolic link */ + type = 2; + break; + case 0x04: + /* hard link */ + type = 1; + break; + case 0x05: + /* directory */ + type = 3; + break; + case 0x10: + /* modification time */ + x_mtime = LOADD(p); + p += 4; + break; + case 'g': + case 'G': + x_gid = (c == 'g') ? *p : LOADD(p); + p += (c == 'g') ? 1 : 4; + break; + case 'i': + case 'I': + /* x_inode = (c == 'i') ? *p : LOADW(p); */ + p += (c == 'i') ? 1 : 2; + break; + case 'm': + case 'M': + x_mode = (c == 'm') ? LOADW(p) : LOADD(p); + p += (c == 'm') ? 2 : 4; + break; + case 'u': + case 'U': + x_uid = (c == 'u') ? *p : LOADD(p); + p += (c == 'u') ? 1 : 4; + break; + case 's': + case 'S': + size = (c == 's') ? *p : LOADT(p); + p += (c == 's') ? 1 : 3; + break; + default: + errx(1, "unknown attribute %02Xh", c); + } + /* skip over final NUL byte */ + ++p; + + switch (type) { + case 1: + /* no data, not implemented */ + if (size) + fputs("WARN: size not allowed, ignoring\n", stderr); + size = 0; + break; + case 2: + /* symbolic link */ + make_symlink(fname, p, size); + x_mtime = 0; + x_mode = 0; + break; + case 3: + /* directory */ + if (size) + fputs("WARN: size not allowed, ignoring\n", stderr); + size = 0; + make_directory(fname, x_mode, x_uid, x_gid, x_mtime); + goto notfile; + break; + case 0: + /* regular file */ + make_file(fname, p, size); + break; + default: + abort(); + } + + if (x_uid || x_gid) + do_chown(fname, x_uid, x_gid); + + if (x_mode) + do_chmod(fname, x_mode); + + if (x_mtime) + do_mtime(fname, x_mtime); + + notfile: + if (type != 3) + free(fname); + + return ((p - (uint8_t *)buf) + size); +} + +static void +make_directory(char *n, uint32_t m, uint32_t u, uint32_t g, time_t t) +{ + struct a_directory *newdir; + + if ((newdir = malloc(sizeof (struct a_directory))) == NULL) + err(1, "out of memory"); + + newdir->next = directories; + directories = newdir; + + newdir->pathname = n; + newdir->owner = u; + newdir->group = g; + newdir->perms = m; + newdir->mtime = t; + + if (mkdir(n, 0700)) + if (errno != EEXIST) + warn("mkdir %s", n); +} + +static void +make_file(char *n, uint8_t *buf, size_t len) +{ + int fd; + + unlink(n); + + if ((fd = open(n, O_WRONLY | O_CREAT | O_TRUNC, 0700)) < 0) { + warn("open %s", n); + return; + } + + if ((size_t)write(fd, buf, len) != len) + warn("could not write %lu bytes", (u_long)len); + + if (close(fd)) + warn("close"); +} + +static void +make_symlink(char *n, uint8_t *buf, size_t len) +{ + char target[len + 1]; + + memcpy(target, buf, len); + target[len] = '\0'; + + unlink(n); + + if (symlink(target, n)) + warn("symlink %s -> %s", n, target); +} + +static void +pop_directories(void) +{ + struct a_directory *p; + + while ((p = directories) != NULL) { + directories = p->next; + + if (p->pathname == NULL) + warnx("pathname for a directory is NULL"); + else { + do_chown(p->pathname, p->owner, p->group); + do_chmod(p->pathname, p->perms); + do_mtime(p->pathname, p->mtime); + free(p->pathname); + } + free(p); + } +} + +static void +do_chown(char *n, uid_t o, gid_t g) +{ + if (lchown(n, o, g)) + warn("lchown %d:%d %s", (int)o, (int)g, n); +} + +static void +do_chmod(char *n, mode_t m) +{ + if (chmod(n, m & 07777)) + warn("lchmod 0%o %s", m & 07777, n); +} + +static void +do_mtime(char *n, time_t t) +{ + struct timeval tv[2] = { {0,0}, {0,0} }; + + tv[1].tv_sec = t; + if (utimes(n, tv)) + warn("utimes %d %s", (int)t, n); +} + +static char * +pfxname(const char *component) +{ + char *foo; + size_t len, x; + + len = basename_len + (x = strlen(component) + /* NUL */ 1); + if ((foo = malloc(len)) == NULL) + err(1, "out of memory"); + memcpy(foo, basename, basename_len); + if ((component[0] == '.') && (component[1] == '\0')) + foo[basename_len] = '\0'; + else + memcpy(foo + basename_len, component, x); + + return (foo); +} diff --git a/package/cfgfs/src/ft_dump.c b/package/cfgfs/src/ft_dump.c new file mode 100644 index 000000000..ed702ba28 --- /dev/null +++ b/package/cfgfs/src/ft_dump.c @@ -0,0 +1,135 @@ +/* $MirOS: contrib/hosted/fwcf/ft_dump.c,v 1.5 2006/09/23 23:21:04 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#include +#include +#include +#include + +#include "defs.h" +#include "pack.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/ft_dump.c,v 1.5 2006/09/23 23:21:04 tg Exp $"); + +static int ft_dumpfile(char *); + +void +ft_dump(char *buf) +{ + while (*buf) + buf += ft_dumpfile(buf); +} + +static int +ft_dumpfile(char *buf) +{ + uint8_t c; + int i, type = 0, size = 0; + uint8_t *p; + uint32_t x; + + i = strlen(buf) + 1; + printf("\nNAME=%s\n", buf); + p = (uint8_t *)buf + i; + while (*p) + switch (c = *p++) { + case 0x01: + printf("BLOCK\n"); + type = 1; + break; + case 0x02: + printf("CHARACTER\n"); + type = 1; + break; + case 0x03: + printf("SYMLINK\n"); + type = 2; + break; + case 0x04: + printf("HARDLINK\n"); + type = 1; + break; + case 0x05: + printf("DIRECTORY\n"); + type = 1; + break; + case 0x10: + { + time_t y = LOADD(p); + p += 4; + printf("MTIME=%d -> %s", (int)y, ctime(&y)); + break; + } + case 'g': + case 'G': + case 'u': + case 'U': + x = (c & 0x20) ? *p : LOADD(p); + p += (c & 0x20) ? 1 : 4; + printf("%cID=%d\n", c & ~0x20, x); + break; + case 'i': + case 'I': + x = (c == 'i') ? *p : LOADW(p); + p += (c == 'i') ? 1 : 2; + printf("INODE=%d\n", x); + break; + case 'm': + case 'M': + x = (c == 'm') ? LOADW(p) : LOADD(p); + p += (c == 'm') ? 2 : 4; + printf("MODE=0%o\n", x); + break; + case 's': + case 'S': + x = (c == 's') ? *p : LOADT(p); + p += (c == 's') ? 1 : 3; + printf("SIZE=%d\n", size = x); + break; + default: + errx(1, "unknown attribute %02Xh", c); + } + ++p; + if (type == 2) { + char *target; + + if ((target = malloc(size + 1)) == NULL) + err(1, "malloc"); + memcpy(target, p, size); + target[size] = '\0'; + printf("LINK_TARGET=%s\n", target); + free(target); + } else if (type == 1) { + if (size) + printf("WARN: size not allowed, ignoring\n"); + size = 0; + } else { + printf("BEGIN DATA\n"); + fflush(stdout); + write(STDOUT_FILENO, p, size); + printf("\nEND DATA\n"); + } + return ((p - (uint8_t *)buf) + size); +} diff --git a/package/cfgfs/src/ft_pack.c b/package/cfgfs/src/ft_pack.c new file mode 100644 index 000000000..5d04f8b5c --- /dev/null +++ b/package/cfgfs/src/ft_pack.c @@ -0,0 +1,134 @@ +/* $MirOS: contrib/hosted/fwcf/ft_pack.c,v 1.7 2006/09/23 23:21:04 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "defs.h" +#include "fts_subs.h" +#include "pack.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/ft_pack.c,v 1.7 2006/09/23 23:21:04 tg Exp $"); + +char * +ft_pack(ftsf_entry *e) +{ + char f_header[4096], *hdrptr = f_header; + size_t hdrleft = sizeof (f_header), k; + char *f_data = NULL, *rv; + off_t e_size; + + if (e == NULL) + return (NULL); + if ((e->etype != FTSF_FILE) && (e->etype != FTSF_SYMLINK) && + (e->etype != FTSF_DIR)) + return (NULL); + + e_size = e->statp->st_size; + + if ((k = strlcpy(hdrptr, e->pathname, hdrleft)) >= hdrleft) + return (NULL); + hdrptr += ++k; + hdrleft -= k; + + if (e->etype == FTSF_SYMLINK) { + STOREB(0x03); + e->statp->st_mtime = 0; + e->statp->st_mode = 0; + } else if (e->etype == FTSF_DIR) { + STOREB(0x05); + e_size = 0; + } + + if (e->statp->st_mtime) { + STOREB(0x10); + STORED(e->statp->st_mtime); + } + + if (e->statp->st_gid > 0xFF) { + STOREB('G'); + STORED(e->statp->st_gid); + } else if (e->statp->st_gid) { + STOREB('g'); + STOREB(e->statp->st_gid); + } + + if (e->statp->st_mode > 0xFFFF) { + STOREB('M'); + STORED(e->statp->st_mode); + } else if (e->statp->st_mode) { + STOREB('m'); + STOREW(e->statp->st_mode); + } + + if (e->statp->st_uid > 0xFF) { + STOREB('U'); + STORED(e->statp->st_uid); + } else if (e->statp->st_uid) { + STOREB('u'); + STOREB(e->statp->st_uid); + } + + /* e_size is zero for everything except files and symlinks */ + if (e_size > 0xFF) { + STOREB('S'); + STORET(e_size); + } else if (e_size) { + STOREB('s'); + STOREB(e_size); + } + + STOREB(0); + + if (e_size) { + if ((f_data = malloc(e_size)) == NULL) + return (NULL); + if (asprintf(&rv, "%s/%s", ftsf_prefix, e->pathname) == -1) + return (NULL); + if (e->etype == FTSF_SYMLINK) { + if (readlink(rv, f_data, e_size) != e_size) + return (NULL); + } else { + int fd; + + if ((fd = open(rv, O_RDONLY, 0)) < 0) + return (NULL); + if (read(fd, f_data, e_size) != e_size) + return (NULL); + close(fd); + } + free(rv); + } + k = sizeof (size_t) + (hdrptr - f_header) + e_size; + if ((rv = malloc(k)) == NULL) + return (NULL); + *(size_t *)rv = k; + memcpy(rv + sizeof (size_t), f_header, hdrptr - f_header); + memcpy(rv + sizeof (size_t) + (hdrptr - f_header), f_data, e_size); + return (rv); +} diff --git a/package/cfgfs/src/ft_packm.c b/package/cfgfs/src/ft_packm.c new file mode 100644 index 000000000..5803bae5e --- /dev/null +++ b/package/cfgfs/src/ft_packm.c @@ -0,0 +1,71 @@ +/* $MirOS: contrib/hosted/fwcf/ft_packm.c,v 1.4 2006/09/23 23:21:04 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#include +#include +#include + +#include "defs.h" +#include "fts_subs.h" +#include "pack.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/ft_packm.c,v 1.4 2006/09/23 23:21:04 tg Exp $"); + +char * +ft_packm(void) +{ + ftsf_entry e; + int i; + char *rv = NULL, *rv2, *afile; + size_t len = 1 + sizeof (size_t), k, pos = sizeof (size_t); + + while ((i = ftsf_next(&e)) > 0) { + //ftsf_debugent(&e); + if ((e.etype != FTSF_FILE) && (e.etype != FTSF_SYMLINK) && + (e.etype != FTSF_DIR)) + continue; + if ((afile = ft_pack(&e)) == NULL) + errx(1, "cannot pack %s/%s", ftsf_prefix, e.pathname); + len += (k = *(size_t *)afile - sizeof (size_t)); + if ((rv2 = realloc(rv, len)) == NULL) { + i = errno; + free(rv); + errno = i; + err(1, "malloc"); + } + rv = rv2; + memcpy(rv + pos, afile + sizeof (size_t), k); + pos += k; + free(afile); + } + if (i < 0) + errx(1, "ft_packm failed in fts"); + if (rv == NULL) + if ((rv = malloc(len)) == NULL) + err(1, "malloc"); + rv[len - 1] = '\0'; + *(size_t *)rv = len; + return (rv); +} diff --git a/package/cfgfs/src/fts.c b/package/cfgfs/src/fts.c new file mode 100644 index 000000000..e271ed538 --- /dev/null +++ b/package/cfgfs/src/fts.c @@ -0,0 +1,1118 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; +#endif /* LIBC_SCCS and not lint */ + +/* Hybrid of uClinux-dist/glibc/io/fts.c and MirBSD src/lib/libc/gen/fts.c */ + +#include +#include +#include +#include +#include +#include +#ifdef __OpenBSD__ +#include +#else +#include "fts_gnu.h" +#endif +#include +#include +#include + +#include "defs.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/fts.c,v 1.3 2007/07/02 14:50:21 tg Exp $"); + +#define internal_function + +/* Largest alignment size needed, minus one. + Usually long double is the worst case. */ +#ifndef ALIGNBYTES +#define ALIGNBYTES (__alignof__ (long double) - 1) +#endif +/* Align P to that size. */ +#ifndef ALIGN +#define ALIGN(p) (((unsigned long int) (p) + ALIGNBYTES) & ~ALIGNBYTES) +#endif + + +static FTSENT *fts_alloc __P((FTS *, const char *, int)) internal_function; +static FTSENT *fts_build __P((FTS *, int)) internal_function; +static void fts_lfree __P((FTSENT *)) internal_function; +static void fts_load __P((FTS *, FTSENT *)) internal_function; +static size_t fts_maxarglen __P((char * const *)) internal_function; +static void fts_padjust __P((FTS *, FTSENT *)) internal_function; +static int fts_palloc __P((FTS *, size_t)) internal_function; +static FTSENT *fts_sort __P((FTS *, FTSENT *, int)) internal_function; +static u_short fts_stat __P((FTS *, FTSENT *, int)) internal_function; +static int fts_safe_changedir(FTS *, FTSENT *, int, char *); + +#ifndef MAX +#define MAX(a, b) ({ __typeof__ (a) _a = (a); \ + __typeof__ (b) _b = (b); \ + _a > _b ? _a : _b; }) +#endif + +#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) + +#define CLR(opt) (sp->fts_options &= ~(opt)) +#define ISSET(opt) (sp->fts_options & (opt)) +#define SET(opt) (sp->fts_options |= (opt)) + +#define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && fchdir(fd)) + +/* fts_build flags */ +#define BCHILD 1 /* fts_children */ +#define BNAMES 2 /* fts_children, names only */ +#define BREAD 3 /* fts_read */ + +FTS * +fts_open(argv, options, compar) + char * const *argv; + register int options; + int (*compar) __P((const FTSENT **, const FTSENT **)); +{ + register FTS *sp; + register FTSENT *p, *root; + register int nitems; + FTSENT *parent, *tmp; + int len; + + /* Options check. */ + if (options & ~FTS_OPTIONMASK) { + errno = EINVAL; + return (NULL); + } + + /* Allocate/initialize the stream */ + if ((sp = malloc((u_int)sizeof(FTS))) == NULL) + return (NULL); + memset(sp, 0, sizeof(FTS)); + sp->fts_compar = (int (*) __P((const void *, const void *))) compar; + sp->fts_options = options; + + /* Logical walks turn on NOCHDIR; symbolic links are too hard. */ + if (ISSET(FTS_LOGICAL)) + SET(FTS_NOCHDIR); + + /* + * Start out with 1K of path space, and enough, in any case, + * to hold the user's paths. + */ +#ifndef MAXPATHLEN +#define MAXPATHLEN 1024 +#endif + if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN))) + goto mem1; + + /* Allocate/initialize root's parent. */ + if ((parent = fts_alloc(sp, "", 0)) == NULL) + goto mem2; + parent->fts_level = FTS_ROOTPARENTLEVEL; + + /* Allocate/initialize root(s). */ + for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { + /* Don't allow zero-length paths. */ + if ((len = strlen(*argv)) == 0) { + errno = ENOENT; + goto mem3; + } + + p = fts_alloc(sp, *argv, len); + p->fts_level = FTS_ROOTLEVEL; + p->fts_parent = parent; + p->fts_accpath = p->fts_name; + p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW)); + + /* Command-line "." and ".." are real directories. */ + if (p->fts_info == FTS_DOT) + p->fts_info = FTS_D; + + /* + * If comparison routine supplied, traverse in sorted + * order; otherwise traverse in the order specified. + */ + if (compar) { + p->fts_link = root; + root = p; + } else { + p->fts_link = NULL; + if (root == NULL) + tmp = root = p; + else { + tmp->fts_link = p; + tmp = p; + } + } + } + if (compar && nitems > 1) + root = fts_sort(sp, root, nitems); + + /* + * Allocate a dummy pointer and make fts_read think that we've just + * finished the node before the root(s); set p->fts_info to FTS_INIT + * so that everything about the "current" node is ignored. + */ + if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL) + goto mem3; + sp->fts_cur->fts_link = root; + sp->fts_cur->fts_info = FTS_INIT; + + /* + * If using chdir(2), grab a file descriptor pointing to dot to ensure + * that we can get back here; this could be avoided for some paths, + * but almost certainly not worth the effort. Slashes, symbolic links, + * and ".." are all fairly nasty problems. Note, if we can't get the + * descriptor we run anyway, just more slowly. + */ + if (!ISSET(FTS_NOCHDIR) + && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0) + SET(FTS_NOCHDIR); + + return (sp); + +mem3: fts_lfree(root); + free(parent); +mem2: free(sp->fts_path); +mem1: free(sp); + return (NULL); +} + +static void +internal_function +fts_load(sp, p) + FTS *sp; + register FTSENT *p; +{ + register int len; + register char *cp; + + /* + * Load the stream structure for the next traversal. Since we don't + * actually enter the directory until after the preorder visit, set + * the fts_accpath field specially so the chdir gets done to the right + * place and the user can access the first node. From fts_open it's + * known that the path will fit. + */ + len = p->fts_pathlen = p->fts_namelen; + memmove(sp->fts_path, p->fts_name, len + 1); + if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) { + len = strlen(++cp); + memmove(p->fts_name, cp, len + 1); + p->fts_namelen = len; + } + p->fts_accpath = p->fts_path = sp->fts_path; + sp->fts_dev = p->fts_dev; +} + +int +fts_close(sp) + FTS *sp; +{ + register FTSENT *freep, *p; + int saved_errno; + + /* + * This still works if we haven't read anything -- the dummy structure + * points to the root list, so we step through to the end of the root + * list which has a valid parent pointer. + */ + if (sp->fts_cur) { + for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) { + freep = p; + p = p->fts_link != NULL ? p->fts_link : p->fts_parent; + free(freep); + } + free(p); + } + + /* Free up child linked list, sort array, path buffer. */ + if (sp->fts_child) + fts_lfree(sp->fts_child); + if (sp->fts_array) + free(sp->fts_array); + free(sp->fts_path); + + /* Return to original directory, save errno if necessary. */ + if (!ISSET(FTS_NOCHDIR)) { + saved_errno = fchdir(sp->fts_rfd) ? errno : 0; + (void)close(sp->fts_rfd); + + /* Set errno and return. */ + if (saved_errno != 0) { + /* Free up the stream pointer. */ + free(sp); + errno = saved_errno; + return (-1); + } + } + + /* Free up the stream pointer. */ + free(sp); + return (0); +} + +/* + * Special case of "/" at the end of the path so that slashes aren't + * appended which would cause paths to be written as "....//foo". + */ +#define NAPPEND(p) \ + (p->fts_path[p->fts_pathlen - 1] == '/' \ + ? p->fts_pathlen - 1 : p->fts_pathlen) + +FTSENT * +fts_read(sp) + register FTS *sp; +{ + register FTSENT *p, *tmp; + register int instr; + register char *t; + int saved_errno; + + /* If finished or unrecoverable error, return NULL. */ + if (sp->fts_cur == NULL || ISSET(FTS_STOP)) + return (NULL); + + /* Set current node pointer. */ + p = sp->fts_cur; + + /* Save and zero out user instructions. */ + instr = p->fts_instr; + p->fts_instr = FTS_NOINSTR; + + /* Any type of file may be re-visited; re-stat and re-turn. */ + if (instr == FTS_AGAIN) { + p->fts_info = fts_stat(sp, p, 0); + return (p); + } + + /* + * Following a symlink -- SLNONE test allows application to see + * SLNONE and recover. If indirecting through a symlink, have + * keep a pointer to current location. If unable to get that + * pointer, follow fails. + */ + if (instr == FTS_FOLLOW && + (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) { + p->fts_info = fts_stat(sp, p, 1); + if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { + if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) { + p->fts_errno = errno; + p->fts_info = FTS_ERR; + } else + p->fts_flags |= FTS_SYMFOLLOW; + } + return (p); + } + + /* Directory in pre-order. */ + if (p->fts_info == FTS_D) { + /* If skipped or crossed mount point, do post-order visit. */ + if (instr == FTS_SKIP || + (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) { + if (p->fts_flags & FTS_SYMFOLLOW) + (void)close(p->fts_symfd); + if (sp->fts_child) { + fts_lfree(sp->fts_child); + sp->fts_child = NULL; + } + p->fts_info = FTS_DP; + return (p); + } + + /* Rebuild if only read the names and now traversing. */ + if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) { + CLR(FTS_NAMEONLY); + fts_lfree(sp->fts_child); + sp->fts_child = NULL; + } + + /* + * Cd to the subdirectory. + * + * If have already read and now fail to chdir, whack the list + * to make the names come out right, and set the parent errno + * so the application will eventually get an error condition. + * Set the FTS_DONTCHDIR flag so that when we logically change + * directories back to the parent we don't do a chdir. + * + * If haven't read do so. If the read fails, fts_build sets + * FTS_STOP or the fts_info field of the node. + */ + if (sp->fts_child != NULL) { + if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) { + p->fts_errno = errno; + p->fts_flags |= FTS_DONTCHDIR; + for (p = sp->fts_child; p != NULL; + p = p->fts_link) + p->fts_accpath = + p->fts_parent->fts_accpath; + } + } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) { + if (ISSET(FTS_STOP)) + return (NULL); + return (p); + } + p = sp->fts_child; + sp->fts_child = NULL; + goto name; + } + + /* Move to the next node on this level. */ +next: tmp = p; + if ((p = p->fts_link) != NULL) { + free(tmp); + + /* + * If reached the top, return to the original directory (or + * the root of the tree), and load the paths for the next root. + */ + if (p->fts_level == FTS_ROOTLEVEL) { + if (FCHDIR(sp, sp->fts_rfd)) { + SET(FTS_STOP); + return (NULL); + } + fts_load(sp, p); + return (sp->fts_cur = p); + } + + /* + * User may have called fts_set on the node. If skipped, + * ignore. If followed, get a file descriptor so we can + * get back if necessary. + */ + if (p->fts_instr == FTS_SKIP) + goto next; + if (p->fts_instr == FTS_FOLLOW) { + p->fts_info = fts_stat(sp, p, 1); + if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { + if ((p->fts_symfd = + open(".", O_RDONLY, 0)) < 0) { + p->fts_errno = errno; + p->fts_info = FTS_ERR; + } else + p->fts_flags |= FTS_SYMFOLLOW; + } + p->fts_instr = FTS_NOINSTR; + } + +name: t = sp->fts_path + NAPPEND(p->fts_parent); + *t++ = '/'; + memmove(t, p->fts_name, p->fts_namelen + 1); + return (sp->fts_cur = p); + } + + /* Move up to the parent node. */ + p = tmp->fts_parent; + free(tmp); + + if (p->fts_level == FTS_ROOTPARENTLEVEL) { + /* + * Done; free everything up and set errno to 0 so the user + * can distinguish between error and EOF. + */ + free(p); + errno = 0; + return (sp->fts_cur = NULL); + } + + /* NUL terminate the pathname. */ + sp->fts_path[p->fts_pathlen] = '\0'; + + /* + * Return to the parent directory. If at a root node or came through + * a symlink, go back through the file descriptor. Otherwise, cd up + * one directory. + */ + if (p->fts_level == FTS_ROOTLEVEL) { + if (FCHDIR(sp, sp->fts_rfd)) { + SET(FTS_STOP); + return (NULL); + } + } else if (p->fts_flags & FTS_SYMFOLLOW) { + if (FCHDIR(sp, p->fts_symfd)) { + saved_errno = errno; + (void)close(p->fts_symfd); + errno = saved_errno; + SET(FTS_STOP); + return (NULL); + } + (void)close(p->fts_symfd); + } else if (!(p->fts_flags & FTS_DONTCHDIR) && + fts_safe_changedir(sp, p->fts_parent, -1, "..")) { + SET(FTS_STOP); + return (NULL); + } + p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP; + return (sp->fts_cur = p); +} + +/* + * Fts_set takes the stream as an argument although it's not used in this + * implementation; it would be necessary if anyone wanted to add global + * semantics to fts using fts_set. An error return is allowed for similar + * reasons. + */ +/* ARGSUSED */ +int +fts_set(sp, p, instr) + FTS *sp; + FTSENT *p; + int instr; +{ + if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW && + instr != FTS_NOINSTR && instr != FTS_SKIP) { + errno = EINVAL; + return (1); + } + p->fts_instr = instr; + return (0); +} + +FTSENT * +fts_children(sp, instr) + register FTS *sp; + int instr; +{ + register FTSENT *p; + int fd; + + if (instr != 0 && instr != FTS_NAMEONLY) { + errno = EINVAL; + return (NULL); + } + + /* Set current node pointer. */ + p = sp->fts_cur; + + /* + * Errno set to 0 so user can distinguish empty directory from + * an error. + */ + errno = 0; + + /* Fatal errors stop here. */ + if (ISSET(FTS_STOP)) + return (NULL); + + /* Return logical hierarchy of user's arguments. */ + if (p->fts_info == FTS_INIT) + return (p->fts_link); + + /* + * If not a directory being visited in pre-order, stop here. Could + * allow FTS_DNR, assuming the user has fixed the problem, but the + * same effect is available with FTS_AGAIN. + */ + if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */) + return (NULL); + + /* Free up any previous child list. */ + if (sp->fts_child != NULL) + fts_lfree(sp->fts_child); + + if (instr == FTS_NAMEONLY) { + SET(FTS_NAMEONLY); + instr = BNAMES; + } else + instr = BCHILD; + + /* + * If using chdir on a relative path and called BEFORE fts_read does + * its chdir to the root of a traversal, we can lose -- we need to + * chdir into the subdirectory, and we don't know where the current + * directory is, so we can't get back so that the upcoming chdir by + * fts_read will work. + */ + if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' || + ISSET(FTS_NOCHDIR)) + return (sp->fts_child = fts_build(sp, instr)); + + if ((fd = open(".", O_RDONLY, 0)) < 0) + return (NULL); + sp->fts_child = fts_build(sp, instr); + if (fchdir(fd)) + return (NULL); + (void)close(fd); + return (sp->fts_child); +} + +/* + * This is the tricky part -- do not casually change *anything* in here. The + * idea is to build the linked list of entries that are used by fts_children + * and fts_read. There are lots of special cases. + * + * The real slowdown in walking the tree is the stat calls. If FTS_NOSTAT is + * set and it's a physical walk (so that symbolic links can't be directories), + * we can do things quickly. First, if it's a 4.4BSD file system, the type + * of the file is in the directory entry. Otherwise, we assume that the number + * of subdirectories in a node is equal to the number of links to the parent. + * The former skips all stat calls. The latter skips stat calls in any leaf + * directories and for any files after the subdirectories in the directory have + * been found, cutting the stat calls by about 2/3. + */ +static FTSENT * +internal_function +fts_build(sp, type) + register FTS *sp; + int type; +{ + register struct dirent *dp; + register FTSENT *p, *head; + register int nitems; + FTSENT *cur, *tail; + DIR *dirp; + void *oldaddr; + int cderrno, descend, len, level, maxlen, nlinks, saved_errno, + nostat, doadjust; + char *cp; + + /* Set current node pointer. */ + cur = sp->fts_cur; + + /* + * Open the directory for reading. If this fails, we're done. + * If being called from fts_read, set the fts_info field. + */ + if ((dirp = opendir(cur->fts_accpath)) == NULL) { + if (type == BREAD) { + cur->fts_info = FTS_DNR; + cur->fts_errno = errno; + } + return (NULL); + } + + /* + * Nlinks is the number of possible entries of type directory in the + * directory if we're cheating on stat calls, 0 if we're not doing + * any stat calls at all, -1 if we're doing stats on everything. + */ + if (type == BNAMES) { + nlinks = 0; + /* Be quiet about nostat, GCC. */ + nostat = 0; + } else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) { + nlinks = cur->fts_nlink - (ISSET(FTS_SEEDOT) ? 0 : 2); + nostat = 1; + } else { + nlinks = -1; + nostat = 0; + } + +#ifdef notdef + (void)printf("nlinks == %d (cur: %d)\n", nlinks, cur->fts_nlink); + (void)printf("NOSTAT %d PHYSICAL %d SEEDOT %d\n", + ISSET(FTS_NOSTAT), ISSET(FTS_PHYSICAL), ISSET(FTS_SEEDOT)); +#endif + /* + * If we're going to need to stat anything or we want to descend + * and stay in the directory, chdir. If this fails we keep going, + * but set a flag so we don't chdir after the post-order visit. + * We won't be able to stat anything, but we can still return the + * names themselves. Note, that since fts_read won't be able to + * chdir into the directory, it will have to return different path + * names than before, i.e. "a/b" instead of "b". Since the node + * has already been visited in pre-order, have to wait until the + * post-order visit to return the error. There is a special case + * here, if there was nothing to stat then it's not an error to + * not be able to stat. This is all fairly nasty. If a program + * needed sorted entries or stat information, they had better be + * checking FTS_NS on the returned nodes. + */ + cderrno = 0; + if (nlinks || type == BREAD) { + if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) { + if (nlinks && type == BREAD) + cur->fts_errno = errno; + cur->fts_flags |= FTS_DONTCHDIR; + descend = 0; + cderrno = errno; + (void)closedir(dirp); + dirp = NULL; + } else + descend = 1; + } else + descend = 0; + + /* + * Figure out the max file name length that can be stored in the + * current path -- the inner loop allocates more path as necessary. + * We really wouldn't have to do the maxlen calculations here, we + * could do them in fts_read before returning the path, but it's a + * lot easier here since the length is part of the dirent structure. + * + * If not changing directories set a pointer so that can just append + * each new name into the path. + */ + len = NAPPEND(cur); + if (ISSET(FTS_NOCHDIR)) { + cp = sp->fts_path + len; + *cp++ = '/'; + } else { + /* GCC, you're too verbose. */ + cp = NULL; + } + len++; + maxlen = sp->fts_pathlen - len; + + level = cur->fts_level + 1; + + /* Read the directory, attaching each entry to the `link' pointer. */ + doadjust = 0; + for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) { + if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name)) + continue; + + if ((p = fts_alloc(sp, dp->d_name, (int)_D_EXACT_NAMLEN (dp))) == NULL) + goto mem1; + if (_D_EXACT_NAMLEN (dp) >= maxlen) {/* include space for NUL */ + oldaddr = sp->fts_path; + if (fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) { + /* + * No more memory for path or structures. Save + * errno, free up the current structure and the + * structures already allocated. + */ +mem1: saved_errno = errno; + if (p) + free(p); + fts_lfree(head); + (void)closedir(dirp); + cur->fts_info = FTS_ERR; + SET(FTS_STOP); + errno = saved_errno; + return (NULL); + } + /* Did realloc() change the pointer? */ + if (oldaddr != sp->fts_path) { + doadjust = 1; + if (ISSET(FTS_NOCHDIR)) + cp = sp->fts_path + len; + } + maxlen = sp->fts_pathlen - len; + } + + if (len + _D_EXACT_NAMLEN (dp) >= USHRT_MAX) { + /* + * In an FTSENT, fts_pathlen is a u_short so it is + * possible to wraparound here. If we do, free up + * the current structure and the structures already + * allocated, then error out with ENAMETOOLONG. + */ + free(p); + fts_lfree(head); + (void)closedir(dirp); + cur->fts_info = FTS_ERR; + SET(FTS_STOP); + errno = ENAMETOOLONG; + return (NULL); + } + p->fts_level = level; + p->fts_parent = sp->fts_cur; + p->fts_pathlen = len + _D_EXACT_NAMLEN (dp); + +#if defined FTS_WHITEOUT && 0 + if (dp->d_type == DT_WHT) + p->fts_flags |= FTS_ISW; +#endif + + if (cderrno) { + if (nlinks) { + p->fts_info = FTS_NS; + p->fts_errno = cderrno; + } else + p->fts_info = FTS_NSOK; + p->fts_accpath = cur->fts_accpath; + } else if (nlinks == 0 +#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE + || (nostat && + dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN) +#endif + ) { + p->fts_accpath = + ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name; + p->fts_info = FTS_NSOK; + } else { + /* Build a file name for fts_stat to stat. */ + if (ISSET(FTS_NOCHDIR)) { + p->fts_accpath = p->fts_path; + memmove(cp, p->fts_name, p->fts_namelen + 1); + } else + p->fts_accpath = p->fts_name; + /* Stat it. */ + p->fts_info = fts_stat(sp, p, 0); + + /* Decrement link count if applicable. */ + if (nlinks > 0 && (p->fts_info == FTS_D || + p->fts_info == FTS_DC || p->fts_info == FTS_DOT)) + --nlinks; + } + + /* We walk in directory order so "ls -f" doesn't get upset. */ + p->fts_link = NULL; + if (head == NULL) + head = tail = p; + else { + tail->fts_link = p; + tail = p; + } + ++nitems; + } + if (dirp) + (void)closedir(dirp); + + /* + * If realloc() changed the address of the path, adjust the + * addresses for the rest of the tree and the dir list. + */ + if (doadjust) + fts_padjust(sp, head); + + /* + * If not changing directories, reset the path back to original + * state. + */ + if (ISSET(FTS_NOCHDIR)) { + if (len == sp->fts_pathlen || nitems == 0) + --cp; + *cp = '\0'; + } + + /* + * If descended after called from fts_children or after called from + * fts_read and nothing found, get back. At the root level we use + * the saved fd; if one of fts_open()'s arguments is a relative path + * to an empty directory, we wind up here with no other way back. If + * can't get back, we're done. + */ + if (descend && (type == BCHILD || !nitems) && + (cur->fts_level == FTS_ROOTLEVEL ? + FCHDIR(sp, sp->fts_rfd) : + fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) { + cur->fts_info = FTS_ERR; + SET(FTS_STOP); + return (NULL); + } + + /* If didn't find anything, return NULL. */ + if (!nitems) { + if (type == BREAD) + cur->fts_info = FTS_DP; + return (NULL); + } + + /* Sort the entries. */ + if (sp->fts_compar && nitems > 1) + head = fts_sort(sp, head, nitems); + return (head); +} + +static u_short +internal_function +fts_stat(sp, p, follow) + FTS *sp; + register FTSENT *p; + int follow; +{ + register FTSENT *t; + register dev_t dev; + register ino_t ino; + struct stat *sbp, sb; + int saved_errno; + + /* If user needs stat info, stat buffer already allocated. */ + sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp; + +#if defined FTS_WHITEOUT && 0 + /* check for whiteout */ + if (p->fts_flags & FTS_ISW) { + if (sbp != &sb) { + memset(sbp, '\0', sizeof (*sbp)); + sbp->st_mode = S_IFWHT; + } + return (FTS_W); + } +#endif + + /* + * If doing a logical walk, or application requested FTS_FOLLOW, do + * a stat(2). If that fails, check for a non-existent symlink. If + * fail, set the errno from the stat call. + */ + if (ISSET(FTS_LOGICAL) || follow) { + if (stat(p->fts_accpath, sbp)) { + saved_errno = errno; + if (!lstat(p->fts_accpath, sbp)) { + errno = 0; + return (FTS_SLNONE); + } + p->fts_errno = saved_errno; + goto err; + } + } else if (lstat(p->fts_accpath, sbp)) { + p->fts_errno = errno; +err: memset(sbp, 0, sizeof(struct stat)); + return (FTS_NS); + } + + if (S_ISDIR(sbp->st_mode)) { + /* + * Set the device/inode. Used to find cycles and check for + * crossing mount points. Also remember the link count, used + * in fts_build to limit the number of stat calls. It is + * understood that these fields are only referenced if fts_info + * is set to FTS_D. + */ + dev = p->fts_dev = sbp->st_dev; + ino = p->fts_ino = sbp->st_ino; + p->fts_nlink = sbp->st_nlink; + + if (ISDOT(p->fts_name)) + return (FTS_DOT); + + /* + * Cycle detection is done by brute force when the directory + * is first encountered. If the tree gets deep enough or the + * number of symbolic links to directories is high enough, + * something faster might be worthwhile. + */ + for (t = p->fts_parent; + t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent) + if (ino == t->fts_ino && dev == t->fts_dev) { + p->fts_cycle = t; + return (FTS_DC); + } + return (FTS_D); + } + if (S_ISLNK(sbp->st_mode)) + return (FTS_SL); + if (S_ISREG(sbp->st_mode)) + return (FTS_F); + return (FTS_DEFAULT); +} + +static FTSENT * +internal_function +fts_sort(sp, head, nitems) + FTS *sp; + FTSENT *head; + register int nitems; +{ + register FTSENT **ap, *p; + + /* + * Construct an array of pointers to the structures and call qsort(3). + * Reassemble the array in the order returned by qsort. If unable to + * sort for memory reasons, return the directory entries in their + * current order. Allocate enough space for the current needs plus + * 40 so don't realloc one entry at a time. + */ + if (nitems > sp->fts_nitems) { + sp->fts_nitems = nitems + 40; + if ((sp->fts_array = realloc(sp->fts_array, + (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) { + sp->fts_nitems = 0; + return (head); + } + } + for (ap = sp->fts_array, p = head; p; p = p->fts_link) + *ap++ = p; + qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar); + for (head = *(ap = sp->fts_array); --nitems; ++ap) + ap[0]->fts_link = ap[1]; + ap[0]->fts_link = NULL; + return (head); +} + +static FTSENT * +internal_function +fts_alloc(sp, name, namelen) + FTS *sp; + const char *name; + register int namelen; +{ + register FTSENT *p; + size_t len; + + /* + * The file name is a variable length array and no stat structure is + * necessary if the user has set the nostat bit. Allocate the FTSENT + * structure, the file name and the stat structure in one chunk, but + * be careful that the stat structure is reasonably aligned. Since the + * fts_name field is declared to be of size 1, the fts_name pointer is + * namelen + 2 before the first possible address of the stat structure. + */ + len = sizeof(FTSENT) + namelen; + if (!ISSET(FTS_NOSTAT)) + len += sizeof(struct stat) + ALIGNBYTES; + if ((p = malloc(len)) == NULL) + return (NULL); + + /* Copy the name and guarantee NUL termination. */ + memmove(p->fts_name, name, namelen); + p->fts_name[namelen] = '\0'; + + if (!ISSET(FTS_NOSTAT)) + p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2); + p->fts_namelen = namelen; + p->fts_path = sp->fts_path; + p->fts_errno = 0; + p->fts_flags = 0; + p->fts_instr = FTS_NOINSTR; + p->fts_number = 0; + p->fts_pointer = NULL; + return (p); +} + +static void +internal_function +fts_lfree(head) + register FTSENT *head; +{ + register FTSENT *p; + + /* Free a linked list of structures. */ + while ((p = head)) { + head = head->fts_link; + free(p); + } +} + +/* + * Allow essentially unlimited paths; find, rm, ls should all work on any tree. + * Most systems will allow creation of paths much longer than MAXPATHLEN, even + * though the kernel won't resolve them. Add the size (not just what's needed) + * plus 256 bytes so don't realloc the path 2 bytes at a time. + */ +static int +internal_function +fts_palloc(sp, more) + FTS *sp; + size_t more; +{ + sp->fts_pathlen += more + 256; + /* + * Check for possible wraparound. In an FTS, fts_pathlen is + * a signed int but in an FTSENT it is an unsigned short. + * We limit fts_pathlen to USHRT_MAX to be safe in both cases. + */ + if (sp->fts_pathlen < 0 || sp->fts_pathlen >= USHRT_MAX) { + if (sp->fts_path) + free(sp->fts_path); + sp->fts_path = NULL; + errno = ENAMETOOLONG; + return (1); + } + sp->fts_path = realloc(sp->fts_path, sp->fts_pathlen); + return (sp->fts_path == NULL); +} + +/* + * When the path is realloc'd, have to fix all of the pointers in structures + * already returned. + */ +static void +internal_function +fts_padjust(sp, head) + FTS *sp; + FTSENT *head; +{ + FTSENT *p; + char *addr = sp->fts_path; + +#define ADJUST(p) do { \ + if ((p)->fts_accpath != (p)->fts_name) { \ + (p)->fts_accpath = \ + (char *)addr + ((p)->fts_accpath - (p)->fts_path); \ + } \ + (p)->fts_path = addr; \ +} while (0) + /* Adjust the current set of children. */ + for (p = sp->fts_child; p; p = p->fts_link) + ADJUST(p); + + /* Adjust the rest of the tree, including the current level. */ + for (p = head; p->fts_level >= FTS_ROOTLEVEL;) { + ADJUST(p); + p = p->fts_link ? p->fts_link : p->fts_parent; + } +} + +static size_t +internal_function +fts_maxarglen(argv) + char * const *argv; +{ + size_t len, max; + + for (max = 0; *argv; ++argv) + if ((len = strlen(*argv)) > max) + max = len; + return (max + 1); +} +/* + * Change to dir specified by fd or p->fts_accpath without getting + * tricked by someone changing the world out from underneath us. + * Assumes p->fts_dev and p->fts_ino are filled in. + */ +static int +fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path) +{ + int ret, oerrno, newfd; + struct stat sb; + + newfd = fd; + if (ISSET(FTS_NOCHDIR)) + return (0); + if (fd < 0 && (newfd = open(path, O_RDONLY, 0)) < 0) + return (-1); + if (fstat(newfd, &sb)) { + ret = -1; + goto bail; + } + if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) { + errno = ENOENT; /* disinformation */ + ret = -1; + goto bail; + } + ret = fchdir(newfd); +bail: + oerrno = errno; + if (fd < 0) + (void)close(newfd); + errno = oerrno; + return (ret); +} + +#endif /* !OpenBSD/NetBSD/APPLE */ diff --git a/package/cfgfs/src/fts_debg.c b/package/cfgfs/src/fts_debg.c new file mode 100644 index 000000000..c2a48af08 --- /dev/null +++ b/package/cfgfs/src/fts_debg.c @@ -0,0 +1,51 @@ +/* $MirOS: contrib/hosted/fwcf/fts_debg.c,v 1.2 2006/09/23 23:21:04 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#include + +#include "defs.h" +#include "fts_subs.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/fts_debg.c,v 1.2 2006/09/23 23:21:04 tg Exp $"); + +void +ftsf_debugent(ftsf_entry *e) +{ + fprintf(stderr, + "%s @%08X %06o %2u %u %06llX %lu:%lu %s/\033[1m%s\033[0m%c\n", + (e->etype == FTSF_DIR ? "DIR" : e->etype == FTSF_FILE ? "REG" : + e->etype == FTSF_SYMLINK ? "SYM" : "OTH"), + (unsigned)e->statp->st_ino, (unsigned)e->statp->st_mode, + e->statp->st_nlink, (unsigned)e->statp->st_mtime, + (uint64_t)e->statp->st_size, (u_long)e->statp->st_uid, + (u_long)e->statp->st_gid, ftsf_prefix, e->pathname, + ((e->statp->st_mode & S_IFMT) == S_IFDIR ? '/' : + (e->statp->st_mode & S_IFMT) == S_IFIFO ? '|' : + (e->statp->st_mode & S_IFMT) == S_IFLNK ? '@' : + (e->statp->st_mode & S_IFMT) == S_IFSOCK ? '=' : + (e->statp->st_mode & S_IFMT) == S_IFBLK ? '&' : + (e->statp->st_mode & S_IFMT) == S_IFCHR ? '%' : + (e->statp->st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) ? '*' : '_')); +} diff --git a/package/cfgfs/src/fts_gnu.h b/package/cfgfs/src/fts_gnu.h new file mode 100644 index 000000000..08d45a085 --- /dev/null +++ b/package/cfgfs/src/fts_gnu.h @@ -0,0 +1,137 @@ +/** $MirOS: contrib/hosted/fwcf/fts_gnu.h,v 1.1 2006/09/24 00:28:32 tg Exp $ */ +/* $OpenBSD: fts.h,v 1.11 2005/06/17 20:36:55 millert Exp $ */ +/* $NetBSD: fts.h,v 1.5 1994/12/28 01:41:50 mycroft Exp $ */ + +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)fts.h 8.3 (Berkeley) 8/14/94 + */ + +#ifndef _FTS_H_ +#define _FTS_H_ + +#include +#include + +/* The fts interface is incompatible with the LFS interface which + transparently uses the 64-bit file access functions on GNU OS. */ +#ifdef __USE_FILE_OFFSET64 +# error " cannot be used with -D_FILE_OFFSET_BITS==64" +#endif + +struct _fts_private; /* implementation data */ + +typedef struct { + struct _ftsent *fts_cur; /* current node */ + struct _ftsent *fts_child; /* linked list of children */ + struct _ftsent **fts_array; /* sort array */ + dev_t fts_dev; /* starting device # */ + char *fts_path; /* path for this descent */ + int fts_rfd; /* fd for root */ + size_t fts_pathlen; /* sizeof(path) */ + int fts_nitems; /* elements in the sort array */ + int (*fts_compar)(); /* compare function */ + +#define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */ +#define FTS_LOGICAL 0x0002 /* logical walk */ +#define FTS_NOCHDIR 0x0004 /* don't change directories */ +#define FTS_NOSTAT 0x0008 /* don't get stat info */ +#define FTS_PHYSICAL 0x0010 /* physical walk */ +#define FTS_SEEDOT 0x0020 /* return dot and dot-dot */ +#define FTS_XDEV 0x0040 /* don't cross devices */ +#define FTS_OPTIONMASK 0x00ff /* valid user option mask */ + +#define FTS_NAMEONLY 0x1000 /* (private) child names only */ +#define FTS_STOP 0x2000 /* (private) unrecoverable error */ + int fts_options; /* fts_open options, global flags */ + struct _fts_private *fts_priv; /* Implementation data */ +} FTS; + +typedef struct _ftsent { + struct _ftsent *fts_cycle; /* cycle node */ + struct _ftsent *fts_parent; /* parent directory */ + struct _ftsent *fts_link; /* next file in directory */ + long fts_number; /* local numeric value */ + void *fts_pointer; /* local address value */ + char *fts_accpath; /* access path */ + char *fts_path; /* root path */ + int fts_errno; /* errno for this node */ + int fts_symfd; /* fd for symlink */ + size_t fts_pathlen; /* strlen(fts_path) */ + size_t fts_namelen; /* strlen(fts_name) */ + + ino_t fts_ino; /* inode */ + dev_t fts_dev; /* device */ + nlink_t fts_nlink; /* link count */ + +#define FTS_ROOTPARENTLEVEL -1 +#define FTS_ROOTLEVEL 0 + short fts_level; /* depth (-1 to N) */ + +#define FTS_D 1 /* preorder directory */ +#define FTS_DC 2 /* directory that causes cycles */ +#define FTS_DEFAULT 3 /* none of the above */ +#define FTS_DNR 4 /* unreadable directory */ +#define FTS_DOT 5 /* dot or dot-dot */ +#define FTS_DP 6 /* postorder directory */ +#define FTS_ERR 7 /* error; errno is set */ +#define FTS_F 8 /* regular file */ +#define FTS_INIT 9 /* initialized only */ +#define FTS_NS 10 /* stat(2) failed */ +#define FTS_NSOK 11 /* no stat(2) requested */ +#define FTS_SL 12 /* symbolic link */ +#define FTS_SLNONE 13 /* symbolic link without target */ + unsigned short fts_info; /* user flags for FTSENT structure */ + +#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ +#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ + unsigned short fts_flags; /* private flags for FTSENT structure */ + +#define FTS_AGAIN 1 /* read node again */ +#define FTS_FOLLOW 2 /* follow symbolic link */ +#define FTS_NOINSTR 3 /* no instructions */ +#define FTS_SKIP 4 /* discard node */ + unsigned short fts_instr; /* fts_set() instructions */ + + struct stat *fts_statp; /* stat(2) information */ + char fts_name[1]; /* file name */ +} FTSENT; + +#include + +__BEGIN_DECLS +FTSENT *fts_children(FTS *, int); +int fts_close(FTS *); +FTS *fts_open(char * const *, int, + int (*)(const FTSENT **, const FTSENT **)); +FTSENT *fts_read(FTS *); +int fts_set(FTS *, FTSENT *, int); +__END_DECLS + +#endif /* !_FTS_H_ */ diff --git a/package/cfgfs/src/fts_subs.c b/package/cfgfs/src/fts_subs.c new file mode 100644 index 000000000..ec40219f8 --- /dev/null +++ b/package/cfgfs/src/fts_subs.c @@ -0,0 +1,163 @@ +/* $MirOS: contrib/hosted/fwcf/fts_subs.c,v 1.8 2007/07/02 14:53:03 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#include +#include +#if !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) +#include "fts_gnu.h" +#else +#include +#endif +#include +#include + +#include "defs.h" +#define FTSF_INTERNALS +#include "fts_subs.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/fts_subs.c,v 1.8 2007/07/02 14:53:03 tg Exp $"); + +static FTS *handle; + +char ftsf_prefix[PATH_MAX]; +size_t ftsf_prefixlen; + +void +ftsf_start(const char *root) +{ + char *paths[2]; + + if (handle != NULL) { + if (fts_close(handle)) + warn("fts_close"); + free(handle); + } + + if (realpath(root, ftsf_prefix) == NULL) + err(1, "determine realpath for %s", root); + ftsf_prefixlen = strlen(ftsf_prefix) + 1; + + paths[0] = ftsf_prefix; + paths[1] = NULL; + + handle = fts_open(paths, FTS_NOCHDIR | FTS_PHYSICAL, NULL); + + if (handle == NULL) + err(1, "fts_open on %s for %s", ftsf_prefix, root); +} + +int +ftsf_next(ftsf_entry *e) +{ + FTSENT *ent; + char *ename; + + memset(e, 0, sizeof (ftsf_entry)); + + if (handle == NULL) { + warn("ftsf_next called before ftsf_open"); + return (-1); + } + + ftsf_continue: + if ((ent = fts_read(handle)) == NULL) { + if (errno == 0) { + if (fts_close(handle)) + warn("fts_close"); + handle = NULL; + return (0); + } + warn("fts_read"); + if (fts_close(handle)) + warn("fts_close"); + handle = NULL; + return (-1); + } + + ename = ent->fts_path; +#if 0 /* debug */ + if (asprintf(&ename, "accpath<%s> path<%s> name<%s>", ent->fts_accpath, + ent->fts_path, ent->fts_name) == -1) + err(1, "asprintf"); +#endif + if (strcmp(ename, ftsf_prefix)) { + if (strlcpy(e->pathname, ename + ftsf_prefixlen, + sizeof (e->pathname)) >= sizeof (e->pathname)) + warn("truncating file name '%s' to '%s'", ename, + e->pathname); + } else + memcpy(e->pathname, ".", 2); + + switch (ent->fts_info) { + case FTS_D: + e->etype = FTSF_DIR; + break; + case FTS_DNR: + warn("directory %s not readable, skipping: %s", ename, + strerror(ent->fts_errno)); + /* FALLTHROUGH */ + case FTS_DC: + case FTS_DOT: + case FTS_DP: + goto ftsf_continue; + case FTS_DEFAULT: + if (S_ISDIR(ent->fts_statp->st_mode)) + e->etype = FTSF_DIR; + else if (S_ISREG(ent->fts_statp->st_mode)) + e->etype = FTSF_FILE; + else if (S_ISLNK(ent->fts_statp->st_mode)) + e->etype = FTSF_SYMLINK; + else + e->etype = FTSF_OTHER; + break; + case FTS_ERR: + warn("generic error condition %s on %s, skipping", + strerror(ent->fts_errno), ename); + goto ftsf_continue; + case FTS_F: + e->etype = FTSF_FILE; + break; + case FTS_NSOK: + ent->fts_errno = 0; + /* FALLTHROUGH */ + case FTS_NS: + warn("skipping due to no stat(2) information on %s: %s", + ename, strerror(ent->fts_errno)); + goto ftsf_continue; + case FTS_SL: + case FTS_SLNONE: + e->etype = FTSF_SYMLINK; + break; + default: + warn("unknown fts_info field for %s: %d, skipping", + ename, (int)ent->fts_info); + warn("ent->fts_errno = %d (%s)", ent->fts_errno, + strerror(ent->fts_errno)); + goto ftsf_continue; + } + + e->statp = ent->fts_statp; + return (1); +} diff --git a/package/cfgfs/src/fts_subs.h b/package/cfgfs/src/fts_subs.h new file mode 100644 index 000000000..c7d2c10fc --- /dev/null +++ b/package/cfgfs/src/fts_subs.h @@ -0,0 +1,37 @@ +/* $MirOS: contrib/hosted/fwcf/fts_subs.h,v 1.6 2006/09/26 10:25:03 tg Exp $ */ + +/* + * This file is part of the FreeWRT project. FreeWRT is copyrighted + * material, please see the LICENCE file in the top-level directory + * or at http://www.freewrt.org/licence for details. + */ + +#ifndef FTS_SUBS_H +#define FTS_SUBS_H + +struct FTSF_ENTRY { + char pathname[MAXPATHLEN]; + struct stat *statp; + enum { + FTSF_DIR, + FTSF_FILE, + FTSF_SYMLINK, + FTSF_OTHER + } etype; +}; +#ifndef PACK_H +typedef struct FTSF_ENTRY ftsf_entry; +#endif + +#ifndef FTSF_INTERNALS +extern const char ftsf_prefix[]; +#endif + +__BEGIN_DECLS +void ftsf_start(const char *); +/* returns -1 on error, 0 on empty, 1 on okay */ +int ftsf_next(ftsf_entry *); +void ftsf_debugent(ftsf_entry *); +__END_DECLS + +#endif diff --git a/package/cfgfs/src/fwcf.helper/Makefile b/package/cfgfs/src/fwcf.helper/Makefile new file mode 100644 index 000000000..882c0d486 --- /dev/null +++ b/package/cfgfs/src/fwcf.helper/Makefile @@ -0,0 +1,51 @@ +# $MirOS: contrib/hosted/fwcf/fwcf.helper/Makefile,v 1.9 2007/03/13 18:14:31 tg Exp $ +#- +# This file is part of the FreeWRT project. FreeWRT is copyrighted +# material, please see the LICENCE file in the top-level directory +# or at http://www.freewrt.org/licence for details. + +PROG= fwcf.helper +SRCS= tool.c sys_bsd.c +CFLAGS_tool.o+= -DSMALL +_CFLADD+= tool.o +NOMAN= Yes +SRCS+= compress.c +SRCS+= cpr_get.c +SRCS+= cpr_list.c +SRCS+= cpr_lsth.c +SRCS+= ft_creat.c +SRCS+= ft_pack.c +SRCS+= ft_packm.c +SRCS+= fts_subs.c +SRCS+= header.c +SRCS+= minilzop.c +SRCS+= unwraps.c +SRCS+= wraps.c +CLEANFILES+= ${.CURDIR}/test.out ${.CURDIR}/test.nil + +LIB= # don't need, thanks + +.ifdef COMPRESSOR_ZLIB +SRCS+= c_zlib.c +DPADD+= ${LIBZ} +LDADD+= -lz +.else +SRCS+= c_lzo1x1.c +.endif + +test: ${PROG} + ./${PROG} -M ${.CURDIR}/../mkfwcf/CVS >${.CURDIR}/test.out + ./${PROG} -Me >${.CURDIR}/test.nil +# ./${PROG} -U out.test <${.CURDIR}/../mkfwcf/test.out +.ifdef COMPRESSOR_ZLIB + ./${PROG} -U out.tesz <${.CURDIR}/../mkfwcf/tesz.out +.else + ./${PROG} -U out.tesL <${.CURDIR}/../mkfwcf/tesL.out +.endif + +.include + +clean cleandir: clean-local + +clean-local: + -rm -rf out.test out.tesz out.tesL diff --git a/package/cfgfs/src/fwcf.sh b/package/cfgfs/src/fwcf.sh new file mode 100644 index 000000000..ad75ee79e --- /dev/null +++ b/package/cfgfs/src/fwcf.sh @@ -0,0 +1,384 @@ +#!/bin/sh +#- +# Copyright (c) 2006, 2007 +# Thorsten Glaser +# Copyright (c) 2009 +# Waldemar Brodkorb +# +# Provided that these terms and disclaimer and all copyright notices +# are retained or reproduced in an accompanying document, permission +# is granted to deal in this work without restriction, including un- +# limited rights to use, publicly perform, distribute, sell, modify, +# merge, give away, or sublicence. +# +# This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to +# the utmost extent permitted by applicable law, neither express nor +# implied; without malicious intent or gross negligence. In no event +# may a licensor, author or contributor be held liable for indirect, +# direct, other damage, loss, or other issues arising in any way out +# of dealing in the work, even if advised of the possibility of such +# damage or existence of a defect, except proven that it results out +# of said person's immediate fault when using the work as intended. +#- +# Possible return values: +# 0 - everything ok +# 1 - syntax error +# 1 - no 'cfgfs' mtd/cf partition found +# 1 - cfgfs erase: failed +# 1 - cfgfs setup: already run +# 3 - cfgfs setup: mount --bind problems +# 4 - cfgfs setup: can't create or write to temporary filesystem +# 5 - cfgfs setup: can't bind the tmpfs to /etc +# 6 - cfgfs commit: cannot write to partition +# 6 - cfgfs restore: cannot write to partition +# 7 - cfgfs commit: won't write to flash because of unclean setup +# 8 - cfgfs status: differences found +# 9 - cfgfs status: old status file not found +# 10 - cfgfs dump: failed +# 11 - cfgfs commit: cfgfs setup not yet run (use -f to force) +# 11 - cfgfs status: cfgfs setup not yet run +# 12 - cfgfs restore: cannot read the backup +# 255 - cfgfs erase: failed +# 255 - internal error + +export PATH=/bin:/sbin:/usr/bin:/usr/sbin +wd=$(pwd) +cd / +what='Configuration Filesystem (cfgfs), Version 1.06' + +usage() { + cat >&2 <&2 <] +EOF + exit 1 ;; +esac + +uname=$(uname -m) +if [[ "$uname" = "i586" ]];then + part=/dev/sda2 +else + part=/dev/mtd$(fgrep '"cfgfs"' /proc/mtd 2>/dev/null | sed 's/^mtd\([^:]*\):.*$/\1/')ro +fi + +if [[ ! -e $part ]]; then + echo 'cfgfs: fatal error: no "cfgfs" partition found!' + exit 1 +fi + +if test $1 = erase; then + dd if="$part" 2>&1 | md5sum 2>&1 >/dev/urandom + cfgfs.helper -Me | cfgfs.write + exit $? +fi + +if test $1 = setup; then + if test -e /tmp/.cfgfs; then + echo 'cfgfs: error: "cfgfs setup" already run!' + exit 1 + fi + mkdir /tmp/.cfgfs + if test ! -d /tmp/.cfgfs; then + echo 'cfgfs: error: cannot create temporary directory!' + exit 4 + fi + chown 0:0 /tmp/.cfgfs + chmod 700 /tmp/.cfgfs + mkdir /tmp/.cfgfs/root + mount --bind /etc /tmp/.cfgfs/root + mkdir /tmp/.cfgfs/temp + mount -t tmpfs -o size=960k cfgfs /tmp/.cfgfs/temp + (cd /tmp/.cfgfs/root; tar cf - .) | (cd /tmp/.cfgfs/temp; tar xpf -) + unclean=0 + if [[ $1 = -N ]]; then + unclean=2 + else + x=$(dd if="$part" bs=4 count=1 2>/dev/null) + [[ "$x" = "FWCF" ]] || cfgfs.helper -Me | cfgfs.write + if ! cfgfs.helper -U /tmp/.cfgfs/temp <"$part"; then + unclean=1 + echo 'cfgfs: error: cannot extract' + echo unclean startup | logger -t 'cfgfs setup' + fi + if test -e /tmp/.cfgfs/temp/.cfgfs_deleted; then + while IFS= read -r file; do + rm -f "/tmp/.cfgfs/temp/$file" + done /tmp/.cfgfs/temp/.cfgfs_unclean + rm -f /tmp/.cfgfs/temp/.cfgfs_done + if test -e /tmp/.cfgfs/temp/.cfgfs_done; then + echo 'cfgfs: fatal: this is not Kansas any more' + umount /tmp/.cfgfs/temp + umount /tmp/.cfgfs/root + rm -rf /tmp/.cfgfs + exit 3 + fi + echo -n >/tmp/.cfgfs/temp/.cfgfs_done + if test ! -e /tmp/.cfgfs/temp/.cfgfs_done; then + echo 'cfgfs: fatal: cannot write to tmpfs' + umount /tmp/.cfgfs/temp + umount /tmp/.cfgfs/root + rm -rf /tmp/.cfgfs + exit 4 + fi + chmod 755 /tmp/.cfgfs/temp + mount --bind /tmp/.cfgfs/temp /etc + if test ! -e /etc/.cfgfs_done; then + umount /etc + echo 'cfgfs: fatal: binding to /etc failed' + if test $unclean = 0; then + echo 'cfgfs: configuration is preserved' \ + in /tmp/.cfgfs/temp + else + umount /tmp/.cfgfs/temp + fi + exit 5 + fi + umount /tmp/.cfgfs/temp + echo complete, unclean=$unclean | logger -t 'cfgfs setup' + cd /etc + rm -f .rnd + find . -type f | grep -v -e '^./.cfgfs' -e '^./.rnd$' | sort | \ + xargs md5sum | sed 's! ./! !' | \ + cfgfs.helper -Z - /tmp/.cfgfs/status.asz + exit 0 +fi + +if test $1 = commit; then + umount /tmp/.cfgfs/temp >/dev/null 2>&1 + if test ! -e /tmp/.cfgfs; then + cat >&2 <<-EOF + cfgfs: error: not yet initialised + explanation: "cfgfs setup" was not yet run + EOF + [[ $1 = -f ]] || exit 11 + fi + if test -e /etc/.cfgfs_unclean; then + cat >&2 <<-EOF + cfgfs: error: unclean startup (or setup run with -N)! + explanation: during boot, the cfgfs filesystem could not + be extracted; saving the current /etc to flash will + result in data loss; to override this check, remove + the file /etc/.cfgfs_unclean and try again. + EOF + [[ $1 = -f ]] || exit 7 + fi + mount -t tmpfs -o size=960k swap /tmp/.cfgfs/temp + (cd /etc; tar cf - .) | (cd /tmp/.cfgfs/temp; tar xpf -) + cd /tmp/.cfgfs/temp + find . -type f | grep -v -e '^./.cfgfs' -e '^./.rnd$' | sort | \ + xargs md5sum | sed 's! ./! !' | \ + cfgfs.helper -Z - /tmp/.cfgfs/status.asz + cd /tmp/.cfgfs/root + rm -f /tmp/.cfgfs/temp/.cfgfs_* /tmp/.cfgfs/temp/.rnd + find /tmp/.cfgfs/temp -type d -empty -delete + find . -type f | while read f; do + f=${f#./} + if [[ ! -e /tmp/.cfgfs/temp/$f ]]; then + [[ $f = .rnd ]] && continue + printf '%s\n' "$f" >>/tmp/.cfgfs/temp/.cfgfs_deleted + continue + fi + x=$(md5sum "$f" 2>/dev/null) + y=$(cd ../temp; md5sum "$f" 2>/dev/null) + [[ "$x" = "$y" ]] && rm "../temp/$f" + done + rv=0 + if ! ( cfgfs.helper -M /tmp/.cfgfs/temp | cfgfs.write ); then + echo 'cfgfs: error: cannot write to $part!' + rv=6 + fi + umount /tmp/.cfgfs/temp + exit $rv +fi + +if test $1 = status; then + if test ! -e /tmp/.cfgfs; then + cat >&2 <<-EOF + cfgfs: error: not yet initialised + explanation: "cfgfs setup" was not yet run + EOF + [[ $1 = -f ]] || exit 11 + fi + rm -f /tmp/.cfgfs/*_status /tmp/.cfgfs/*_files + rflag=0 + q=printf # or : (true) if -q + shift + while getopts "rq" ch; do + case $ch in + (r) rflag=1 ;; + (q) q=: ;; + esac + done + shift $((OPTIND - 1)) + if test $rflag = 1; then + f=/tmp/.cfgfs/rom_status + cd /tmp/.cfgfs/root + find . -type f | grep -v -e '^./.cfgfs' -e '^./.rnd$' | sort | \ + xargs md5sum | sed 's! ./! !' >$f + else + f=/tmp/.cfgfs/status + cfgfs.helper -Zd $f.asz $f || rm -f $f + fi + if [[ ! -e $f ]]; then + echo 'cfgfs: error: old status file not found' + exit 9 + fi + cd /etc + find . -type f | grep -v -e '^./.cfgfs' -e '^./.rnd$' | sort | \ + xargs md5sum | sed 's! ./! !' >/tmp/.cfgfs/cur_status || exit 255 + cd /tmp/.cfgfs + sed 's/^[0-9a-f]* //' <$f >old_files + sed 's/^[0-9a-f]* //' cur_files + # make *_status be of exactly the same length, for benefit of the + # while ... read $name" >>cur_status + done + comm -13 old_files cur_files | while read name; do + echo " $name" >>$f + done + # this implementation of sort -o sucks: doesn't do in-place edits + sort -k2 -o sold_status $f + sort -k2 -o snew_status cur_status + gotany=0 + while :; do + IFS=' ' read oldsum oldname <&3 || break + IFS=' ' read newsum newname <&4 || exit 255 + [[ "$oldname" = "$newname" ]] || exit 255 + [[ "$oldsum" = "$newsum" ]] && continue + [[ $gotany = 0 ]] && $q '%-32s %-32s %s\n' \ + 'MD5 hash of old file' 'MD5 hash of new file' 'filename' + gotany=8 + test $q = : && break + $q '%32s %32s %s\n' "$oldsum" "$newsum" "$oldname" + done 3/dev/null 2>&1 + tar -cf - dump seed | (cd "$wd"; cfgfs.helper -Z - $fn) + cd / + rm -rf /tmp/.cfgfs.dump + case $fn in + (-) echo "cfgfs: dump to standard output complete." + ;; + (*) echo "cfgfs: dump to '$fn' complete." + ls -l "$fn" >&2 + ;; + esac + exit 0 +fi + +if test $1 = restore; then + if test -e /tmp/.cfgfs; then + echo 'cfgfs: warning: "cfgfs setup" already run!' + echo 'please reboot after restoring; in no event' + echo 'run "cfgfs commit" to prevent data loss' + echo -n >/etc/.cfgfs_unclean + fi + fn=$2 + [[ -n $fn ]] || fn=- + rm -rf /tmp/.cfgfs.restore + mkdir -m 0700 /tmp/.cfgfs.restore + cd /tmp/.cfgfs.restore + if ! (cd "$wd"; cfgfs.helper -Zd "$fn") | tar -xf -; then + cd / + rm -rf /tmp/.cfgfs.restore + exit 12 + fi + dd if=seed of=/dev/urandom bs=256 count=1 >/dev/null 2>&1 + if test ! -e dump; then + echo 'cfgfs: error: invalid backup' + cd / + rm -rf /tmp/.cfgfs.restore + exit 12 + fi + if ! ( cfgfs.helper -MD dump | cfgfs.write ); then + echo 'cfgfs: error: cannot write to $part!' + exit 6 + fi + cd / + rm -rf /tmp/.cfgfs.restore + case $fn in + (-) echo "cfgfs: restore from standard output complete." + ;; + (*) echo "cfgfs: restore from '$fn' complete." + ls -l "$fn" >&2 + ;; + esac + exit 0 +fi + +echo 'cfgfs: cannot be reached...' +exit 255 diff --git a/package/cfgfs/src/fwcf.txt b/package/cfgfs/src/fwcf.txt new file mode 100644 index 000000000..ba23af470 --- /dev/null +++ b/package/cfgfs/src/fwcf.txt @@ -0,0 +1,434 @@ + FreeWRT Configuration Filesystem + â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• + + Specification Document + + Version 1.04 - 2 July 2007 + + +Copyright © 2006, 2007 + Thorsten Glaser + +Provided that these terms and disclaimer and all copyright notices +are retained or reproduced in an accompanying document, permission +is granted to deal in this work without restriction, including un- +limited rights to use, publicly perform, distribute, sell, modify, +merge, give away, or sublicence. + +Advertising materials mentioning features or use of this work must +display the following acknowledgement: + This product includes material provided by Thorsten Glaser + for the FreeWRT Project. + +This work is provided “AS IS†and WITHOUT WARRANTY of any kind, to +the utmost extent permitted by applicable law, neither express nor +implied; without malicious intent or gross negligence. In no event +may a licensor, author or contributor be held liable for indirect, +direct, other damage, loss, or other issues arising in any way out +of dealing in the work, even if advised of the possibility of such +damage or existence of a defect, except proven that it results out +of said person's immediate fault when using the work as intended. + + +1. Abstract +――――――――――― + +FreeWRT is an operating system for embedded devices. At the moment, +it provides a uClibc/GNU/Linux-based operating environment for mips- +based hardware routers, e.g. from Linksys or Asus. + +FreeWRT operates on flash memory and as such is under constraints to +reduce the amount of write operations to the root filesystem, because +flash memory has limited lifetime. Changing the file-based configura- +tion in /etc, however, often requires a fair amount of write opera- +tions; furthermore, usual reconfiguration operations change more than +only one file, possibly erasing and re-writing the same flash memory +block several times. In addition, in between these changes, the sy- +stem is in an inconsistent state, and, if the configuration changes +render the system unusable, a simple reboot will not be able to fix +it, a full reflash and reconfiguration is required. + +My proposed implementation will present /etc as a memory filesystem, +loaded at boot with the content of the underlying /etc from the de- +fault root filesystem (usually on squashfs or jffs2), then populated +with additional files read from a custom flash partition in the be- +low documented format. Changes to /etc will never be reflected in the +underlying root filesystem, and the fwcf partition is only updated by +a userland programme to be run manually. + + +2. Implementation details +――――――――――――――――――――――――― + +The size of the flash partition has been set by the FreeWRT project +to 128 KiB (usually two flash blocks). A custom flash map driver has +been added to the FreeWRT kernel before the import of fwcf. + +The command-line utility will support three operations: +• fwcf setup to be run by the rc bootup script early +• fwcf commit similar to Cisco ‘write’ +• fwcf erase similar to Cisco ‘erase startup-config’ +• fwcf status NEW IN 1.03: check if commit is needed +• fwcf dump NEW IN 1.03: make a backup of the fwcf filesystem +• fwcf restore NEW IN 1.03: restore a previously made backup +• halt \ +• poweroff > NEW IN 1.04: wrapper around busybox +• reboot / + +This utility is implemented as rapid prototype as a shell script in +ash, using one C helper programme. Later versions will be pure C. + + +2.1. Operation of ‘fwcf setup’ +―――――――――――――――――――――――――――――― + +This command will first remap the existing /etc (via ‘mount --bind’) +to /tmp/.fwcf/root. Then, it will create a memory filesystem (tmpfs) +at /tmp/.fwcf/temp and populate it with all files from /tmp/.fwcf/root. +Now, the fwcf flash partition will be read, the format and checksum +verified and data extracted to /tmp/.fwcf/temp, possibly overwriting +pre-existing files†. Then, the /tmp/.fwcf/temp filesystem will be re- +bound to /etc and, finally, the mountpoint at /tmp/.fwcf/temp unloaded. + +NEW IN 1.03: If /etc/.fwcf_deleted exists, the files listed in it, +newline-separated, will be removed from and relative to /etc, then +the file itself will be removed. + +Data from the end of the fwcf data in the flash partition to the +end of the 64 KiB block the end of data resides in will be written +to /dev/urandom. + +NEW IN 1.03: Afterwards, a sorted list of all files is given to the +busybox md5sum applet, the output is stored as /tmp/.fwcf/status.asz + +If the “fwcf†mtd partition does not start with the four letters +FWCF on invoking ‘fwcf setup’, it is erased (i.e. populated with +an empty FWCF filesystem). + +NEW IN 1.03: If run with ‘-N’, it will not read out the data from +flash and force an “unclean startupâ€, as described below. + +†) NEW IN 1.03: If this fails, but the “fwcf†mtd partition starts +with FWCF, i.e. we cannot read the flash filesystem, possibly because +it's from an incompatible format or unknown compressor, a flag file +is created as /etc/.fwcf_unclean to prevent a following commit which +would lead to data loss. The user must remove this file to override. + + +2.2. Operation of ‘fwcf commit’ +――――――――――――――――――――――――――――――― + +A new memory filesystem (tmpfs) will be createt at /tmp/.fwcf/temp +and populated with the data currently in /etc. Now, NEW IN 1.03, +the /tmp/.fwcf/status.asz file is recreated. Then, ALSO NEW IN 1.03, +files in /tmp/.fwcf/root but not in /tmp/.fwcf/temp will be listed +in /tmp/.fwcf/temp/.fwcf_deleted, newline-separated. Now, all files +with exactly the same content in /tmp/.fwcf/root will be removed +from /tmp/.fwcf/temp. Any remaining files will be packed into the +fwcf format documented below and written to the flash partition, +padded to a multiple of 64 KiB with data read from /dev/urandom. + +Unclean setups, NEW IN 1.03, will prevent a commit, unless the +file /etc/.fwcf_unclean is removed manually, or the ‘-f’ option +is given. + +The first public release does only support directories, files +and symbolic links, for simplicity. Stored hard links and other +file types will be skipped, because their storage format is al- +ready specified (as “reserved for future useâ€), and ignored. No +inode or file-sequential-number information is read or written. + + +2.3. Operation of ‘fwcf erase’ +―――――――――――――――――――――――――――――― + +In theory, just writing a NUL byte to the beginning of the flash +partition would suffice. However, this requires an mtd erase and +flash operation of one entire flash block (usually 64 KiB), so an +empty fwcf filesystem padded with random data to the next 64 KiB +will be written instead, for the added benefit of improving the +quality of the kernel PRNG even over total reconfigurations. + + +2.4. Operation of ‘fwcf status’ (NEW IN 1.03) +――――――――――――――――――――――――――――――― ┄┄┄┄┄┄┄┄┄┄┄┄┄ + +For all files in /etc, the ‘md5sum’ busybox applet is run, output +stored in a temporary file and compared against the saved values +from ‘fwcf setup’. If the ‘-q’ flag is not given, the differences +are shown as “â€, where the md5 +is expressed as shown by the busybox applet, or as padded¹ Ҡ+if the file does not exist on either side, where “old†is the status +at fwcf setup time (or the /etc from the root fs, if ‘-r’ is given), +and “new†is the status of the current (tmpfs) /etc. If there are +no differences, the exit status is 0, non-0 otherwise. + +If the ‘-r’ flag is given, operation is done against the data that +is stored in the ROM, without considering the contents of the FWCF +filesystem, instead. + +¹) Every “MD5†value is padded to be 32 bytes long, at its left + side, with spaces (just to clarify). + + +2.5. Operation of ‘fwcf dump’ (NEW IN 1.03) +――――――――――――――――――――――――――――― ┄┄┄┄┄┄┄┄┄┄┄┄┄ + +A dump of the data currently stored in flash (commit first if you +have changed anything!) is dumped to the filename argument, or to +standard output, if none is present. + +Note: dumps are a LZO1X compressed tarball of a 256-byte entropy +seed (“seedâ€) and the contents of the “inner filesystem†in “asz†+format (“dumpâ€), which is stored as .tar.asz itself. There is no +version information, and this is by design. + +Implementation information: the fwcf helper tool has a new mo- +de of operation in which it works as compressor/decompressor – +the algorithm used is determined with the -C option on a build +system, and at compile time (i.e. the only one compiled in) on +the target system. That's a compromise relative to using gzip, +because it makes dumps depend on the compression algorithms in +use, but it's always LZO1X-1 in FreeWRT 1.03 and up, and no de- +pendency on a 50+ KiB gzip binary is added; the .tar.asz enco- +ded dump can be recompressed with the tool on the build system. + +While the dump itself is tar → compressed → asz encoded, “asz†+itself is not a compressing format, just a storage container – +which stores one octet stream, plus size and checksum informa- +tion only. Because many compressors have no idea about the un- +compressed size, the actual encoded data is prefixed by a lit- +tle endian unsigned 32-bit integer of the uncompressed length; +the resulting larger buffer is then passed to the asz encoder. + + +2.6. Operation of ‘fwcf restore’ (NEW IN 1.03) +―――――――――――――――――――――――――――――――― ┄┄┄┄┄┄┄┄┄┄┄┄┄ + +A dump created with “fwcf dump†is expected to be read from the +filename argument, or standard input, if none is present, and +then written to flash. + + +3. Structure of the fwcf data +――――――――――――――――――――――――――――― + +All data is written in little-endian format. + +The fwcf data begins at offset 0 in the flash partition, with the +magic bytes “FWCF†(0x46435746). + +The next doubleword (four bytes) is the “outer length†of the fwcf +data, including the header (including the magic bytes and the length +information itself) and the trailer (checksum), but not the padding; +the length takes up the lower 24 bits of this doubleword. The upper +8 bits are the (major) version of the specification adhered to, i.e. +0x01 for this document. This information shall be true for all ver- +sions of this specification in order to enable the fwcf command-line +utility to perform as follows: it is not required to process any non- +native versions of fwcf data, but even if reading a different version, +the random data used for the padding should be written to /dev/urandom. + +The following information is dependent on the version of the speci- +fication. + +The next doubleword (starting at offset 8) is the “inner length†of +the compressed fwcf data (lower 24 bit), or'd with the identification +number of the compression algorithm used (upper 8 bit). Note this ef- +fectively limits both the uncompressed and the compressed size of an +fwcf filesystem to 2²ⴠbytes = 16 MiB. Since the filesystem is de- +signed for /etc, this limitation is not expected to be troublesome. + +After this, at offset 12, the compressed data starts. It is padded +to the next 4-byte boundary with zeroes. + +The next doubleword is the ADLER-32 checksum (as defined by libz) +of all previous data, starting from the magic bytes at offset 0, +ending with the zero-padding of the compressed data. Note that this +does not check the integrity of the data after decompressing; cur- +rently we must trust the decompressor to check integrity and do a +length check on the decompressed data returned by the plugin our- +selves. The next major version of the specification may change that. + + +4. Compression algorithm allocation +――――――――――――――――――――――――――――――――――― + +An implementation is only required to be able to use exactly one of +the compression algorithms defined below, but it is not required to +implement a specific algorithm. Conversion might be achieved by un- +and repacking the data, or using an fwcf implementation with multi- +ple algorithms. Every implementation, however, is required to offer +at least one of the non-private algorithms below. + +This draft of the specification offers two compression algorithms: + +0x00 = plain uncompressed data +0x01 = zlib deflate compression as per http://www.zlib.net/ +0x10 = LZO1X as per http://www.oberhumer.com/opensource/lzo/ + +Algorithm codes from 0xE0 to 0xFF are available for private use. + + +5. Structure of the fwcf filesystem +――――――――――――――――――――――――――――――――――― + +The compressed/inner data consists of a byte stream without padding +applied, in the following format: + +entry ::= file-entry | NUL-byte + +file-entry ::= pathname NUL-byte attributes NUL-byte data + +attributes ::= attribute ( attribute )* + +The pathname is a POSIX pathname, i.e. can contain any character +except NUL. Directories are separated with ‘/’ and automatically +created by the extraction tool if required. If the first octet +of the pathname is a NUL byte (i.e. it is of zero length), the +end of the filesystem has been reached. Any data read afterwards +MUST be discarded for security reasons. + +Attributes consist of a one-byte identifier, which is usually a +letter, and a zero-to-multiple-bytes payload. If the identifier +is a letter, its lowercase and uppercase forms denote the same +attribute with a different payload length. + +The raw file data is not padded or aligned; its length is an at- +tribute. Alternate streams / forks are not supported. + + +6. Currently defined attributes +――――――――――――――――――――――――――――――― + +0x01 this file is a block special device â‘  + no payload + reserved for future use + +0x02 this file is a character special device â‘  + no payload + reserved for future use + +0x03 this file is a symbolic link â‘¡ + no payload + +0x04 this file is a hard link to another file â‘  â‘£ + no payload + reserved for future use + +0x05 this file is a directory â‘£ + no payload + +0x0D this file is deleted â‘  + reserved for future use + +0x10 modification time of the entry + optional + ignored for symbolic links + payload length: 32 bit + +g/G group of the file (numeric GID) + optional + payload length: lowercase = 8 bit, uppercase = 32 bit + +i/I “inode†of the file â‘  â‘£ + required if this file is a hard link source or target + optional (ignored) otherwise + payload length: lowercase = 8 bit, uppercase = 16 bit + reserved for future use + +m/M mode_t / permissions of the file â‘¢ + optional + ignored for symbolic links + payload length: lowercase = 16 bit, uppercase = 32 bit + +o/O owner of the file (numeric UID) + optional + payload length: lowercase = 8 bit, uppercase = 32 bit + +s/S size of the file + for files and symbolic links: mandatory + for directories, device nodes and hard links: forbidden + payload length: lowercase = 8 bit, uppercase = 24 bit + +â‘  These identifiers are defined in this specification for future + use; implementations do not need to support them at this time. + +â‘¡ The name of the target is the data, thus, size is required. + +â‘¢ Defaults to 0 if not used (for security reasons), so labelling + it as “optional†is probably a farce ☺ + +â‘£ Implementing hard links and directories is, of course, optional + for the writer. + + +7. Miscellaneous +―――――――――――――――― + +The initial idea for a “configuration filesystem†based upon the +Linux FUSE kernel module has been communicated to me by Waldemar +Brodkorb, FreeWRT Project Founder. After a discussion with him I +decided on the archive/userland tool layout outlined in sections +1 and 2 above. For FreeWRT 1.0, it has been realised in shell. + +For now, nodes other than directories, files, and symbolic links +are not supported. + +Development of FWCF is hosted in the CVS repository of the MirOS +project. Anonymous read-only CVS access is available at the root +“:ext:anoncvs@anoncvs.mirbsd.org:/cvs†using password “anoncvsâ€, +SSH on port 22; module “fwcfâ€. CVSweb is also available, e.g. at +http://cvs.mirbsd.de/contrib/hosted/fwcf/ or its mirrors. + +FWCF code is released under the same licence terms as the speci- +fication, but without the advertising clause. The author however +would really appreciate users to credit his name and that of the +FreeWRT Project in derived works and/or links to the CVS reposi- +tory of the original source. + + +8. The “asz†file format (NEW IN 1.03) +―――――――――――――――――――――――― ┄┄┄┄┄┄┄┄┄┄┄┄┄ + +The “asz†format is intended for storing small arbitrary 8-bit +data, and used in the “fwcf dump†and “fwcf restore†formats – +the dump itself is a raw uncompressed “inner fwcf filesystemâ€, +stored as “aszâ€, and the storage used by the dump/restore com- +mands is a tarball, compressed with lzo1X1 (in the current im- +plementation), the result stored, again, as “aszâ€. + +It almost looks like the “outer fwcf†format, except the start +isn't a header but the ADLER-32 checksum double-word (2 unsig- +ned 16-bit integer in LITTLE ENDIAN), i.e. without magic bytes +to identify the format; followed by the length double-word – 1 +unsigned 32-bit integer in LITTLE ENDIAN – and finally the raw +binary data. Only the lowest three octets of the length should +be used because the current implementation malloc(3)s a buffer +containing the whole data. + + +9. Future directions +―――――――――――――――――――― + +The next major version of the FWCF filesystem specification is +likely to contain the following changes: + +• An additional checksum (probably ADLER32 as well) shall be + placed inside the compressed portion, to be checked after + decompression. The idea of adding a random IV has not been + adopted because we pretty much want the same FWCF blocks, + except the random padding at the end, to be generated for + the same input data. (This is not guaranteed because fts() + may traverse the directory hierarchy differently.) +• Revisit the current size limits and file types. +• Implement a r̲e̲a̲l̲ file type “deletedâ€, replacing the hack + with the .fwcf_deleted file. + +These future directions have come up during or after the +fwcf 1.00 release process, and from the discussion thereafter. +They are provided as hint only and not part of the specifi- +cation itself. They may change without notice. + +⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼ +$MirOS: contrib/hosted/fwcf/fwcf.txt,v 1.37 2007/07/02 14:55:44 tg Exp $ diff --git a/package/cfgfs/src/header.c b/package/cfgfs/src/header.c new file mode 100644 index 000000000..b3db0ce21 --- /dev/null +++ b/package/cfgfs/src/header.c @@ -0,0 +1,83 @@ +/* $MirOS: contrib/hosted/fwcf/header.c,v 1.7 2006/09/26 10:25:03 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#include +#include +#ifdef DEBUG_ADLER +#include +#endif + +#include "defs.h" +#include "adler.h" +#include "pack.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/header.c,v 1.7 2006/09/26 10:25:03 tg Exp $" + "\t" ADLER_H); + +char * +mkheader(char *f_header, size_t hdrsize, uint32_t outer_len, + uint32_t inner_len, uint8_t algo) +{ + char *hdrptr = f_header; + size_t hdrleft = hdrsize; + +#ifdef DEBUG + fprintf(stderr, "header: inner=%d outer=%d\n", inner_len & 0xFFFFFF, + outer_len & 0xFFFFFF); +#endif + + STOREB('F'); + STOREB('W'); + STOREB('C'); + STOREB('F'); + + outer_len = (outer_len & 0xFFFFFF) | (FWCF_VER << 24); + STORED(outer_len); + + inner_len = (inner_len & 0xFFFFFF) | (algo << 24); + STORED(inner_len); + return (hdrptr); +} + +char * +mktrailer(char *data, size_t len) +{ + char *hdrptr = data + len; + size_t hdrleft = 4; + ADLER_DECL; +#ifdef DEBUG_ADLER + uint32_t adler = adler32(1, (uint8_t *)data, len); +#endif + + ADLER_CALC(data); +#ifdef DEBUG_ADLER + if ((s1 != (adler & 0xFFFF)) || (s2 != (adler >> 16))) + errx(255, "adler32 implementation error: %04X%04X vs %08X", + s2, s1, adler); +#endif + STOREW(s1); + STOREW(s2); + return (data); +} diff --git a/package/cfgfs/src/lib/Makefile b/package/cfgfs/src/lib/Makefile new file mode 100644 index 000000000..85252b4cb --- /dev/null +++ b/package/cfgfs/src/lib/Makefile @@ -0,0 +1,28 @@ +# $MirOS: contrib/hosted/fwcf/lib/Makefile,v 1.5 2007/03/13 18:14:31 tg Exp $ +#- +# This file is part of the FreeWRT project. FreeWRT is copyrighted +# material, please see the LICENCE file in the top-level directory +# or at http://www.freewrt.org/licence for details. + +LIB= fwcf +NOPIC= Yes +NOPROFILE= Yes # for OpenBSD +SRCS+= compress.c +SRCS+= cpr_get.c +SRCS+= cpr_list.c +SRCS+= cpr_lsth.c +SRCS+= ft_creat.c +SRCS+= ft_dump.c +SRCS+= ft_pack.c +SRCS+= ft_packm.c +SRCS+= fts_debg.c +SRCS+= fts_subs.c +SRCS+= header.c +SRCS+= minilzop.c +SRCS+= unwraps.c +SRCS+= wraps.c + +CFLAGS_header.o+= -DDEBUG_ADLER +_CFLADD+= header.o + +.include diff --git a/package/cfgfs/src/minilzop.c b/package/cfgfs/src/minilzop.c new file mode 100644 index 000000000..51935185c --- /dev/null +++ b/package/cfgfs/src/minilzop.c @@ -0,0 +1,178 @@ +/* $MirOS: contrib/hosted/fwcf/minilzop.c,v 1.2 2007/03/09 22:25:45 tg Exp $ */ + +/*- + * Copyright (c) 2007 + * Thorsten Glaser + * + * Provided that these terms and disclaimer and all copyright notices + * are retained or reproduced in an accompanying document, permission + * is granted to deal in this work without restriction, including un- + * limited rights to use, publicly perform, distribute, sell, modify, + * merge, give away, or sublicence. + * + * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to + * the utmost extent permitted by applicable law, neither express nor + * implied; without malicious intent or gross negligence. In no event + * may a licensor, author or contributor be held liable for indirect, + * direct, other damage, loss, or other issues arising in any way out + * of dealing in the work, even if advised of the possibility of such + * damage or existence of a defect, except proven that it results out + * of said person's immediate fault when using the work as intended. + */ + +#include +#include +#include +#include +#include +#include + +#include "defs.h" +#include "adler.h" +#include "compress.h" +#include "minilzop.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/minilzop.c,v 1.2 2007/03/09 22:25:45 tg Exp $"); + +#define lodsw(s) __extension__({ \ + const uint8_t *lodsw_buf = (const uint8_t *)(s);\ + uint16_t lodsw_val; \ + \ + lodsw_val = lodsw_buf[0]; \ + lodsw_val |= lodsw_buf[1] << 8; \ + (lodsw_val); \ + }) +#define lodsd(s) __extension__({ \ + const uint8_t *lodsd_buf = (const uint8_t *)(s);\ + uint32_t lodsd_val; \ + \ + lodsd_val = lodsd_buf[0]; \ + lodsd_val |= lodsd_buf[1] << 8; \ + lodsd_val |= lodsd_buf[2] << 16; \ + lodsd_val |= lodsd_buf[3] << 24; \ + (lodsd_val); \ + }) +#define stosw(s,w) do { \ + uint8_t *stosw_buf = (uint8_t *)(s); \ + uint16_t stosw_val = (w); \ + \ + stosw_buf[0] = stosw_val & 0xFF; \ + stosw_buf[1] = (stosw_val >> 8) & 0xFF; \ + } while (0) +#define stosd(s,dw) do { \ + uint8_t *stosd_buf = (uint8_t *)(s); \ + uint32_t stosd_val = (dw); \ + \ + stosd_buf[0] = stosd_val & 0xFF; \ + stosd_buf[1] = (stosd_val >> 8) & 0xFF; \ + stosd_buf[2] = (stosd_val >> 16) & 0xFF; \ + stosd_buf[3] = (stosd_val >> 24) & 0xFF; \ + } while (0) + +void +read_aszdata(int dfd, char **dbuf, size_t *dlen) +{ + size_t len; + uint8_t hdrbuf[8]; + ADLER_DECL; + + if (read(dfd, hdrbuf, 8) != 8) + err(1, "short read"); + *dlen = lodsd(hdrbuf + 4); + if ((*dbuf = malloc(*dlen)) == NULL) + err(255, "out of memory trying to allocate %zu bytes", *dlen); + if ((size_t)read(dfd, *dbuf, *dlen) != *dlen) + err(1, "short read"); + len = 4; + ADLER_CALC(hdrbuf + 4); + len = *dlen; + ADLER_CALC(*dbuf); + if ((lodsw(hdrbuf) != s1) || (lodsw(hdrbuf + 2) != s2)) + err(2, "checksum mismatch, size %zu," + " want 0x%02X%02X%02X%02X got 0x%04X%04X", *dlen, + hdrbuf[3], hdrbuf[2], hdrbuf[1], hdrbuf[0], s2, s1); +} + +void +write_aszdata(int dfd, const char *dbuf, size_t dlen) +{ + size_t len; + uint8_t hdrbuf[8]; + ADLER_DECL; + + stosd(hdrbuf + 4, dlen); + len = 4; + ADLER_CALC(hdrbuf + 4); + len = dlen; + ADLER_CALC(dbuf); + stosw(hdrbuf, s1); + stosw(hdrbuf + 2, s2); + if (write(dfd, hdrbuf, 8) != 8) + err(1, "short write"); + if ((size_t)write(dfd, dbuf, dlen) != dlen) + err(1, "short write"); +} + +int +minilzop(int ifd, int ofd, int compr_alg, int decompress) +{ + size_t ilen, olen, n; + char *idata, *odata; + +#ifndef SMALL + fprintf(stderr, "minilzop: using algorithm %02X (%s)\n", + compr_alg, compressor_get(compr_alg)->name); +#endif + if (decompress) { + read_aszdata(ifd, &idata, &ilen); + olen = lodsd(idata); + if ((odata = malloc(olen)) == NULL) + err(255, "out of memory trying to allocate %zu bytes", + olen); + if ((n = compressor_get(compr_alg)->decompress(odata, olen, + idata + 4, ilen - 4)) != olen) + errx(1, "size mismatch: decompressed %zu, want %zu", + n, olen); + free(idata); + idata = odata; /* save for later free(3) */ + while (olen) { + if ((n = write(ofd, odata, olen)) == (size_t)-1) + err(1, "cannot write"); + olen -= n; + odata += n; + } + free(idata); + } else { + size_t cc; + + n = 16384; + idata = NULL; + ilen = 0; + slurp_file: + if ((idata = realloc(idata, (n <<= 1))) == NULL) + err(255, "out of memory trying to allocate %zu bytes", + n); + slurp_retry: + if ((cc = read(ifd, idata + ilen, n - ilen)) == (size_t)-1) + err(1, "cannot read"); + ilen += cc; + if (cc > 0) { + if (ilen < n) + goto slurp_retry; + goto slurp_file; + } + if ((olen = compressor_get(compr_alg)->compress(&odata, idata, + ilen)) == (size_t)-1) + errx(1, "%s compression failed", + compressor_get(compr_alg)->name); + free(idata); + if ((idata = malloc(olen + 4)) == NULL) + err(255, "out of memory trying to allocate %zu bytes", + olen + 4); + stosd(idata, ilen); + memcpy(idata + 4, odata, olen); + write_aszdata(ofd, idata, olen + 4); + free(idata); + } + return (0); +} diff --git a/package/cfgfs/src/minilzop.h b/package/cfgfs/src/minilzop.h new file mode 100644 index 000000000..8c23c674e --- /dev/null +++ b/package/cfgfs/src/minilzop.h @@ -0,0 +1,19 @@ +/* $MirOS: contrib/hosted/fwcf/minilzop.h,v 1.1 2007/03/09 21:10:29 tg Exp $ */ + +/* + * This file is part of the FreeWRT project. FreeWRT is copyrighted + * material, please see the LICENCE file in the top-level directory + * or at http://www.freewrt.org/licence for details. + */ + +#ifndef MINILZOP_H +#define MINILZOP_H + +__BEGIN_DECLS +int minilzop(int ifd, int ofd, int compr_alg, int decompress); +/* TODO: use the two below for the “outer filesystem†as well */ +void read_aszdata(int, char **, size_t *); +void write_aszdata(int, const char *, size_t); +__END_DECLS + +#endif diff --git a/package/cfgfs/src/mkfwcf/Makefile b/package/cfgfs/src/mkfwcf/Makefile new file mode 100644 index 000000000..35eed0cba --- /dev/null +++ b/package/cfgfs/src/mkfwcf/Makefile @@ -0,0 +1,23 @@ +# $MirOS: contrib/hosted/fwcf/mkfwcf/Makefile,v 1.14 2006/09/26 10:25:06 tg Exp $ +#- +# This file is part of the FreeWRT project. FreeWRT is copyrighted +# material, please see the LICENCE file in the top-level directory +# or at http://www.freewrt.org/licence for details. + +PROG= mkfwcf +SRCS= ${PROG}.c ${COMPRESSORS} sys_bsd.c +NOMAN= yes +DPADD+= ${LIBZ} +LDADD+= -lz +CLEANFILES+= ${.CURDIR}/test.out ${.CURDIR}/tesz.out ${.CURDIR}/tesL.out \ + ${.CURDIR}/test.nil ${.CURDIR}/tesz.nil ${.CURDIR}/tesL.nil + +test: ${PROG} + ./${PROG} -o ${.CURDIR}/test.out ${.CURDIR}/CVS + ./${PROG} -C 1 -o ${.CURDIR}/tesz.out ${.CURDIR}/CVS + ./${PROG} -C 16 -o ${.CURDIR}/tesL.out ${.CURDIR}/CVS + ./${PROG} -eo ${.CURDIR}/test.nil + ./${PROG} -eC 1 -o ${.CURDIR}/tesz.nil + ./${PROG} -eC 16 -o ${.CURDIR}/tesL.nil + +.include diff --git a/package/cfgfs/src/mkfwcf/mkfwcf.c b/package/cfgfs/src/mkfwcf/mkfwcf.c new file mode 100644 index 000000000..b4b80fb6e --- /dev/null +++ b/package/cfgfs/src/mkfwcf/mkfwcf.c @@ -0,0 +1,109 @@ +/* $MirOS: contrib/hosted/fwcf/mkfwcf/mkfwcf.c,v 1.13 2006/09/24 20:35:00 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#include +#include +#include +#include + +#include "defs.h" +#include "compress.h" +#include "pack.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/mkfwcf/mkfwcf.c,v 1.13 2006/09/24 20:35:00 tg Exp $"); + +static int mkfwcf(int, const char *, int); +static __dead void usage(void); + +int +main(int argc, char *argv[]) +{ + int c; + int fd = STDOUT_FILENO, docompress = 0, doempty = 0; + const char *file_root = NULL, *outfile = NULL; + + while ((c = getopt(argc, argv, "C:celo:")) != -1) + switch (c) { + case 'C': + if (!(docompress = strtonum(optarg, 1, 255, NULL))) + usage(); + break; + case 'c': + docompress = 1; + break; + case 'e': + doempty = 1; + break; + case 'l': + return (list_compressors()); + case 'o': + outfile = optarg; + break; + default: + usage(); + } + argc -= optind; + argv += optind; + + if ((argc < 0) || (argc > 1)) + usage(); + + if (argc && doempty) + usage(); + + if (argc) + file_root = *argv; + + if (outfile != NULL) + if ((fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, + 0666)) < 0) + err(1, "open %s", outfile); + + if ((file_root == NULL) && !doempty) + if ((file_root = getcwd(NULL, 0)) == NULL) + err(1, "cannot determine current working directory"); + + return (mkfwcf(fd, doempty ? NULL : file_root, docompress)); +} + +static __dead void +usage(void) +{ + extern const char *__progname; + + fprintf(stderr, "Usage:\t%s [-e] [-c | -C ] [-o ]" + "\n\t []\n\t%s -l\n", __progname, __progname); + exit(1); +} + +static int +mkfwcf(int fd, const char *dir, int algo) +{ + size_t sz; + char *data; + + data = fwcf_packm(dir, algo, &sz); + return ((size_t)write(fd, data, sz) == sz ? 0 : 1); +} diff --git a/package/cfgfs/src/mtd.c b/package/cfgfs/src/mtd.c new file mode 100644 index 000000000..6812c5e31 --- /dev/null +++ b/package/cfgfs/src/mtd.c @@ -0,0 +1,379 @@ +/* + * mtd - simple memory technology device manipulation tool + * + * Copyright (c) 2006, 2007 Thorsten Glaser + * Copyright (C) 2005 Waldemar Brodkorb , + * Felix Fietkau + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The code is based on the linux-mtd examples. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define BUFSIZE (16 * 1024) +#define MAX_ARGS 8 + +#define DEBUG + +int mtd_check(char *); +int mtd_unlock(const char *); +int mtd_open(const char *, int); +int mtd_erase(const char *); +int mtd_write(int, const char *, int, bool); +void usage(void) __attribute__((noreturn)); + +char buf[BUFSIZE]; +int buflen; + +int +mtd_check(char *mtd) +{ + struct mtd_info_user mtdInfo; + int fd; + + fd = mtd_open(mtd, O_RDWR | O_SYNC); + if(fd < 0) { + fprintf(stderr, "Could not open mtd device: %s\n", mtd); + return 0; + } + + if(ioctl(fd, MEMGETINFO, &mtdInfo)) { + fprintf(stderr, "Could not get MTD device info from %s\n", mtd); + close(fd); + return 0; + } + + close(fd); + return 1; +} + +int +mtd_unlock(const char *mtd) +{ + int fd; + struct mtd_info_user mtdInfo; + struct erase_info_user mtdLockInfo; + + fd = mtd_open(mtd, O_RDWR | O_SYNC); + if(fd < 0) { + fprintf(stderr, "Could not open mtd device: %s\n", mtd); + exit(1); + } + + if(ioctl(fd, MEMGETINFO, &mtdInfo)) { + fprintf(stderr, "Could not get MTD device info from %s\n", mtd); + close(fd); + exit(1); + } + + mtdLockInfo.start = 0; + mtdLockInfo.length = mtdInfo.size; + if(ioctl(fd, MEMUNLOCK, &mtdLockInfo)) { + close(fd); + return 0; + } + + close(fd); + return 0; +} + +int +mtd_open(const char *mtd, int flags) +{ + FILE *fp; + char dev[PATH_MAX]; + int i; + + if ((fp = fopen("/proc/mtd", "r"))) { + while (fgets(dev, sizeof(dev), fp)) { + if (sscanf(dev, "mtd%d:", &i) && strstr(dev, mtd)) { + snprintf(dev, sizeof(dev), "/dev/mtd%d", i); + fclose(fp); + return open(dev, flags); + } + } + fclose(fp); + } + + return open(mtd, flags); +} + +int +mtd_erase(const char *mtd) +{ + int fd; + struct mtd_info_user mtdInfo; + struct erase_info_user mtdEraseInfo; + + fd = mtd_open(mtd, O_RDWR | O_SYNC); + if(fd < 0) { + fprintf(stderr, "Could not open mtd device: %s\n", mtd); + exit(1); + } + + if(ioctl(fd, MEMGETINFO, &mtdInfo)) { + fprintf(stderr, "Could not get MTD device info from %s\n", mtd); + close(fd); + exit(1); + } + + mtdEraseInfo.length = mtdInfo.erasesize; + + for (mtdEraseInfo.start = 0; + mtdEraseInfo.start < mtdInfo.size; + mtdEraseInfo.start += mtdInfo.erasesize) { + + ioctl(fd, MEMUNLOCK, &mtdEraseInfo); + if(ioctl(fd, MEMERASE, &mtdEraseInfo)) { + fprintf(stderr, "Could not erase MTD device: %s\n", mtd); + close(fd); + exit(1); + } + } + + close(fd); + return 0; + +} + +int +mtd_write(int imagefd, const char *mtd, int quiet, bool do_erase) +{ + int fd, result; + size_t r, w, e; + struct mtd_info_user mtdInfo; + struct erase_info_user mtdEraseInfo; + + fd = mtd_open(mtd, O_RDWR | O_SYNC); + if(fd < 0) { + fprintf(stderr, "Could not open mtd device: %s\n", mtd); + exit(1); + } + + if(ioctl(fd, MEMGETINFO, &mtdInfo)) { + fprintf(stderr, "Could not get MTD device info from %s\n", mtd); + close(fd); + exit(1); + } + + r = w = e = 0; + if (!quiet) + fprintf(stderr, " [ ]"); + + for (;;) { + /* buffer may contain data already (from trx check) */ + r = buflen; + r += read(imagefd, buf + buflen, BUFSIZE - buflen); + w += r; + + /* EOF */ + if (r <= 0) break; + + /* need to erase the next block before writing data to it */ + while (do_erase && w > e) { + mtdEraseInfo.start = e; + mtdEraseInfo.length = mtdInfo.erasesize; + + if (!quiet) + fprintf(stderr, "\b\b\b[e]"); + /* erase the chunk */ + if (ioctl (fd,MEMERASE,&mtdEraseInfo) < 0) { + fprintf(stderr, "Erasing mtd failed: %s\n", mtd); + exit(1); + } + e += mtdInfo.erasesize; + } + + if (!quiet) + fprintf(stderr, "\b\b\b[w]"); + + if ((result = write(fd, buf, r)) < (ssize_t)r) { + if (result < 0) { + fprintf(stderr, "Error writing image.\n"); + exit(1); + } else { + fprintf(stderr, "Insufficient space.\n"); + exit(1); + } + } + + buflen = 0; + } + if (!quiet) + fprintf(stderr, "\b\b\b\b"); + + close(fd); + return 0; +} + +void +usage(void) +{ + fprintf(stderr, "Usage: mtd [ ...] [ ...] \n\n" + "The device is in the format of mtdX (eg: mtd4) or its label.\n" + "mtd recognises these commands:\n" + " unlock unlock the device\n" + " erase erase all data on device\n" + " write |- write (use - for stdin) to device\n" + "Following options are available:\n" + " -q quiet mode (once: no [w] on writing,\n" + " twice: no status messages)\n" + " -e erase before executing the command\n\n" + "Example: To write linux.trx to mtd1 labeled as linux\n" + " mtd write linux.trx linux\n\n"); + exit(1); +} + +int +main(int argc, char **argv) +{ + int ch, i, imagefd = -1, quiet, unlocked; + char *erase[MAX_ARGS], *device; + const char *imagefile = NULL; + enum { + CMD_ERASE, + CMD_WRITE, + CMD_UNLOCK + } cmd; + + erase[0] = NULL; + buflen = 0; + quiet = 0; + + while ((ch = getopt(argc, argv, "Fqe:")) != -1) + switch (ch) { + case 'F': + quiet = 1; + /* FALLTHROUGH */ + case 'q': + quiet++; + break; + case 'e': + i = 0; + while ((erase[i] != NULL) && ((i + 1) < MAX_ARGS)) + i++; + + erase[i++] = optarg; + erase[i] = NULL; + break; + + case '?': + default: + usage(); + } + argc -= optind; + argv += optind; + + if (argc < 2) + usage(); + + if ((strcmp(argv[0], "unlock") == 0) && (argc == 2)) { + cmd = CMD_UNLOCK; + device = argv[1]; + } else if ((strcmp(argv[0], "erase") == 0) && (argc == 2)) { + cmd = CMD_ERASE; + device = argv[1]; + } else if ((strcmp(argv[0], "write") == 0) && (argc == 3)) { + cmd = CMD_WRITE; + device = argv[2]; + + if (strcmp(argv[1], "-") == 0) { + imagefile = ""; + imagefd = 0; + } else { + imagefile = argv[1]; + if ((imagefd = open(argv[1], O_RDONLY)) < 0) { + fprintf(stderr, "Couldn't open image file: %s!\n", imagefile); + exit(1); + } + } + + if (!mtd_check(device)) { + fprintf(stderr, "Can't open device for writing!\n"); + exit(1); + } + } else { + usage(); + } + + sync(); + + i = 0; + unlocked = 0; + while (erase[i] != NULL) { + if (quiet < 2) + fprintf(stderr, "Unlocking %s ...\n", erase[i]); + mtd_unlock(erase[i]); + if (quiet < 2) + fprintf(stderr, "Erasing %s ...\n", erase[i]); + mtd_erase(erase[i]); + if (strcmp(erase[i], device) == 0) + /* this means that is unlocked and erased */ + unlocked = 1; + i++; + } + + if (!unlocked) { + if (quiet < 2) + fprintf(stderr, "Unlocking %s ...\n", device); + mtd_unlock(device); + } + + switch (cmd) { + case CMD_UNLOCK: + break; + case CMD_ERASE: + if (unlocked) { + fprintf(stderr, "Already erased: %s\n", device); + break; + } + if (quiet < 2) + fprintf(stderr, "Erasing %s ...\n", device); + mtd_erase(device); + break; + case CMD_WRITE: + if (quiet < 2) + fprintf(stderr, "Writing from %s to %s ... ", imagefile, device); + mtd_write(imagefd, device, quiet, (unlocked == 0)); + if (quiet < 2) + fprintf(stderr, "\n"); + break; + } + + sync(); + return 0; +} diff --git a/package/cfgfs/src/pack.h b/package/cfgfs/src/pack.h new file mode 100644 index 000000000..9dfb8233f --- /dev/null +++ b/package/cfgfs/src/pack.h @@ -0,0 +1,95 @@ +/* $MirOS: contrib/hosted/fwcf/pack.h,v 1.13 2007/03/09 21:10:29 tg Exp $ */ + +/* + * This file is part of the FreeWRT project. FreeWRT is copyrighted + * material, please see the LICENCE file in the top-level directory + * or at http://www.freewrt.org/licence for details. + */ + +#ifndef PACK_H +#define PACK_H + +struct FTSF_ENTRY; +#ifndef FTS_SUBS_H +typedef struct FTSF_ENTRY ftsf_entry; +#endif + +/* XXX use macros from minilzop.h */ + +#define STOREB(x) do { \ + if (hdrleft < 1) \ + return (NULL); \ + *hdrptr++ = (x) & 0xFF; \ + --hdrleft; \ + } while (0) + +#define STOREW(x) do { \ + if (hdrleft < 2) \ + return (NULL); \ + *hdrptr++ = (x) & 0xFF; \ + *hdrptr++ = ((x) >> 8) & 0xFF; \ + hdrleft -= 2; \ + } while (0) + +#define STORET(x) do { \ + if (hdrleft < 3) \ + return (NULL); \ + *hdrptr++ = (x) & 0xFF; \ + *hdrptr++ = ((x) >> 8) & 0xFF; \ + *hdrptr++ = ((x) >> 16) & 0xFF; \ + hdrleft -= 3; \ + } while (0) + +#define STORED(x) do { \ + if (hdrleft < 4) \ + return (NULL); \ + *hdrptr++ = (x) & 0xFF; \ + *hdrptr++ = ((x) >> 8) & 0xFF; \ + *hdrptr++ = ((x) >> 16) & 0xFF; \ + *hdrptr++ = ((x) >> 24) & 0xFF; \ + hdrleft -= 4; \ + } while (0) + +#define LOADW(x) __extension__({ \ + uint8_t *lwbf = (uint8_t *)(x); \ + uint32_t res = 0; \ + res = (res << 8) | lwbf[1]; \ + res = (res << 8) | lwbf[0]; \ + res; \ + }) + +#define LOADT(x) __extension__({ \ + uint8_t *lwbf = (uint8_t *)(x); \ + uint32_t res = 0; \ + res = (res << 8) | lwbf[2]; \ + res = (res << 8) | lwbf[1]; \ + res = (res << 8) | lwbf[0]; \ + res; \ + }) + +#define LOADD(x) __extension__({ \ + uint8_t *lwbf = (uint8_t *)(x); \ + uint32_t res = 0; \ + res = (res << 8) | lwbf[3]; \ + res = (res << 8) | lwbf[2]; \ + res = (res << 8) | lwbf[1]; \ + res = (res << 8) | lwbf[0]; \ + res; \ + }) + +__BEGIN_DECLS +char *ft_pack(ftsf_entry *); +char *ft_packm(void); + +char *mkheader(char *, size_t, uint32_t, uint32_t, uint8_t); +char *mktrailer(char *, size_t); + +void ft_dump(char *); +void ft_creatm(char *, const char *); + +char *fwcf_unpack(int, size_t *); +char *fwcf_pack(char *, size_t, int, size_t *); +char *fwcf_packm(const char *, int, size_t *); +__END_DECLS + +#endif diff --git a/package/cfgfs/src/replace.c b/package/cfgfs/src/replace.c new file mode 100644 index 000000000..50f137b67 --- /dev/null +++ b/package/cfgfs/src/replace.c @@ -0,0 +1,39 @@ +#ifndef __UCLIBC__ +#include +#include +/* like strncpy but does not 0 fill the buffer and always null + terminates. bufsize is the size of the destination buffer */ +size_t rep_strlcpy(char *d, const char *s, size_t bufsize) +{ + size_t len = strlen(s); + size_t ret = len; + if (bufsize <= 0) return 0; + if (len >= bufsize) len = bufsize-1; + memcpy(d, s, len); + d[len] = 0; + return ret; +} + +/* like strncat but does not 0 fill the buffer and always null + terminates. bufsize is the length of the buffer, which should + be one more than the maximum resulting string length */ +size_t rep_strlcat(char *d, const char *s, size_t bufsize) +{ + size_t len1 = strlen(d); + size_t len2 = strlen(s); + size_t ret = len1 + len2; + + if (len1+len2 >= bufsize) { + if (bufsize < (len1+1)) { + return ret; + } + len2 = bufsize - (len1+1); + } + if (len2 > 0) { + memcpy(d+len1, s, len2); + d[len1+len2] = 0; + } + return ret; +} + +#endif diff --git a/package/cfgfs/src/replace.h b/package/cfgfs/src/replace.h new file mode 100644 index 000000000..80385f4a2 --- /dev/null +++ b/package/cfgfs/src/replace.h @@ -0,0 +1,6 @@ +#ifndef __UCLIBC__ +#define strlcpy rep_strlcpy +size_t rep_strlcpy(char *d, const char *s, size_t bufsize); +#define strlcat rep_strlcat +size_t rep_strlcat(char *d, const char *s, size_t bufsize); +#endif diff --git a/package/cfgfs/src/sys_bsd.c b/package/cfgfs/src/sys_bsd.c new file mode 100644 index 000000000..b37fd5637 --- /dev/null +++ b/package/cfgfs/src/sys_bsd.c @@ -0,0 +1,96 @@ +/* $MirOS: contrib/hosted/fwcf/sys_bsd.c,v 1.4 2007/03/13 18:14:30 tg Exp $ */ + +/*- + * Copyright (c) 2006, 2007 + * Thorsten Glaser + * + * Provided that these terms and disclaimer and all copyright notices + * are retained or reproduced in an accompanying document, permission + * is granted to deal in this work without restriction, including un- + * limited rights to use, publicly perform, distribute, sell, modify, + * merge, give away, or sublicence. + * + * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to + * the utmost extent permitted by applicable law, neither express nor + * implied; without malicious intent or gross negligence. In no event + * may a licensor, author or contributor be held liable for indirect, + * direct, other damage, loss, or other issues arising in any way out + * of dealing in the work, even if advised of the possibility of such + * damage or existence of a defect, except proven that it results out + * of said person's immediate fault when using the work as intended. + */ + +#include +#include +#include + +#include "defs.h" +#include "sysdeps.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/sys_bsd.c,v 1.4 2007/03/13 18:14:30 tg Exp $"); + +void +pull_rndata(uint8_t *buf, size_t n) +{ +#ifdef RND_DISABLE + while (n--) + *buf++ = 0xF6; + *--buf = 0xFF; +#else +#ifdef RND_DEBUG + fprintf(stderr, "writing %ld bytes of entropy\n", n); + while (n > 4) { +#else + while (n >= 4) { +#endif + *(uint32_t *)buf = arc4random(); +#ifdef RND_DEBUG + *buf = 0xF6; +#endif + buf += 4; + n -= 4; + } + while (n) { +#ifdef RND_DEBUG + *buf++ = 0xF6; +#else + *buf++ = arc4random() & 0xFF; +#endif + n--; + } +#ifdef RND_DEBUG + *--buf = 0xFF; +#endif +#endif +} + +void +push_rndata(uint8_t *buf, size_t n) +{ +#ifdef RND_DEBUG + size_t i; +#endif +#ifdef __MirBSD__ + arc4random_pushb(buf, n); +#else + int fd; + uint32_t x; + + arc4random_addrandom(buf, n); + x = arc4random(); + if ((fd = open("/dev/arandom", O_WRONLY)) >= 0) { + write(fd, &x, 4); + close(fd); + } else + warn("cannot write to /dev/arandom"); +#endif +#ifdef RND_DEBUG + printf("reading %ld bytes of entropy\n", n); + for (i = 0; i < n; ++i) { + printf(" %02X", buf[i]); + if ((i & 0xF) == 0xF) + putchar('\n'); + } + putchar('\n'); +#endif +} diff --git a/package/cfgfs/src/sys_linux.c b/package/cfgfs/src/sys_linux.c new file mode 100644 index 000000000..38283a44d --- /dev/null +++ b/package/cfgfs/src/sys_linux.c @@ -0,0 +1,61 @@ +/* $MirOS: contrib/hosted/fwcf/sys_linux.c,v 1.3 2006/09/26 10:25:03 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#include +#include +#include + +#include "defs.h" +#include "sysdeps.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/sys_linux.c,v 1.3 2006/09/26 10:25:03 tg Exp $"); + +void +pull_rndata(uint8_t *buf, size_t n) +{ + int fd; + + if ((fd = open("/dev/urandom", O_RDONLY)) < 0) { + warn("Cannot open /dev/urandom for %sing", "read"); + return; + } + if ((size_t)read(fd, buf, n) != n) + warn("Cannot read %lu bytes from /dev/urandom", (u_long)n); + close(fd); +} + +void +push_rndata(uint8_t *buf, size_t n) +{ + int fd; + + if ((fd = open("/dev/urandom", O_WRONLY)) < 0) { + warn("Cannot open /dev/urandom for %sing", "writ"); + return; + } + if ((size_t)write(fd, buf, n) != n) + warn("Cannot write %lu bytes to /dev/urandom", (u_long)n); + close(fd); +} diff --git a/package/cfgfs/src/sysdeps.h b/package/cfgfs/src/sysdeps.h new file mode 100644 index 000000000..34313f58c --- /dev/null +++ b/package/cfgfs/src/sysdeps.h @@ -0,0 +1,17 @@ +/* $MirOS: contrib/hosted/fwcf/sysdeps.h,v 1.2 2006/09/26 10:25:03 tg Exp $ */ + +/* + * This file is part of the FreeWRT project. FreeWRT is copyrighted + * material, please see the LICENCE file in the top-level directory + * or at http://www.freewrt.org/licence for details. + */ + +#ifndef SYSDEPS_H +#define SYSDEPS_H + +__BEGIN_DECLS +void pull_rndata(uint8_t *, size_t); +void push_rndata(uint8_t *, size_t); +__END_DECLS + +#endif diff --git a/package/cfgfs/src/tool.c b/package/cfgfs/src/tool.c new file mode 100644 index 000000000..3daf141cd --- /dev/null +++ b/package/cfgfs/src/tool.c @@ -0,0 +1,302 @@ +/* $MirOS: contrib/hosted/fwcf/tool.c,v 1.7 2007/03/09 22:35:13 tg Exp $ */ + +/*- + * Copyright (c) 2006, 2007 + * Thorsten Glaser + * + * Provided that these terms and disclaimer and all copyright notices + * are retained or reproduced in an accompanying document, permission + * is granted to deal in this work without restriction, including un- + * limited rights to use, publicly perform, distribute, sell, modify, + * merge, give away, or sublicence. + * + * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to + * the utmost extent permitted by applicable law, neither express nor + * implied; without malicious intent or gross negligence. In no event + * may a licensor, author or contributor be held liable for indirect, + * direct, other damage, loss, or other issues arising in any way out + * of dealing in the work, even if advised of the possibility of such + * damage or existence of a defect, except proven that it results out + * of said person's immediate fault when using the work as intended. + */ + +#include +#include +#include +#include +#include +#include + +#include "defs.h" +#include "compress.h" +#include "minilzop.h" +#include "pack.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/tool.c,v 1.7 2007/03/09 22:35:13 tg Exp $"); + +static __dead void usage(void); +static int mkfwcf(int, const char *, int); +static int unfwcf(int, const char *); +#ifndef SMALL +static int refwcf(int, int, int); +#endif +static int fsopen(const char *, int, int); + +int +main(int argc, char *argv[]) +{ + int c; + int mode = 0, doempty = 0; + int ifd, ofd; +#ifdef SMALL + int calg = -1; +#else + int calg = 0; + const char *infile = NULL, *outfile = NULL; +#endif + const char *dfile = NULL; + const char *file_root = NULL; + fwcf_compressor *cl; + +#ifdef SMALL + while ((c = getopt(argc, argv, "D:delMUZ")) != -1) +#else + while ((c = getopt(argc, argv, "C:cD:dei:lMo:RUZ")) != -1) +#endif + switch (c) { +#ifndef SMALL + case 'C': + if (!(calg = strtonum(optarg, 1, 255, NULL)) + && !(calg = compressor_getbyname(optarg))) + usage(); + break; + case 'c': + calg = -1; + break; +#endif + case 'D': + if (doempty) + usage(); + dfile = optarg; + break; + case 'd': + mode = (mode == 5 || mode == 6) ? 6 : 3; + break; + case 'e': + if (dfile != NULL) + usage(); + doempty = 1; + break; +#ifndef SMALL + case 'i': + infile = optarg; + break; +#endif + case 'l': + return (list_compressors()); + case 'M': + mode = 1; + break; +#ifndef SMALL + case 'o': + outfile = optarg; + break; + case 'R': + mode = 4; + break; +#endif + case 'U': + mode = 2; + break; + case 'Z': + mode = (mode == 3) ? 6 : 5; + break; + default: + usage(); + } + argc -= optind; + argv += optind; + + switch (mode) { + case 1: + if (argc != ((dfile == NULL) ? (1 - doempty) : 0)) + usage(); + break; + case 2: + if (argc != ((dfile == NULL) ? 1 : 0)) + usage(); + break; +#ifndef SMALL + case 3: + case 4: + if (argc || doempty || (dfile != NULL)) + usage(); + break; +#endif + case 5: + case 6: + if ((dfile != NULL) || doempty +#ifndef SMALL + || infile || outfile +#endif + ) + usage(); + break; + default: + usage(); + } + if (argc) + file_root = *argv; + + if (mode == 5 || mode == 6) { + ifd = fsopen(argc-- > 0 ? *argv++ : NULL, + O_RDONLY, STDIN_FILENO); + ofd = fsopen(argc-- > 0 ? *argv++ : NULL, + O_WRONLY | O_CREAT | O_TRUNC, STDOUT_FILENO); + if (argc > 0) + usage(); +#ifndef SMALL + if (calg == 0) + /* force host tool to compress even without -c */ + calg = -1; +#endif + goto get_calg; + } + +#ifdef SMALL + ifd = STDIN_FILENO; + ofd = STDOUT_FILENO; +#else + ifd = fsopen(infile, O_RDONLY, STDIN_FILENO); + ofd = fsopen(outfile, O_WRONLY | O_CREAT | O_TRUNC, STDOUT_FILENO); +#endif + + if (mode == 2 && dfile != NULL) { + char *data; + size_t sz; + int dfd; + + if ((data = fwcf_unpack(ifd, &sz)) == NULL) + return (1); + if ((dfd = fsopen(dfile, O_WRONLY | O_CREAT | O_TRUNC, + STDOUT_FILENO)) < 0) + err(1, "open %s", dfile); + write_aszdata(dfd, data, sz); + close(dfd); + free(data); + return (0); + } + + if ((mode == 2) || (mode == 3)) + return (unfwcf(ifd, (mode == 3) ? NULL : file_root)); + + get_calg: + if (calg == -1) { + if ((cl = compress_enumerate()) != NULL) + for (calg = 1; calg < 257; ++calg) + if (cl[calg & 0xFF].name != NULL) + break; + + if ((cl == NULL) || (calg == 257)) + errx(1, "no compression algorithms found"); + calg &= 0xFF; + } + + if (mode == 5 || mode == 6) + return (minilzop(ifd, ofd, calg, (mode == 6))); + +#ifndef SMALL + if (mode == 4) + return (refwcf(ifd, ofd, calg)); +#endif + + if (dfile != NULL) { + char *udata, *data; + size_t sz, isz; + int dfd; + + if ((dfd = fsopen(dfile, O_RDONLY, STDIN_FILENO)) < 0) + err(1, "open %s", dfile); + read_aszdata(dfd, &udata, &isz); + close(dfd); + data = fwcf_pack(udata, isz, calg, &sz); + isz = write(ofd, data, sz); + free(data); + return (isz == sz ? 0 : 1); + } + + return (mkfwcf(ofd, doempty ? NULL : file_root, calg)); +} + +static __dead void +usage(void) +{ + extern const char *__progname; + + fprintf(stderr, "Usage:" +#ifdef SMALL + " %s -M { -D | -e | }" + "\n %s -U { -D | }" + "\n %s -Z[d] [ []]" + "\n %s -l\n", __progname, __progname, __progname, __progname); +#else + " %s -M [-c | -C ] [-o ]" + "\n { -D | -e | }" + "\n %s [-i ] -U { -D | }" + "\n %s [-i ] -d" + "\n %s -R [-c | -C ] [-i ] [-o ]" + "\n %s -Z[d] [-c | -C ] [ []]" + "\n %s -l\n", + __progname, __progname, __progname, __progname, __progname, + __progname); +#endif + exit(1); +} + +static int +mkfwcf(int fd, const char *dir, int algo) +{ + size_t sz; + char *data; + + data = fwcf_packm(dir, algo, &sz); + return ((size_t)write(fd, data, sz) == sz ? 0 : 1); +} + +static int +unfwcf(int fd, const char *dir) +{ + char *udata; + + if ((udata = fwcf_unpack(fd, NULL))) { +#ifndef SMALL + if (dir == NULL) + ft_dump(udata); + else +#endif + ft_creatm(udata, dir); + } + return (udata != NULL ? 0 : 1); +} + +#ifndef SMALL +static int +refwcf(int ifd, int ofd, int algo) +{ + char *udata, *data; + size_t sz, isz; + + if ((udata = fwcf_unpack(ifd, &isz)) == NULL) + return (1); + data = fwcf_pack(udata, isz, algo, &sz); + return ((size_t)write(ofd, data, sz) == sz ? 0 : 1); +} +#endif + +static int +fsopen(const char *fn, int mode, int altfd) +{ + return (((fn == NULL) || (*fn == '\0') || + ((fn[0] == '-') && (fn[1] == '\0'))) ? altfd : + open(fn, mode, 0666)); +} diff --git a/package/cfgfs/src/tool/Makefile b/package/cfgfs/src/tool/Makefile new file mode 100644 index 000000000..8ffa054a2 --- /dev/null +++ b/package/cfgfs/src/tool/Makefile @@ -0,0 +1,59 @@ +# $MirOS: contrib/hosted/fwcf/tool/Makefile,v 1.5 2007/02/28 22:59:38 tg Exp $ +#- +# This file is part of the FreeWRT project. FreeWRT is copyrighted +# material, please see the LICENCE file in the top-level directory +# or at http://www.freewrt.org/licence for details. + +PROG= fwcf_tool +SRCS= tool.c ${COMPRESSORS} sys_bsd.c +NOMAN= yes +DPADD+= ${LIBZ} +LDADD+= -lz +CLEANFILES+= ${.CURDIR}/test_c.out ${.CURDIR}/tesz_c.out ${.CURDIR}/tesL_c.out \ + ${.CURDIR}/test_c.nil ${.CURDIR}/tesz_c.nil ${.CURDIR}/tesL_c.nil \ + ${.CURDIR}/test_d.out ${.CURDIR}/tesz_d.out ${.CURDIR}/tesL_d.out \ + ${.CURDIR}/test_d.nil ${.CURDIR}/tesz_d.nil ${.CURDIR}/tesL_d.nil \ + ${.CURDIR}/test_r.out ${.CURDIR}/tesz_r.out ${.CURDIR}/tesL_r.out \ + ${.CURDIR}/test_r.nil ${.CURDIR}/tesz_r.nil ${.CURDIR}/tesL_r.nil \ + ${.CURDIR}/dtest_d.out ${.CURDIR}/dtesz_d.out ${.CURDIR}/dtesL_d.out \ + ${.CURDIR}/dtest_d.nil ${.CURDIR}/dtesz_d.nil ${.CURDIR}/dtesL_d.nil \ + ${.CURDIR}/test_D.out ${.CURDIR}/test_D.cz + +test: ${PROG} + ./${PROG} -Mo ${.CURDIR}/test_c.out ${.CURDIR}/../mkfwcf/CVS + ./${PROG} -MC 1 -o ${.CURDIR}/tesz_c.out ${.CURDIR}/../mkfwcf/CVS + ./${PROG} -MC 0x10 -o ${.CURDIR}/tesL_c.out ${.CURDIR}/../mkfwcf/CVS + ./${PROG} -Meo ${.CURDIR}/test_c.nil + ./${PROG} -MeC 1 -o ${.CURDIR}/tesz_c.nil + ./${PROG} -MeC 16 -o ${.CURDIR}/tesL_c.nil + ./${PROG} -Ud <${.CURDIR}/test_c.out >${.CURDIR}/dtest_d.out + ./${PROG} -Ud <${.CURDIR}/tesz_c.out >${.CURDIR}/dtesz_d.out + ./${PROG} -Ud <${.CURDIR}/tesL_c.out >${.CURDIR}/dtesL_d.out + ./${PROG} -Ud <${.CURDIR}/test_c.nil >${.CURDIR}/dtest_d.nil + ./${PROG} -Ud <${.CURDIR}/tesz_c.nil >${.CURDIR}/dtesz_d.nil + ./${PROG} -Ud <${.CURDIR}/tesL_c.nil >${.CURDIR}/dtesL_d.nil + ./${PROG} -Ui ${.CURDIR}/test_c.out out.test + ./${PROG} -Ui ${.CURDIR}/tesz_c.out out.tesz + ./${PROG} -Ui ${.CURDIR}/tesL_c.out out.tesL +.ifndef notyet + ./${PROG} -Ri ${.CURDIR}/tesz_c.out -o ${.CURDIR}/test_r.out + ./${PROG} -Ri ${.CURDIR}/tesz_c.nil -o ${.CURDIR}/test_r.nil + ./${PROG} -Rci ${.CURDIR}/test_c.out -o ${.CURDIR}/tesz_r.out + ./${PROG} -Rci ${.CURDIR}/test_c.nil -o ${.CURDIR}/tesz_r.nil + ./${PROG} -RC 0x10 -i ${.CURDIR}/tesz_c.out -o ${.CURDIR}/tesL_r.out + ./${PROG} -RC 16 -i ${.CURDIR}/test_c.nil -o ${.CURDIR}/tesL_r.nil +.else + ./${PROG} -Ri ${.CURDIR}/test_c.out -o ${.CURDIR}/test_r.out + ./${PROG} -Ri ${.CURDIR}/test_c.nil -o ${.CURDIR}/test_r.nil + ./${PROG} -Rci ${.CURDIR}/tesz_c.out -o ${.CURDIR}/tesz_r.out + ./${PROG} -Rci ${.CURDIR}/tesz_c.nil -o ${.CURDIR}/tesz_r.nil +.endif + ./${PROG} -UD ${.CURDIR}/test_D.out <${.CURDIR}/tesL_c.out + ./${PROG} -McD ${.CURDIR}/test_D.out >${.CURDIR}/test_D.cz + +.include + +clean cleandir: clean-local + +clean-local: + -rm -rf out.test out.tesz out.tesL diff --git a/package/cfgfs/src/unfwcf/Makefile b/package/cfgfs/src/unfwcf/Makefile new file mode 100644 index 000000000..678482ad4 --- /dev/null +++ b/package/cfgfs/src/unfwcf/Makefile @@ -0,0 +1,28 @@ +# $MirOS: contrib/hosted/fwcf/unfwcf/Makefile,v 1.14 2006/09/26 10:25:06 tg Exp $ +#- +# This file is part of the FreeWRT project. FreeWRT is copyrighted +# material, please see the LICENCE file in the top-level directory +# or at http://www.freewrt.org/licence for details. + +PROG= unfwcf +SRCS= ${PROG}.c ${COMPRESSORS} sys_bsd.c +NOMAN= yes +DPADD+= ${LIBZ} +LDADD+= -lz +CLEANFILES+= ${.CURDIR}/test.out ${.CURDIR}/tesz.out \ + ${.CURDIR}/test.nil ${.CURDIR}/tesz.nil + +test: ${PROG} + ./${PROG} -d <${.CURDIR}/../mkfwcf/test.out >${.CURDIR}/test.out + ./${PROG} -d <${.CURDIR}/../mkfwcf/tesz.out >${.CURDIR}/tesz.out + ./${PROG} -d <${.CURDIR}/../mkfwcf/test.nil >${.CURDIR}/test.nil + ./${PROG} -d <${.CURDIR}/../mkfwcf/tesz.nil >${.CURDIR}/tesz.nil + ./${PROG} -i ${.CURDIR}/../mkfwcf/test.out out.test + ./${PROG} -i ${.CURDIR}/../mkfwcf/tesz.out out.tesz + +.include + +clean cleandir: clean-local + +clean-local: + -rm -rf out.test out.tesz diff --git a/package/cfgfs/src/unfwcf/unfwcf.c b/package/cfgfs/src/unfwcf/unfwcf.c new file mode 100644 index 000000000..839235695 --- /dev/null +++ b/package/cfgfs/src/unfwcf/unfwcf.c @@ -0,0 +1,100 @@ +/* $MirOS: contrib/hosted/fwcf/unfwcf/unfwcf.c,v 1.8 2006/09/24 20:35:01 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#include +#include +#include +#include + +#include "defs.h" +#include "compress.h" +#include "pack.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/unfwcf/unfwcf.c,v 1.8 2006/09/24 20:35:01 tg Exp $"); + +static int unfwcf(int, const char *); +static __dead void usage(void); + +static int do_dump = 0; + +int +main(int argc, char *argv[]) +{ + int c; + int fd = STDIN_FILENO; + const char *file_root = NULL, *infile = NULL; + + while ((c = getopt(argc, argv, "di:l")) != -1) + switch (c) { + case 'd': + do_dump = 1; + break; + case 'i': + infile = optarg; + break; + case 'l': + return (list_compressors()); + default: + usage(); + } + argc -= optind; + argv += optind; + + if (argc != (1 - do_dump)) + usage(); + + file_root = *argv; + + if (infile != NULL) + if ((fd = open(infile, O_RDONLY, 0)) < 0) + err(1, "open %s", infile); + + return (unfwcf(fd, file_root)); +} + +static __dead void +usage(void) +{ + extern const char *__progname; + + fprintf(stderr, "Usage:\t%s [-i ] " + "\n\t%s -d [-i ]" + "\n\t%s -l\n", __progname, __progname, __progname); + exit(1); +} + +static int +unfwcf(int fd, const char *dir) +{ + char *udata; + + if ((udata = fwcf_unpack(fd, NULL))) { + if (do_dump) + ft_dump(udata); + else + ft_creatm(udata, dir); + } + return (udata != NULL ? 0 : 1); +} diff --git a/package/cfgfs/src/unwraps.c b/package/cfgfs/src/unwraps.c new file mode 100644 index 000000000..d03f297e3 --- /dev/null +++ b/package/cfgfs/src/unwraps.c @@ -0,0 +1,95 @@ +/* $MirOS: contrib/hosted/fwcf/unwraps.c,v 1.10 2006/09/26 10:25:03 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#ifdef DEBUG +#include +#endif +#include +#include +#include + +#include "defs.h" +#include "adler.h" +#include "compress.h" +#include "pack.h" +#include "sysdeps.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/unwraps.c,v 1.10 2006/09/26 10:25:03 tg Exp $"); + +char * +fwcf_unpack(int fd, size_t *inner) +{ + uint8_t c, hdrbuf[12]; + size_t outer, x_inner, x, len, maxln; + char *cdata, *udata; + ADLER_DECL; + + if (inner == NULL) + inner = &x_inner; + + if (read(fd, hdrbuf, 12) != 12) + err(1, "read"); + + if (strncmp((const char *)hdrbuf, "FWCF", 4)) + errx(1, "file format error"); + + outer = LOADT(hdrbuf + 4); + /* we don't need to support older versions, but specification + major 0 and 1 are compatible */ + if (hdrbuf[7] > FWCF_VER) + errx(1, "wrong file version %02Xh", hdrbuf[7]); + *inner = LOADT(hdrbuf + 8); + c = hdrbuf[11]; + maxln = ((outer + (DEF_FLASHBLOCK - 1)) / DEF_FLASHBLOCK) + * DEF_FLASHBLOCK; + + if (((cdata = malloc(maxln)) == NULL) || + ((udata = malloc(*inner)) == NULL)) + err(1, "malloc"); + memcpy(cdata, hdrbuf, 12); + if (read(fd, cdata + 12, maxln - 12) < (ssize_t)(outer - 12)) + err(1, "read"); + + len = outer - 4; + ADLER_CALC(cdata); + if ((s1 != LOADW(cdata + outer - 4)) || + (s2 != LOADW(cdata + outer - 2))) + errx(1, "crc mismatch: %02X%02X%02X%02X != %04X%04X", + (uint8_t)cdata[outer - 1], (uint8_t)cdata[outer - 2], + (uint8_t)cdata[outer - 3], (uint8_t)cdata[outer - 4], + s2, s1); + + if ((x = compressor_get(c)->decompress(udata, *inner, cdata + 12, + outer - 16)) != *inner) + errx(1, "size mismatch: decompressed %lu, want %lu", (u_long)x, + (u_long)*inner); + push_rndata((uint8_t *)cdata + outer, maxln - outer); + free(cdata); +#ifdef DEBUG + fprintf(stderr, "fwcf_unpack: decompressed outer %lu inner %lu\n", + (u_long)outer, (u_long)*inner); +#endif + return (udata); +} diff --git a/package/cfgfs/src/wraps.c b/package/cfgfs/src/wraps.c new file mode 100644 index 000000000..650474791 --- /dev/null +++ b/package/cfgfs/src/wraps.c @@ -0,0 +1,103 @@ +/* $MirOS: contrib/hosted/fwcf/wraps.c,v 1.7 2006/09/26 10:25:03 tg Exp $ */ + +/*- + * Copyright (c) 2006 + * Thorsten Glaser + * + * Licensee is hereby permitted to deal in this work without restric- + * tion, including unlimited rights to use, publicly perform, modify, + * merge, distribute, sell, give away or sublicence, provided all co- + * pyright notices above, these terms and the disclaimer are retained + * in all redistributions or reproduced in accompanying documentation + * or other materials provided with binary redistributions. + * + * Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, + * express, or implied, to the maximum extent permitted by applicable + * law, without malicious intent or gross negligence; in no event may + * licensor, an author or contributor be held liable for any indirect + * or other damage, or direct damage except proven a consequence of a + * direct error of said person and intended use of this work, loss or + * other issues arising in any way out of its use, even if advised of + * the possibility of such damage or existence of a defect. + */ + +#include +#include +#ifdef DEBUG +#include +#endif +#include +#include +#include + +#include "defs.h" +#include "adler.h" +#include "compress.h" +#include "fts_subs.h" +#include "pack.h" +#include "sysdeps.h" + +__RCSID("$MirOS: contrib/hosted/fwcf/wraps.c,v 1.7 2006/09/26 10:25:03 tg Exp $"); + +char * +fwcf_packm(const char *dir, int algo, size_t *dstsz) +{ + char empty_data = 0, *data, *f_data = NULL; + size_t i; + + if (dir == NULL) { + data = &empty_data; + i = 1; + } else { + ftsf_start(dir); + data = (f_data = ft_packm()) + sizeof (size_t); + i = *(size_t *)f_data - sizeof (size_t); + } + data = fwcf_pack(data, i, algo, dstsz); + if (f_data != NULL) + free(f_data); + return (data); +} + +char * +fwcf_pack(char *odata, size_t i, int algo, size_t *dstsz) +{ + int j; + size_t k; + char *data, *cdata; + + if (i > 0xFFFFFF) + errx(1, "inner size of %lu too large", (u_long)i); +#ifdef DEBUG + fprintf(stderr, "fwcf_pack: algo %02X packing %lu\n", algo, (u_long)i); +#endif + + if ((j = compressor_get(algo)->compress(&cdata, odata, i)) == -1) + errx(1, "%s compression failed", compressor_get(algo)->name); + + /* 12 bytes header, padding to 4-byte boundary, 4 bytes trailer */ + k = ((j + 19) / 4) * 4; +#if DEF_FLASHPART > 0xFFFFFF +# error DEF_FLASHPART too large +#endif + if (k > DEF_FLASHPART) + errx(1, "%lu bytes too large for flash partition of %lu KiB", + (u_long)k, DEF_FLASHPART / 1024UL); + /* padded to size of flash block */ +#if (DEF_FLASHBLOCK & 3) +# error DEF_FLASHBLOCK must be dword-aligned +#endif + *dstsz = ((k + (DEF_FLASHBLOCK - 1)) / DEF_FLASHBLOCK) * DEF_FLASHBLOCK; + if ((data = malloc(*dstsz)) == NULL) + err(1, "malloc"); + mkheader(data, *dstsz, k, i, algo); + memcpy(data + 12, cdata, j); + free(cdata); + k = j + 12; + while (k & 3) + data[k++] = 0; + mktrailer(data, k); + k += 4; + pull_rndata((uint8_t *)data + k, *dstsz - k); + return (data); +} diff --git a/package/cgilib/Config.in b/package/cgilib/Config.in new file mode 100644 index 000000000..40da2fc47 --- /dev/null +++ b/package/cgilib/Config.in @@ -0,0 +1,10 @@ +config ADK_PACKAGE_CGILIB + prompt "cgilib............................ Simple CGI Library" + tristate + default n + help + This library provides a simple programming API to the Common Gateway + Interface (CGI). It features HTTP Redirect, provides read access to + FORM variables, sets HTTP Cookies and reads them. + + http://www.infodrom.org/projects/cgilib/ diff --git a/package/cgilib/Makefile b/package/cgilib/Makefile new file mode 100644 index 000000000..dc0dc9337 --- /dev/null +++ b/package/cgilib/Makefile @@ -0,0 +1,26 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= cgilib +PKG_VERSION:= 0.7 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 2c7053f58dfb06f7a80a112797ed7e86 +MASTER_SITES:= http://www.infodrom.org/projects/cgilib/download/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,CGILIB,cgilib,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE:= gnu +BUILD_STYLE= auto +INSTALL_STYLE= auto + +post-install: + ${INSTALL_DIR} ${IDIR_CGILIB}/usr/lib + ${CP} ${WRKINST}/usr/lib/libcgi.so* ${IDIR_CGILIB}/usr/lib/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/cgilib/extra/m4/libtool.m4 b/package/cgilib/extra/m4/libtool.m4 new file mode 100644 index 000000000..2f42cf831 --- /dev/null +++ b/package/cgilib/extra/m4/libtool.m4 @@ -0,0 +1,7370 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 56 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl +_LT_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\[$]0 --fallback-echo"')dnl " + lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` + ;; +esac + +_LT_OUTPUT_LIBTOOL_INIT +]) + + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +cat >"$CONFIG_LT" <<_LTEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate a libtool stub with the current configuration. + +lt_cl_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AS_SHELL_SANITIZE +_AS_PREPARE + +exec AS_MESSAGE_FD>&1 +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +if test "$no_create" != yes; then + lt_cl_success=: + test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" + exec AS_MESSAGE_LOG_FD>/dev/null + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false + exec AS_MESSAGE_LOG_FD>>config.log + $lt_cl_success || AS_EXIT(1) +fi +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_XSI_SHELLFNS + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX +# ----------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_SHELL_INIT + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[_LT_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +[$]* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(lt_ECHO) +]) +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], + [An echo program that does not interpret backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[AC_CHECK_TOOL(AR, ar, false) +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1]) + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line __oline__ "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + # Handle Gentoo/FreeBSD as it was Linux + case $host_vendor in + gentoo) + version_type=linux ;; + *) + version_type=freebsd-$objformat ;; + esac + + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + linux) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + need_lib_prefix=no + need_version=no + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method == "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac +AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE(int foo(void) {}, + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + ) + LDFLAGS="$save_LDFLAGS" + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], + [[If ld is used when linking, flag to hardcode $libdir into a binary + during linking. This must work even if $libdir does not exist]]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [fix_srcfile_path], [1], + [Fix the shell variable $srcfile for the compiler]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_PROG_CXX +# ------------ +# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ +# compiler, we have our own version here. +m4_defun([_LT_PROG_CXX], +[ +pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) +AC_PROG_CXX +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_CXX + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_CXX], []) + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[AC_REQUIRE([_LT_PROG_CXX])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 will use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + xl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +]) +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_PROG_F77 +# ------------ +# Since AC_PROG_F77 is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_F77], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) +AC_PROG_F77 +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_F77 + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_F77], []) + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_REQUIRE([_LT_PROG_F77])dnl +AC_LANG_PUSH(Fortran 77) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${F77-"f77"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_PROG_FC +# ----------- +# Since AC_PROG_FC is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_FC], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) +AC_PROG_FC +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_FC + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_FC], []) + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_REQUIRE([_LT_PROG_FC])dnl +AC_LANG_PUSH(Fortran) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${FC-"f95"} + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC="$lt_save_CC" +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC="$lt_save_CC" +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_XSI_SHELLFNS +# --------------------- +# Bourne and XSI compatible variants of some useful shell functions. +m4_defun([_LT_PROG_XSI_SHELLFNS], +[case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $[*] )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +dnl func_dirname_and_basename +dnl A portable version of this function is already defined in general.m4sh +dnl so there is no need for it here. + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[[^=]]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$[@]"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]+=\$[2]" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]=\$$[1]\$[2]" +} + +_LT_EOF + ;; + esac +]) diff --git a/package/cgilib/extra/m4/ltoptions.m4 b/package/cgilib/extra/m4/ltoptions.m4 new file mode 100644 index 000000000..34151a3ba --- /dev/null +++ b/package/cgilib/extra/m4/ltoptions.m4 @@ -0,0 +1,368 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [0], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/package/cgilib/extra/m4/ltsugar.m4 b/package/cgilib/extra/m4/ltsugar.m4 new file mode 100644 index 000000000..9000a057d --- /dev/null +++ b/package/cgilib/extra/m4/ltsugar.m4 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/package/cgilib/extra/m4/ltversion.m4 b/package/cgilib/extra/m4/ltversion.m4 new file mode 100644 index 000000000..b8e154fe6 --- /dev/null +++ b/package/cgilib/extra/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# Generated from ltversion.in. + +# serial 3012 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.2.6]) +m4_define([LT_PACKAGE_REVISION], [1.3012]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6' +macro_revision='1.3012' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/package/cgilib/extra/m4/lt~obsolete.m4 b/package/cgilib/extra/m4/lt~obsolete.m4 new file mode 100644 index 000000000..637bb2066 --- /dev/null +++ b/package/cgilib/extra/m4/lt~obsolete.m4 @@ -0,0 +1,92 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 4 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff --git a/package/cgilib/ipkg/cgilib.control b/package/cgilib/ipkg/cgilib.control new file mode 100644 index 000000000..eeed8be3a --- /dev/null +++ b/package/cgilib/ipkg/cgilib.control @@ -0,0 +1,7 @@ +Package: cgilib +Priority: optional +Section: libs +Description: Simple CGI Library. + This library provides a simple programming API to the Common Gateway + Interface (CGI). It features HTTP Redirect, provides read access to + FORM variables, sets HTTP Cookies and reads them. diff --git a/package/cgilib/patches/patch-INSTALL b/package/cgilib/patches/patch-INSTALL new file mode 100644 index 000000000..e2ce1ee71 --- /dev/null +++ b/package/cgilib/patches/patch-INSTALL @@ -0,0 +1,277 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- cgilib-0.7.orig/INSTALL 2009-02-08 15:13:57.000000000 +0100 ++++ cgilib-0.7/INSTALL 2009-05-09 03:58:09.000000000 +0200 +@@ -1,56 +1,236 @@ + Installation Instructions +-========================= ++************************* + +-The version control system does not contain all files required to +-compile this project. This is intentional. ++Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free ++Software Foundation, Inc. + +-These files will be added before releasing a new version of the +-package outside of the version control system. ++This file is free documentation; the Free Software Foundation gives ++unlimited permission to copy, distribute and modify it. + +-Compiling from Source +---------------------- ++Basic Installation ++================== + +-To compile this package you'll have to execute the following two +-commands: ++These are generic installation instructions. + +-./configure +-make ++ The `configure' shell script attempts to guess correct values for ++various system-dependent variables used during compilation. It uses ++those values to create a `Makefile' in each directory of the package. ++It may also create one or more `.h' files containing system-dependent ++definitions. Finally, it creates a shell script `config.status' that ++you can run in the future to recreate the current configuration, and a ++file `config.log' containing compiler output (useful mainly for ++debugging `configure'). + +-Compiling from CVS +------------------- ++ It can also use an optional file (typically called `config.cache' ++and enabled with `--cache-file=config.cache' or simply `-C') that saves ++the results of its tests to speed up reconfiguring. (Caching is ++disabled by default to prevent problems with accidental use of stale ++cache files.) + +-Before you can compile this project you'll have to install the +-following packages: ++ If you need to do unusual things to compile the package, please try ++to figure out how `configure' could check whether to do them, and mail ++diffs or instructions to the address given in the `README' so they can ++be considered for the next release. If you are using the cache, and at ++some point `config.cache' contains results you don't want to keep, you ++may remove or edit it. + +- . autoconf +- . automake +- . libtool ++ The file `configure.ac' (or `configure.in') is used to create ++`configure' by a program called `autoconf'. You only need ++`configure.ac' if you want to change it or regenerate `configure' using ++a newer version of `autoconf'. + +-Once installed you'll have to execute the following commands: ++The simplest way to compile this package is: + +-aclocal +-autoconf +-libtoolize --force +-automake --add-missing --foreign ++ 1. `cd' to the directory containing the package's source code and type ++ `./configure' to configure the package for your system. If you're ++ using `csh' on an old version of System V, you might need to type ++ `sh ./configure' instead to prevent `csh' from trying to execute ++ `configure' itself. + +-Now ./configure is generated and needs to be executed. ++ Running `configure' takes awhile. While running, it prints some ++ messages telling which features it is checking for. + +-Preparing a release +-------------------- ++ 2. Type `make' to compile the package. + +-After the final commit, edit configure.ac and adjust the package version. +-Run the following commands: ++ 3. Optionally, type `make check' to run any self-tests that come with ++ the package. + +-aclocal +-autoconf +-libtoolize --force --copy +-automake --copy --add-missing --foreign ++ 4. Type `make install' to install the programs and any data files and ++ documentation. + +-Before building the final release tarball some files may be removed. ++ 5. You can remove the program binaries and object files from the ++ source code directory by typing `make clean'. To also remove the ++ files that `configure' created (so you can compile the package for ++ a different kind of computer), type `make distclean'. There is ++ also a `make maintainer-clean' target, but that is intended mainly ++ for the package's developers. If you use it, you may have to get ++ all sorts of other programs in order to regenerate files that came ++ with the distribution. + +-After a normal build run, execute: ++Compilers and Options ++===================== + +-make distclean +-rm -rf autom4te.cache +-rm -f aclocal.m4 ++Some systems require unusual options for compilation or linking that the ++`configure' script does not know about. Run `./configure --help' for ++details on some of the pertinent environment variables. ++ ++ You can give `configure' initial values for configuration parameters ++by setting variables in the command line or in the environment. Here ++is an example: ++ ++ ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix ++ ++ *Note Defining Variables::, for more details. ++ ++Compiling For Multiple Architectures ++==================================== ++ ++You can compile the package for more than one kind of computer at the ++same time, by placing the object files for each architecture in their ++own directory. To do this, you must use a version of `make' that ++supports the `VPATH' variable, such as GNU `make'. `cd' to the ++directory where you want the object files and executables to go and run ++the `configure' script. `configure' automatically checks for the ++source code in the directory that `configure' is in and in `..'. ++ ++ If you have to use a `make' that does not support the `VPATH' ++variable, you have to compile the package for one architecture at a ++time in the source code directory. After you have installed the ++package for one architecture, use `make distclean' before reconfiguring ++for another architecture. ++ ++Installation Names ++================== ++ ++By default, `make install' installs the package's commands under ++`/usr/local/bin', include files under `/usr/local/include', etc. You ++can specify an installation prefix other than `/usr/local' by giving ++`configure' the option `--prefix=PREFIX'. ++ ++ You can specify separate installation prefixes for ++architecture-specific files and architecture-independent files. If you ++pass the option `--exec-prefix=PREFIX' to `configure', the package uses ++PREFIX as the prefix for installing programs and libraries. ++Documentation and other data files still use the regular prefix. ++ ++ In addition, if you use an unusual directory layout you can give ++options like `--bindir=DIR' to specify different values for particular ++kinds of files. Run `configure --help' for a list of the directories ++you can set and what kinds of files go in them. ++ ++ If the package supports it, you can cause programs to be installed ++with an extra prefix or suffix on their names by giving `configure' the ++option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. ++ ++Optional Features ++================= ++ ++Some packages pay attention to `--enable-FEATURE' options to ++`configure', where FEATURE indicates an optional part of the package. ++They may also pay attention to `--with-PACKAGE' options, where PACKAGE ++is something like `gnu-as' or `x' (for the X Window System). The ++`README' should mention any `--enable-' and `--with-' options that the ++package recognizes. ++ ++ For packages that use the X Window System, `configure' can usually ++find the X include and library files automatically, but if it doesn't, ++you can use the `configure' options `--x-includes=DIR' and ++`--x-libraries=DIR' to specify their locations. ++ ++Specifying the System Type ++========================== ++ ++There may be some features `configure' cannot figure out automatically, ++but needs to determine by the type of machine the package will run on. ++Usually, assuming the package is built to be run on the _same_ ++architectures, `configure' can figure that out, but if it prints a ++message saying it cannot guess the machine type, give it the ++`--build=TYPE' option. TYPE can either be a short name for the system ++type, such as `sun4', or a canonical name which has the form: ++ ++ CPU-COMPANY-SYSTEM ++ ++where SYSTEM can have one of these forms: ++ ++ OS KERNEL-OS ++ ++ See the file `config.sub' for the possible values of each field. If ++`config.sub' isn't included in this package, then this package doesn't ++need to know the machine type. ++ ++ If you are _building_ compiler tools for cross-compiling, you should ++use the option `--target=TYPE' to select the type of system they will ++produce code for. ++ ++ If you want to _use_ a cross compiler, that generates code for a ++platform different from the build platform, you should specify the ++"host" platform (i.e., that on which the generated programs will ++eventually be run) with `--host=TYPE'. ++ ++Sharing Defaults ++================ ++ ++If you want to set default values for `configure' scripts to share, you ++can create a site shell script called `config.site' that gives default ++values for variables like `CC', `cache_file', and `prefix'. ++`configure' looks for `PREFIX/share/config.site' if it exists, then ++`PREFIX/etc/config.site' if it exists. Or, you can set the ++`CONFIG_SITE' environment variable to the location of the site script. ++A warning: not all `configure' scripts look for a site script. ++ ++Defining Variables ++================== ++ ++Variables not defined in a site shell script can be set in the ++environment passed to `configure'. However, some packages may run ++configure again during the build, and the customized values of these ++variables may be lost. In order to avoid this problem, you should set ++them in the `configure' command line, using `VAR=value'. For example: ++ ++ ./configure CC=/usr/local2/bin/gcc ++ ++causes the specified `gcc' to be used as the C compiler (unless it is ++overridden in the site shell script). Here is a another example: ++ ++ /bin/bash ./configure CONFIG_SHELL=/bin/bash ++ ++Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent ++configuration-related scripts to be executed by `/bin/bash'. ++ ++`configure' Invocation ++====================== ++ ++`configure' recognizes the following options to control how it operates. ++ ++`--help' ++`-h' ++ Print a summary of the options to `configure', and exit. ++ ++`--version' ++`-V' ++ Print the version of Autoconf used to generate the `configure' ++ script, and exit. ++ ++`--cache-file=FILE' ++ Enable the cache: use and save the results of the tests in FILE, ++ traditionally `config.cache'. FILE defaults to `/dev/null' to ++ disable caching. ++ ++`--config-cache' ++`-C' ++ Alias for `--cache-file=config.cache'. ++ ++`--quiet' ++`--silent' ++`-q' ++ Do not print messages saying which checks are being made. To ++ suppress all normal output, redirect it to `/dev/null' (any error ++ messages will still be shown). ++ ++`--srcdir=DIR' ++ Look for the package's source code in directory DIR. Usually ++ `configure' can determine that directory automatically. ++ ++`configure' also accepts some other, not widely useful, options. Run ++`configure --help' for more details. + diff --git a/package/cgilib/patches/patch-Makefile_in b/package/cgilib/patches/patch-Makefile_in new file mode 100644 index 000000000..540cf21a6 --- /dev/null +++ b/package/cgilib/patches/patch-Makefile_in @@ -0,0 +1,491 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- cgilib-0.7.orig/Makefile.in 2009-02-08 19:47:04.000000000 +0100 ++++ cgilib-0.7/Makefile.in 2009-05-09 04:01:39.000000000 +0200 +@@ -1,8 +1,8 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.9.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ++# 2003, 2004, 2005 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -32,11 +32,15 @@ + + + ++srcdir = @srcdir@ ++top_srcdir = @top_srcdir@ + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ ++top_builddir = . + am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd ++INSTALL = @INSTALL@ + install_sh_DATA = $(install_sh) -c -m 644 + install_sh_PROGRAM = $(install_sh) -c + install_sh_SCRIPT = $(install_sh) -c +@@ -51,17 +55,17 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + bin_PROGRAMS = cgitest$(EXEEXT) jumpto$(EXEEXT) +-subdir = . + DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ +- $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL \ ++ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ + config.guess config.sub depcomp install-sh ltmain.sh missing ++subdir = . + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ +- configure.lineno config.status.lineno ++ configure.lineno configure.status.lineno + mkinstalldirs = $(install_sh) -d + CONFIG_CLEAN_FILES = + am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +@@ -78,9 +82,6 @@ LTLIBRARIES = $(lib_LTLIBRARIES) + libcgi_la_LIBADD = + am_libcgi_la_OBJECTS = cgi.lo cookies.lo aux.lo + libcgi_la_OBJECTS = $(am_libcgi_la_OBJECTS) +-libcgi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +- $(libcgi_la_LDFLAGS) $(LDFLAGS) -o $@ + binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) + PROGRAMS = $(bin_PROGRAMS) + am_cgitest_OBJECTS = cgitest.$(OBJEXT) +@@ -89,18 +90,17 @@ cgitest_DEPENDENCIES = libcgi.la + am_jumpto_OBJECTS = cgitest.$(OBJEXT) + jumpto_OBJECTS = $(am_jumpto_OBJECTS) + jumpto_DEPENDENCIES = libcgi.la +-DEFAULT_INCLUDES = -I.@am__isrc@ ++DEFAULT_INCLUDES = -I. -I$(srcdir) + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ +- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ +- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) ++LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ ++ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ ++ $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) +-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ +- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ +- $(LDFLAGS) -o $@ ++LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(AM_LDFLAGS) $(LDFLAGS) -o $@ + SOURCES = $(libcgi_la_SOURCES) $(cgitest_SOURCES) $(jumpto_SOURCES) + DIST_SOURCES = $(libcgi_la_SOURCES) $(cgitest_SOURCES) \ + $(jumpto_SOURCES) +@@ -124,6 +124,8 @@ GZIP_ENV = --best + distuninstallcheck_listfiles = find . -type f -print + distcleancheck_listfiles = find . -type f -print + ACLOCAL = @ACLOCAL@ ++AMDEP_FALSE = @AMDEP_FALSE@ ++AMDEP_TRUE = @AMDEP_TRUE@ + AMTAR = @AMTAR@ + AR = @AR@ + AUTOCONF = @AUTOCONF@ +@@ -152,7 +154,6 @@ EXEEXT = @EXEEXT@ + F77 = @F77@ + FFLAGS = @FFLAGS@ + GREP = @GREP@ +-INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ +@@ -164,7 +165,6 @@ LIBTOOL = @LIBTOOL@ + LN_S = @LN_S@ + LTLIBOBJS = @LTLIBOBJS@ + MAKEINFO = @MAKEINFO@ +-MKDIR_P = @MKDIR_P@ + NMEDIT = @NMEDIT@ + OBJEXT = @OBJEXT@ + PACKAGE = @PACKAGE@ +@@ -181,13 +181,13 @@ SHELL = @SHELL@ + SO_VERSION = @SO_VERSION@ + STRIP = @STRIP@ + VERSION = @VERSION@ +-abs_builddir = @abs_builddir@ +-abs_srcdir = @abs_srcdir@ +-abs_top_builddir = @abs_top_builddir@ +-abs_top_srcdir = @abs_top_srcdir@ + ac_ct_CC = @ac_ct_CC@ + ac_ct_CXX = @ac_ct_CXX@ + ac_ct_F77 = @ac_ct_F77@ ++am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ ++am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ ++am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ ++am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ + am__include = @am__include@ + am__leading_dot = @am__leading_dot@ + am__quote = @am__quote@ +@@ -199,7 +199,6 @@ build_alias = @build_alias@ + build_cpu = @build_cpu@ + build_os = @build_os@ + build_vendor = @build_vendor@ +-builddir = @builddir@ + datadir = @datadir@ + datarootdir = @datarootdir@ + docdir = @docdir@ +@@ -227,11 +226,8 @@ program_transform_name = @program_transf + psdir = @psdir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ +-srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +-top_builddir = @top_builddir@ +-top_srcdir = @top_srcdir@ + lib_LTLIBRARIES = libcgi.la + libcgi_la_SOURCES = cgi.c cookies.c aux.c + libcgi_la_LDFLAGS = -version-info @SO_VERSION@ +@@ -245,56 +241,23 @@ all: all-am + + .SUFFIXES: + .SUFFIXES: .c .lo .o .obj +-am--refresh: +- @: +-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +- @for dep in $?; do \ +- case '$(am__configure_deps)' in \ +- *$$dep*) \ +- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ +- cd $(srcdir) && $(AUTOMAKE) --foreign \ +- && exit 0; \ +- exit 1;; \ +- esac; \ +- done; \ +- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ +- cd $(top_srcdir) && \ +- $(AUTOMAKE) --foreign Makefile +-.PRECIOUS: Makefile +-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +- @case '$?' in \ +- *config.status*) \ +- echo ' $(SHELL) ./config.status'; \ +- $(SHELL) ./config.status;; \ +- *) \ +- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ +- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ +- esac; +- +-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) +- $(SHELL) ./config.status --recheck +- +-$(top_srcdir)/configure: $(am__configure_deps) +- cd $(srcdir) && $(AUTOCONF) +-$(ACLOCAL_M4): $(am__aclocal_m4_deps) +- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) +- test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" ++ test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ +- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ +- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ ++ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ ++ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + + uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) +- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ ++ @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ +- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ +- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ ++ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ ++ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + + clean-libLTLIBRARIES: +@@ -306,18 +269,18 @@ clean-libLTLIBRARIES: + rm -f "$${dir}/so_locations"; \ + done + libcgi.la: $(libcgi_la_OBJECTS) $(libcgi_la_DEPENDENCIES) +- $(libcgi_la_LINK) -rpath $(libdir) $(libcgi_la_OBJECTS) $(libcgi_la_LIBADD) $(LIBS) ++ $(LINK) -rpath $(libdir) $(libcgi_la_LDFLAGS) $(libcgi_la_OBJECTS) $(libcgi_la_LIBADD) $(LIBS) + install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) +- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" ++ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ +- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ +- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ ++ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ ++ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +@@ -337,10 +300,10 @@ clean-binPROGRAMS: + done + cgitest$(EXEEXT): $(cgitest_OBJECTS) $(cgitest_DEPENDENCIES) + @rm -f cgitest$(EXEEXT) +- $(LINK) $(cgitest_OBJECTS) $(cgitest_LDADD) $(LIBS) ++ $(LINK) $(cgitest_LDFLAGS) $(cgitest_OBJECTS) $(cgitest_LDADD) $(LIBS) + jumpto$(EXEEXT): $(jumpto_OBJECTS) $(jumpto_DEPENDENCIES) + @rm -f jumpto$(EXEEXT) +- $(LINK) $(jumpto_OBJECTS) $(jumpto_LDADD) $(LIBS) ++ $(LINK) $(jumpto_LDFLAGS) $(jumpto_OBJECTS) $(jumpto_LDADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) +@@ -354,22 +317,22 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cookies.Plo@am__quote@ + + .c.o: +-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po ++@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(COMPILE) -c $< + + .c.obj: +-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po ++@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + + .c.lo: +-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo ++@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@@ -382,9 +345,10 @@ clean-libtool: + + distclean-libtool: + -rm -f libtool ++uninstall-info-am: + install-man3: $(man3_MANS) $(man_MANS) + @$(NORMAL_INSTALL) +- test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" ++ test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)" + @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ +@@ -429,7 +393,7 @@ uninstall-man3: + done + install-man5: $(man5_MANS) $(man_MANS) + @$(NORMAL_INSTALL) +- test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" ++ test -z "$(man5dir)" || $(mkdir_p) "$(DESTDIR)$(man5dir)" + @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ +@@ -474,7 +438,7 @@ uninstall-man5: + done + install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) +- test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" ++ test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ +@@ -495,8 +459,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ +- $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ +- END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ $(AWK) ' { files[$$0] = 1; } \ ++ END { for (i in files) print i; }'`; \ + mkid -fID $$unique + tags: TAGS + +@@ -508,8 +472,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEP + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ +- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ +- END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ $(AWK) ' { files[$$0] = 1; } \ ++ END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ +@@ -519,12 +483,13 @@ ctags: CTAGS + CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ ++ here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ +- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ +- END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ $(AWK) ' { files[$$0] = 1; } \ ++ END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +@@ -539,22 +504,23 @@ distclean-tags: + + distdir: $(DISTFILES) + $(am__remove_distdir) +- test -d $(distdir) || mkdir $(distdir) +- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ +- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ +- list='$(DISTFILES)'; \ +- dist_files=`for file in $$list; do echo $$file; done | \ +- sed -e "s|^$$srcdirstrip/||;t" \ +- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ +- case $$dist_files in \ +- */*) $(MKDIR_P) `echo "$$dist_files" | \ +- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ +- sort -u` ;; \ +- esac; \ +- for file in $$dist_files; do \ ++ mkdir $(distdir) ++ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ ++ list='$(DISTFILES)'; for file in $$list; do \ ++ case $$file in \ ++ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ ++ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ ++ esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ ++ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ ++ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ ++ dir="/$$dir"; \ ++ $(mkdir_p) "$(distdir)$$dir"; \ ++ else \ ++ dir=''; \ ++ fi; \ + if test -d $$d/$$file; then \ +- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ +@@ -568,7 +534,7 @@ distdir: $(DISTFILES) + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ +- ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ ++ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) + dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz +@@ -578,10 +544,6 @@ dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +-dist-lzma: distdir +- tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma +- $(am__remove_distdir) +- + dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) +@@ -608,8 +570,6 @@ distcheck: dist + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ +- *.tar.lzma*) \ +- unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ +@@ -649,7 +609,7 @@ distcheck: dist + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ +- sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' ++ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ +@@ -675,7 +635,7 @@ install-binPROGRAMS: install-libLTLIBRAR + + installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(includedir)"; do \ +- test -z "$$dir" || $(MKDIR_P) "$$dir"; \ ++ test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done + install: install-am + install-exec: install-exec-am +@@ -725,20 +685,12 @@ info-am: + + install-data-am: install-includeHEADERS install-man + +-install-dvi: install-dvi-am +- + install-exec-am: install-binPROGRAMS install-libLTLIBRARIES + +-install-html: install-html-am +- + install-info: install-info-am + + install-man: install-man3 install-man5 + +-install-pdf: install-pdf-am +- +-install-ps: install-ps-am +- + installcheck-am: + + maintainer-clean: maintainer-clean-am +@@ -762,31 +714,28 @@ ps: ps-am + ps-am: + + uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ +- uninstall-libLTLIBRARIES uninstall-man ++ uninstall-info-am uninstall-libLTLIBRARIES uninstall-man + + uninstall-man: uninstall-man3 uninstall-man5 + +-.MAKE: install-am install-strip +- + .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool ctags dist dist-all dist-bzip2 dist-gzip \ +- dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \ ++ dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ +- install-binPROGRAMS install-data install-data-am install-dvi \ +- install-dvi-am install-exec install-exec-am install-html \ +- install-html-am install-includeHEADERS install-info \ ++ install-binPROGRAMS install-data install-data-am install-exec \ ++ install-exec-am install-includeHEADERS install-info \ + install-info-am install-libLTLIBRARIES install-man \ +- install-man3 install-man5 install-pdf install-pdf-am \ +- install-ps install-ps-am install-strip installcheck \ ++ install-man3 install-man5 install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ +- uninstall-includeHEADERS uninstall-libLTLIBRARIES \ +- uninstall-man uninstall-man3 uninstall-man5 ++ uninstall-includeHEADERS uninstall-info-am \ ++ uninstall-libLTLIBRARIES uninstall-man uninstall-man3 \ ++ uninstall-man5 + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/package/cgilib/patches/patch-cgi_c b/package/cgilib/patches/patch-cgi_c new file mode 100644 index 000000000..0e4052688 --- /dev/null +++ b/package/cgilib/patches/patch-cgi_c @@ -0,0 +1,12 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- cgilib-0.7.orig/cgi.c 2009-01-11 22:59:16.000000000 +0100 ++++ cgilib-0.7/cgi.c 2009-03-31 19:16:46.214155324 +0200 +@@ -327,7 +327,7 @@ s_cgi *cgiReadMultipart (char *boundary) + file->name = name; + file->type = type; + file->tmpfile = tmpfile; +- if ((cp = rindex (fname, '/')) == NULL) ++ if ((cp = strrchr (fname, '/')) == NULL) + file->filename = fname; + else { + file->filename = strdup (++cp); diff --git a/package/cgilib/patches/patch-configure b/package/cgilib/patches/patch-configure new file mode 100644 index 000000000..3a682731e --- /dev/null +++ b/package/cgilib/patches/patch-configure @@ -0,0 +1,8132 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- cgilib-0.7.orig/configure 2009-02-08 19:47:03.000000000 +0100 ++++ cgilib-0.7/configure 2009-05-09 03:58:09.000000000 +0200 +@@ -1,9 +1,9 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.61. ++# Generated by GNU Autoconf 2.62. + # + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. ++# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + # This configure script is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. + ## --------------------- ## +@@ -15,7 +15,7 @@ DUALCASE=1; export DUALCASE # for MKS sh + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ++ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +@@ -37,17 +37,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTE + as_cr_digits='0123456789' + as_cr_alnum=$as_cr_Letters$as_cr_digits + +-# The user is always right. +-if test "${PATH_SEPARATOR+set}" != set; then +- echo "#! /bin/sh" >conf$$.sh +- echo "exit 0" >>conf$$.sh +- chmod +x conf$$.sh +- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then +- PATH_SEPARATOR=';' ++as_nl=' ++' ++export as_nl ++# Printing a long string crashes Solaris 7 /usr/bin/printf. ++as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo ++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo ++if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then ++ as_echo='printf %s\n' ++ as_echo_n='printf %s' ++else ++ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then ++ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' ++ as_echo_n='/usr/ucb/echo -n' + else +- PATH_SEPARATOR=: ++ as_echo_body='eval expr "X$1" : "X\\(.*\\)"' ++ as_echo_n_body='eval ++ arg=$1; ++ case $arg in ++ *"$as_nl"*) ++ expr "X$arg" : "X\\(.*\\)$as_nl"; ++ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; ++ esac; ++ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ++ ' ++ export as_echo_n_body ++ as_echo_n='sh -c $as_echo_n_body as_echo' + fi +- rm -f conf$$.sh ++ export as_echo_body ++ as_echo='sh -c $as_echo_body as_echo' ++fi ++ ++# The user is always right. ++if test "${PATH_SEPARATOR+set}" != set; then ++ PATH_SEPARATOR=: ++ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { ++ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || ++ PATH_SEPARATOR=';' ++ } + fi + + # Support unset when possible. +@@ -63,8 +91,6 @@ fi + # there to prevent editors from complaining about space-tab. + # (If _AS_PATH_WALK were called with IFS unset, it would disable word + # splitting by setting IFS to empty value.) +-as_nl=' +-' + IFS=" "" $as_nl" + + # Find who we are. Look in the path if we contain no directory separator. +@@ -87,7 +113,7 @@ if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then +- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 ++ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } + fi + +@@ -100,17 +126,10 @@ PS2='> ' + PS4='+ ' + + # NLS nuisances. +-for as_var in \ +- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ +- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ +- LC_TELEPHONE LC_TIME +-do +- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then +- eval $as_var=C; export $as_var +- else +- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +- fi +-done ++LC_ALL=C ++export LC_ALL ++LANGUAGE=C ++export LANGUAGE + + # Required to use basename. + if expr a : '\(a\)' >/dev/null 2>&1 && +@@ -132,7 +151,7 @@ as_me=`$as_basename -- "$0" || + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +-echo X/"$0" | ++$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q +@@ -158,7 +177,7 @@ else + as_have_required=no + fi + +- if test $as_have_required = yes && (eval ": ++ if test $as_have_required = yes && (eval ": + (as_func_return () { + (exit \$1) + } +@@ -240,7 +259,7 @@ IFS=$as_save_IFS + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ++ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +@@ -261,7 +280,7 @@ _ASEOF + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ++ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +@@ -341,10 +360,10 @@ fi + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV +- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +- done +- export CONFIG_SHELL +- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} ++ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++ done ++ export CONFIG_SHELL ++ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + fi + + +@@ -413,9 +432,10 @@ fi + + test \$exitcode = 0") || { + echo No shell found that supports shell functions. +- echo Please tell autoconf@gnu.org about your system, +- echo including any error possibly output before this +- echo message ++ echo Please tell bug-autoconf@gnu.org about your system, ++ echo including any error possibly output before this message. ++ echo This can help us improve future autoconf versions. ++ echo Configuration will now proceed without shell functions. + } + + +@@ -451,7 +471,7 @@ test \$exitcode = 0") || { + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || +- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 ++ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems +@@ -479,7 +499,6 @@ case `echo -n x` in + *) + ECHO_N='-n';; + esac +- + if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +@@ -492,19 +511,22 @@ if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file + else + rm -f conf$$.dir +- mkdir conf$$.dir ++ mkdir conf$$.dir 2>/dev/null + fi +-echo >conf$$.file +-if ln -s conf$$.file conf$$ 2>/dev/null; then +- as_ln_s='ln -s' +- # ... but there are two gotchas: +- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. +- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. +- # In both cases, we have to default to `cp -p'. +- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || ++if (echo >conf$$.file) 2>/dev/null; then ++ if ln -s conf$$.file conf$$ 2>/dev/null; then ++ as_ln_s='ln -s' ++ # ... but there are two gotchas: ++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. ++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. ++ # In both cases, we have to default to `cp -p'. ++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || ++ as_ln_s='cp -p' ++ elif ln conf$$.file conf$$ 2>/dev/null; then ++ as_ln_s=ln ++ else + as_ln_s='cp -p' +-elif ln conf$$.file conf$$ 2>/dev/null; then +- as_ln_s=ln ++ fi + else + as_ln_s='cp -p' + fi +@@ -529,10 +551,10 @@ else + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then +- test -d "$1/."; ++ test -d "$1/."; + else + case $1 in +- -*)set "./$1";; ++ -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi +@@ -807,7 +829,6 @@ target_alias + INSTALL_PROGRAM + INSTALL_SCRIPT + INSTALL_DATA +-am__isrc + CYGPATH_W + PACKAGE + VERSION +@@ -875,6 +896,17 @@ SO_VERSION + LIBOBJS + LTLIBOBJS' + ac_subst_files='' ++ac_user_opts=' ++enable_option_checking ++enable_dependency_tracking ++enable_shared ++enable_static ++enable_fast_install ++with_gnu_ld ++enable_libtool_lock ++with_pic ++with_tags ++' + ac_precious_vars='build_alias + host_alias + target_alias +@@ -895,6 +927,8 @@ FFLAGS' + # Initialize some variables set by options. + ac_init_help= + ac_init_version=false ++ac_unrecognized_opts= ++ac_unrecognized_sep= + # The variables have the same names as the options, with + # dashes changed to underlines. + cache_file=/dev/null +@@ -993,13 +1027,21 @@ do + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) +- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` ++ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && ++ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } +- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` +- eval enable_$ac_feature=no ;; ++ ac_useropt_orig=$ac_useropt ++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ++ case $ac_user_opts in ++ *" ++"enable_$ac_useropt" ++"*) ;; ++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ++ ac_unrecognized_sep=', ';; ++ esac ++ eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; +@@ -1012,13 +1054,21 @@ do + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) +- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` ++ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && ++ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } +- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` +- eval enable_$ac_feature=\$ac_optarg ;; ++ ac_useropt_orig=$ac_useropt ++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ++ case $ac_user_opts in ++ *" ++"enable_$ac_useropt" ++"*) ;; ++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ++ ac_unrecognized_sep=', ';; ++ esac ++ eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ +@@ -1209,22 +1259,38 @@ do + ac_init_version=: ;; + + -with-* | --with-*) +- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` ++ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid package name: $ac_package" >&2 ++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && ++ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } +- ac_package=`echo $ac_package | sed 's/[-.]/_/g'` +- eval with_$ac_package=\$ac_optarg ;; ++ ac_useropt_orig=$ac_useropt ++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ++ case $ac_user_opts in ++ *" ++"with_$ac_useropt" ++"*) ;; ++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ++ ac_unrecognized_sep=', ';; ++ esac ++ eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) +- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` ++ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid package name: $ac_package" >&2 ++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && ++ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } +- ac_package=`echo $ac_package | sed 's/[-.]/_/g'` +- eval with_$ac_package=no ;; ++ ac_useropt_orig=$ac_useropt ++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ++ case $ac_user_opts in ++ *" ++"with_$ac_useropt" ++"*) ;; ++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ++ ac_unrecognized_sep=', ';; ++ esac ++ eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. +@@ -1244,7 +1310,7 @@ do + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + +- -*) { echo "$as_me: error: unrecognized option: $ac_option ++ -*) { $as_echo "$as_me: error: unrecognized option: $ac_option + Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; +@@ -1253,16 +1319,16 @@ Try \`$0 --help' for more information." + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 ++ { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. +- echo "$as_me: WARNING: you should use --build, --host, --target" >&2 ++ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && +- echo "$as_me: WARNING: invalid host type: $ac_option" >&2 ++ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + +@@ -1271,22 +1337,38 @@ done + + if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` +- { echo "$as_me: error: missing argument to $ac_option" >&2 ++ { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } + fi + +-# Be sure to have absolute directory names. ++if test -n "$ac_unrecognized_opts"; then ++ case $enable_option_checking in ++ no) ;; ++ fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&2 ++ { (exit 1); exit 1; }; } ;; ++ *) $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;; ++ esac ++fi ++ ++# Check all directory arguments for consistency. + for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir + do + eval ac_val=\$$ac_var ++ # Remove trailing slashes. ++ case $ac_val in ++ */ ) ++ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` ++ eval $ac_var=\$ac_val;; ++ esac ++ # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac +- { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 ++ { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } + done + +@@ -1301,7 +1383,7 @@ target=$target_alias + if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe +- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. ++ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes +@@ -1317,10 +1399,10 @@ test "$silent" = yes && exec 6>/dev/null + ac_pwd=`pwd` && test -n "$ac_pwd" && + ac_ls_di=`ls -di .` && + ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || +- { echo "$as_me: error: Working directory cannot be determined" >&2 ++ { $as_echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } + test "X$ac_ls_di" = "X$ac_pwd_ls_di" || +- { echo "$as_me: error: pwd does not report name of working directory" >&2 ++ { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +@@ -1328,12 +1410,12 @@ test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. +- ac_confdir=`$as_dirname -- "$0" || +-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$0" : 'X\(//\)[^/]' \| \ +- X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)' \| . 2>/dev/null || +-echo X"$0" | ++ ac_confdir=`$as_dirname -- "$as_myself" || ++$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$as_myself" : 'X\(//\)[^/]' \| \ ++ X"$as_myself" : 'X\(//\)$' \| \ ++ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q +@@ -1360,12 +1442,12 @@ else + fi + if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." +- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 ++ { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi + ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" + ac_abs_confdir=`( +- cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 ++ cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` + # When building in place, set srcdir=. +@@ -1414,9 +1496,9 @@ Configuration: + + Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX +- [$ac_default_prefix] ++ [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX +- [PREFIX] ++ [PREFIX] + + By default, \`make install' will install all the files in + \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +@@ -1426,25 +1508,25 @@ for instance \`--prefix=\$HOME'. + For better control, use the options below. + + Fine tuning of the installation directories: +- --bindir=DIR user executables [EPREFIX/bin] +- --sbindir=DIR system admin executables [EPREFIX/sbin] +- --libexecdir=DIR program executables [EPREFIX/libexec] +- --sysconfdir=DIR read-only single-machine data [PREFIX/etc] +- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] +- --localstatedir=DIR modifiable single-machine data [PREFIX/var] +- --libdir=DIR object code libraries [EPREFIX/lib] +- --includedir=DIR C header files [PREFIX/include] +- --oldincludedir=DIR C header files for non-gcc [/usr/include] +- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] +- --datadir=DIR read-only architecture-independent data [DATAROOTDIR] +- --infodir=DIR info documentation [DATAROOTDIR/info] +- --localedir=DIR locale-dependent data [DATAROOTDIR/locale] +- --mandir=DIR man documentation [DATAROOTDIR/man] +- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] +- --htmldir=DIR html documentation [DOCDIR] +- --dvidir=DIR dvi documentation [DOCDIR] +- --pdfdir=DIR pdf documentation [DOCDIR] +- --psdir=DIR ps documentation [DOCDIR] ++ --bindir=DIR user executables [EPREFIX/bin] ++ --sbindir=DIR system admin executables [EPREFIX/sbin] ++ --libexecdir=DIR program executables [EPREFIX/libexec] ++ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] ++ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] ++ --localstatedir=DIR modifiable single-machine data [PREFIX/var] ++ --libdir=DIR object code libraries [EPREFIX/lib] ++ --includedir=DIR C header files [PREFIX/include] ++ --oldincludedir=DIR C header files for non-gcc [/usr/include] ++ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] ++ --datadir=DIR read-only architecture-independent data [DATAROOTDIR] ++ --infodir=DIR info documentation [DATAROOTDIR/info] ++ --localedir=DIR locale-dependent data [DATAROOTDIR/locale] ++ --mandir=DIR man documentation [DATAROOTDIR/man] ++ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] ++ --htmldir=DIR html documentation [DOCDIR] ++ --dvidir=DIR dvi documentation [DOCDIR] ++ --pdfdir=DIR pdf documentation [DOCDIR] ++ --psdir=DIR ps documentation [DOCDIR] + _ACEOF + + cat <<\_ACEOF +@@ -1465,6 +1547,7 @@ if test -n "$ac_init_help"; then + cat <<\_ACEOF + + Optional Features: ++ --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking speeds up one-time build +@@ -1508,15 +1591,17 @@ fi + if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue +- test -d "$ac_dir" || continue ++ test -d "$ac_dir" || ++ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || ++ continue + ac_builddir=. + + case "$ac_dir" in + .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) +- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` ++ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. +- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` ++ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; +@@ -1552,7 +1637,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_ + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else +- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 ++ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +@@ -1562,10 +1647,10 @@ test -n "$ac_init_help" && exit $ac_stat + if $ac_init_version; then + cat <<\_ACEOF + configure +-generated by GNU Autoconf 2.61 ++generated by GNU Autoconf 2.62 + + Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. ++2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + _ACEOF +@@ -1576,7 +1661,7 @@ This file contains any messages produced + running configure, to aid debugging if configure makes a mistake. + + It was created by $as_me, which was +-generated by GNU Autoconf 2.61. Invocation command line was ++generated by GNU Autoconf 2.62. Invocation command line was + + $ $0 $@ + +@@ -1612,7 +1697,7 @@ for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- echo "PATH: $as_dir" ++ $as_echo "PATH: $as_dir" + done + IFS=$as_save_IFS + +@@ -1647,7 +1732,7 @@ do + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) +- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; ++ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; +@@ -1699,11 +1784,12 @@ _ASBOX + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( +- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; ++ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 ++$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( ++ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac +@@ -1733,9 +1819,9 @@ _ASBOX + do + eval ac_val=\$$ac_var + case $ac_val in +- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; ++ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac +- echo "$ac_var='\''$ac_val'\''" ++ $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + +@@ -1750,9 +1836,9 @@ _ASBOX + do + eval ac_val=\$$ac_var + case $ac_val in +- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; ++ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac +- echo "$ac_var='\''$ac_val'\''" ++ $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi +@@ -1768,8 +1854,8 @@ _ASBOX + echo + fi + test "$ac_signal" != 0 && +- echo "$as_me: caught signal $ac_signal" +- echo "$as_me: exit $exit_status" ++ $as_echo "$as_me: caught signal $ac_signal" ++ $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && +@@ -1811,21 +1897,24 @@ _ACEOF + + + # Let the site file select an alternate cache file if it wants to. +-# Prefer explicitly selected file to automatically selected ones. ++# Prefer an explicitly selected file to automatically selected ones. ++ac_site_file1=NONE ++ac_site_file2=NONE + if test -n "$CONFIG_SITE"; then +- set x "$CONFIG_SITE" ++ ac_site_file1=$CONFIG_SITE + elif test "x$prefix" != xNONE; then +- set x "$prefix/share/config.site" "$prefix/etc/config.site" ++ ac_site_file1=$prefix/share/config.site ++ ac_site_file2=$prefix/etc/config.site + else +- set x "$ac_default_prefix/share/config.site" \ +- "$ac_default_prefix/etc/config.site" ++ ac_site_file1=$ac_default_prefix/share/config.site ++ ac_site_file2=$ac_default_prefix/etc/config.site + fi +-shift +-for ac_site_file ++for ac_site_file in "$ac_site_file1" "$ac_site_file2" + do ++ test "x$ac_site_file" = xNONE && continue + if test -r "$ac_site_file"; then +- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +-echo "$as_me: loading site script $ac_site_file" >&6;} ++ { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 ++$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +@@ -1835,16 +1924,16 @@ if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then +- { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +-echo "$as_me: loading cache $cache_file" >&6;} ++ { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 ++$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi + else +- { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +-echo "$as_me: creating cache $cache_file" >&6;} ++ { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 ++$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file + fi + +@@ -1858,29 +1947,38 @@ for ac_var in $ac_precious_vars; do + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) +- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ++ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 ++$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) +- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ++ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 ++$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then +- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} +- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +-echo "$as_me: former value: $ac_old_val" >&2;} +- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +-echo "$as_me: current value: $ac_new_val" >&2;} +- ac_cache_corrupted=: ++ # differences in whitespace do not lead to failure. ++ ac_old_val_w=`echo x $ac_old_val` ++ ac_new_val_w=`echo x $ac_new_val` ++ if test "$ac_old_val_w" != "$ac_new_val_w"; then ++ { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 ++$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ++ ac_cache_corrupted=: ++ else ++ { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 ++$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} ++ eval $ac_var=\$ac_old_val ++ fi ++ { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 ++$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} ++ { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 ++$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in +- *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; ++ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in +@@ -1890,10 +1988,10 @@ echo "$as_me: current value: $ac_new_v + fi + done + if $ac_cache_corrupted; then +- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +-echo "$as_me: error: changes in the environment can compromise the build" >&2;} +- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} ++ { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 ++$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 ++$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } + fi + +@@ -1921,8 +2019,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +-am__api_version='1.10' +- ++am__api_version="1.9" + ac_aux_dir= + for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then +@@ -1940,8 +2037,8 @@ for ac_dir in "$srcdir" "$srcdir/.." "$s + fi + done + if test -z "$ac_aux_dir"; then +- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +-echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 ++$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } + fi + +@@ -1967,11 +2064,12 @@ ac_configure="$SHELL $ac_aux_dir/configu + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # OS/2's system install, which has a completely different semantic + # ./install, which can be erroneously created by make from ./install.sh. +-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } ++# Reject install programs that cannot install multiple files. ++{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 ++$as_echo_n "checking for a BSD-compatible install... " >&6; } + if test -z "$INSTALL"; then + if test "${ac_cv_path_install+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH +@@ -2000,17 +2098,29 @@ case $as_dir/ in + # program-specific install script used by HP pwplus--don't use. + : + else +- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" +- break 3 ++ rm -rf conftest.one conftest.two conftest.dir ++ echo one > conftest.one ++ echo two > conftest.two ++ mkdir conftest.dir ++ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && ++ test -s conftest.one && test -s conftest.two && ++ test -s conftest.dir/conftest.one && ++ test -s conftest.dir/conftest.two ++ then ++ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" ++ break 3 ++ fi + fi + fi + done + done + ;; + esac ++ + done + IFS=$as_save_IFS + ++rm -rf conftest.one conftest.two conftest.dir + + fi + if test "${ac_cv_path_install+set}" = set; then +@@ -2023,8 +2133,8 @@ fi + INSTALL=$ac_install_sh + fi + fi +-{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +-echo "${ECHO_T}$INSTALL" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 ++$as_echo "$INSTALL" >&6; } + + # Use test -z because SunOS4 sh mishandles braces in ${var-val}. + # It thinks the first close brace ends the variable substitution. +@@ -2034,8 +2144,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCR + + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +-{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 ++$as_echo_n "checking whether build environment is sane... " >&6; } + # Just in case + sleep 1 + echo timestamp > conftest.file +@@ -2058,9 +2168,9 @@ if ( + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". +- { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken ++ { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken + alias in your environment" >&5 +-echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken ++$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken + alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi +@@ -2071,26 +2181,23 @@ then + # Ok. + : + else +- { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! ++ { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! + Check your system clock" >&5 +-echo "$as_me: error: newly created file is older than distributed files! ++$as_echo "$as_me: error: newly created file is older than distributed files! + Check your system clock" >&2;} + { (exit 1); exit 1; }; } + fi +-{ echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } ++{ $as_echo "$as_me:$LINENO: result: yes" >&5 ++$as_echo "yes" >&6; } + test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" + # Use a double $ so make ignores it. + test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +-# Double any \ or $. echo might interpret backslashes. ++# Double any \ or $. + # By default was `s,x,x', remove it if useless. +-cat <<\_ACEOF >conftest.sed +-s/[\\$]/&&/g;s/;s,x,x,$// +-_ACEOF +-program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +-rm -f conftest.sed ++ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' ++program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + + # expand $ac_aux_dir to an absolute path + am_aux_dir=`cd $ac_aux_dir && pwd` +@@ -2101,66 +2208,51 @@ if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " + else + am_missing_run= +- { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 ++$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + fi + +-{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +-echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +-if test -z "$MKDIR_P"; then +- if test "${ac_cv_path_mkdir+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then ++ # We used to keeping the `.' as first argument, in order to ++ # allow $(mkdir_p) to be used without argument. As in ++ # $(mkdir_p) $(somedir) ++ # where $(somedir) is conditionally defined. However this is wrong ++ # for two reasons: ++ # 1. if the package is installed by a user who cannot write `.' ++ # make install will fail, ++ # 2. the above comment should most certainly read ++ # $(mkdir_p) $(DESTDIR)$(somedir) ++ # so it does not work when $(somedir) is undefined and ++ # $(DESTDIR) is not. ++ # To support the latter case, we have to write ++ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), ++ # so the `.' trick is pointless. ++ mkdir_p='mkdir -p --' + else +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_prog in mkdir gmkdir; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue +- case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( +- 'mkdir (GNU coreutils) '* | \ +- 'mkdir (coreutils) '* | \ +- 'mkdir (fileutils) '4.1*) +- ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext +- break 3;; +- esac +- done +- done +-done +-IFS=$as_save_IFS +- +-fi +- +- if test "${ac_cv_path_mkdir+set}" = set; then +- MKDIR_P="$ac_cv_path_mkdir -p" ++ # On NextStep and OpenStep, the `mkdir' command does not ++ # recognize any option. It will interpret all options as ++ # directories to create, and then abort because `.' already ++ # exists. ++ for d in ./-p ./--version; ++ do ++ test -d $d && rmdir $d ++ done ++ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. ++ if test -f "$ac_aux_dir/mkinstalldirs"; then ++ mkdir_p='$(mkinstalldirs)' + else +- # As a last resort, use the slow shell script. Don't cache a +- # value for MKDIR_P within a source directory, because that will +- # break other packages using the cache if that directory is +- # removed, or if the value is a relative name. +- test -d ./--version && rmdir ./--version +- MKDIR_P="$ac_install_sh -d" ++ mkdir_p='$(install_sh) -d' + fi + fi +-{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +-echo "${ECHO_T}$MKDIR_P" >&6; } +- +-mkdir_p="$MKDIR_P" +-case $mkdir_p in +- [\\/$]* | ?:[\\/]*) ;; +- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +-esac + + for ac_prog in gawk mawk nawk awk + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AWK+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +@@ -2173,7 +2265,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -2184,22 +2276,23 @@ fi + fi + AWK=$ac_cv_prog_AWK + if test -n "$AWK"; then +- { echo "$as_me:$LINENO: result: $AWK" >&5 +-echo "${ECHO_T}$AWK" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $AWK" >&5 ++$as_echo "$AWK" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + + test -n "$AWK" && break + done + +-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` ++{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 ++$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } ++set x ${MAKE-make} ++ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` + if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.make <<\_ACEOF + SHELL = /bin/sh +@@ -2216,12 +2309,12 @@ esac + rm -f conftest.make + fi + if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then +- { echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } ++ { $as_echo "$as_me:$LINENO: result: yes" >&5 ++$as_echo "yes" >&6; } + SET_MAKE= + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" + fi + +@@ -2234,16 +2327,12 @@ else + fi + rmdir .tst 2>/dev/null + +-if test "`cd $srcdir && pwd`" != "`pwd`"; then +- # Use -I$(srcdir) only when $(srcdir) != ., so that make's output +- # is not polluted with repeated "-I." +- am__isrc=' -I$(srcdir)' +- # test to see if srcdir already configured +- if test -f $srcdir/config.status; then +- { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} ++# test to see if srcdir already configured ++if test "`cd $srcdir && pwd`" != "`pwd`" && ++ test -f $srcdir/config.status; then ++ { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 ++$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } +- fi + fi + + # test whether we have cygpath +@@ -2286,7 +2375,7 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_ru + + MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} ++install_sh=${install_sh-"$am_aux_dir/install-sh"} + + # Installed binaries are usually stripped using `strip' when the user + # run `make install-strip'. However `strip' might not be the right +@@ -2296,10 +2385,10 @@ if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_STRIP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +@@ -2312,7 +2401,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -2323,11 +2412,11 @@ fi + fi + STRIP=$ac_cv_prog_STRIP + if test -n "$STRIP"; then +- { echo "$as_me:$LINENO: result: $STRIP" >&5 +-echo "${ECHO_T}$STRIP" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 ++$as_echo "$STRIP" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -2336,10 +2425,10 @@ if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. + set dummy strip; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +@@ -2352,7 +2441,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -2363,11 +2452,11 @@ fi + fi + ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP + if test -n "$ac_ct_STRIP"; then +- { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +-echo "${ECHO_T}$ac_ct_STRIP" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 ++$as_echo "$ac_ct_STRIP" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_STRIP" = x; then +@@ -2375,10 +2464,10 @@ fi + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 +-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; +@@ -2390,7 +2479,7 @@ else + fi + + fi +-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" ++INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" + + # We need awk for the "check" target. The system "awk" is bad on + # some platforms. +@@ -2414,10 +2503,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. + set dummy ${ac_tool_prefix}gcc; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -2430,7 +2519,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -2441,11 +2530,11 @@ fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- { echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++$as_echo "$CC" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -2454,10 +2543,10 @@ if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +@@ -2470,7 +2559,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -2481,11 +2570,11 @@ fi + fi + ac_ct_CC=$ac_cv_prog_ac_ct_CC + if test -n "$ac_ct_CC"; then +- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +-echo "${ECHO_T}$ac_ct_CC" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++$as_echo "$ac_ct_CC" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_CC" = x; then +@@ -2493,10 +2582,10 @@ fi + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 +-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; +@@ -2511,10 +2600,10 @@ if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + set dummy ${ac_tool_prefix}cc; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -2527,7 +2616,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -2538,11 +2627,11 @@ fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- { echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++$as_echo "$CC" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -2551,10 +2640,10 @@ fi + if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -2572,7 +2661,7 @@ do + continue + fi + ac_cv_prog_CC="cc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -2595,11 +2684,11 @@ fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- { echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++$as_echo "$CC" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -2610,10 +2699,10 @@ if test -z "$CC"; then + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -2626,7 +2715,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -2637,11 +2726,11 @@ fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- { echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++$as_echo "$CC" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -2654,10 +2743,10 @@ if test -z "$CC"; then + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +@@ -2670,7 +2759,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -2681,11 +2770,11 @@ fi + fi + ac_ct_CC=$ac_cv_prog_ac_ct_CC + if test -n "$ac_ct_CC"; then +- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +-echo "${ECHO_T}$ac_ct_CC" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++$as_echo "$ac_ct_CC" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -2697,10 +2786,10 @@ done + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 +-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; +@@ -2712,44 +2801,48 @@ fi + fi + + +-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH ++test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH + See \`config.log' for more details." >&5 +-echo "$as_me: error: no acceptable C compiler found in \$PATH ++$as_echo "$as_me: error: no acceptable C compiler found in \$PATH + See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + + # Provide some information about the compiler. +-echo "$as_me:$LINENO: checking for C compiler version" >&5 +-ac_compiler=`set X $ac_compile; echo $2` ++$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 ++set X $ac_compile ++ac_compiler=$2 + { (ac_try="$ac_compiler --version >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { (ac_try="$ac_compiler -v >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { (ac_try="$ac_compiler -V >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + + cat >conftest.$ac_ext <<_ACEOF +@@ -2768,27 +2861,22 @@ main () + } + _ACEOF + ac_clean_files_save=$ac_clean_files +-ac_clean_files="$ac_clean_files a.out a.exe b.out" ++ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" + # Try to create an executable without -o first, disregard a.out. + # It will help us diagnose broken compilers, and finding out an intuition + # of exeext. +-{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +-# +-# List of possible output files, starting from the most likely. +-# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +-# only as a last resort. b.out is created by i960 compilers. +-ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +-# +-# The IRIX 6 linker writes into existing files which may not be +-# executable, retaining their permissions. Remove them first so a +-# subsequent execution test works. ++{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 ++$as_echo_n "checking for C compiler default output file name... " >&6; } ++ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` ++ ++# The possible output files: ++ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ++ + ac_rmfiles= + for ac_file in $ac_files + do + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac + done +@@ -2799,10 +2887,11 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. + # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +@@ -2813,7 +2902,7 @@ for ac_file in $ac_files '' + do + test -f "$ac_file" || continue + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most +@@ -2840,15 +2929,15 @@ else + ac_file='' + fi + +-{ echo "$as_me:$LINENO: result: $ac_file" >&5 +-echo "${ECHO_T}$ac_file" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 ++$as_echo "$ac_file" >&6; } + if test -z "$ac_file"; then +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables ++{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables + See \`config.log' for more details." >&5 +-echo "$as_me: error: C compiler cannot create executables ++$as_echo "$as_me: error: C compiler cannot create executables + See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + fi +@@ -2857,8 +2946,8 @@ ac_exeext=$ac_cv_exeext + + # Check that the compiler produces executables we can run. If not, either + # the compiler is broken, or we cross compile. +-{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 ++$as_echo_n "checking whether the C compiler works... " >&6; } + # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 + # If not cross compiling, check that we can run a simple program. + if test "$cross_compiling" != yes; then +@@ -2867,49 +2956,51 @@ if test "$cross_compiling" != yes; then + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else +- { { echo "$as_me:$LINENO: error: cannot run C compiled programs. ++ { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. + If you meant to cross compile, use \`--host'. + See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot run C compiled programs. ++$as_echo "$as_me: error: cannot run C compiled programs. + If you meant to cross compile, use \`--host'. + See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi + fi +-{ echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } ++{ $as_echo "$as_me:$LINENO: result: yes" >&5 ++$as_echo "yes" >&6; } + +-rm -f a.out a.exe conftest$ac_cv_exeext b.out ++rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out + ac_clean_files=$ac_clean_files_save + # Check that the compiler produces executables we can run. If not, either + # the compiler is broken, or we cross compile. +-{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +-{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +-echo "${ECHO_T}$cross_compiling" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 ++$as_echo_n "checking whether we are cross compiling... " >&6; } ++{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 ++$as_echo "$cross_compiling" >&6; } + +-{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 ++$as_echo_n "checking for suffix of executables... " >&6; } + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) + # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +@@ -2918,31 +3009,31 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec + for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac + done + else +- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link ++ { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link ++$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link + See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + + rm -f conftest$ac_cv_exeext +-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +-echo "${ECHO_T}$ac_cv_exeext" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 ++$as_echo "$ac_cv_exeext" >&6; } + + rm -f conftest.$ac_ext + EXEEXT=$ac_cv_exeext + ac_exeext=$EXEEXT +-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 ++$as_echo_n "checking for suffix of object files... " >&6; } + if test "${ac_cv_objext+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -2965,40 +3056,41 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac + done + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile ++{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile + See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot compute suffix of object files: cannot compile ++$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile + See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + + rm -f conftest.$ac_cv_objext conftest.$ac_ext + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +-echo "${ECHO_T}$ac_cv_objext" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 ++$as_echo "$ac_cv_objext" >&6; } + OBJEXT=$ac_cv_objext + ac_objext=$OBJEXT +-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 ++$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } + if test "${ac_cv_c_compiler_gnu+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -3024,20 +3116,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +@@ -3047,15 +3140,19 @@ rm -f core conftest.err conftest.$ac_obj + ac_cv_c_compiler_gnu=$ac_compiler_gnu + + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +-GCC=`test $ac_compiler_gnu = yes && echo yes` ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 ++$as_echo "$ac_cv_c_compiler_gnu" >&6; } ++if test $ac_compiler_gnu = yes; then ++ GCC=yes ++else ++ GCC= ++fi + ac_test_CFLAGS=${CFLAGS+set} + ac_save_CFLAGS=$CFLAGS +-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 ++$as_echo_n "checking whether $CC accepts -g... " >&6; } + if test "${ac_cv_prog_cc_g+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes +@@ -3082,20 +3179,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" +@@ -3120,20 +3218,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag +@@ -3159,20 +3258,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + +@@ -3187,8 +3287,8 @@ fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 ++$as_echo "$ac_cv_prog_cc_g" >&6; } + if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS + elif test $ac_cv_prog_cc_g = yes; then +@@ -3204,10 +3304,10 @@ else + CFLAGS= + fi + fi +-{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +-echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 ++$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } + if test "${ac_cv_prog_cc_c89+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_cv_prog_cc_c89=no + ac_save_CC=$CC +@@ -3278,20 +3378,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + +@@ -3307,15 +3408,15 @@ fi + # AC_CACHE_VAL + case "x$ac_cv_prog_cc_c89" in + x) +- { echo "$as_me:$LINENO: result: none needed" >&5 +-echo "${ECHO_T}none needed" >&6; } ;; ++ { $as_echo "$as_me:$LINENO: result: none needed" >&5 ++$as_echo "none needed" >&6; } ;; + xno) +- { echo "$as_me:$LINENO: result: unsupported" >&5 +-echo "${ECHO_T}unsupported" >&6; } ;; ++ { $as_echo "$as_me:$LINENO: result: unsupported" >&5 ++$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" +- { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +-echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; ++ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 ++$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + esac + + +@@ -3336,8 +3437,8 @@ am__doit: + .PHONY: am__doit + END + # If we don't find an include directive, just comment out the code. +-{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 ++$as_echo_n "checking for style of include used by $am_make... " >&6; } + am__include="#" + am__quote= + _am_result=none +@@ -3364,8 +3465,8 @@ if test "$am__include" = "#"; then + fi + + +-{ echo "$as_me:$LINENO: result: $_am_result" >&5 +-echo "${ECHO_T}$_am_result" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 ++$as_echo "$_am_result" >&6; } + rm -f confinc confmf + + # Check whether --enable-dependency-tracking was given. +@@ -3377,7 +3478,9 @@ if test "x$enable_dependency_tracking" ! + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + fi +- if test "x$enable_dependency_tracking" != xno; then ++ ++ ++if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' + else +@@ -3387,12 +3490,13 @@ fi + + + ++ + depcc="$CC" am_compiler_list= + +-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 ++$as_echo_n "checking dependency style of $depcc... " >&6; } + if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up +@@ -3454,7 +3558,6 @@ else + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && +- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then +@@ -3480,11 +3583,13 @@ else + fi + + fi +-{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 ++$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } + CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + +- if ++ ++ ++if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= +@@ -3508,11 +3613,12 @@ fi + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # OS/2's system install, which has a completely different semantic + # ./install, which can be erroneously created by make from ./install.sh. +-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } ++# Reject install programs that cannot install multiple files. ++{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 ++$as_echo_n "checking for a BSD-compatible install... " >&6; } + if test -z "$INSTALL"; then + if test "${ac_cv_path_install+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH +@@ -3541,17 +3647,29 @@ case $as_dir/ in + # program-specific install script used by HP pwplus--don't use. + : + else +- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" +- break 3 ++ rm -rf conftest.one conftest.two conftest.dir ++ echo one > conftest.one ++ echo two > conftest.two ++ mkdir conftest.dir ++ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && ++ test -s conftest.one && test -s conftest.two && ++ test -s conftest.dir/conftest.one && ++ test -s conftest.dir/conftest.two ++ then ++ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" ++ break 3 ++ fi + fi + fi + done + done + ;; + esac ++ + done + IFS=$as_save_IFS + ++rm -rf conftest.one conftest.two conftest.dir + + fi + if test "${ac_cv_path_install+set}" = set; then +@@ -3564,8 +3682,8 @@ fi + INSTALL=$ac_install_sh + fi + fi +-{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +-echo "${ECHO_T}$INSTALL" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 ++$as_echo "$INSTALL" >&6; } + + # Use test -z because SunOS4 sh mishandles braces in ${var-val}. + # It thinks the first close brace ends the variable substitution. +@@ -3649,34 +3767,34 @@ fi + + # Make sure we can run config.sub. + $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || +- { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 ++$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +-{ echo "$as_me:$LINENO: checking build system type" >&5 +-echo $ECHO_N "checking build system type... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking build system type" >&5 ++$as_echo_n "checking build system type... " >&6; } + if test "${ac_cv_build+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_build_alias=$build_alias + test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` + test "x$ac_build_alias" = x && +- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +-echo "$as_me: error: cannot guess build type; you must specify one" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 ++$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } + ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || +- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 ++$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +-echo "${ECHO_T}$ac_cv_build" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 ++$as_echo "$ac_cv_build" >&6; } + case $ac_cv_build in + *-*-*) ;; +-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +-echo "$as_me: error: invalid value of canonical build" >&2;} ++*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 ++$as_echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; + esac + build=$ac_cv_build +@@ -3693,27 +3811,27 @@ IFS=$ac_save_IFS + case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +-{ echo "$as_me:$LINENO: checking host system type" >&5 +-echo $ECHO_N "checking host system type... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking host system type" >&5 ++$as_echo_n "checking host system type... " >&6; } + if test "${ac_cv_host+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build + else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || +- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 ++$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } + fi + + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +-echo "${ECHO_T}$ac_cv_host" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 ++$as_echo "$ac_cv_host" >&6; } + case $ac_cv_host in + *-*-*) ;; +-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +-echo "$as_me: error: invalid value of canonical host" >&2;} ++*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 ++$as_echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; + esac + host=$ac_cv_host +@@ -3730,10 +3848,10 @@ IFS=$ac_save_IFS + case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +-{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +-echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 ++$as_echo_n "checking for a sed that does not truncate output... " >&6; } + if test "${lt_cv_path_SED+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + # Loop through the user's path and test for sed and gsed. + # Then use that list of sed's as ones to test for truncation. +@@ -3786,45 +3904,40 @@ fi + + SED=$lt_cv_path_SED + +-{ echo "$as_me:$LINENO: result: $SED" >&5 +-echo "${ECHO_T}$SED" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $SED" >&5 ++$as_echo "$SED" >&6; } + +-{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +-if test "${ac_cv_path_GREP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- # Extract the first word of "grep ggrep" to use in msg output +-if test -z "$GREP"; then +-set dummy grep ggrep; ac_prog_name=$2 ++{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 ++$as_echo_n "checking for grep that handles long lines and -e... " >&6; } + if test "${ac_cv_path_GREP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else ++ if test -z "$GREP"; then + ac_path_GREP_found=false +-# Loop through the user's path and test for each of PROGNAME-LIST +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++ # Loop through the user's path and test for each of PROGNAME-LIST ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" +- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +- # Check for GNU ac_path_GREP and select it if it is found. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue ++# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP + case `"$ac_path_GREP" --version 2>&1` in + *GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; + *) + ac_count=0 +- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" ++ $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" +- echo 'GREP' >> "conftest.nl" ++ $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` +@@ -3839,74 +3952,60 @@ case `"$ac_path_GREP" --version 2>&1` in + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; + esac + +- +- $ac_path_GREP_found && break 3 ++ $ac_path_GREP_found && break 3 ++ done + done + done +- +-done + IFS=$as_save_IFS +- +- +-fi +- +-GREP="$ac_cv_path_GREP" +-if test -z "$GREP"; then +- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} ++ if test -z "$ac_cv_path_GREP"; then ++ { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 ++$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +-fi +- ++ fi + else + ac_cv_path_GREP=$GREP + fi + +- + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +-echo "${ECHO_T}$ac_cv_path_GREP" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 ++$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +-{ echo "$as_me:$LINENO: checking for egrep" >&5 +-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 ++$as_echo_n "checking for egrep... " >&6; } + if test "${ac_cv_path_EGREP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else +- # Extract the first word of "egrep" to use in msg output +-if test -z "$EGREP"; then +-set dummy egrep; ac_prog_name=$2 +-if test "${ac_cv_path_EGREP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else ++ if test -z "$EGREP"; then + ac_path_EGREP_found=false +-# Loop through the user's path and test for each of PROGNAME-LIST +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++ # Loop through the user's path and test for each of PROGNAME-LIST ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" +- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +- # Check for GNU ac_path_EGREP and select it if it is found. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue ++# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP + case `"$ac_path_EGREP" --version 2>&1` in + *GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; + *) + ac_count=0 +- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" ++ $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" +- echo 'EGREP' >> "conftest.nl" ++ $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` +@@ -3921,33 +4020,24 @@ case `"$ac_path_EGREP" --version 2>&1` i + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; + esac + +- +- $ac_path_EGREP_found && break 3 ++ $ac_path_EGREP_found && break 3 ++ done + done + done +- +-done + IFS=$as_save_IFS +- +- +-fi +- +-EGREP="$ac_cv_path_EGREP" +-if test -z "$EGREP"; then +- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} ++ if test -z "$ac_cv_path_EGREP"; then ++ { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 ++$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +-fi +- ++ fi + else + ac_cv_path_EGREP=$EGREP + fi + +- + fi + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 ++$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +@@ -3962,8 +4052,8 @@ fi + ac_prog=ld + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. +- { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 ++$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw +@@ -3992,14 +4082,14 @@ echo $ECHO_N "checking for ld used by $C + ;; + esac + elif test "$with_gnu_ld" = yes; then +- { echo "$as_me:$LINENO: checking for GNU ld" >&5 +-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 ++$as_echo_n "checking for GNU ld... " >&6; } + else +- { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 ++$as_echo_n "checking for non-GNU ld... " >&6; } + fi + if test "${lt_cv_path_LD+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +@@ -4029,19 +4119,19 @@ fi + + LD="$lt_cv_path_LD" + if test -n "$LD"; then +- { echo "$as_me:$LINENO: result: $LD" >&5 +-echo "${ECHO_T}$LD" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $LD" >&5 ++$as_echo "$LD" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi +-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} ++test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 ++$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +-{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 ++$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } + if test "${lt_cv_prog_gnu_ld+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + # I'd rather use --version here, but apparently some GNU lds only accept -v. + case `$LD -v 2>&1 &1 &5 +-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 ++$as_echo "$lt_cv_prog_gnu_ld" >&6; } + with_gnu_ld=$lt_cv_prog_gnu_ld + + +-{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 ++$as_echo_n "checking for $LD option to reload object files... " >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_ld_reload_flag='-r' + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 ++$as_echo "$lt_cv_ld_reload_flag" >&6; } + reload_flag=$lt_cv_ld_reload_flag + case $reload_flag in + "" | " "*) ;; +@@ -4083,10 +4173,10 @@ case $host_os in + ;; + esac + +-{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 ++$as_echo_n "checking for BSD-compatible nm... " >&6; } + if test "${lt_cv_path_NM+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$NM"; then + # Let the user override the test. +@@ -4132,25 +4222,25 @@ else + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm + fi + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +-echo "${ECHO_T}$lt_cv_path_NM" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 ++$as_echo "$lt_cv_path_NM" >&6; } + NM="$lt_cv_path_NM" + +-{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 ++$as_echo_n "checking whether ln -s works... " >&6; } + LN_S=$as_ln_s + if test "$LN_S" = "ln -s"; then +- { echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } ++ { $as_echo "$as_me:$LINENO: result: yes" >&5 ++$as_echo "yes" >&6; } + else +- { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +-echo "${ECHO_T}no, using $LN_S" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 ++$as_echo "no, using $LN_S" >&6; } + fi + +-{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +-echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 ++$as_echo_n "checking how to recognize dependent libraries... " >&6; } + if test "${lt_cv_deplibs_check_method+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_file_magic_cmd='$MAGIC_CMD' + lt_cv_file_magic_test_file= +@@ -4262,7 +4352,7 @@ linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +-netbsd* | netbsdelf*-gnu) ++netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else +@@ -4333,8 +4423,8 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* + esac + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 ++$as_echo "$lt_cv_deplibs_check_method" >&6; } + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -4368,7 +4458,7 @@ ia64-*-hpux*) + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) +@@ -4383,11 +4473,11 @@ ia64-*-hpux*) + ;; + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 4386 "configure"' > conftest.$ac_ext ++ echo '#line 4476 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in +@@ -4425,7 +4515,7 @@ s390*-*linux*|sparc*-*linux*) + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) +@@ -4475,10 +4565,10 @@ s390*-*linux*|sparc*-*linux*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" +- { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 ++$as_echo_n "checking whether the C compiler needs -belf... " >&6; } + if test "${lt_cv_cc_needs_belf+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -4507,26 +4597,30 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + lt_cv_cc_needs_belf=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +@@ -4536,8 +4630,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLA + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 ++$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" +@@ -4549,7 +4643,7 @@ sparc*-*solaris*) + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) +@@ -4578,15 +4672,15 @@ ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 ++$as_echo_n "checking how to run the C preprocessor... " >&6; } + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= + fi + if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" +@@ -4618,20 +4712,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +@@ -4655,13 +4750,14 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err +@@ -4669,7 +4765,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec + # Broken: success on invalid input. + continue + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +@@ -4694,8 +4790,8 @@ fi + else + ac_cv_prog_CPP=$CPP + fi +-{ echo "$as_me:$LINENO: result: $CPP" >&5 +-echo "${ECHO_T}$CPP" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 ++$as_echo "$CPP" >&6; } + ac_preproc_ok=false + for ac_c_preproc_warn_flag in '' yes + do +@@ -4723,20 +4819,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +@@ -4760,13 +4857,14 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err +@@ -4774,7 +4872,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec + # Broken: success on invalid input. + continue + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +@@ -4790,9 +4888,9 @@ rm -f conftest.err conftest.$ac_ext + if $ac_preproc_ok; then + : + else +- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check ++ { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + See \`config.log' for more details." >&5 +-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check ++$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check + See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi +@@ -4804,10 +4902,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLA + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 ++$as_echo_n "checking for ANSI C header files... " >&6; } + if test "${ac_cv_header_stdc+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -4834,20 +4932,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +@@ -4939,37 +5038,40 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : + else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: program exited with status $ac_status" >&5 ++$as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ( exit $ac_status ) + ac_cv_header_stdc=no + fi ++rm -rf conftest.dSYM + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + + + fi + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +-echo "${ECHO_T}$ac_cv_header_stdc" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 ++$as_echo "$ac_cv_header_stdc" >&6; } + if test $ac_cv_header_stdc = yes; then + + cat >>confdefs.h <<\_ACEOF +@@ -4991,11 +5093,11 @@ fi + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h + do +-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 ++$as_echo_n "checking for $ac_header... " >&6; } + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -5013,20 +5115,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +@@ -5034,12 +5137,14 @@ fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-ac_res=`eval echo '${'$as_ac_Header'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$ac_res" >&6; } +-if test `eval echo '${'$as_ac_Header'}'` = yes; then ++ac_res=`eval 'as_val=${'$as_ac_Header'} ++ $as_echo "$as_val"'` ++ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++if test `eval 'as_val=${'$as_ac_Header'} ++ $as_echo "$as_val"'` = yes; then + cat >>confdefs.h <<_ACEOF +-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF + + fi +@@ -5050,20 +5155,21 @@ done + + for ac_header in dlfcn.h + do +-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ++as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 ++$as_echo_n "checking for $ac_header... " >&6; } + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + fi +-ac_res=`eval echo '${'$as_ac_Header'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$ac_res" >&6; } ++ac_res=`eval 'as_val=${'$as_ac_Header'} ++ $as_echo "$as_val"'` ++ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } + else + # Is the header compilable? +-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 ++$as_echo_n "checking $ac_header usability... " >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -5079,32 +5185,33 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ++$as_echo "$ac_header_compiler" >&6; } + + # Is the header present? +-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 ++$as_echo_n "checking $ac_header presence... " >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -5118,69 +5225,72 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no + fi + + rm -f conftest.err conftest.$ac_ext +-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ++$as_echo "$ac_header_preproc" >&6; } + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 ++$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 ++$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 ++$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 ++$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 ++$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 ++$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ++$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 ++$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; + esac +-{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 ++$as_echo_n "checking for $ac_header... " >&6; } + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + eval "$as_ac_Header=\$ac_header_preproc" + fi +-ac_res=`eval echo '${'$as_ac_Header'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$ac_res" >&6; } ++ac_res=`eval 'as_val=${'$as_ac_Header'} ++ $as_echo "$as_val"'` ++ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } + + fi +-if test `eval echo '${'$as_ac_Header'}'` = yes; then ++if test `eval 'as_val=${'$as_ac_Header'} ++ $as_echo "$as_val"'` = yes; then + cat >>confdefs.h <<_ACEOF +-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF + + fi +@@ -5201,10 +5311,10 @@ if test -z "$CXX"; then + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_CXX+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +@@ -5217,7 +5327,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -5228,11 +5338,11 @@ fi + fi + CXX=$ac_cv_prog_CXX + if test -n "$CXX"; then +- { echo "$as_me:$LINENO: result: $CXX" >&5 +-echo "${ECHO_T}$CXX" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $CXX" >&5 ++$as_echo "$CXX" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -5245,10 +5355,10 @@ if test -z "$CXX"; then + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +@@ -5261,7 +5371,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -5272,11 +5382,11 @@ fi + fi + ac_ct_CXX=$ac_cv_prog_ac_ct_CXX + if test -n "$ac_ct_CXX"; then +- { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +-echo "${ECHO_T}$ac_ct_CXX" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 ++$as_echo "$ac_ct_CXX" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -5288,10 +5398,10 @@ done + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 +-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; +@@ -5303,43 +5413,47 @@ fi + fi + fi + # Provide some information about the compiler. +-echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +-ac_compiler=`set X $ac_compile; echo $2` ++$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ++set X $ac_compile ++ac_compiler=$2 + { (ac_try="$ac_compiler --version >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { (ac_try="$ac_compiler -v >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { (ac_try="$ac_compiler -V >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +-{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 ++$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } + if test "${ac_cv_cxx_compiler_gnu+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -5365,20 +5479,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +@@ -5388,15 +5503,19 @@ rm -f core conftest.err conftest.$ac_obj + ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +-GXX=`test $ac_compiler_gnu = yes && echo yes` ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 ++$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } ++if test $ac_compiler_gnu = yes; then ++ GXX=yes ++else ++ GXX= ++fi + ac_test_CXXFLAGS=${CXXFLAGS+set} + ac_save_CXXFLAGS=$CXXFLAGS +-{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 ++$as_echo_n "checking whether $CXX accepts -g... " >&6; } + if test "${ac_cv_prog_cxx_g+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes +@@ -5423,20 +5542,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" +@@ -5461,20 +5581,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +@@ -5500,20 +5621,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + +@@ -5528,8 +5650,8 @@ fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 ++$as_echo "$ac_cv_prog_cxx_g" >&6; } + if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS + elif test $ac_cv_prog_cxx_g = yes; then +@@ -5553,10 +5675,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + depcc="$CXX" am_compiler_list= + +-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 ++$as_echo_n "checking dependency style of $depcc... " >&6; } + if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up +@@ -5618,7 +5740,6 @@ else + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && +- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then +@@ -5644,11 +5765,13 @@ else + fi + + fi +-{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +-echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 ++$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } + CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + +- if ++ ++ ++if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= +@@ -5669,11 +5792,11 @@ ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +-{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +-echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 ++$as_echo_n "checking how to run the C++ preprocessor... " >&6; } + if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" +@@ -5705,20 +5828,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +@@ -5742,13 +5866,14 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err +@@ -5756,7 +5881,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec + # Broken: success on invalid input. + continue + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +@@ -5781,8 +5906,8 @@ fi + else + ac_cv_prog_CXXCPP=$CXXCPP + fi +-{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +-echo "${ECHO_T}$CXXCPP" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 ++$as_echo "$CXXCPP" >&6; } + ac_preproc_ok=false + for ac_cxx_preproc_warn_flag in '' yes + do +@@ -5810,20 +5935,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +@@ -5847,13 +5973,14 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err +@@ -5861,7 +5988,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec + # Broken: success on invalid input. + continue + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +@@ -5877,9 +6004,9 @@ rm -f conftest.err conftest.$ac_ext + if $ac_preproc_ok; then + : + else +- { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check ++ { { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check + See \`config.log' for more details." >&5 +-echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check ++$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check + See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi +@@ -5902,10 +6029,10 @@ if test -n "$ac_tool_prefix"; then + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_F77+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +@@ -5918,7 +6045,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -5929,11 +6056,11 @@ fi + fi + F77=$ac_cv_prog_F77 + if test -n "$F77"; then +- { echo "$as_me:$LINENO: result: $F77" >&5 +-echo "${ECHO_T}$F77" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $F77" >&5 ++$as_echo "$F77" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -5946,10 +6073,10 @@ if test -z "$F77"; then + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_F77+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +@@ -5962,7 +6089,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_F77="$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -5973,11 +6100,11 @@ fi + fi + ac_ct_F77=$ac_cv_prog_ac_ct_F77 + if test -n "$ac_ct_F77"; then +- { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +-echo "${ECHO_T}$ac_ct_F77" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 ++$as_echo "$ac_ct_F77" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -5989,10 +6116,10 @@ done + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 +-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; +@@ -6003,37 +6130,41 @@ fi + + + # Provide some information about the compiler. +-echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 +-ac_compiler=`set X $ac_compile; echo $2` ++$as_echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 ++set X $ac_compile ++ac_compiler=$2 + { (ac_try="$ac_compiler --version >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { (ac_try="$ac_compiler -v >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { (ac_try="$ac_compiler -V >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + rm -f a.out + +@@ -6041,10 +6172,10 @@ rm -f a.out + # input file. (Note that this only needs to work for GNU compilers.) + ac_save_ext=$ac_ext + ac_ext=F +-{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +-echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 ++$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } + if test "${ac_cv_f77_compiler_gnu+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + program main +@@ -6060,20 +6191,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +@@ -6083,16 +6215,16 @@ rm -f core conftest.err conftest.$ac_obj + ac_cv_f77_compiler_gnu=$ac_compiler_gnu + + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +-echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 ++$as_echo "$ac_cv_f77_compiler_gnu" >&6; } + ac_ext=$ac_save_ext + ac_test_FFLAGS=${FFLAGS+set} + ac_save_FFLAGS=$FFLAGS + FFLAGS= +-{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +-echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 ++$as_echo_n "checking whether $F77 accepts -g... " >&6; } + if test "${ac_cv_prog_f77_g+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + FFLAGS=-g + cat >conftest.$ac_ext <<_ACEOF +@@ -6106,20 +6238,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_g=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_prog_f77_g=no +@@ -6128,8 +6261,8 @@ fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +-echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 ++$as_echo "$ac_cv_prog_f77_g" >&6; } + if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS + elif test $ac_cv_prog_f77_g = yes; then +@@ -6146,7 +6279,11 @@ else + fi + fi + +-G77=`test $ac_compiler_gnu = yes && echo yes` ++if test $ac_compiler_gnu = yes; then ++ G77=yes ++else ++ G77= ++fi + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +@@ -6157,10 +6294,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + # find the maximum length of command line arguments +-{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 ++$as_echo_n "checking the maximum length of command line arguments... " >&6; } + if test "${lt_cv_sys_max_cmd_len+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + i=0 + teststring="ABCD" +@@ -6269,11 +6406,11 @@ else + fi + + if test -n $lt_cv_sys_max_cmd_len ; then +- { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 ++$as_echo "$lt_cv_sys_max_cmd_len" >&6; } + else +- { echo "$as_me:$LINENO: result: none" >&5 +-echo "${ECHO_T}none" >&6; } ++ { $as_echo "$as_me:$LINENO: result: none" >&5 ++$as_echo "none" >&6; } + fi + + +@@ -6281,10 +6418,10 @@ fi + + + # Check for command to grab the raw symbol name followed by C symbol from nm. +-{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +-echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 ++$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } + if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + + # These are sane defaults that work on at least a few old systems. +@@ -6389,14 +6526,14 @@ EOF + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then +@@ -6451,7 +6588,7 @@ EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +@@ -6486,17 +6623,17 @@ if test -z "$lt_cv_sys_global_symbol_pip + lt_cv_sys_global_symbol_to_cdecl= + fi + if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then +- { echo "$as_me:$LINENO: result: failed" >&5 +-echo "${ECHO_T}failed" >&6; } ++ { $as_echo "$as_me:$LINENO: result: failed" >&5 ++$as_echo "failed" >&6; } + else +- { echo "$as_me:$LINENO: result: ok" >&5 +-echo "${ECHO_T}ok" >&6; } ++ { $as_echo "$as_me:$LINENO: result: ok" >&5 ++$as_echo "ok" >&6; } + fi + +-{ echo "$as_me:$LINENO: checking for objdir" >&5 +-echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 ++$as_echo_n "checking for objdir... " >&6; } + if test "${lt_cv_objdir+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + rm -f .libs 2>/dev/null + mkdir .libs 2>/dev/null +@@ -6508,8 +6645,8 @@ else + fi + rmdir .libs 2>/dev/null + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +-echo "${ECHO_T}$lt_cv_objdir" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 ++$as_echo "$lt_cv_objdir" >&6; } + objdir=$lt_cv_objdir + + +@@ -6560,10 +6697,10 @@ with_gnu_ld="$lt_cv_prog_gnu_ld" + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. + set dummy ${ac_tool_prefix}ar; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AR+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +@@ -6576,7 +6713,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -6587,11 +6724,11 @@ fi + fi + AR=$ac_cv_prog_AR + if test -n "$AR"; then +- { echo "$as_me:$LINENO: result: $AR" >&5 +-echo "${ECHO_T}$AR" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $AR" >&5 ++$as_echo "$AR" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -6600,10 +6737,10 @@ if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. + set dummy ar; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +@@ -6616,7 +6753,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -6627,11 +6764,11 @@ fi + fi + ac_ct_AR=$ac_cv_prog_ac_ct_AR + if test -n "$ac_ct_AR"; then +- { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +-echo "${ECHO_T}$ac_ct_AR" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 ++$as_echo "$ac_ct_AR" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_AR" = x; then +@@ -6639,10 +6776,10 @@ fi + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 +-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; +@@ -6656,10 +6793,10 @@ fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. + set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_RANLIB+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +@@ -6672,7 +6809,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -6683,11 +6820,11 @@ fi + fi + RANLIB=$ac_cv_prog_RANLIB + if test -n "$RANLIB"; then +- { echo "$as_me:$LINENO: result: $RANLIB" >&5 +-echo "${ECHO_T}$RANLIB" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 ++$as_echo "$RANLIB" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -6696,10 +6833,10 @@ if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +@@ -6712,7 +6849,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -6723,11 +6860,11 @@ fi + fi + ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB + if test -n "$ac_ct_RANLIB"; then +- { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +-echo "${ECHO_T}$ac_ct_RANLIB" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 ++$as_echo "$ac_ct_RANLIB" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_RANLIB" = x; then +@@ -6735,10 +6872,10 @@ fi + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 +-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; +@@ -6752,10 +6889,10 @@ fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_STRIP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +@@ -6768,7 +6905,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -6779,11 +6916,11 @@ fi + fi + STRIP=$ac_cv_prog_STRIP + if test -n "$STRIP"; then +- { echo "$as_me:$LINENO: result: $STRIP" >&5 +-echo "${ECHO_T}$STRIP" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 ++$as_echo "$STRIP" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -6792,10 +6929,10 @@ if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. + set dummy strip; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +@@ -6808,7 +6945,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -6819,11 +6956,11 @@ fi + fi + ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP + if test -n "$ac_ct_STRIP"; then +- { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +-echo "${ECHO_T}$ac_ct_STRIP" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 ++$as_echo "$ac_ct_STRIP" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_STRIP" = x; then +@@ -6831,10 +6968,10 @@ fi + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 +-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; +@@ -6899,10 +7036,10 @@ cc_basename=`$echo "X$cc_temp" | $Xsed - + case $deplibs_check_method in + file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then +- { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 ++$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } + if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + case $MAGIC_CMD in + [\\/*] | ?:[\\/]*) +@@ -6952,19 +7089,19 @@ fi + + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if test -n "$MAGIC_CMD"; then +- { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +-echo "${ECHO_T}$MAGIC_CMD" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 ++$as_echo "$MAGIC_CMD" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then +- { echo "$as_me:$LINENO: checking for file" >&5 +-echo $ECHO_N "checking for file... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for file" >&5 ++$as_echo_n "checking for file... " >&6; } + if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + case $MAGIC_CMD in + [\\/*] | ?:[\\/]*) +@@ -7014,11 +7151,11 @@ fi + + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if test -n "$MAGIC_CMD"; then +- { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +-echo "${ECHO_T}$MAGIC_CMD" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 ++$as_echo "$MAGIC_CMD" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + else +@@ -7036,10 +7173,10 @@ esac + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. + set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_DSYMUTIL+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +@@ -7052,7 +7189,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -7063,11 +7200,11 @@ fi + fi + DSYMUTIL=$ac_cv_prog_DSYMUTIL + if test -n "$DSYMUTIL"; then +- { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 +-echo "${ECHO_T}$DSYMUTIL" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 ++$as_echo "$DSYMUTIL" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -7076,10 +7213,10 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. + set dummy dsymutil; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +@@ -7092,7 +7229,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -7103,11 +7240,11 @@ fi + fi + ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL + if test -n "$ac_ct_DSYMUTIL"; then +- { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 +-echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 ++$as_echo "$ac_ct_DSYMUTIL" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_DSYMUTIL" = x; then +@@ -7115,10 +7252,10 @@ fi + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 +-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; +@@ -7132,10 +7269,10 @@ fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. + set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_NMEDIT+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +@@ -7148,7 +7285,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -7159,11 +7296,11 @@ fi + fi + NMEDIT=$ac_cv_prog_NMEDIT + if test -n "$NMEDIT"; then +- { echo "$as_me:$LINENO: result: $NMEDIT" >&5 +-echo "${ECHO_T}$NMEDIT" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 ++$as_echo "$NMEDIT" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -7172,10 +7309,10 @@ if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. + set dummy nmedit; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +@@ -7188,7 +7325,7 @@ do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +@@ -7199,11 +7336,11 @@ fi + fi + ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT + if test -n "$ac_ct_NMEDIT"; then +- { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 +-echo "${ECHO_T}$ac_ct_NMEDIT" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 ++$as_echo "$ac_ct_NMEDIT" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_NMEDIT" = x; then +@@ -7211,10 +7348,10 @@ fi + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 +-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; +@@ -7226,10 +7363,10 @@ else + fi + + +- { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 +-echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 ++$as_echo_n "checking for -single_module linker flag... " >&6; } + if test "${lt_cv_apple_cc_single_mod+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then +@@ -7247,12 +7384,12 @@ else + rm conftest.c + fi + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +-echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; } +- { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 +-echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 ++$as_echo "$lt_cv_apple_cc_single_mod" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 ++$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } + if test "${lt_cv_ld_exported_symbols_list+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS +@@ -7279,33 +7416,37 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + lt_cv_ld_exported_symbols_list=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_ld_exported_symbols_list=no + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +-echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 ++$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + case $host_os in + rhapsody* | darwin1.[0123]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; +@@ -7417,10 +7558,10 @@ if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +-{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 ++$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } + if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext +@@ -7435,11 +7576,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:7438: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:7579: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:7442: \$? = $ac_status" >&5 ++ echo "$as_me:7583: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -7452,8 +7593,8 @@ else + $rm conftest* + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 ++$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + + if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +@@ -7467,8 +7608,8 @@ lt_prog_compiler_wl= + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -7699,18 +7840,18 @@ echo $ECHO_N "checking for $compiler opt + esac + fi + +-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 ++$as_echo "$lt_prog_compiler_pic" >&6; } + + # + # Check to make sure the PIC flag actually works. + # + if test -n "$lt_prog_compiler_pic"; then + +-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 ++$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } + if test "${lt_cv_prog_compiler_pic_works+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext +@@ -7725,11 +7866,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:7728: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:7869: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:7732: \$? = $ac_status" >&5 ++ echo "$as_me:7873: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -7742,8 +7883,8 @@ else + $rm conftest* + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 ++$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + + if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in +@@ -7770,10 +7911,10 @@ esac + # Check to make sure the static flag actually works. + # + wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 ++$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } + if test "${lt_cv_prog_compiler_static_works+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" +@@ -7798,8 +7939,8 @@ else + LDFLAGS="$save_LDFLAGS" + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 ++$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + + if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +@@ -7808,10 +7949,10 @@ else + fi + + +-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ++$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } + if test "${lt_cv_prog_compiler_c_o+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null +@@ -7829,11 +7970,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:7832: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:7973: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:7836: \$? = $ac_status" >&5 ++ echo "$as_me:7977: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -7855,34 +7996,34 @@ else + $rm conftest* + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 ++$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + hard_links="nottested" + if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user +- { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ++$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no +- { echo "$as_me:$LINENO: result: $hard_links" >&5 +-echo "${ECHO_T}$hard_links" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 ++$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then +- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 ++$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi + else + need_locks=no + fi + +-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= +@@ -8094,13 +8235,12 @@ EOF + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi +- link_all_deplibs=no + else + ld_shlibs=no + fi + ;; + +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= +@@ -8313,18 +8453,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { +@@ -8339,12 +8482,13 @@ if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +@@ -8379,18 +8523,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { +@@ -8405,12 +8552,13 @@ if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +@@ -8643,7 +8791,7 @@ if test -z "$aix_libpath"; then aix_libp + link_all_deplibs=yes + ;; + +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else +@@ -8862,8 +9010,8 @@ if test -z "$aix_libpath"; then aix_libp + esac + fi + +-{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +-echo "${ECHO_T}$ld_shlibs" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 ++$as_echo "$ld_shlibs" >&6; } + test "$ld_shlibs" = no && can_build_shared=no + + # +@@ -8883,15 +9031,15 @@ x|xyes) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. +- { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ++$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest +@@ -8909,7 +9057,7 @@ echo $ECHO_N "checking whether -lc shoul + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no +@@ -8921,16 +9069,16 @@ echo $ECHO_N "checking whether -lc shoul + cat conftest.err 1>&5 + fi + $rm conftest* +- { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +-echo "${ECHO_T}$archive_cmds_need_lc" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 ++$as_echo "$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; + esac + +-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 ++$as_echo_n "checking dynamic linker characteristics... " >&6; } + library_names_spec= + libname_spec='lib$name' + soname_spec= +@@ -9354,18 +9502,6 @@ linux* | k*bsd*-gnu) + dynamic_linker='GNU/Linux ld.so' + ;; + +-netbsdelf*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='NetBSD ld.elf_so' +- ;; +- + netbsd*) + version_type=sunos + need_lib_prefix=no +@@ -9543,19 +9679,19 @@ uts4*) + dynamic_linker=no + ;; + esac +-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +-echo "${ECHO_T}$dynamic_linker" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 ++$as_echo "$dynamic_linker" >&6; } + test "$dynamic_linker" = no && can_build_shared=no + + if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" + fi + + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" + if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" + fi +@@ -9567,8 +9703,8 @@ if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + fi + +-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ++$as_echo_n "checking how to hardcode library paths into programs... " >&6; } + hardcode_action= + if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ +@@ -9592,8 +9728,8 @@ else + # directories. + hardcode_action=unsupported + fi +-{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 +-echo "${ECHO_T}$hardcode_action" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 ++$as_echo "$hardcode_action" >&6; } + + if test "$hardcode_action" = relink; then + # Fast installation is not supported +@@ -9606,13 +9742,13 @@ fi + + striplib= + old_striplib= +-{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 ++$as_echo_n "checking whether stripping libraries is possible... " >&6; } + if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" +- { echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } ++ { $as_echo "$as_me:$LINENO: result: yes" >&5 ++$as_echo "yes" >&6; } + else + # FIXME - insert some real tests, host_os isn't really good enough + case $host_os in +@@ -9620,16 +9756,16 @@ else + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" +- { echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } ++ { $as_echo "$as_me:$LINENO: result: yes" >&5 ++$as_echo "yes" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ;; + *) +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + ;; + esac + fi +@@ -9661,10 +9797,10 @@ else + + darwin*) + # if libdl is installed we need to link against it +- { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 ++$as_echo_n "checking for dlopen in -ldl... " >&6; } + if test "${ac_cv_lib_dl_dlopen+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldl $LIBS" +@@ -9696,32 +9832,36 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_lib_dl_dlopen=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 ++$as_echo "$ac_cv_lib_dl_dlopen" >&6; } + if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + else +@@ -9735,10 +9875,10 @@ fi + ;; + + *) +- { echo "$as_me:$LINENO: checking for shl_load" >&5 +-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 ++$as_echo_n "checking for shl_load... " >&6; } + if test "${ac_cv_func_shl_load+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -9791,38 +9931,42 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_func_shl_load=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +-echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 ++$as_echo "$ac_cv_func_shl_load" >&6; } + if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" + else +- { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 ++$as_echo_n "checking for shl_load in -ldld... " >&6; } + if test "${ac_cv_lib_dld_shl_load+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldld $LIBS" +@@ -9854,39 +9998,43 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_lib_dld_shl_load=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 ++$as_echo "$ac_cv_lib_dld_shl_load" >&6; } + if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" + else +- { echo "$as_me:$LINENO: checking for dlopen" >&5 +-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 ++$as_echo_n "checking for dlopen... " >&6; } + if test "${ac_cv_func_dlopen+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -9939,38 +10087,42 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_func_dlopen=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +-echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 ++$as_echo "$ac_cv_func_dlopen" >&6; } + if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" + else +- { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 ++$as_echo_n "checking for dlopen in -ldl... " >&6; } + if test "${ac_cv_lib_dl_dlopen+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldl $LIBS" +@@ -10002,39 +10154,43 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_lib_dl_dlopen=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 ++$as_echo "$ac_cv_lib_dl_dlopen" >&6; } + if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + else +- { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 ++$as_echo_n "checking for dlopen in -lsvld... " >&6; } + if test "${ac_cv_lib_svld_dlopen+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lsvld $LIBS" +@@ -10066,39 +10222,43 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_lib_svld_dlopen=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 ++$as_echo "$ac_cv_lib_svld_dlopen" >&6; } + if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" + else +- { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 ++$as_echo_n "checking for dld_link in -ldld... " >&6; } + if test "${ac_cv_lib_dld_dld_link+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldld $LIBS" +@@ -10130,32 +10290,36 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_lib_dld_dld_link=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 ++$as_echo "$ac_cv_lib_dld_dld_link" >&6; } + if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" + fi +@@ -10195,10 +10359,10 @@ fi + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + +- { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 ++$as_echo_n "checking whether a program can dlopen itself... " >&6; } + if test "${lt_cv_dlopen_self+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +@@ -10206,7 +10370,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <&5 + (eval $ac_link) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? +@@ -10290,15 +10454,15 @@ rm -fr conftest* + + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +-echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 ++$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" +- { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 ++$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } + if test "${lt_cv_dlopen_self_static+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +@@ -10306,7 +10470,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <&5 + (eval $ac_link) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? +@@ -10390,8 +10554,8 @@ rm -fr conftest* + + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +-echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 ++$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" +@@ -10413,13 +10577,13 @@ fi + + + # Report which library types will actually be built +-{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +-{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +-echo "${ECHO_T}$can_build_shared" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 ++$as_echo_n "checking if libtool supports shared libraries... " >&6; } ++{ $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 ++$as_echo "$can_build_shared" >&6; } + +-{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 ++$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and +@@ -10439,15 +10603,15 @@ aix[4-9]*) + fi + ;; + esac +-{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +-echo "${ECHO_T}$enable_shared" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 ++$as_echo "$enable_shared" >&6; } + +-{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 ++$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes +-{ echo "$as_me:$LINENO: result: $enable_static" >&5 +-echo "${ECHO_T}$enable_static" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $enable_static" >&5 ++$as_echo "$enable_static" >&6; } + + # The else clause should only fire when bootstrapping the + # libtool distribution, otherwise you forgot to ship ltmain.sh +@@ -10540,8 +10704,8 @@ if test -f "$ltmain"; then + cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" +- { echo "$as_me:$LINENO: creating $ofile" >&5 +-echo "$as_me: creating $ofile" >&6;} ++ { $as_echo "$as_me:$LINENO: creating $ofile" >&5 ++$as_echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" + #! $SHELL +@@ -10953,18 +11117,18 @@ fi + + if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then +- { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +-echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 ++$as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then +- { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +-echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 ++$as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else +- { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +-echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 ++$as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then +@@ -10981,16 +11145,16 @@ echo "$as_me: WARNING: using \`LTCC=$LTC + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; +- *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +-echo "$as_me: error: invalid tag name: $tagname" >&2;} ++ *) { { $as_echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 ++$as_echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then +- { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +-echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 ++$as_echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + +@@ -11133,8 +11297,8 @@ fi + ac_prog=ld + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. +- { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 ++$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw +@@ -11163,14 +11327,14 @@ echo $ECHO_N "checking for ld used by $C + ;; + esac + elif test "$with_gnu_ld" = yes; then +- { echo "$as_me:$LINENO: checking for GNU ld" >&5 +-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 ++$as_echo_n "checking for GNU ld... " >&6; } + else +- { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 ++$as_echo_n "checking for non-GNU ld... " >&6; } + fi + if test "${lt_cv_path_LD+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +@@ -11200,19 +11364,19 @@ fi + + LD="$lt_cv_path_LD" + if test -n "$LD"; then +- { echo "$as_me:$LINENO: result: $LD" >&5 +-echo "${ECHO_T}$LD" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $LD" >&5 ++$as_echo "$LD" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi +-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} ++test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 ++$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +-{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 ++$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } + if test "${lt_cv_prog_gnu_ld+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + # I'd rather use --version here, but apparently some GNU lds only accept -v. + case `$LD -v 2>&1 &1 &5 +-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 ++$as_echo "$lt_cv_prog_gnu_ld" >&6; } + with_gnu_ld=$lt_cv_prog_gnu_ld + + +@@ -11275,8 +11439,8 @@ else + fi + + # PORTME: fill in a description of your system's C++ link characteristics +-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + ld_shlibs_CXX=yes + case $host_os in + aix3*) +@@ -11393,18 +11557,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { +@@ -11419,12 +11586,13 @@ if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +@@ -11460,18 +11628,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { +@@ -11486,12 +11657,13 @@ if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +@@ -11894,7 +12066,7 @@ if test -z "$aix_libpath"; then aix_libp + ;; + esac + ;; +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= +@@ -12221,8 +12393,8 @@ if test -z "$aix_libpath"; then aix_libp + ld_shlibs_CXX=no + ;; + esac +-{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +-echo "${ECHO_T}$ld_shlibs_CXX" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 ++$as_echo "$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no + + GCC_CXX="$GXX" +@@ -12241,7 +12413,7 @@ EOF + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. +@@ -12397,8 +12569,8 @@ lt_prog_compiler_wl_CXX= + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX= + +-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then +@@ -12598,7 +12770,7 @@ echo $ECHO_N "checking for $compiler opt + ;; + esac + ;; +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in +@@ -12681,18 +12853,18 @@ echo $ECHO_N "checking for $compiler opt + esac + fi + +-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 ++$as_echo "$lt_prog_compiler_pic_CXX" >&6; } + + # + # Check to make sure the PIC flag actually works. + # + if test -n "$lt_prog_compiler_pic_CXX"; then + +-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 ++$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } + if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext +@@ -12707,11 +12879,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:12710: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:12882: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:12714: \$? = $ac_status" >&5 ++ echo "$as_me:12886: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -12724,8 +12896,8 @@ else + $rm conftest* + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 ++$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } + + if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in +@@ -12752,10 +12924,10 @@ esac + # Check to make sure the static flag actually works. + # + wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 ++$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } + if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" +@@ -12780,8 +12952,8 @@ else + LDFLAGS="$save_LDFLAGS" + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 ++$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } + + if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then + : +@@ -12790,10 +12962,10 @@ else + fi + + +-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ++$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } + if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null +@@ -12811,11 +12983,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:12814: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:12986: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:12818: \$? = $ac_status" >&5 ++ echo "$as_me:12990: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -12837,34 +13009,34 @@ else + $rm conftest* + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 ++$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + hard_links="nottested" + if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user +- { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ++$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no +- { echo "$as_me:$LINENO: result: $hard_links" >&5 +-echo "${ECHO_T}$hard_links" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 ++$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then +- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 ++$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi + else + need_locks=no + fi + +-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in +@@ -12883,17 +13055,14 @@ echo $ECHO_N "checking whether the $comp + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + ;; +- linux* | k*bsd*-gnu) +- link_all_deplibs_CXX=no +- ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + +-{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +-echo "${ECHO_T}$ld_shlibs_CXX" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 ++$as_echo "$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no + + # +@@ -12913,15 +13082,15 @@ x|xyes) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. +- { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ++$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest +@@ -12939,7 +13108,7 @@ echo $ECHO_N "checking whether -lc shoul + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no +@@ -12951,16 +13120,16 @@ echo $ECHO_N "checking whether -lc shoul + cat conftest.err 1>&5 + fi + $rm conftest* +- { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +-echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 ++$as_echo "$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi + ;; + esac + +-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 ++$as_echo_n "checking dynamic linker characteristics... " >&6; } + library_names_spec= + libname_spec='lib$name' + soname_spec= +@@ -13332,18 +13501,6 @@ linux* | k*bsd*-gnu) + dynamic_linker='GNU/Linux ld.so' + ;; + +-netbsdelf*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='NetBSD ld.elf_so' +- ;; +- + netbsd*) + version_type=sunos + need_lib_prefix=no +@@ -13521,19 +13678,19 @@ uts4*) + dynamic_linker=no + ;; + esac +-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +-echo "${ECHO_T}$dynamic_linker" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 ++$as_echo "$dynamic_linker" >&6; } + test "$dynamic_linker" = no && can_build_shared=no + + if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" + fi + + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" + if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" + fi +@@ -13545,8 +13702,8 @@ if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + fi + +-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ++$as_echo_n "checking how to hardcode library paths into programs... " >&6; } + hardcode_action_CXX= + if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ +@@ -13570,8 +13727,8 @@ else + # directories. + hardcode_action_CXX=unsupported + fi +-{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +-echo "${ECHO_T}$hardcode_action_CXX" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 ++$as_echo "$hardcode_action_CXX" >&6; } + + if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported +@@ -14109,13 +14266,13 @@ done + cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +-{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +-{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +-echo "${ECHO_T}$can_build_shared" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 ++$as_echo_n "checking if libtool supports shared libraries... " >&6; } ++{ $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 ++$as_echo "$can_build_shared" >&6; } + +-{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 ++$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and +@@ -14134,15 +14291,15 @@ aix[4-9]*) + fi + ;; + esac +-{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +-echo "${ECHO_T}$enable_shared" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 ++$as_echo "$enable_shared" >&6; } + +-{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 ++$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes +-{ echo "$as_me:$LINENO: result: $enable_static" >&5 +-echo "${ECHO_T}$enable_static" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $enable_static" >&5 ++$as_echo "$enable_static" >&6; } + + GCC_F77="$G77" + LD_F77="$LD" +@@ -14151,8 +14308,8 @@ lt_prog_compiler_wl_F77= + lt_prog_compiler_pic_F77= + lt_prog_compiler_static_F77= + +-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' +@@ -14383,18 +14540,18 @@ echo $ECHO_N "checking for $compiler opt + esac + fi + +-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 ++$as_echo "$lt_prog_compiler_pic_F77" >&6; } + + # + # Check to make sure the PIC flag actually works. + # + if test -n "$lt_prog_compiler_pic_F77"; then + +-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 ++$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } + if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext +@@ -14409,11 +14566,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:14412: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:14569: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:14416: \$? = $ac_status" >&5 ++ echo "$as_me:14573: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -14426,8 +14583,8 @@ else + $rm conftest* + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5 ++$as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; } + + if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in +@@ -14454,10 +14611,10 @@ esac + # Check to make sure the static flag actually works. + # + wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 ++$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } + if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" +@@ -14482,8 +14639,8 @@ else + LDFLAGS="$save_LDFLAGS" + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5 ++$as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; } + + if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then + : +@@ -14492,10 +14649,10 @@ else + fi + + +-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ++$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } + if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null +@@ -14513,11 +14670,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:14516: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:14673: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:14520: \$? = $ac_status" >&5 ++ echo "$as_me:14677: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -14539,34 +14696,34 @@ else + $rm conftest* + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 ++$as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } + + + hard_links="nottested" + if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user +- { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ++$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no +- { echo "$as_me:$LINENO: result: $hard_links" >&5 +-echo "${ECHO_T}$hard_links" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 ++$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then +- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 ++$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi + else + need_locks=no + fi + +-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag_F77= +@@ -14778,13 +14935,12 @@ EOF + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi +- link_all_deplibs_F77=no + else + ld_shlibs_F77=no + fi + ;; + +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= +@@ -14987,18 +15143,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { +@@ -15013,12 +15172,13 @@ if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +@@ -15043,18 +15203,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { +@@ -15069,12 +15232,13 @@ if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +@@ -15307,7 +15471,7 @@ if test -z "$aix_libpath"; then aix_libp + link_all_deplibs_F77=yes + ;; + +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else +@@ -15526,8 +15690,8 @@ if test -z "$aix_libpath"; then aix_libp + esac + fi + +-{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +-echo "${ECHO_T}$ld_shlibs_F77" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 ++$as_echo "$ld_shlibs_F77" >&6; } + test "$ld_shlibs_F77" = no && can_build_shared=no + + # +@@ -15547,15 +15711,15 @@ x|xyes) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. +- { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ++$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest +@@ -15573,7 +15737,7 @@ echo $ECHO_N "checking whether -lc shoul + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no +@@ -15585,16 +15749,16 @@ echo $ECHO_N "checking whether -lc shoul + cat conftest.err 1>&5 + fi + $rm conftest* +- { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +-echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 ++$as_echo "$archive_cmds_need_lc_F77" >&6; } + ;; + esac + fi + ;; + esac + +-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 ++$as_echo_n "checking dynamic linker characteristics... " >&6; } + library_names_spec= + libname_spec='lib$name' + soname_spec= +@@ -15966,18 +16130,6 @@ linux* | k*bsd*-gnu) + dynamic_linker='GNU/Linux ld.so' + ;; + +-netbsdelf*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='NetBSD ld.elf_so' +- ;; +- + netbsd*) + version_type=sunos + need_lib_prefix=no +@@ -16155,19 +16307,19 @@ uts4*) + dynamic_linker=no + ;; + esac +-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +-echo "${ECHO_T}$dynamic_linker" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 ++$as_echo "$dynamic_linker" >&6; } + test "$dynamic_linker" = no && can_build_shared=no + + if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" + fi + + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" + if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" + fi +@@ -16179,8 +16331,8 @@ if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + fi + +-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ++$as_echo_n "checking how to hardcode library paths into programs... " >&6; } + hardcode_action_F77= + if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ +@@ -16204,8 +16356,8 @@ else + # directories. + hardcode_action_F77=unsupported + fi +-{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +-echo "${ECHO_T}$hardcode_action_F77" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 ++$as_echo "$hardcode_action_F77" >&6; } + + if test "$hardcode_action_F77" = relink; then + # Fast installation is not supported +@@ -16715,10 +16867,10 @@ if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +-{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 ++$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } + if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext +@@ -16733,11 +16885,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:16736: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:16888: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:16740: \$? = $ac_status" >&5 ++ echo "$as_me:16892: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -16750,8 +16902,8 @@ else + $rm conftest* + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 ++$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + + if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +@@ -16765,8 +16917,8 @@ lt_prog_compiler_wl_GCJ= + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_static_GCJ= + +-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' +@@ -16997,18 +17149,18 @@ echo $ECHO_N "checking for $compiler opt + esac + fi + +-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 ++$as_echo "$lt_prog_compiler_pic_GCJ" >&6; } + + # + # Check to make sure the PIC flag actually works. + # + if test -n "$lt_prog_compiler_pic_GCJ"; then + +-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 ++$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... " >&6; } + if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext +@@ -17023,11 +17175,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:17026: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:17178: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:17030: \$? = $ac_status" >&5 ++ echo "$as_me:17182: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -17040,8 +17192,8 @@ else + $rm conftest* + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 ++$as_echo "$lt_cv_prog_compiler_pic_works_GCJ" >&6; } + + if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in +@@ -17068,10 +17220,10 @@ esac + # Check to make sure the static flag actually works. + # + wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 ++$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } + if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" +@@ -17096,8 +17248,8 @@ else + LDFLAGS="$save_LDFLAGS" + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 ++$as_echo "$lt_cv_prog_compiler_static_works_GCJ" >&6; } + + if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then + : +@@ -17106,10 +17258,10 @@ else + fi + + +-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ++$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } + if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null +@@ -17127,11 +17279,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:17130: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:17282: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:17134: \$? = $ac_status" >&5 ++ echo "$as_me:17286: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -17153,34 +17305,34 @@ else + $rm conftest* + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 ++$as_echo "$lt_cv_prog_compiler_c_o_GCJ" >&6; } + + + hard_links="nottested" + if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user +- { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ++$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no +- { echo "$as_me:$LINENO: result: $hard_links" >&5 +-echo "${ECHO_T}$hard_links" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 ++$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then +- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 ++$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi + else + need_locks=no + fi + +-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag_GCJ= +@@ -17392,13 +17544,12 @@ EOF + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi +- link_all_deplibs_GCJ=no + else + ld_shlibs_GCJ=no + fi + ;; + +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= +@@ -17611,18 +17762,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { +@@ -17637,12 +17791,13 @@ if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +@@ -17677,18 +17832,21 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { +@@ -17703,12 +17861,13 @@ if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +@@ -17941,7 +18100,7 @@ if test -z "$aix_libpath"; then aix_libp + link_all_deplibs_GCJ=yes + ;; + +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else +@@ -18160,8 +18319,8 @@ if test -z "$aix_libpath"; then aix_libp + esac + fi + +-{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +-echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 ++$as_echo "$ld_shlibs_GCJ" >&6; } + test "$ld_shlibs_GCJ" = no && can_build_shared=no + + # +@@ -18181,15 +18340,15 @@ x|xyes) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. +- { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ++$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest +@@ -18207,7 +18366,7 @@ echo $ECHO_N "checking whether -lc shoul + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no +@@ -18219,16 +18378,16 @@ echo $ECHO_N "checking whether -lc shoul + cat conftest.err 1>&5 + fi + $rm conftest* +- { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +-echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } ++ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 ++$as_echo "$archive_cmds_need_lc_GCJ" >&6; } + ;; + esac + fi + ;; + esac + +-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 ++$as_echo_n "checking dynamic linker characteristics... " >&6; } + library_names_spec= + libname_spec='lib$name' + soname_spec= +@@ -18600,18 +18759,6 @@ linux* | k*bsd*-gnu) + dynamic_linker='GNU/Linux ld.so' + ;; + +-netbsdelf*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='NetBSD ld.elf_so' +- ;; +- + netbsd*) + version_type=sunos + need_lib_prefix=no +@@ -18789,19 +18936,19 @@ uts4*) + dynamic_linker=no + ;; + esac +-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +-echo "${ECHO_T}$dynamic_linker" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 ++$as_echo "$dynamic_linker" >&6; } + test "$dynamic_linker" = no && can_build_shared=no + + if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" + fi + + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" + if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" + fi +@@ -18813,8 +18960,8 @@ if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + fi + +-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } ++{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ++$as_echo_n "checking how to hardcode library paths into programs... " >&6; } + hardcode_action_GCJ= + if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ +@@ -18838,8 +18985,8 @@ else + # directories. + hardcode_action_GCJ=unsupported + fi +-{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +-echo "${ECHO_T}$hardcode_action_GCJ" >&6; } ++{ $as_echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 ++$as_echo "$hardcode_action_GCJ" >&6; } + + if test "$hardcode_action_GCJ" = relink; then + # Fast installation is not supported +@@ -19762,8 +19909,8 @@ CC="$lt_save_CC" + ;; + + *) +- { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +-echo "$as_me: error: Unsupported tag name: $tagname" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 ++$as_echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac +@@ -19782,8 +19929,8 @@ echo "$as_me: error: Unsupported tag nam + chmod +x "$ofile" + else + rm -f "${ofile}T" +- { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +-echo "$as_me: error: unable to update list of available tagged configurations." >&2;} ++ { { $as_echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 ++$as_echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi + fi +@@ -19823,11 +19970,11 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtoo + + for ac_func in strndup + do +-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } ++as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ++{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 ++$as_echo_n "checking for $ac_func... " >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -19880,35 +20027,41 @@ case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + eval "$as_ac_var=yes" + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" + fi + ++rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-ac_res=`eval echo '${'$as_ac_var'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$ac_res" >&6; } +-if test `eval echo '${'$as_ac_var'}'` = yes; then ++ac_res=`eval 'as_val=${'$as_ac_var'} ++ $as_echo "$as_val"'` ++ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++if test `eval 'as_val=${'$as_ac_var'} ++ $as_echo "$as_val"'` = yes; then + cat >>confdefs.h <<_ACEOF +-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF + + fi +@@ -19944,11 +20097,12 @@ _ACEOF + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( +- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; ++ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 ++$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( ++ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac +@@ -19981,12 +20135,12 @@ echo "$as_me: WARNING: Cache variable $a + if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && +- { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +-echo "$as_me: updating cache $cache_file" >&6;} ++ { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 ++$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else +- { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +-echo "$as_me: not updating unwritable cache $cache_file" >&6;} ++ { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 ++$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi + fi + rm -f confcache +@@ -20003,6 +20157,12 @@ test "x$exec_prefix" = xNONE && exec_pre + # take arguments), then branch to the quote section. Otherwise, + # look for a macro that doesn't take arguments. + ac_script=' ++:mline ++/\\$/{ ++ N ++ s,\\\n,, ++ b mline ++} + t clear + :clear + s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +@@ -20032,7 +20192,7 @@ ac_ltlibobjs= + for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' +- ac_i=`echo "$ac_i" | sed "$ac_script"` ++ ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" +@@ -20044,33 +20204,34 @@ LTLIBOBJS=$ac_ltlibobjs + + + if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. ++ { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. + Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"AMDEP\" was never defined. ++$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. + Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } + fi + if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. ++ { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. + Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. ++$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. + Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } + fi + if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. ++ { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. + Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. ++$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. + Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } + fi + + : ${CONFIG_STATUS=./config.status} ++ac_write_fail=0 + ac_clean_files_save=$ac_clean_files + ac_clean_files="$ac_clean_files $CONFIG_STATUS" +-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +-echo "$as_me: creating $CONFIG_STATUS" >&6;} +-cat >$CONFIG_STATUS <<_ACEOF ++{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 ++$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} ++cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + #! $SHELL + # Generated by $as_me. + # Run this file to recreate the current configuration. +@@ -20083,7 +20244,7 @@ ac_cs_silent=false + SHELL=\${CONFIG_SHELL-$SHELL} + _ACEOF + +-cat >>$CONFIG_STATUS <<\_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + ## --------------------- ## + ## M4sh Initialization. ## + ## --------------------- ## +@@ -20093,7 +20254,7 @@ DUALCASE=1; export DUALCASE # for MKS sh + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ++ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +@@ -20115,17 +20276,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTE + as_cr_digits='0123456789' + as_cr_alnum=$as_cr_Letters$as_cr_digits + +-# The user is always right. +-if test "${PATH_SEPARATOR+set}" != set; then +- echo "#! /bin/sh" >conf$$.sh +- echo "exit 0" >>conf$$.sh +- chmod +x conf$$.sh +- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then +- PATH_SEPARATOR=';' ++as_nl=' ++' ++export as_nl ++# Printing a long string crashes Solaris 7 /usr/bin/printf. ++as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo ++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo ++if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then ++ as_echo='printf %s\n' ++ as_echo_n='printf %s' ++else ++ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then ++ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' ++ as_echo_n='/usr/ucb/echo -n' + else +- PATH_SEPARATOR=: ++ as_echo_body='eval expr "X$1" : "X\\(.*\\)"' ++ as_echo_n_body='eval ++ arg=$1; ++ case $arg in ++ *"$as_nl"*) ++ expr "X$arg" : "X\\(.*\\)$as_nl"; ++ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; ++ esac; ++ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ++ ' ++ export as_echo_n_body ++ as_echo_n='sh -c $as_echo_n_body as_echo' + fi +- rm -f conf$$.sh ++ export as_echo_body ++ as_echo='sh -c $as_echo_body as_echo' ++fi ++ ++# The user is always right. ++if test "${PATH_SEPARATOR+set}" != set; then ++ PATH_SEPARATOR=: ++ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { ++ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || ++ PATH_SEPARATOR=';' ++ } + fi + + # Support unset when possible. +@@ -20141,8 +20330,6 @@ fi + # there to prevent editors from complaining about space-tab. + # (If _AS_PATH_WALK were called with IFS unset, it would disable word + # splitting by setting IFS to empty value.) +-as_nl=' +-' + IFS=" "" $as_nl" + + # Find who we are. Look in the path if we contain no directory separator. +@@ -20165,7 +20352,7 @@ if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then +- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 ++ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } + fi + +@@ -20178,17 +20365,10 @@ PS2='> ' + PS4='+ ' + + # NLS nuisances. +-for as_var in \ +- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ +- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ +- LC_TELEPHONE LC_TIME +-do +- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then +- eval $as_var=C; export $as_var +- else +- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +- fi +-done ++LC_ALL=C ++export LC_ALL ++LANGUAGE=C ++export LANGUAGE + + # Required to use basename. + if expr a : '\(a\)' >/dev/null 2>&1 && +@@ -20210,7 +20390,7 @@ as_me=`$as_basename -- "$0" || + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +-echo X/"$0" | ++$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q +@@ -20261,7 +20441,7 @@ $as_unset CDPATH + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || +- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 ++ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems +@@ -20289,7 +20469,6 @@ case `echo -n x` in + *) + ECHO_N='-n';; + esac +- + if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +@@ -20302,19 +20481,22 @@ if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file + else + rm -f conf$$.dir +- mkdir conf$$.dir ++ mkdir conf$$.dir 2>/dev/null + fi +-echo >conf$$.file +-if ln -s conf$$.file conf$$ 2>/dev/null; then +- as_ln_s='ln -s' +- # ... but there are two gotchas: +- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. +- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. +- # In both cases, we have to default to `cp -p'. +- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || ++if (echo >conf$$.file) 2>/dev/null; then ++ if ln -s conf$$.file conf$$ 2>/dev/null; then ++ as_ln_s='ln -s' ++ # ... but there are two gotchas: ++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. ++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. ++ # In both cases, we have to default to `cp -p'. ++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || ++ as_ln_s='cp -p' ++ elif ln conf$$.file conf$$ 2>/dev/null; then ++ as_ln_s=ln ++ else + as_ln_s='cp -p' +-elif ln conf$$.file conf$$ 2>/dev/null; then +- as_ln_s=ln ++ fi + else + as_ln_s='cp -p' + fi +@@ -20339,10 +20521,10 @@ else + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then +- test -d "$1/."; ++ test -d "$1/."; + else + case $1 in +- -*)set "./$1";; ++ -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi +@@ -20365,7 +20547,7 @@ exec 6>&1 + # values after options handling. + ac_log=" + This file was extended by $as_me, which was +-generated by GNU Autoconf 2.61. Invocation command line was ++generated by GNU Autoconf 2.62. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS +@@ -20378,14 +20560,14 @@ on `(hostname || uname -n) 2>/dev/null | + + _ACEOF + +-cat >>$CONFIG_STATUS <<_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + # Files that config.status was made for. + config_files="$ac_config_files" + config_commands="$ac_config_commands" + + _ACEOF + +-cat >>$CONFIG_STATUS <<\_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + ac_cs_usage="\ + \`$as_me' instantiates files from templates according to the + current configuration. +@@ -20398,7 +20580,7 @@ Usage: $0 [OPTIONS] [FILE]... + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] +- instantiate the configuration file FILE ++ instantiate the configuration file FILE + + Configuration files: + $config_files +@@ -20409,25 +20591,25 @@ $config_commands + Report bugs to ." + + _ACEOF +-cat >>$CONFIG_STATUS <<_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_version="\\ + config.status +-configured by $0, generated by GNU Autoconf 2.61, +- with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" ++configured by $0, generated by GNU Autoconf 2.62, ++ with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +-Copyright (C) 2006 Free Software Foundation, Inc. ++Copyright (C) 2008 Free Software Foundation, Inc. + This config.status script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it." + + ac_pwd='$ac_pwd' + srcdir='$srcdir' + INSTALL='$INSTALL' +-MKDIR_P='$MKDIR_P' ++AWK='$AWK' ++test -n "\$AWK" || AWK=awk + _ACEOF + +-cat >>$CONFIG_STATUS <<\_ACEOF +-# If no file are specified by the user, then we need to provide default +-# value. By we need to know if files were specified by the user. ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ++# The default lists apply if the user does not specify any file. + ac_need_defaults=: + while test $# != 0 + do +@@ -20449,21 +20631,24 @@ do + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) +- echo "$ac_cs_version"; exit ;; ++ $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift +- CONFIG_FILES="$CONFIG_FILES $ac_optarg" ++ case $ac_optarg in ++ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; ++ esac ++ CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) +- echo "$ac_cs_usage"; exit ;; ++ $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. +- -*) { echo "$as_me: error: unrecognized option: $1 ++ -*) { $as_echo "$as_me: error: unrecognized option: $1 + Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + +@@ -20482,27 +20667,29 @@ if $ac_cs_silent; then + fi + + _ACEOF +-cat >>$CONFIG_STATUS <<_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + if \$ac_cs_recheck; then +- echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 +- CONFIG_SHELL=$SHELL ++ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion ++ shift ++ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 ++ CONFIG_SHELL='$SHELL' + export CONFIG_SHELL +- exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion ++ exec "\$@" + fi + + _ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + exec 5>>config.log + { + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX + ## Running $as_me. ## + _ASBOX +- echo "$ac_log" ++ $as_echo "$ac_log" + } >&5 + + _ACEOF +-cat >>$CONFIG_STATUS <<_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + # + # INIT-COMMANDS + # +@@ -20510,7 +20697,7 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac + + _ACEOF + +-cat >>$CONFIG_STATUS <<\_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + + # Handling of arguments. + for ac_config_target in $ac_config_targets +@@ -20519,8 +20706,8 @@ do + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + +- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +-echo "$as_me: error: invalid argument: $ac_config_target" >&2;} ++ *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 ++$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac + done +@@ -20560,213 +20747,143 @@ $debug || + (umask 077 && mkdir "$tmp") + } || + { +- echo "$me: cannot create a temporary directory in ." >&2 ++ $as_echo "$as_me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } + } + +-# +-# Set up the sed scripts for CONFIG_FILES section. +-# +- +-# No need to generate the scripts if there are no CONFIG_FILES. +-# This happens for instance when ./config.status config.h ++# Set up the scripts for CONFIG_FILES section. ++# No need to generate them if there are no CONFIG_FILES. ++# This happens for instance with `./config.status config.h'. + if test -n "$CONFIG_FILES"; then + +-_ACEOF +- +- + +-ac_delim='%!_!# ' +-for ac_last_try in false false false false false :; do +- cat >conf$$subs.sed <<_ACEOF +-SHELL!$SHELL$ac_delim +-PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +-PACKAGE_NAME!$PACKAGE_NAME$ac_delim +-PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +-PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +-PACKAGE_STRING!$PACKAGE_STRING$ac_delim +-PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +-exec_prefix!$exec_prefix$ac_delim +-prefix!$prefix$ac_delim +-program_transform_name!$program_transform_name$ac_delim +-bindir!$bindir$ac_delim +-sbindir!$sbindir$ac_delim +-libexecdir!$libexecdir$ac_delim +-datarootdir!$datarootdir$ac_delim +-datadir!$datadir$ac_delim +-sysconfdir!$sysconfdir$ac_delim +-sharedstatedir!$sharedstatedir$ac_delim +-localstatedir!$localstatedir$ac_delim +-includedir!$includedir$ac_delim +-oldincludedir!$oldincludedir$ac_delim +-docdir!$docdir$ac_delim +-infodir!$infodir$ac_delim +-htmldir!$htmldir$ac_delim +-dvidir!$dvidir$ac_delim +-pdfdir!$pdfdir$ac_delim +-psdir!$psdir$ac_delim +-libdir!$libdir$ac_delim +-localedir!$localedir$ac_delim +-mandir!$mandir$ac_delim +-DEFS!$DEFS$ac_delim +-ECHO_C!$ECHO_C$ac_delim +-ECHO_N!$ECHO_N$ac_delim +-ECHO_T!$ECHO_T$ac_delim +-LIBS!$LIBS$ac_delim +-build_alias!$build_alias$ac_delim +-host_alias!$host_alias$ac_delim +-target_alias!$target_alias$ac_delim +-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +-INSTALL_DATA!$INSTALL_DATA$ac_delim +-am__isrc!$am__isrc$ac_delim +-CYGPATH_W!$CYGPATH_W$ac_delim +-PACKAGE!$PACKAGE$ac_delim +-VERSION!$VERSION$ac_delim +-ACLOCAL!$ACLOCAL$ac_delim +-AUTOCONF!$AUTOCONF$ac_delim +-AUTOMAKE!$AUTOMAKE$ac_delim +-AUTOHEADER!$AUTOHEADER$ac_delim +-MAKEINFO!$MAKEINFO$ac_delim +-install_sh!$install_sh$ac_delim +-STRIP!$STRIP$ac_delim +-INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +-mkdir_p!$mkdir_p$ac_delim +-AWK!$AWK$ac_delim +-SET_MAKE!$SET_MAKE$ac_delim +-am__leading_dot!$am__leading_dot$ac_delim +-AMTAR!$AMTAR$ac_delim +-am__tar!$am__tar$ac_delim +-am__untar!$am__untar$ac_delim +-CC!$CC$ac_delim +-CFLAGS!$CFLAGS$ac_delim +-LDFLAGS!$LDFLAGS$ac_delim +-CPPFLAGS!$CPPFLAGS$ac_delim +-ac_ct_CC!$ac_ct_CC$ac_delim +-EXEEXT!$EXEEXT$ac_delim +-OBJEXT!$OBJEXT$ac_delim +-DEPDIR!$DEPDIR$ac_delim +-am__include!$am__include$ac_delim +-am__quote!$am__quote$ac_delim +-AMDEP_TRUE!$AMDEP_TRUE$ac_delim +-AMDEP_FALSE!$AMDEP_FALSE$ac_delim +-AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +-CCDEPMODE!$CCDEPMODE$ac_delim +-am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +-am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +-build!$build$ac_delim +-build_cpu!$build_cpu$ac_delim +-build_vendor!$build_vendor$ac_delim +-build_os!$build_os$ac_delim +-host!$host$ac_delim +-host_cpu!$host_cpu$ac_delim +-host_vendor!$host_vendor$ac_delim +-host_os!$host_os$ac_delim +-SED!$SED$ac_delim +-GREP!$GREP$ac_delim +-EGREP!$EGREP$ac_delim +-LN_S!$LN_S$ac_delim +-ECHO!$ECHO$ac_delim +-AR!$AR$ac_delim +-RANLIB!$RANLIB$ac_delim +-DSYMUTIL!$DSYMUTIL$ac_delim +-NMEDIT!$NMEDIT$ac_delim +-CPP!$CPP$ac_delim +-CXX!$CXX$ac_delim +-CXXFLAGS!$CXXFLAGS$ac_delim +-ac_ct_CXX!$ac_ct_CXX$ac_delim +-CXXDEPMODE!$CXXDEPMODE$ac_delim +-_ACEOF +- +- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then +- break +- elif $ac_last_try; then +- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} +- { (exit 1); exit 1; }; } +- else +- ac_delim="$ac_delim!$ac_delim _$ac_delim!! " +- fi +-done +- +-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +-if test -n "$ac_eof"; then +- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` +- ac_eof=`expr $ac_eof + 1` ++ac_cr=' ' ++ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` ++if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ++ ac_cs_awk_cr='\\r' ++else ++ ac_cs_awk_cr=$ac_cr + fi + +-cat >>$CONFIG_STATUS <<_ACEOF +-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +-_ACEOF +-sed ' +-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +-s/^/s,@/; s/!/@,|#_!!_#|/ +-:n +-t n +-s/'"$ac_delim"'$/,g/; t +-s/$/\\/; p +-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +-' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +-CEOF$ac_eof ++echo 'BEGIN {' >"$tmp/subs1.awk" && + _ACEOF + + ++{ ++ echo "cat >conf$$subs.awk <<_ACEOF" && ++ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && ++ echo "_ACEOF" ++} >conf$$subs.sh || ++ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 ++$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} ++ { (exit 1); exit 1; }; } ++ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + ac_delim='%!_!# ' + for ac_last_try in false false false false false :; do +- cat >conf$$subs.sed <<_ACEOF +-am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim +-am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim +-CXXCPP!$CXXCPP$ac_delim +-F77!$F77$ac_delim +-FFLAGS!$FFLAGS$ac_delim +-ac_ct_F77!$ac_ct_F77$ac_delim +-LIBTOOL!$LIBTOOL$ac_delim +-SO_VERSION!$SO_VERSION$ac_delim +-LIBOBJS!$LIBOBJS$ac_delim +-LTLIBOBJS!$LTLIBOBJS$ac_delim +-_ACEOF ++ . ./conf$$subs.sh || ++ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 ++$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} ++ { (exit 1); exit 1; }; } + +- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 10; then ++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then + break + elif $ac_last_try; then +- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 ++$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi + done ++rm -f conf$$subs.sh + +-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +-if test -n "$ac_eof"; then +- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` +- ac_eof=`expr $ac_eof + 1` +-fi ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ++cat >>"\$tmp/subs1.awk" <<\\_ACAWK && ++_ACEOF ++sed -n ' ++h ++s/^/S["/; s/!.*/"]=/ ++p ++g ++s/^[^!]*!// ++:repl ++t repl ++s/'"$ac_delim"'$// ++t delim ++:nl ++h ++s/\(.\{148\}\).*/\1/ ++t more1 ++s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ ++p ++n ++b repl ++:more1 ++s/["\\]/\\&/g; s/^/"/; s/$/"\\/ ++p ++g ++s/.\{148\}// ++t nl ++:delim ++h ++s/\(.\{148\}\).*/\1/ ++t more2 ++s/["\\]/\\&/g; s/^/"/; s/$/"/ ++p ++b ++:more2 ++s/["\\]/\\&/g; s/^/"/; s/$/"\\/ ++p ++g ++s/.\{148\}// ++t delim ++' >$CONFIG_STATUS || ac_write_fail=1 ++rm -f conf$$subs.awk ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ++_ACAWK ++cat >>"\$tmp/subs1.awk" <<_ACAWK && ++ for (key in S) S_is_set[key] = 1 ++ FS = "" + +-cat >>$CONFIG_STATUS <<_ACEOF +-cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end ++} ++{ ++ line = $ 0 ++ nfields = split(line, field, "@") ++ substed = 0 ++ len = length(field[1]) ++ for (i = 2; i < nfields; i++) { ++ key = field[i] ++ keylen = length(key) ++ if (S_is_set[key]) { ++ value = S[key] ++ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) ++ len += length(value) + length(field[++i]) ++ substed = 1 ++ } else ++ len += 1 + keylen ++ } ++ ++ print line ++} ++ ++_ACAWK + _ACEOF +-sed ' +-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +-s/^/s,@/; s/!/@,|#_!!_#|/ +-:n +-t n +-s/'"$ac_delim"'$/,g/; t +-s/$/\\/; p +-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +-' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +-:end +-s/|#_!!_#|//g +-CEOF$ac_eof ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ++if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then ++ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" ++else ++ cat ++fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ ++ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 ++$as_echo "$as_me: error: could not setup config files machinery" >&2;} ++ { (exit 1); exit 1; }; } + _ACEOF + +- + # VPATH may cause trouble with some makes, so we remove $(srcdir), + # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and + # trailing colons and then remove the whole line if VPATH becomes empty +@@ -20782,19 +20899,21 @@ s/^[^=]*=[ ]*$// + }' + fi + +-cat >>$CONFIG_STATUS <<\_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + fi # test -n "$CONFIG_FILES" + + +-for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS ++eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" ++shift ++for ac_tag + do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; +- :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +-echo "$as_me: error: Invalid tag $ac_tag." >&2;} ++ :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 ++$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; +@@ -20823,26 +20942,38 @@ echo "$as_me: error: Invalid tag $ac_tag + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || +- { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +-echo "$as_me: error: cannot find input file: $ac_f" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 ++$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac +- ac_file_inputs="$ac_file_inputs $ac_f" ++ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ++ ac_file_inputs="$ac_file_inputs '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ +- configure_input="Generated from "`IFS=: +- echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." ++ configure_input='Generated from '` ++ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' ++ `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" +- { echo "$as_me:$LINENO: creating $ac_file" >&5 +-echo "$as_me: creating $ac_file" >&6;} ++ { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 ++$as_echo "$as_me: creating $ac_file" >&6;} + fi ++ # Neutralize special characters interpreted by sed in replacement strings. ++ case $configure_input in #( ++ *\&* | *\|* | *\\* ) ++ ac_sed_conf_input=`$as_echo "$configure_input" | ++ sed 's/[\\\\&|]/\\\\&/g'`;; #( ++ *) ac_sed_conf_input=$configure_input;; ++ esac + + case $ac_tag in +- *:-:* | *:-) cat >"$tmp/stdin";; ++ *:-:* | *:-) cat >"$tmp/stdin" \ ++ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 ++$as_echo "$as_me: error: could not create $ac_file" >&2;} ++ { (exit 1); exit 1; }; } ;; + esac + ;; + esac +@@ -20852,7 +20983,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +-echo X"$ac_file" | ++$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q +@@ -20878,7 +21009,7 @@ echo X"$ac_file" | + as_dirs= + while :; do + case $as_dir in #( +- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( ++ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" +@@ -20887,7 +21018,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +-echo X"$as_dir" | ++$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q +@@ -20908,17 +21039,17 @@ echo X"$as_dir" | + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" +- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +-echo "$as_me: error: cannot create directory $as_dir" >&2;} ++ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 ++$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + + case "$ac_dir" in + .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) +- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` ++ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. +- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` ++ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; +@@ -20956,19 +21087,15 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_ + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac +- ac_MKDIR_P=$MKDIR_P +- case $MKDIR_P in +- [\\/$]* | ?:[\\/]* ) ;; +- */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; +- esac + _ACEOF + +-cat >>$CONFIG_STATUS <<\_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + # If the template does not know about datarootdir, expand it. + # FIXME: This hack should be removed a few years after 2.60. + ac_datarootdir_hack=; ac_datarootdir_seen= + +-case `sed -n '/datarootdir/ { ++ac_sed_dataroot=' ++/datarootdir/ { + p + q + } +@@ -20977,13 +21104,14 @@ case `sed -n '/datarootdir/ { + /@infodir@/p + /@localedir@/p + /@mandir@/p +-' $ac_file_inputs` in ++' ++case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in + *datarootdir*) ac_datarootdir_seen=yes;; + *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) +- { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 ++$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + _ACEOF +-cat >>$CONFIG_STATUS <<_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g +@@ -20997,15 +21125,16 @@ _ACEOF + # Neutralize VPATH when `$srcdir' = `.'. + # Shell code in configure.ac might set extrasub. + # FIXME: do we really want to maintain this feature? +-cat >>$CONFIG_STATUS <<_ACEOF +- sed "$ac_vpsub ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ++ac_sed_extra="$ac_vpsub + $extrasub + _ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + :t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b +-s&@configure_input@&$configure_input&;t t ++s|@configure_input@|$ac_sed_conf_input|;t t + s&@top_builddir@&$ac_top_builddir_sub&;t t ++s&@top_build_prefix@&$ac_top_build_prefix&;t t + s&@srcdir@&$ac_srcdir&;t t + s&@abs_srcdir@&$ac_abs_srcdir&;t t + s&@top_srcdir@&$ac_top_srcdir&;t t +@@ -21014,28 +21143,34 @@ s&@builddir@&$ac_builddir&;t t + s&@abs_builddir@&$ac_abs_builddir&;t t + s&@abs_top_builddir@&$ac_abs_top_builddir&;t t + s&@INSTALL@&$ac_INSTALL&;t t +-s&@MKDIR_P@&$ac_MKDIR_P&;t t + $ac_datarootdir_hack +-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out ++" ++eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ ++ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 ++$as_echo "$as_me: error: could not create $ac_file" >&2;} ++ { (exit 1); exit 1; }; } + + test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && +- { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' + which seems to be undefined. Please make sure it is defined." >&5 +-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' ++$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' + which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in +- -) cat "$tmp/out"; rm -f "$tmp/out";; +- *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; +- esac ++ -) cat "$tmp/out" && rm -f "$tmp/out";; ++ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; ++ esac \ ++ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 ++$as_echo "$as_me: error: could not create $ac_file" >&2;} ++ { (exit 1); exit 1; }; } + ;; + + +- :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +-echo "$as_me: executing $ac_file commands" >&6;} ++ :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 ++$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + +@@ -21049,15 +21184,14 @@ echo "$as_me: executing $ac_file command + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. +- # Grep'ing the whole file is not good either: AIX grep has a line +- # limit of 2048, but all sed's we know have understand at least 4000. +- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then ++ # So let's grep whole file. ++ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || + $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +-echo X"$mf" | ++$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q +@@ -21101,7 +21235,7 @@ $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +-echo X"$file" | ++$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q +@@ -21127,7 +21261,7 @@ echo X"$file" | + as_dirs= + while :; do + case $as_dir in #( +- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( ++ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" +@@ -21136,7 +21270,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +-echo X"$as_dir" | ++$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q +@@ -21157,8 +21291,8 @@ echo X"$as_dir" | + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" +- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +-echo "$as_me: error: cannot create directory $as_dir" >&2;} ++ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 ++$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" +@@ -21175,6 +21309,11 @@ _ACEOF + chmod +x $CONFIG_STATUS + ac_clean_files=$ac_clean_files_save + ++test $ac_write_fail = 0 || ++ { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 ++$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} ++ { (exit 1); exit 1; }; } ++ + + # configure is writing to config.log, and then calls config.status. + # config.status does its own redirection, appending to config.log. +@@ -21196,4 +21335,8 @@ if test "$no_create" != yes; then + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } + fi ++if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then ++ { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5 ++$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;} ++fi + diff --git a/package/cgilib/patches/patch-depcomp b/package/cgilib/patches/patch-depcomp new file mode 100644 index 000000000..236d65f31 --- /dev/null +++ b/package/cgilib/patches/patch-depcomp @@ -0,0 +1,153 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- cgilib-0.7.orig/depcomp 2009-02-08 19:47:04.000000000 +0100 ++++ cgilib-0.7/depcomp 2009-05-09 03:58:09.000000000 +0200 +@@ -1,10 +1,9 @@ + #! /bin/sh + # depcomp - compile a program generating dependencies as side-effects + +-scriptversion=2007-03-29.01 ++scriptversion=2005-07-09.11 + +-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software +-# Foundation, Inc. ++# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. + + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -92,20 +91,7 @@ gcc3) + ## gcc 3 implements dependency tracking that does exactly what + ## we want. Yay! Note: for some reason libtool 1.4 doesn't like + ## it if -MD -MP comes after the -MF stuff. Hmm. +-## Unfortunately, FreeBSD c89 acceptance of flags depends upon +-## the command line argument order; so add the flags where they +-## appear in depend2.am. Note that the slowdown incurred here +-## affects only configure: in makefiles, %FASTDEP% shortcuts this. +- for arg +- do +- case $arg in +- -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; +- *) set fnord "$@" "$arg" ;; +- esac +- shift # fnord +- shift # $arg +- done +- "$@" ++ "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else +@@ -215,39 +201,34 @@ aix) + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. +- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` +- test "x$dir" = "x$object" && dir= +- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` ++ stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` ++ tmpdepfile="$stripped.u" + if test "$libtool" = yes; then +- tmpdepfile1=$dir$base.u +- tmpdepfile2=$base.u +- tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else +- tmpdepfile1=$dir$base.u +- tmpdepfile2=$dir$base.u +- tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + ++ if test -f "$tmpdepfile"; then : ++ else ++ stripped=`echo "$stripped" | sed 's,^.*/,,'` ++ tmpdepfile="$stripped.u" ++ fi ++ + if test $stat -eq 0; then : + else +- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" ++ rm -f "$tmpdepfile" + exit $stat + fi + +- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" +- do +- test -f "$tmpdepfile" && break +- done + if test -f "$tmpdepfile"; then ++ outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. +- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" +- # That's a tab and a space in the []. +- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" ++ sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" ++ sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile +@@ -295,46 +276,6 @@ icc) + rm -f "$tmpdepfile" + ;; + +-hp2) +- # The "hp" stanza above does not work with aCC (C++) and HP's ia64 +- # compilers, which have integrated preprocessors. The correct option +- # to use with these is +Maked; it writes dependencies to a file named +- # 'foo.d', which lands next to the object file, wherever that +- # happens to be. +- # Much of this is similar to the tru64 case; see comments there. +- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` +- test "x$dir" = "x$object" && dir= +- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` +- if test "$libtool" = yes; then +- tmpdepfile1=$dir$base.d +- tmpdepfile2=$dir.libs/$base.d +- "$@" -Wc,+Maked +- else +- tmpdepfile1=$dir$base.d +- tmpdepfile2=$dir$base.d +- "$@" +Maked +- fi +- stat=$? +- if test $stat -eq 0; then : +- else +- rm -f "$tmpdepfile1" "$tmpdepfile2" +- exit $stat +- fi +- +- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" +- do +- test -f "$tmpdepfile" && break +- done +- if test -f "$tmpdepfile"; then +- sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" +- # Add `dependent.h:' lines. +- sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" +- else +- echo "#dummy" > "$depfile" +- fi +- rm -f "$tmpdepfile" "$tmpdepfile2" +- ;; +- + tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. +@@ -347,13 +288,13 @@ tru64) + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a +- # static library. This mechanism is used in libtool 1.4 series to ++ # static library. This mecanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two +- # compilations output dependencies in $dir.libs/$base.o.d and ++ # compilations output dependencies in in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is diff --git a/package/cgilib/patches/patch-install-sh b/package/cgilib/patches/patch-install-sh new file mode 100644 index 000000000..a4ebbb915 --- /dev/null +++ b/package/cgilib/patches/patch-install-sh @@ -0,0 +1,641 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- cgilib-0.7.orig/install-sh 2009-02-08 19:47:04.000000000 +0100 ++++ cgilib-0.7/install-sh 2009-05-09 03:58:09.000000000 +0200 +@@ -1,7 +1,7 @@ + #!/bin/sh + # install - install a program, script, or datafile + +-scriptversion=2006-12-25.00 ++scriptversion=2005-05-14.22 + + # This originates from X11R5 (mit/util/scripts/install.sh), which was + # later released in X11R6 (xc/config/util/install.sh) with the +@@ -39,68 +39,38 @@ scriptversion=2006-12-25.00 + # when there is no Makefile. + # + # This script is compatible with the BSD install script, but was written +-# from scratch. +- +-nl=' +-' +-IFS=" "" $nl" ++# from scratch. It can only install one file at a time, a restriction ++# shared with many OS's install programs. + + # set DOITPROG to echo to test this script + + # Don't use :- since 4.3BSD and earlier shells don't like it. +-doit=${DOITPROG-} +-if test -z "$doit"; then +- doit_exec=exec +-else +- doit_exec=$doit +-fi +- +-# Put in absolute file names if you don't have them in your path; +-# or use environment vars. +- +-chgrpprog=${CHGRPPROG-chgrp} +-chmodprog=${CHMODPROG-chmod} +-chownprog=${CHOWNPROG-chown} +-cmpprog=${CMPPROG-cmp} +-cpprog=${CPPROG-cp} +-mkdirprog=${MKDIRPROG-mkdir} +-mvprog=${MVPROG-mv} +-rmprog=${RMPROG-rm} +-stripprog=${STRIPPROG-strip} +- +-posix_glob='?' +-initialize_posix_glob=' +- test "$posix_glob" != "?" || { +- if (set -f) 2>/dev/null; then +- posix_glob= +- else +- posix_glob=: +- fi +- } +-' ++doit="${DOITPROG-}" + +-posix_mkdir= ++# put in absolute paths if you don't have them in your path; or use env. vars. + +-# Desired mode of installed file. +-mode=0755 ++mvprog="${MVPROG-mv}" ++cpprog="${CPPROG-cp}" ++chmodprog="${CHMODPROG-chmod}" ++chownprog="${CHOWNPROG-chown}" ++chgrpprog="${CHGRPPROG-chgrp}" ++stripprog="${STRIPPROG-strip}" ++rmprog="${RMPROG-rm}" ++mkdirprog="${MKDIRPROG-mkdir}" + +-chgrpcmd= +-chmodcmd=$chmodprog ++chmodcmd="$chmodprog 0755" + chowncmd= +-mvcmd=$mvprog +-rmcmd="$rmprog -f" ++chgrpcmd= + stripcmd= +- ++rmcmd="$rmprog -f" ++mvcmd="$mvprog" + src= + dst= + dir_arg= +-dst_arg= +- +-copy_on_change=false ++dstarg= + no_target_directory= + +-usage="\ +-Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE ++usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... +@@ -110,86 +80,81 @@ In the 2nd and 3rd, copy all SRCFILES to + In the 4th, create DIRECTORIES. + + Options: +- --help display this help and exit. +- --version display version info and exit. +- +- -c (ignored) +- -C install only if different (preserve the last data modification time) +- -d create directories instead of installing files. +- -g GROUP $chgrpprog installed files to GROUP. +- -m MODE $chmodprog installed files to MODE. +- -o USER $chownprog installed files to USER. +- -s $stripprog installed files. +- -t DIRECTORY install into DIRECTORY. +- -T report an error if DSTFILE is a directory. ++-c (ignored) ++-d create directories instead of installing files. ++-g GROUP $chgrpprog installed files to GROUP. ++-m MODE $chmodprog installed files to MODE. ++-o USER $chownprog installed files to USER. ++-s $stripprog installed files. ++-t DIRECTORY install into DIRECTORY. ++-T report an error if DSTFILE is a directory. ++--help display this help and exit. ++--version display version info and exit. + + Environment variables override the default commands: +- CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG +- RMPROG STRIPPROG ++ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + " + +-while test $# -ne 0; do ++while test -n "$1"; do + case $1 in +- -c) ;; +- +- -C) copy_on_change=true;; ++ -c) shift ++ continue;; + +- -d) dir_arg=true;; ++ -d) dir_arg=true ++ shift ++ continue;; + + -g) chgrpcmd="$chgrpprog $2" +- shift;; ++ shift ++ shift ++ continue;; + + --help) echo "$usage"; exit $?;; + +- -m) mode=$2 +- case $mode in +- *' '* | *' '* | *' +-'* | *'*'* | *'?'* | *'['*) +- echo "$0: invalid mode: $mode" >&2 +- exit 1;; +- esac +- shift;; ++ -m) chmodcmd="$chmodprog $2" ++ shift ++ shift ++ continue;; + + -o) chowncmd="$chownprog $2" +- shift;; ++ shift ++ shift ++ continue;; + +- -s) stripcmd=$stripprog;; ++ -s) stripcmd=$stripprog ++ shift ++ continue;; + +- -t) dst_arg=$2 +- shift;; ++ -t) dstarg=$2 ++ shift ++ shift ++ continue;; + +- -T) no_target_directory=true;; ++ -T) no_target_directory=true ++ shift ++ continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + +- --) shift ++ *) # When -d is used, all remaining arguments are directories to create. ++ # When -t is used, the destination is already specified. ++ test -n "$dir_arg$dstarg" && break ++ # Otherwise, the last argument is the destination. Remove it from $@. ++ for arg ++ do ++ if test -n "$dstarg"; then ++ # $@ is not empty: it contains at least $arg. ++ set fnord "$@" "$dstarg" ++ shift # fnord ++ fi ++ shift # arg ++ dstarg=$arg ++ done + break;; +- +- -*) echo "$0: invalid option: $1" >&2 +- exit 1;; +- +- *) break;; + esac +- shift + done + +-if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then +- # When -d is used, all remaining arguments are directories to create. +- # When -t is used, the destination is already specified. +- # Otherwise, the last argument is the destination. Remove it from $@. +- for arg +- do +- if test -n "$dst_arg"; then +- # $@ is not empty: it contains at least $arg. +- set fnord "$@" "$dst_arg" +- shift # fnord +- fi +- shift # arg +- dst_arg=$arg +- done +-fi +- +-if test $# -eq 0; then ++if test -z "$1"; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 +@@ -199,47 +164,24 @@ if test $# -eq 0; then + exit 0 + fi + +-if test -z "$dir_arg"; then +- trap '(exit $?); exit' 1 2 13 15 +- +- # Set umask so as not to create temps with too-generous modes. +- # However, 'strip' requires both read and write access to temps. +- case $mode in +- # Optimize common cases. +- *644) cp_umask=133;; +- *755) cp_umask=22;; +- +- *[0-7]) +- if test -z "$stripcmd"; then +- u_plus_rw= +- else +- u_plus_rw='% 200' +- fi +- cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; +- *) +- if test -z "$stripcmd"; then +- u_plus_rw= +- else +- u_plus_rw=,u+rw +- fi +- cp_umask=$mode$u_plus_rw;; +- esac +-fi +- + for src + do + # Protect names starting with `-'. + case $src in +- -*) src=./$src;; ++ -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src +- dstdir=$dst +- test -d "$dstdir" +- dstdir_status=$? +- else ++ src= + ++ if test -d "$dst"; then ++ mkdircmd=: ++ chmodcmd= ++ else ++ mkdircmd=$mkdirprog ++ fi ++ else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. +@@ -248,199 +190,71 @@ do + exit 1 + fi + +- if test -z "$dst_arg"; then ++ if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + +- dst=$dst_arg ++ dst=$dstarg + # Protect names starting with `-'. + case $dst in +- -*) dst=./$dst;; ++ -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then +- echo "$0: $dst_arg: Is a directory" >&2 ++ echo "$0: $dstarg: Is a directory" >&2 + exit 1 + fi +- dstdir=$dst +- dst=$dstdir/`basename "$src"` +- dstdir_status=0 +- else +- # Prefer dirname, but fall back on a substitute if dirname fails. +- dstdir=` +- (dirname "$dst") 2>/dev/null || +- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$dst" : 'X\(//\)[^/]' \| \ +- X"$dst" : 'X\(//\)$' \| \ +- X"$dst" : 'X\(/\)' \| . 2>/dev/null || +- echo X"$dst" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ +- s//\1/ +- q +- } +- /^X\(\/\/\)[^/].*/{ +- s//\1/ +- q +- } +- /^X\(\/\/\)$/{ +- s//\1/ +- q +- } +- /^X\(\/\).*/{ +- s//\1/ +- q +- } +- s/.*/./; q' +- ` +- +- test -d "$dstdir" +- dstdir_status=$? ++ dst=$dst/`basename "$src"` + fi + fi + +- obsolete_mkdir_used=false +- +- if test $dstdir_status != 0; then +- case $posix_mkdir in +- '') +- # Create intermediate dirs using mode 755 as modified by the umask. +- # This is like FreeBSD 'install' as of 1997-10-28. +- umask=`umask` +- case $stripcmd.$umask in +- # Optimize common cases. +- *[2367][2367]) mkdir_umask=$umask;; +- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; +- +- *[0-7]) +- mkdir_umask=`expr $umask + 22 \ +- - $umask % 100 % 40 + $umask % 20 \ +- - $umask % 10 % 4 + $umask % 2 +- `;; +- *) mkdir_umask=$umask,go-w;; +- esac +- +- # With -d, create the new directory with the user-specified mode. +- # Otherwise, rely on $mkdir_umask. +- if test -n "$dir_arg"; then +- mkdir_mode=-m$mode +- else +- mkdir_mode= +- fi +- +- posix_mkdir=false +- case $umask in +- *[123567][0-7][0-7]) +- # POSIX mkdir -p sets u+wx bits regardless of umask, which +- # is incompatible with FreeBSD 'install' when (umask & 300) != 0. +- ;; +- *) +- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ +- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 +- +- if (umask $mkdir_umask && +- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 +- then +- if test -z "$dir_arg" || { +- # Check for POSIX incompatibilities with -m. +- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or +- # other-writeable bit of parent directory when it shouldn't. +- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. +- ls_ld_tmpdir=`ls -ld "$tmpdir"` +- case $ls_ld_tmpdir in +- d????-?r-*) different_mode=700;; +- d????-?--*) different_mode=755;; +- *) false;; +- esac && +- $mkdirprog -m$different_mode -p -- "$tmpdir" && { +- ls_ld_tmpdir_1=`ls -ld "$tmpdir"` +- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" +- } +- } +- then posix_mkdir=: +- fi +- rmdir "$tmpdir/d" "$tmpdir" +- else +- # Remove any dirs left behind by ancient mkdir implementations. +- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null +- fi +- trap '' 0;; +- esac;; +- esac ++ # This sed command emulates the dirname command. ++ dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` + +- if +- $posix_mkdir && ( +- umask $mkdir_umask && +- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" +- ) +- then : +- else ++ # Make sure that the destination directory exists. + +- # The umask is ridiculous, or mkdir does not conform to POSIX, +- # or it failed possibly due to a race condition. Create the +- # directory the slow way, step by step, checking for races as we go. ++ # Skip lots of stat calls in the usual case. ++ if test ! -d "$dstdir"; then ++ defaultIFS=' ++ ' ++ IFS="${IFS-$defaultIFS}" + +- case $dstdir in +- /*) prefix='/';; +- -*) prefix='./';; +- *) prefix='';; +- esac ++ oIFS=$IFS ++ # Some sh's can't handle IFS=/ for some reason. ++ IFS='%' ++ set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` ++ shift ++ IFS=$oIFS + +- eval "$initialize_posix_glob" ++ pathcomp= + +- oIFS=$IFS +- IFS=/ +- $posix_glob set -f +- set fnord $dstdir ++ while test $# -ne 0 ; do ++ pathcomp=$pathcomp$1 + shift +- $posix_glob set +f +- IFS=$oIFS +- +- prefixes= +- +- for d +- do +- test -z "$d" && continue +- +- prefix=$prefix$d +- if test -d "$prefix"; then +- prefixes= +- else +- if $posix_mkdir; then +- (umask=$mkdir_umask && +- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break +- # Don't fail if two instances are running concurrently. +- test -d "$prefix" || exit 1 +- else +- case $prefix in +- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; +- *) qprefix=$prefix;; +- esac +- prefixes="$prefixes '$qprefix'" +- fi +- fi +- prefix=$prefix/ +- done +- +- if test -n "$prefixes"; then +- # Don't fail if two instances are running concurrently. +- (umask $mkdir_umask && +- eval "\$doit_exec \$mkdirprog $prefixes") || +- test -d "$dstdir" || exit 1 +- obsolete_mkdir_used=true ++ if test ! -d "$pathcomp"; then ++ $mkdirprog "$pathcomp" ++ # mkdir can fail with a `File exist' error in case several ++ # install-sh are creating the directory concurrently. This ++ # is OK. ++ test -d "$pathcomp" || exit + fi +- fi ++ pathcomp=$pathcomp/ ++ done + fi + + if test -n "$dir_arg"; then +- { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && +- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && +- { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || +- test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 ++ $doit $mkdircmd "$dst" \ ++ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ ++ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ ++ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ ++ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } ++ + else ++ dstfile=`basename "$dst"` + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ +@@ -448,9 +262,10 @@ do + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 ++ trap '(exit $?); exit' 1 2 13 15 + + # Copy the file name to the temp name. +- (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && ++ $doit $cpprog "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits. + # +@@ -458,59 +273,48 @@ do + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # +- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && +- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && +- { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && +- { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && +- +- # If -C, don't bother to copy if it wouldn't change the file. +- if $copy_on_change && +- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && +- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && +- +- eval "$initialize_posix_glob" && +- $posix_glob set -f && +- set X $old && old=:$2:$4:$5:$6 && +- set X $new && new=:$2:$4:$5:$6 && +- $posix_glob set +f && +- +- test "$old" = "$new" && +- $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 +- then +- rm -f "$dsttmp" +- else +- # Rename the file to the real destination. +- $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || ++ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ ++ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ ++ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ ++ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + +- # The rename failed, perhaps because mv can't rename something else +- # to itself, or perhaps because mv is so ancient that it does not +- # support -f. +- { +- # Now remove or move aside any old file at destination location. +- # We try this two ways since rm can't unlink itself on some +- # systems and the destination file might be busy for other +- # reasons. In this case, the final cleanup might fail but the new +- # file should still install successfully. +- { +- test ! -f "$dst" || +- $doit $rmcmd -f "$dst" 2>/dev/null || +- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && +- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } +- } || +- { echo "$0: cannot unlink or rename $dst" >&2 +- (exit 1); exit 1 +- } +- } && ++ # Now rename the file to the real destination. ++ { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ ++ || { ++ # The rename failed, perhaps because mv can't rename something else ++ # to itself, or perhaps because mv is so ancient that it does not ++ # support -f. + +- # Now rename the file to the real destination. +- $doit $mvcmd "$dsttmp" "$dst" +- } +- fi || exit 1 ++ # Now remove or move aside any old file at destination location. ++ # We try this two ways since rm can't unlink itself on some ++ # systems and the destination file might be busy for other ++ # reasons. In this case, the final cleanup might fail but the new ++ # file should still install successfully. ++ { ++ if test -f "$dstdir/$dstfile"; then ++ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ ++ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ ++ || { ++ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 ++ (exit 1); exit 1 ++ } ++ else ++ : ++ fi ++ } && + +- trap '' 0 +- fi ++ # Now rename the file to the real destination. ++ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" ++ } ++ } ++ fi || { (exit 1); exit 1; } + done + ++# The final little trick to "correctly" pass the exit status to the exit trap. ++{ ++ (exit 0); exit 0 ++} ++ + # Local variables: + # eval: (add-hook 'write-file-hooks 'time-stamp) + # time-stamp-start: "scriptversion=" diff --git a/package/cgilib/patches/patch-ltmain_sh b/package/cgilib/patches/patch-ltmain_sh new file mode 100644 index 000000000..6eceb3560 --- /dev/null +++ b/package/cgilib/patches/patch-ltmain_sh @@ -0,0 +1,131 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- cgilib-0.7.orig/ltmain.sh 2008-04-29 23:33:55.000000000 +0200 ++++ cgilib-0.7/ltmain.sh 2009-05-09 03:58:09.000000000 +0200 +@@ -43,8 +43,8 @@ EXIT_FAILURE=1 + + PROGRAM=ltmain.sh + PACKAGE=libtool +-VERSION="1.5.26 Debian 1.5.26-4" +-TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)" ++VERSION=1.5.26 ++TIMESTAMP=" (1.1220.2.492 2008/01/30 06:40:56)" + + # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +@@ -250,6 +250,20 @@ func_win32_libid () + # arg is usually of the form 'gcc ...' + func_infer_tag () + { ++ # FreeBSD-specific: where we install compilers with non-standard names ++ tag_compilers_CC="*cc cc* *gcc gcc*" ++ tag_compilers_CXX="*c++ c++* *g++ g++*" ++ base_compiler=`set -- "$@"; echo $1` ++ ++ # If $tagname isn't set, then try to infer if the default "CC" tag applies ++ if test -z "$tagname"; then ++ for zp in $tag_compilers_CC; do ++ case $base_compiler in ++ $zp) tagname="CC"; break;; ++ esac ++ done ++ fi ++ + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do +@@ -290,7 +304,22 @@ func_infer_tag () + break + ;; + esac +- fi ++ ++ # FreeBSD-specific: try compilers based on inferred tag ++ if test -z "$tagname"; then ++ eval "tag_compilers=\$tag_compilers_${z}" ++ if test -n "$tag_compilers"; then ++ for zp in $tag_compilers; do ++ case $base_compiler in ++ $zp) tagname=$z; break;; ++ esac ++ done ++ if test -n "$tagname"; then ++ break ++ fi ++ fi ++ fi ++ fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command +@@ -1651,6 +1680,7 @@ EOF + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" ++ deplibs="$deplibs $arg" + continue + ;; + +@@ -2135,10 +2165,7 @@ EOF + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; +- link) +- libs="$deplibs %DEPLIBS%" +- test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" +- ;; ++ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$pass" = dlopen; then +@@ -2157,6 +2184,29 @@ EOF + else + compiler_flags="$compiler_flags $deplib" + fi ++ ++ case $linkmode in ++ lib) ++ deplibs="$deplib $deplibs" ++ test "$pass" = conv && continue ++ newdependency_libs="$deplib $newdependency_libs" ++ ;; ++ prog) ++ if test "$pass" = conv; then ++ deplibs="$deplib $deplibs" ++ continue ++ fi ++ if test "$pass" = scan; then ++ deplibs="$deplib $deplibs" ++ else ++ compile_deplibs="$deplib $compile_deplibs" ++ finalize_deplibs="$deplib $finalize_deplibs" ++ fi ++ ;; ++ *) ++ ;; ++ esac # linkmode ++ + continue + ;; + -l*) +@@ -3272,11 +3322,6 @@ EOF + revision="$number_minor" + lt_irix_increment=no + ;; +- *) +- $echo "$modename: unknown library version type \`$version_type'" 1>&2 +- $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 +- exit $EXIT_FAILURE +- ;; + esac + ;; + no) +@@ -4788,6 +4833,9 @@ static const void *lt_preloaded_setup() + ;; + esac + ;; ++ *-*-freebsd*) ++ # FreeBSD doesn't need this... ++ ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE diff --git a/package/cgilib/patches/patch-missing b/package/cgilib/patches/patch-missing new file mode 100644 index 000000000..75fdcb564 --- /dev/null +++ b/package/cgilib/patches/patch-missing @@ -0,0 +1,185 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- cgilib-0.7.orig/missing 2009-02-08 19:47:04.000000000 +0100 ++++ cgilib-0.7/missing 2009-05-09 03:58:09.000000000 +0200 +@@ -1,9 +1,9 @@ + #! /bin/sh + # Common stub for a few missing GNU programs while installing. + +-scriptversion=2006-05-10.23 ++scriptversion=2005-06-08.21 + +-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 ++# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 + # Free Software Foundation, Inc. + # Originally by Fran,cois Pinard , 1996. + +@@ -33,8 +33,6 @@ if test $# -eq 0; then + fi + + run=: +-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +-sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + + # In the cases where this matters, `missing' is being run in the + # srcdir already. +@@ -46,7 +44,7 @@ fi + + msg="missing on your system" + +-case $1 in ++case "$1" in + --run) + # Try to run requested program, and just exit if it succeeds. + run= +@@ -79,7 +77,6 @@ Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' +- autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c +@@ -109,7 +106,7 @@ esac + # Now exit if we have it, but it failed. Also exit now if we + # don't have it and --version was passed (most likely to detect + # the program). +-case $1 in ++case "$1" in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; +@@ -138,7 +135,7 @@ esac + + # If it does not exist, or fails to run (possibly an outdated version), + # try to emulate it. +-case $1 in ++case "$1" in + aclocal*) + echo 1>&2 "\ + WARNING: \`$1' is $msg. You should only need it if +@@ -167,7 +164,7 @@ WARNING: \`$1' is $msg. You should only + test -z "$files" && files="config.h" + touch_files= + for f in $files; do +- case $f in ++ case "$f" in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; +@@ -195,8 +192,8 @@ WARNING: \`$1' is needed, but is $msg. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + +- file=`echo "$*" | sed -n "$sed_output"` +- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` ++ file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` ++ test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + if test -f "$file"; then + touch $file + else +@@ -217,25 +214,25 @@ WARNING: \`$1' $msg. You should only ne + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h +- if test $# -ne 1; then ++ if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" +- case $LASTARG in ++ case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` +- if test -f "$SRCFILE"; then ++ if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` +- if test -f "$SRCFILE"; then ++ if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi +- if test ! -f y.tab.h; then ++ if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi +- if test ! -f y.tab.c; then ++ if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; +@@ -247,18 +244,18 @@ WARNING: \`$1' is $msg. You should only + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c +- if test $# -ne 1; then ++ if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" +- case $LASTARG in ++ case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` +- if test -f "$SRCFILE"; then ++ if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi +- if test ! -f lex.yy.c; then ++ if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; +@@ -270,9 +267,11 @@ WARNING: \`$1' is $msg. You should only + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + +- file=`echo "$*" | sed -n "$sed_output"` +- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` +- if test -f "$file"; then ++ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` ++ if test -z "$file"; then ++ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` ++ fi ++ if [ -f "$file" ]; then + touch $file + else + test -z "$file" || exec >$file +@@ -290,17 +289,11 @@ WARNING: \`$1' is $msg. You should only + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... +- file=`echo "$*" | sed -n "$sed_output"` +- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` ++ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` +- file=`sed -n ' +- /^@setfilename/{ +- s/.* \([^ ]*\) *$/\1/ +- p +- q +- }' $infile` ++ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi +@@ -324,13 +317,13 @@ WARNING: \`$1' is $msg. You should only + fi + firstarg="$1" + if shift; then +- case $firstarg in ++ case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac +- case $firstarg in ++ case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 diff --git a/package/chillispot/Config.in b/package/chillispot/Config.in new file mode 100644 index 000000000..902ffb1db --- /dev/null +++ b/package/chillispot/Config.in @@ -0,0 +1,15 @@ +config ADK_PACKAGE_CHILLISPOT + prompt "chillispot........................ Wireless LAN access point controller" + tristate + default n + select ADK_KPACKAGE_KMOD_TUN + help + ChilliSpot is an open source captive portal or wireless LAN + access point controller. It is used for authenticating users + of a wireless LAN. It supports web based login which is today's + standard for public HotSpots and it supports Wireless Protected + Access (WPA) which is the standard of the future. Authentication, + authorization and accounting (AAA) is handled by your favorite + radius server. + + http://www.chillispot.org/ diff --git a/package/chillispot/Makefile b/package/chillispot/Makefile new file mode 100644 index 000000000..9ad16b887 --- /dev/null +++ b/package/chillispot/Makefile @@ -0,0 +1,31 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= chillispot +PKG_VERSION:= 1.1.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 9d2597756af3fa14d7331b4a3651fc9b +MASTER_SITES= http://www.chillispot.info/download/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,CHILLISPOT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +BUILD_STYLE= auto +INSTALL_STYLE= auto + +post-install: + ${INSTALL_DIR} ${IDIR_CHILLISPOT}/etc/init.d + ${INSTALL_DIR} ${IDIR_CHILLISPOT}/usr/sbin + ${INSTALL_BIN} ./files/chilli.conf \ + ${IDIR_CHILLISPOT}/etc/ + ${INSTALL_BIN} ./files/${PKG_NAME}.init \ + ${IDIR_CHILLISPOT}/etc/init.d/chilli + ${INSTALL_BIN} ${WRKINST}/usr/sbin/chilli ${IDIR_CHILLISPOT}/usr/sbin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/chillispot/files/chilli.conf b/package/chillispot/files/chilli.conf new file mode 100644 index 000000000..e6712d89b --- /dev/null +++ b/package/chillispot/files/chilli.conf @@ -0,0 +1,292 @@ +# Sample ChilliSpot configuration file + +#fg +#debug + +# TAG: interval +# Re-read configuration file at this interval. Will also cause new domain +# name lookups to be performed. Value is given in seconds. +#interval 3600 + +# TAG: pidfile +# File to store information about the process id of the program. +# The program must have write access to this file/directory. +#pidfile /var/run/chilli.pid + +# TAG: statedir +# Directory to use for nonvolatile storage. +# The program must have write access to this directory. +# This tag is currently ignored +#statedir ./ + + +# TUN parameters + +# TAG: net +# IP network address of external packet data network +# Used to allocate dynamic IP addresses and set up routing. +# Normally you do not need to uncomment this tag. +#net 192.168.182.0/24 + +# TAG: dynip +# Dynamic IP address pool +# Used to allocate dynamic IP addresses to clients. +# If not set it defaults to the net tag. +# Do not uncomment this tag unless you are an experienced user! +#dynip 192.168.182.0/24 + +# TAG: statip +# Static IP address pool +# Used to allocate static IP addresses to clients. +# Do not uncomment this tag unless you are an experienced user! +#statip 192.168.182.0/24 + + +# TAG: dns1 +# Primary DNS server. +# Will be suggested to the client. +# If omitted the system default will be used. +# Normally you do not need to uncomment this tag. +#dns1 172.16.0.5 + +# TAG: dns2 +# Secondary DNS server. +# Will be suggested to the client. +# If omitted the system default will be used. +# Normally you do not need to uncomment this tag. +#dns2 172.16.0.6 + +# TAG: domain +# Domain name +# Will be suggested to the client. +# Normally you do not need to uncomment this tag. +#domain key.chillispot.org + +# TAG: ipup +# Script executed after network interface has been brought up. +# Executed with the following parameters: +# +# Normally you do not need to uncomment this tag. +#ipup /etc/chilli.ipup + +# TAG: ipdown +# Script executed after network interface has been taken down. +# Executed with the following parameters: +# +# Normally you do not need to uncomment this tag. +#ipdown /etc/chilli.ipdown + +# TAG: conup +# Script executed after a user has been authenticated. +# Executed with the following parameters: +# +# Normally you do not need to uncomment this tag. +#conup /etc/chilli.conup + +# TAG: conup +# Script executed after a user has disconnected. +# Executed with the following parameters: +# +# Normally you do not need to uncomment this tag. +#conup /etc/chilli.condown + + +# Radius parameters + +# TAG: radiuslisten +# IP address to listen to +# Normally you do not need to uncomment this tag. +radiuslisten 127.0.0.1 + +# TAG: radiusserver1 +# IP address of radius server 1 +# For most installations you need to modify this tag. +radiusserver1 localhost + +# TAG: radiusserver2 +# IP address of radius server 2 +# If you have only one radius server you should set radiusserver2 to the +# same value as radiusserver1. +# For most installations you need to modify this tag. +radiusserver2 localhost + +# TAG: radiusauthport +# Radius authentication port +# The UDP port number to use for radius authentication requests. +# The same port number is used for both radiusserver1 and radiusserver2. +# Normally you do not need to uncomment this tag. +#radiusauthport 1812 + +# TAG: radiusacctport +# Radius accounting port +# The UDP port number to use for radius accounting requests. +# The same port number is used for both radiusserver1 and radiusserver2. +# Normally you do not need to uncomment this tag. +#radiusacctport 1813 + +# TAG: radiussecret +# Radius shared secret for both servers +# For all installations you should modify this tag. +radiussecret testing123 + +# TAG: radiusnasid +# Radius NAS-Identifier +# Normally you do not need to uncomment this tag. +#radiusnasid nas01 + +# TAG: radiusnasip +# Radius NAS-IP-Address +# Normally you do not need to uncomment this tag. +#radiusnasip 127.0.0.1 + +# TAG: radiuscalled +# Radius Called-Station-ID +# Normally you do not need to uncomment this tag. +#radiuscalled 00133300 + +# TAG: radiuslocationid +# WISPr Location ID. Should be in the format: isocc=, +# cc=,ac=,network= +# Normally you do not need to uncomment this tag. +#radiuslocationid isocc=us,cc=1,ac=408,network=ACMEWISP_NewarkAirport + +# TAG: radiuslocationname +# WISPr Location Name. Should be in the format: +# , +# Normally you do not need to uncomment this tag. +#radiuslocationname ACMEWISP,Gate_14_Terminal_C_of_Newark_Airport + + +# Radius proxy parameters + +# TAG: proxylisten +# IP address to listen to +# Normally you do not need to uncomment this tag. +#proxylisten 10.0.0.1 + +# TAG: proxyport +# UDP port to listen to. +# If not specified a port will be selected by the system +# Normally you do not need to uncomment this tag. +#proxyport 1645 + +# TAG: proxyclient +# Client(s) from which we accept radius requests +# Normally you do not need to uncomment this tag. +#proxyclient 10.0.0.1/24 + +# TAG: proxysecret +# Radius proxy shared secret for all clients +# If not specified defaults to radiussecret +# Normally you do not need to uncomment this tag. +#proxysecret testing123 + + +# Remote configuration management + +# TAG: confusername +# If confusername is specified together with confpassword chillispot +# will at regular intervals specified by the interval option query the +# radius server for configuration information. +# Normally you do not need to uncomment this tag. +#confusername conf + +# TAG: confpassword +# If confusername is specified together with confpassword chillispot +# will at regular intervals specified by the interval option query the +# radius server for configuration information. +# Normally you do not need to uncomment this tag. +#confpassword secret + + +# DHCP Parameters + +# TAG: dhcpif +# Ethernet interface to listen to. +# This is the network interface which is connected to the access points. +# In a typical configuration this tag should be set to eth1. +dhcpif wlan0 + +# TAG: dhcpmac +# Use specified MAC address. +# An address in the range 00:00:5E:00:02:00 - 00:00:5E:FF:FF:FF falls +# within the IANA range of addresses and is not allocated for other +# purposes. +# Normally you do not need to uncomment this tag. +#dhcpmac 00:00:5E:00:02:00 + +# TAG: lease +# Time before DHCP lease expires +# Normally you do not need to uncomment this tag. +#lease 600 + + +# Universal access method (UAM) parameters + +# TAG: uamserver +# URL of web server handling authentication. +uamserver https://192.168.182.1/hotspotlogin + +# TAG: uamhomepage +# URL of welcome homepage. +# Unauthenticated users will be redirected to this URL. If not specified +# users will be redirected to the uamserver instead. +# Normally you do not need to uncomment this tag. +uamhomepage http://localhost + +# TAG: uamsecret +# Shared between chilli and authentication web server +#uamsecret ht2eb8ej6s4et3rg1ulp + +# TAG: uamlisten +# IP address to listen to for authentication requests +# Do not uncomment this tag unless you are an experienced user! +#uamlisten 192.168.182.1 + +# TAG: uamport +# TCP port to listen to for authentication requests +# Do not uncomment this tag unless you are an experienced user! +#uamport 3990 + +# TAG: uamallowed +# Comma separated list of domain names, IP addresses or network segments +# the client can access without first authenticating. +# It is possible to specify this tag multiple times. +# Normally you do not need to uncomment this tag. +#uamallowed www.chillispot.org,10.11.12.0/24 + +# TAG: uamanydns +# If this flag is given unauthenticated users are allowed to use +# any DNS server. +# Normally you do not need to uncomment this tag. +#uamanydns + + +# MAC authentication + +# TAG: macauth +# If this flag is given users will be authenticated only on their MAC +# address. +# Normally you do not need to uncomment this tag. +#macauth + +# TAG: macallowed +# List of MAC addresses. +# The MAC addresses specified in this list will be authenticated only on +# their MAC address. +# This tag is ignored if the macauth tag is given. +# It is possible to specify this tag multiple times. +# Normally you do not need to uncomment this tag. +#macallowed 00-0A-5E-AC-BE-51,00-30-1B-3C-32-E9 + +# TAG: macpasswd +# Password to use for MAC authentication. +# Normally you do not need to uncomment this tag. +#macpasswd password + +# TAG: macsuffix +# Suffix to add to MAC address in order to form the username. +# Normally you do not need to uncomment this tag. +#macsuffix suffix + + diff --git a/package/chillispot/files/chillispot.init b/package/chillispot/files/chillispot.init new file mode 100644 index 000000000..c2a6cd489 --- /dev/null +++ b/package/chillispot/files/chillispot.init @@ -0,0 +1,25 @@ +#!/bin/sh +#FWINIT 70 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${chillispot:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + chilli + ;; +stop) + killall chilli + ;; +restart) + sh $0 stop + sh $0 start + ;; + *) + echo "usage: $0 {start | stop | restart}" + exit 1 +esac +exit $? diff --git a/package/chillispot/ipkg/chillispot.conffiles b/package/chillispot/ipkg/chillispot.conffiles new file mode 100644 index 000000000..08485167d --- /dev/null +++ b/package/chillispot/ipkg/chillispot.conffiles @@ -0,0 +1 @@ +/etc/chilli.conf diff --git a/package/chillispot/ipkg/chillispot.control b/package/chillispot/ipkg/chillispot.control new file mode 100644 index 000000000..0bb2badb8 --- /dev/null +++ b/package/chillispot/ipkg/chillispot.control @@ -0,0 +1,5 @@ +Package: chillispot +Priority: optional +Section: net +Depends: kmod-tun +Description: ChilliSpot is a Wireless LAN Access Point Controller. diff --git a/package/chillispot/ipkg/chillispot.postinst b/package/chillispot/ipkg/chillispot.postinst new file mode 100644 index 000000000..20ad12d8c --- /dev/null +++ b/package/chillispot/ipkg/chillispot.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf chillispot chillispot NO diff --git a/package/collectd/Config.in b/package/collectd/Config.in new file mode 100644 index 000000000..f645ee403 --- /dev/null +++ b/package/collectd/Config.in @@ -0,0 +1,36 @@ + +config ADK_PACKAGE_COLLECTD + prompt "collectd.......................... Lightweight system statistics collection daemon" + tristate + default n + select ADK_PACKAGE_LIBPTHREAD + help + collectd is a small daemon which collects system information + every 10 seconds. The values are then sent to a multicast group + to be stored in RRD files by a server process. + + http://verplant.org/collectd/ + +config ADK_PACKAGE_COLLECTD_CPU + prompt "Enable cpu support" + bool + default y + depends ADK_PACKAGE_COLLECTD + +config ADK_PACKAGE_COLLECTD_LOAD + prompt "Enable load support" + bool + default y + depends ADK_PACKAGE_COLLECTD + +config ADK_PACKAGE_COLLECTD_MEMORY + prompt "Enable memory support" + bool + default y + depends ADK_PACKAGE_COLLECTD + +config ADK_PACKAGE_COLLECTD_PING + prompt "Enable ping support" + bool + default y + depends ADK_PACKAGE_COLLECTD diff --git a/package/collectd/Makefile b/package/collectd/Makefile new file mode 100644 index 000000000..75518ff04 --- /dev/null +++ b/package/collectd/Makefile @@ -0,0 +1,94 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= collectd +PKG_VERSION:= 4.6.2 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 9eee46a6330780d6e6b41155b159f4f9 +MASTER_SITES:= http://verplant.org/collectd/files/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,COLLECTD,collectd,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +ifneq (${ADK_PACKAGE_COLLECTD_CPU},y) +DISABLE_CPU:=--disable-cpu +endif +ifneq (${ADK_PACKAGE_COLLECTD_LOAD},y) +DISABLE_LOAD:=--disable-load +endif +ifneq (${ADK_PACKAGE_COLLECTD_MEMORY},y) +DISABLE_MEMORY:=--disable-memory +endif +ifneq (${ADK_PACKAGE_COLLECTD_PING},y) +DISABLE_PING:=--disable-ping +endif + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS+= --disable-apache \ + --disable-apcups \ + --disable-apple_sensors \ + --disable-ascent \ + --disable-battery \ + ${DISABLE_CPU} \ + --disable-cpufreq \ + --disable-disk \ + --enable-csv \ + --disable-df \ + --disable-dns \ + --disable-email \ + --disable-entropy \ + --disable-exec \ + --disable-hddtemp \ + --disable-interface \ + --disable-iptables \ + --disable-irq \ + ${DISABLE_LOAD} \ + --disable-mbmon \ + --disable-memcached \ + ${DISABLE_MEMORY} \ + --disable-multimeter \ + --disable-mysql \ + --disable-postgresql \ + --disable-powerdns \ + --disable-network \ + --disable-nginx \ + --disable-nfs \ + --disable-ntpd \ + --disable-nut \ + --disable-perl \ + ${DISABLE_PING} \ + --disable-processes \ + --disable-sensors \ + --disable-serial \ + --disable-logfile \ + --disable-swap \ + --disable-syslog \ + --disable-tape \ + --disable-teamspeak2 \ + --disable-thermal \ + --disable-unixsock \ + --disable-users \ + --disable-vserver \ + --enable-wireless \ + --with-fp-layout=nothing \ + --with-nan-emulation + +XAKE_FLAGS+= LIBS='-lm' +BUILD_STYLE= auto +INSTALL_STYLE= auto + +post-install: + ${INSTALL_DIR} ${IDIR_COLLECTD}/etc/init.d + ${INSTALL_DIR} ${IDIR_COLLECTD}/usr/sbin + ${INSTALL_DIR} ${IDIR_COLLECTD}/usr/lib/collectd + ${INSTALL_BIN} ./files/collectd.init \ + ${IDIR_COLLECTD}/etc/init.d/collectd + ${CP} ${WRKINST}/usr/sbin/collectd ${IDIR_COLLECTD}/usr/sbin/ + ${CP} ${WRKINST}/usr/lib/collectd/*.so ${IDIR_COLLECTD}/usr/lib/collectd/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/collectd/files/collectd.init b/package/collectd/files/collectd.init new file mode 100644 index 000000000..7d4f70b59 --- /dev/null +++ b/package/collectd/files/collectd.init @@ -0,0 +1,27 @@ +#!/bin/sh +#FWINIT 75 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${collectd:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + [ -d /var/lib/collectd ] || mkdir -p /var/lib/collectd + collectd + ;; +stop) + killall collectd + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/collectd/ipkg/collectd.control b/package/collectd/ipkg/collectd.control new file mode 100644 index 000000000..790e0fdfb --- /dev/null +++ b/package/collectd/ipkg/collectd.control @@ -0,0 +1,5 @@ +Package: collectd +Priority: optional +Section: console +Description: System statistics collection daemon +Depends: libpthread diff --git a/package/collectd/ipkg/collectd.postinst b/package/collectd/ipkg/collectd.postinst new file mode 100644 index 000000000..7e4416125 --- /dev/null +++ b/package/collectd/ipkg/collectd.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf collectd collectd NO diff --git a/package/collectd/patches/patch-src_Makefile_in b/package/collectd/patches/patch-src_Makefile_in new file mode 100644 index 000000000..d563de441 --- /dev/null +++ b/package/collectd/patches/patch-src_Makefile_in @@ -0,0 +1,12 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- collectd-4.6.2.orig/src/Makefile.in 2009-03-18 11:56:40.000000000 +0100 ++++ collectd-4.6.2/src/Makefile.in 2009-05-09 16:28:02.000000000 +0200 +@@ -1340,7 +1340,7 @@ top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + SUBDIRS = libcollectdclient $(am__append_1) $(am__append_2) \ + $(am__append_3) +-@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall -Werror ++@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall + AM_CPPFLAGS = -DPREFIX='"${prefix}"' \ + -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"' \ + -DLOCALSTATEDIR='"${localstatedir}"' \ diff --git a/package/collectd/patches/patch-src_libcollectdclient_Makefile_in b/package/collectd/patches/patch-src_libcollectdclient_Makefile_in new file mode 100644 index 000000000..ba4d4c067 --- /dev/null +++ b/package/collectd/patches/patch-src_libcollectdclient_Makefile_in @@ -0,0 +1,12 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- collectd-4.6.2.orig/src/libcollectdclient/Makefile.in 2009-03-18 11:56:40.000000000 +0100 ++++ collectd-4.6.2/src/libcollectdclient/Makefile.in 2009-05-09 16:29:33.000000000 +0200 +@@ -251,7 +251,7 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AUTOMAKE_OPTIONS = foreign no-dependencies +-@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall -Werror ++@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall + pkginclude_HEADERS = client.h lcc_features.h + lib_LTLIBRARIES = libcollectdclient.la + nodist_pkgconfig_DATA = libcollectdclient.pc diff --git a/package/comgt/Config.in b/package/comgt/Config.in new file mode 100644 index 000000000..4711c2195 --- /dev/null +++ b/package/comgt/Config.in @@ -0,0 +1,11 @@ +config ADK_PACKAGE_COMGT + prompt "comgt............................. Option/Vodafone 3G/GPRS control tool" + tristate + default n + help + Option GlobeTrotter GPRS/EDGE/3G/HSDPA and Vodafone 3G/GPRS datacard control tool + + comgt is a scripting language interpreter useful for establishing communications + on serial lines and through PCMCIA modems as well as GPRS and 3G datacards. + + http://www.pharscape.org/content/view/46/70/ diff --git a/package/comgt/Makefile b/package/comgt/Makefile new file mode 100644 index 000000000..c9304dda8 --- /dev/null +++ b/package/comgt/Makefile @@ -0,0 +1,29 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= comgt +PKG_VERSION:= 0.32 +PKG_RELEASE:= 1 +PKG_MD5SUM:= db2452680c3d953631299e331daf49ef +DISTFILES:= ${PKG_NAME}.${PKG_VERSION}.tgz +MASTER_SITES:= ${MASTER_SITE_SOURCEFORGE:=comgt/} +WRKDIST= ${WRKDIR}/${PKG_NAME}.${PKG_VERSION} + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,COMGT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +BUILD_STYLE= auto +ALL_TARGET= comgt + +do-install: + ${INSTALL_DIR} ${IDIR_COMGT}/usr/bin + ${INSTALL_DIR} ${IDIR_COMGT}/etc/comgt + ${INSTALL_BIN} ${WRKBUILD}/comgt ${IDIR_COMGT}/usr/bin/comgt + ${INSTALL_DATA} ./files/dial.comgt ${IDIR_COMGT}/etc/comgt/dial.comgt + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/comgt/files/dial.comgt b/package/comgt/files/dial.comgt new file mode 100644 index 000000000..de3327331 --- /dev/null +++ b/package/comgt/files/dial.comgt @@ -0,0 +1,26 @@ +# dial given number +opengt + set com 115200n81 + set senddelay 0.02 + waitquiet 1 0.2 + flash 0.1 + +:start + print "Dialing '"+$env("NUMBER")+"'\n" + send "ATDT"+$env("NUMBER")+"^m" + + waitfor 15 "CONNECT" "OK","ERR","ERROR" + if % = 0 goto continue + if % = 1 goto continue + if % = 2 goto senderror + if % = 3 goto senderror + + print "Timeout dialing '"+$env("NUMBER")+"'\n" + exit 1 + +:senderror + print "Error dialing '"+$env("NUMBER")+"'\n" + exit 1 + +:continue + exit 0 diff --git a/package/comgt/files/setmode.comgt b/package/comgt/files/setmode.comgt new file mode 100644 index 000000000..4ce0b5fa7 --- /dev/null +++ b/package/comgt/files/setmode.comgt @@ -0,0 +1,26 @@ +# set wwan mode from environment +opengt + set com 115200n81 + set senddelay 0.02 + waitquiet 1 0.2 + flash 0.1 + +:start + print "Trying to set mode\n" + send $env("MODE") + send "^m" + + waitfor 15 "OK","ERR","ERROR" + if % = 0 goto continue + if % = 1 goto modeerror + if % = 2 goto modeerror + + print "Timeout setting WWAN mode!\n" + exit 1 + +:modeerror + print "Error setting WWAN mode!\n" + exit 1 + +:continue + exit 0 diff --git a/package/comgt/ipkg/comgt.control b/package/comgt/ipkg/comgt.control new file mode 100644 index 000000000..fe2c1cd61 --- /dev/null +++ b/package/comgt/ipkg/comgt.control @@ -0,0 +1,4 @@ +Package: comgt +Priority: optional +Section: console +Description: Option GlobeTrotter GPRS/EDGE/3G/HSDPA and Vodafone 3G/GPRS datacard control tool diff --git a/package/comgt/patches/patch-comgt_0_32_Makefile b/package/comgt/patches/patch-comgt_0_32_Makefile new file mode 100644 index 000000000..29a6dbfdc --- /dev/null +++ b/package/comgt/patches/patch-comgt_0_32_Makefile @@ -0,0 +1,33 @@ +$Id$ +--- comgt.0.32.orig/Makefile 2006-10-20 16:49:46.000000000 +0200 ++++ comgt.0.32/Makefile 2006-12-05 18:03:37.000000000 +0100 +@@ -23,8 +23,6 @@ + # + # + +-LIB = -L/usr/local/lib +-INC = -I/usr/local/include + EXE = /usr/local/bin + MAN = /usr/share/man/man1 + CPROG = comgt +@@ -33,9 +31,6 @@ SCRIPTSRC = ./scripts/ + BIN = $(CPROG) + MANP = comgt.1 sigmon.1 + +-CFLAGS = -c +-LDFLAGS = +- + all: $(BIN) + + install: +@@ -72,8 +67,8 @@ clean: + + + comgt: comgt.o +- cc comgt.o $(LDFLAGS) -o comgt ++ $(CC) comgt.o $(LDFLAGS) -o comgt + + comgt.o: comgt.c comgt.h +- cc comgt.c $(CFLAGS) ++ $(CC) comgt.c -c $(CFLAGS) + diff --git a/package/comgt/patches/patch-comgt_h b/package/comgt/patches/patch-comgt_h new file mode 100644 index 000000000..fe715df4f --- /dev/null +++ b/package/comgt/patches/patch-comgt_h @@ -0,0 +1,14 @@ +$Id$ +--- comgt.0.32.orig/comgt.h 2006-10-20 16:49:46.000000000 +0200 ++++ comgt.0.32/comgt.h 2006-12-06 13:10:54.000000000 +0100 +@@ -470,8 +470,8 @@ char _SETAPN_code[]= + if a=0 goto apnerror\n\ + if a>32 goto apnerror\n\ + :enterapn\n\ +- send \"AT+CGDCONT=1,\\\"IP\\\",\\\"\n\ +- send $c\n\ ++ send \"AT+CGDCONT=1,\\\"IP\\\",\\\"\"\n\ ++ send $x\n\ + send \"\\\"^m\"\n\ + waitfor 20 \"OK\",\"ERR\"\n\ + if % = -1 goto timeerror\n\ diff --git a/package/compositeproto/Config.in b/package/compositeproto/Config.in new file mode 100644 index 000000000..88d73d6b3 --- /dev/null +++ b/package/compositeproto/Config.in @@ -0,0 +1,6 @@ +config ADK_PACKAGE_XPROTO + prompt "xproto................................. X protocol library" + tristate + default n + help + http://www.x.org diff --git a/package/compositeproto/Makefile b/package/compositeproto/Makefile new file mode 100644 index 000000000..9438a34c7 --- /dev/null +++ b/package/compositeproto/Makefile @@ -0,0 +1,20 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= compositeproto +PKG_VERSION:= 0.4 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 33a79f6ba950bc5b41e077c951871bd5 +MASTER_SITES:= ${MASTER_SITE_XORG} + +include $(TOPDIR)/mk/package.mk + +CONFIGURE_STYLE= gnu +BUILD_STYLE= auto +INSTALL_STYLE= auto confprog + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/cryptsetup/Config.in b/package/cryptsetup/Config.in new file mode 100644 index 000000000..db5d8a9ca --- /dev/null +++ b/package/cryptsetup/Config.in @@ -0,0 +1,16 @@ +config ADK_PACKAGE_CRYPTSETUP + prompt "cryptsetup........................ LUKS cryptsetup tools" + tristate + select ADK_PACKAGE_LIBPOPT + select ADK_PACKAGE_LIBUUID + select ADK_PACKAGE_LIBGCRYPT + select ADK_PACKAGE_DEVICE_MAPPER + select ADK_KPACKAGE_KMOD_BLK_DEV_DM + select ADK_KPACKAGE_KMOD_DM_CRYPT + select ADK_KPACKAGE_KMOD_CRYPTO_SHA256 + select ADK_KPACKAGE_KMOD_CRYPTO_AES + select ADK_KPACKAGE_KMOD_CRYPTO_CBC + default n + help + LUKS cryptsetup tools. You need to enable crypto kernel + modules to get a working setup (f.e. aes and sha256). diff --git a/package/cryptsetup/Makefile b/package/cryptsetup/Makefile new file mode 100644 index 000000000..f82509774 --- /dev/null +++ b/package/cryptsetup/Makefile @@ -0,0 +1,32 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= cryptsetup +PKG_VERSION:= 1.0.6 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 00d452eb7a76e39f5749545d48934a10 +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 +MASTER_SITES:= http://cryptsetup.googlecode.com/files/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,CRYPTSETUP,cryptsetup,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE:= gnu +CONFIGURE_ARGS+= --disable-static +BUILD_STYLE:= auto +INSTALL_STYLE:= auto + +post-install: + ${INSTALL_DIR} ${IDIR_CRYPTSETUP}/usr/sbin + ${INSTALL_DIR} ${IDIR_CRYPTSETUP}/usr/lib + ${CP} ${WRKINST}/usr/lib/libcryptsetup.so.* \ + ${IDIR_CRYPTSETUP}/usr/lib + ${INSTALL_BIN} ${WRKINST}/usr/sbin/cryptsetup \ + ${IDIR_CRYPTSETUP}/usr/sbin + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/cryptsetup/ipkg/cryptsetup.control b/package/cryptsetup/ipkg/cryptsetup.control new file mode 100644 index 000000000..f23b5bf4d --- /dev/null +++ b/package/cryptsetup/ipkg/cryptsetup.control @@ -0,0 +1,5 @@ +Package: cryptsetup +Priority: optional +Section: crypto +Depends: libgcrypt, device-mapper, libuuid, libpopt +Description: LUKS cryptsetup tools diff --git a/package/cryptsetup/patches/patch-lib_libdevmapper_c b/package/cryptsetup/patches/patch-lib_libdevmapper_c new file mode 100644 index 000000000..052241c92 --- /dev/null +++ b/package/cryptsetup/patches/patch-lib_libdevmapper_c @@ -0,0 +1,14 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- cryptsetup-1.0.6.orig/lib/libdevmapper.c 2007-10-25 09:11:19.000000000 +0200 ++++ cryptsetup-1.0.6/lib/libdevmapper.c 2009-01-04 17:02:57.000000000 +0100 +@@ -192,7 +192,9 @@ static int dm_create_device(int reload, + options->flags |= CRYPT_FLAG_READONLY; + + /* run udevsettle to avoid a race in libdevmapper causing busy dm devices */ +- run_udevsettle(); ++ /* do not run on mdev based systems ++ run_udevsettle(); ++ */ + + r = 0; + diff --git a/package/cryptsetup/patches/patch-lib_utils_c b/package/cryptsetup/patches/patch-lib_utils_c new file mode 100644 index 000000000..665620528 --- /dev/null +++ b/package/cryptsetup/patches/patch-lib_utils_c @@ -0,0 +1,16 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ + +* prevent segfault with uClibc + http://www.spinics.net/lists/dm-crypt/msg01187.html + +--- cryptsetup-1.0.6.orig/lib/utils.c 2007-12-01 17:29:27.000000000 +0100 ++++ cryptsetup-1.0.6/lib/utils.c 2008-12-25 14:18:46.523091272 +0100 +@@ -27,6 +27,8 @@ static char *error=NULL; + void set_error_va(const char *fmt, va_list va) + { + ++ if(!fmt) return; ++ + if(error) { + free(error); + error=NULL; diff --git a/package/ctorrent/Config.in b/package/ctorrent/Config.in new file mode 100644 index 000000000..169546625 --- /dev/null +++ b/package/ctorrent/Config.in @@ -0,0 +1,29 @@ +config ADK_PACKAGE_CTORRENT + prompt "ctorrent.......................... console-based BitTorrent client" + tristate + default n + depends on ADK_CXX + help + CTorrent is a BitTorrent client written in the C programming language, known to + be a very robust and mature programming language, which produces fast and + optimized application. + + http://www.rahul.net/dholmes/ctorrent/ + +choice +prompt "C++ library to use" +depends on ADK_PACKAGE_CTORRENT +default ADK_COMPILE_CTORRENT_WITH_STDCXX if ADK_TARGET_LIB_GLIBC +default ADK_COMPILE_CTORRENT_WITH_UCLIBCXX if ADK_TARGET_LIB_UCLIBC + +config ADK_COMPILE_CTORRENT_WITH_STDCXX + bool "Standard C++ library" + select ADK_PACKAGE_LIBSTDCXX + help + +config ADK_COMPILE_CTORRENT_WITH_UCLIBCXX + bool "Embedded uClibc++ library" + select ADK_PACKAGE_UCLIBCXX + help + +endchoice diff --git a/package/ctorrent/Makefile b/package/ctorrent/Makefile new file mode 100755 index 000000000..964ae555a --- /dev/null +++ b/package/ctorrent/Makefile @@ -0,0 +1,36 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= ctorrent +PKG_VERSION:= 1.3.4-dnh2 +PKG_RELEASE:= 2 +PKG_MD5SUM:= 6635e2d0d0ee21faeb85d95cd93c137b +MASTER_SITES:= http://www.rahul.net/dholmes/ctorrent/ +WRKDIST= ${WRKDIR}/${PKG_NAME}-dnh2 +ifeq ($(ADK_COMPILE_CTORRENT_WITH_UCLIBCXX),y) +PKG_DEPEND:= uclibc++ +else +PKG_DEPEND:= libstdcxx +endif + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,CTORRENT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH},${PKG_DEPEND})) + +ifeq ($(ADK_COMPILE_CTORRENT_WITH_UCLIBCXX),y) +TCXXFLAGS+= -fno-builtin -fno-rtti -nostdinc++ +TLDFLAGS+= -lgcc_s -luClibc++ -lc -lm -nodefaultlibs +endif +CONFIGURE_STYLE= gnu +BUILD_STYLE= auto +INSTALL_STYLE= auto + +post-install: + ${INSTALL_DIR} ${IDIR_CTORRENT} + ${CP} ${WRKINST}/* ${IDIR_CTORRENT}/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/ctorrent/ipkg/ctorrent.control b/package/ctorrent/ipkg/ctorrent.control new file mode 100644 index 000000000..0b7d1d59e --- /dev/null +++ b/package/ctorrent/ipkg/ctorrent.control @@ -0,0 +1,4 @@ +Package: ctorrent +Priority: optional +Section: net +Description: console-based BitTorrent client diff --git a/package/ctorrent/patches/patch-btcontent_cpp b/package/ctorrent/patches/patch-btcontent_cpp new file mode 100644 index 000000000..e402465f8 --- /dev/null +++ b/package/ctorrent/patches/patch-btcontent_cpp @@ -0,0 +1,16 @@ +$Id$ +--- ctorrent-dnh2.orig/btcontent.cpp 2006-01-02 03:40:49.000000000 +0100 ++++ ctorrent-dnh2/btcontent.cpp 2007-01-22 23:43:50.000000000 +0100 +@@ -9,12 +9,8 @@ + #else + #include + #include +-#if defined(HAVE_LIBCRYPT) || defined(HAVE_LIBMD) || defined(HAVE_LIBCRYPTO) +-#include +-#elif defined(HAVE_LIBSSL) + #include + #endif +-#endif + + #include + #include diff --git a/package/ctorrent/patches/patch-btfiles_cpp b/package/ctorrent/patches/patch-btfiles_cpp new file mode 100644 index 000000000..e390083bb --- /dev/null +++ b/package/ctorrent/patches/patch-btfiles_cpp @@ -0,0 +1,16 @@ +$Id$ +--- ctorrent-dnh2.orig/btfiles.cpp 2006-01-02 03:41:21.000000000 +0100 ++++ ctorrent-dnh2/btfiles.cpp 2007-01-22 23:46:13.000000000 +0100 +@@ -8,12 +8,8 @@ + #include + #include + #include +-#if defined(HAVE_LIBCRYPT) || defined(HAVE_LIBMD) || defined(HAVE_LIBCRYPTO) +-#include +-#elif defined(HAVE_LIBSSL) + #include + #endif +-#endif + + #include + #include diff --git a/package/cups/Config.in b/package/cups/Config.in new file mode 100644 index 000000000..662ff5a84 --- /dev/null +++ b/package/cups/Config.in @@ -0,0 +1,10 @@ +config ADK_PACKAGE_CUPS + prompt "cups.............................. Common UNIX Printing System" + tristate + select ADK_PACKAGE_ZLIB + select ADK_PACKAGE_LIBPTHREAD + default n + help + A printer spooling system for devices with USB or LP support + + http://www.cups.org/ diff --git a/package/cups/Makefile b/package/cups/Makefile new file mode 100644 index 000000000..4d045c77b --- /dev/null +++ b/package/cups/Makefile @@ -0,0 +1,77 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= cups +PKG_VERSION:= 1.3.10 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 84fffe96b8537c81a463faccead80026 +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}-source.tar.bz2 +MASTER_SITES:= http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/cups/${PKG_VERSION}/ \ + ftp://ftp.easysw.com/pub/cups/${PKG_VERSION}/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,CUPS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +CONFIGURE_ENV+= ac_cv_func_sigset=no \ + OPTIM='' +CONFIGURE_ARGS+= --with-cups-user=root \ + --with-cups-group=root \ + --disable-ldap \ + --disable-gssapi \ + --disable-pam \ + --disable-pap \ + --disable-dbus \ + --without-java \ + --without-perl \ + --without-python \ + --without-php \ + --disable-slp \ + --disable-gnutls \ + --disable-openssl \ + --disable-cdsassl \ + --disable-dbus \ + --disable-ssl +BUILD_STYLE= auto +INSTALL_STYLE= auto +FAKE_FLAGS+= DSTROOT="${WRKINST}" STRIP="/bin/true" +XAKE_FLAGS+= OPTIM='' + +post-install: + ${INSTALL_DIR} ${IDIR_CUPS}/etc/init.d + ${INSTALL_DIR} ${IDIR_CUPS}/usr/share/doc/cups + ${INSTALL_DIR} ${IDIR_CUPS}/usr/bin + ${INSTALL_DIR} ${IDIR_CUPS}/usr/sbin + ${INSTALL_DIR} ${IDIR_CUPS}/etc/cups + ${INSTALL_DIR} ${IDIR_CUPS}/usr/lib/cups/cgi-bin + ${INSTALL_DIR} ${IDIR_CUPS}/usr/lib/cups/daemon + ${INSTALL_DIR} ${IDIR_CUPS}/usr/share/cups/banners + ${INSTALL_DIR} ${IDIR_CUPS}/usr/share/cups/templates + ${CP} ${WRKINST}/etc/cups/* ${IDIR_CUPS}/etc/cups/ + rm ${IDIR_CUPS}/etc/cups/cupsd.conf.default + ${CP} ${WRKINST}/usr/bin/* ${IDIR_CUPS}/usr/bin/ + ${CP} ${WRKINST}/usr/share/doc/cups/index.html \ + ${IDIR_CUPS}/usr/share/doc/cups/ + ${CP} ${WRKINST}/usr/share/doc/cups/*.css \ + ${IDIR_CUPS}/usr/share/doc/cups/ + ${CP} ${WRKINST}/usr/share/doc/cups/images \ + ${IDIR_CUPS}/usr/share/doc/cups/ + rm -f ${IDIR_CUPS}/usr/bin/cups-config + ${CP} ${WRKINST}/usr/lib/libcups.so* ${IDIR_CUPS}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/cups/cgi-bin/* ${IDIR_CUPS}/usr/lib/cups/cgi-bin/ + ${CP} ${WRKINST}/usr/lib/cups/daemon/* ${IDIR_CUPS}/usr/lib/cups/daemon/ + ${CP} ${WRKINST}/usr/share/cups/banners/* \ + ${IDIR_CUPS}/usr/share/cups/banners/ + ${CP} ${WRKINST}/usr/share/cups/templates/*.tmpl \ + ${IDIR_CUPS}/usr/share/cups/templates/ + ${CP} ${WRKINST}/usr/sbin/* ${IDIR_CUPS}/usr/sbin/ + ${CP} ./files/etc/cups/* ${IDIR_CUPS}/etc/cups/ + ${INSTALL_BIN} ./files/cupsd.init \ + ${IDIR_CUPS}/etc/init.d/cupsd + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/cups/files/cupsd.init b/package/cups/files/cupsd.init new file mode 100644 index 000000000..d22f55c96 --- /dev/null +++ b/package/cups/files/cupsd.init @@ -0,0 +1,28 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${cups:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + [ -d /var/cache/cups ] || mkdir -p /var/cache/cups + [ -d /var/cups ] || mkdir -p /var/cups/tmp + [ -d /var/cups/spool/cups/tmp ] || mkdir -p /var/cups/spool/cups/tmp + /usr/sbin/cupsd -c /etc/cups/cupsd.conf + ;; +stop) + killall cupsd + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + ;; +esac +exit $? diff --git a/package/cups/files/etc/cups/classes.conf b/package/cups/files/etc/cups/classes.conf new file mode 100644 index 000000000..15afda75a --- /dev/null +++ b/package/cups/files/etc/cups/classes.conf @@ -0,0 +1,7 @@ +######################################################################## +# # +# This is a sample class configuration file. This file is included # +# from the main configuration file (cups.conf) and lists all of the # +# printer classes known to the system. # +# # +######################################################################## diff --git a/package/cups/files/etc/cups/client.conf b/package/cups/files/etc/cups/client.conf new file mode 100644 index 000000000..c8d9f910e --- /dev/null +++ b/package/cups/files/etc/cups/client.conf @@ -0,0 +1,9 @@ +######################################################################## +# # +# This is the CUPS client configuration file. This file is used to # +# define client-specific parameters, such as the default server or # +# default encryption settings. # +# # +######################################################################## + +Encryption Never diff --git a/package/cups/files/etc/cups/cupsd.conf b/package/cups/files/etc/cups/cupsd.conf new file mode 100644 index 000000000..89aa40c2a --- /dev/null +++ b/package/cups/files/etc/cups/cupsd.conf @@ -0,0 +1,34 @@ +AccessLog syslog +ErrorLog syslog +LogLevel info +PageLog syslog +PreserveJobHistory No +PreserveJobFiles No +AutoPurgeJobs Yes +MaxJobs 25 +MaxPrinterHistory 10 +RequestRoot /tmp/cups +User cups +Group cups +RIPCache 512k +TempDir /tmp/cups +Port 631 +HostNameLookups Off +KeepAlive On +Browsing On +BrowseProtocols cups + + +AuthType Basic +AuthClass System +Order Allow,Deny +Allow From All + + + +AuthType Basic +AuthClass System +Order Allow,Deny +Allow From All + + diff --git a/package/cups/files/etc/cups/printers.conf b/package/cups/files/etc/cups/printers.conf new file mode 100644 index 000000000..88bba1b13 --- /dev/null +++ b/package/cups/files/etc/cups/printers.conf @@ -0,0 +1,23 @@ + +Info USB Printer +Location +DeviceURI usb:/dev/usb/lp0 +State Idle +Accepting Yes +JobSheets none none +QuotaPeriod 0 +PageLimit 0 +KLimit 0 + + + +Info Parallel Port Printer +Location +DeviceURI parallel:/dev/printers/0 +State Idle +Accepting Yes +JobSheets none none +QuotaPeriod 0 +PageLimit 0 +KLimit 0 + diff --git a/package/cups/ipkg/cups.conffiles b/package/cups/ipkg/cups.conffiles new file mode 100644 index 000000000..bed6faa3f --- /dev/null +++ b/package/cups/ipkg/cups.conffiles @@ -0,0 +1,4 @@ +/etc/cups/classes.conf +/etc/cups/client.conf +/etc/cups/cupsd.conf +/etc/cups/printers.conf diff --git a/package/cups/ipkg/cups.control b/package/cups/ipkg/cups.control new file mode 100644 index 000000000..de3d14250 --- /dev/null +++ b/package/cups/ipkg/cups.control @@ -0,0 +1,5 @@ +Package: cups +Priority: optional +Section: net +Depends: zlib, libpthread +Description: Common Unix Printing System diff --git a/package/cups/ipkg/cups.postinst b/package/cups/ipkg/cups.postinst new file mode 100644 index 000000000..fa191bee7 --- /dev/null +++ b/package/cups/ipkg/cups.postinst @@ -0,0 +1,6 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +gid=$(get_next_gid) +add_user cups $(get_next_uid) $gid /tmp +add_group cups $gid +add_rcconf cups cups NO diff --git a/package/cups/patches/patch-Makefile b/package/cups/patches/patch-Makefile new file mode 100644 index 000000000..663b989b9 --- /dev/null +++ b/package/cups/patches/patch-Makefile @@ -0,0 +1,12 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- cups-1.3.10.orig/Makefile 2009-03-12 22:34:21.000000000 +0100 ++++ cups-1.3.10/Makefile 2009-05-09 22:41:42.000000000 +0200 +@@ -19,7 +19,7 @@ include Makedefs + # Directories to make... + # + +-DIRS = cups backend berkeley cgi-bin filter locale man monitor \ ++DIRS = cups backend berkeley cgi-bin filter locale monitor \ + notifier scheduler systemv test \ + $(PHPDIR) \ + conf data doc $(FONTS) ppd templates diff --git a/package/cups/patches/patch-configure b/package/cups/patches/patch-configure new file mode 100644 index 000000000..773a2da96 --- /dev/null +++ b/package/cups/patches/patch-configure @@ -0,0 +1,12 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- cups-1.3.10.orig/configure 2009-04-16 22:02:06.000000000 +0200 ++++ cups-1.3.10/configure 2009-05-09 22:44:29.000000000 +0200 +@@ -9254,7 +9254,7 @@ if test "$libdir" = "\${exec_prefix}/lib + ;; + Linux*) + if test -d /usr/lib64; then +- libdir="$exec_prefix/lib64" ++ libdir="$exec_prefix/lib" + fi + ;; + HP-UX*) diff --git a/package/curl/Config.in b/package/curl/Config.in new file mode 100644 index 000000000..a74a823e2 --- /dev/null +++ b/package/curl/Config.in @@ -0,0 +1,26 @@ +config ADK_COMPILE_CURL + tristate + default n + depends ADK_PACKAGE_LIBCURL + +config ADK_PACKAGE_LIBCURL + prompt "libcurl........................... A client-side URL transfer library" + tristate + default n + select ADK_COMPILE_CURL + select ADK_PACKAGE_LIBOPENSSL + select ADK_PACKAGE_ZLIB + help + A client-side URL transfer library. + + http://curl.haxx.se/ + +config ADK_PACKAGE_CURL + prompt "curl............................ A client-side URL transfer tool" + tristate + default n + depends ADK_PACKAGE_LIBCURL + help + A client-side URL transfer tool. + + http://curl.haxx.se/ diff --git a/package/curl/Makefile b/package/curl/Makefile new file mode 100644 index 000000000..1d6f4855c --- /dev/null +++ b/package/curl/Makefile @@ -0,0 +1,55 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= curl +PKG_VERSION:= 7.19.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 35f51ac7bcff689b2d2d6e38a3c4d1ae +MASTER_SITES:= http://curl.haxx.se/download/ \ + http://www.mirrorspace.org/curl/ \ + http://curl.mirror.internet.tp/download/ \ + ftp://ftp.sunet.se/pub/www/utilities/curl/ \ + ftp://ftp.planetmirror.com/pub/curl/ \ + http://www.mirrormonster.com/curl/download/ \ + http://curl.mirrors.cyberservers.net/download/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,CURL,curl,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,LIBCURL,libcurl,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS+= --disable-thread \ + --enable-cookies \ + --enable-crypto-auth \ + --enable-nonblocking \ + --enable-file \ + --enable-ftp \ + --enable-http \ + --disable-ares \ + --disable-dict \ + --disable-gopher \ + --disable-ldap \ + --disable-manual \ + --disable-sspi \ + --disable-telnet \ + --disable-verbose \ + --with-random="/dev/urandom" \ + --with-ssl="${STAGING_DIR}/usr" \ + --without-ca-bundle \ + --without-gnutls \ + --without-libidn +BUILD_STYLE= auto +INSTALL_STYLE= auto + +post-install: + ${INSTALL_DIR} ${IDIR_CURL}/usr/bin + ${CP} ${WRKINST}/usr/bin/curl ${IDIR_CURL}/usr/bin/ + ${INSTALL_DIR} ${IDIR_LIBCURL}/usr/lib + ${CP} ${WRKINST}/usr/lib/libcurl.so.* ${IDIR_LIBCURL}/usr/lib/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/curl/ipkg/curl.control b/package/curl/ipkg/curl.control new file mode 100644 index 000000000..2678e0430 --- /dev/null +++ b/package/curl/ipkg/curl.control @@ -0,0 +1,5 @@ +Package: curl +Priority: optional +Section: net +Description: a client-side URL transfer tool +Depends: libcurl diff --git a/package/curl/ipkg/libcurl.control b/package/curl/ipkg/libcurl.control new file mode 100644 index 000000000..435a3192a --- /dev/null +++ b/package/curl/ipkg/libcurl.control @@ -0,0 +1,5 @@ +Package: libcurl +Priority: optional +Section: libs +Description: a client-side URL transfer library +Depends: libopenssl, zlib diff --git a/package/curl/patches/patch-configure b/package/curl/patches/patch-configure new file mode 100644 index 000000000..d046721f0 --- /dev/null +++ b/package/curl/patches/patch-configure @@ -0,0 +1,24 @@ +$Id$ + + Don't do *THAT* for cross-compiling. + +--- curl-7.16.3.orig/configure 2007-06-25 11:18:41.000000000 +0200 ++++ curl-7.16.3/configure 2007-08-02 17:44:28.000000000 +0200 +@@ -25783,17 +25783,6 @@ fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +- +- if test "$OPENSSL_ENABLED" = "1"; then +- if test -n "$LIB_OPENSSL"; then +- +- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL" +- export LD_LIBRARY_PATH +- { echo "$as_me:$LINENO: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&5 +-echo "$as_me: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&6;} +- fi +- fi +- + fi + + diff --git a/package/cutter/Config.in b/package/cutter/Config.in new file mode 100644 index 000000000..5d027b689 --- /dev/null +++ b/package/cutter/Config.in @@ -0,0 +1,10 @@ +config ADK_PACKAGE_CUTTER + prompt "cutter............................ allows an user to abort TCP/IP connections" + tristate + default n + help + "Cutter" is an open source program that allows Linux firewall + administrators to abort TCP/IP connections routed over the + firewall or router on which it is run. + + http://www.lowth.com/cutter/ diff --git a/package/cutter/Makefile b/package/cutter/Makefile new file mode 100755 index 000000000..68af7df76 --- /dev/null +++ b/package/cutter/Makefile @@ -0,0 +1,26 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= cutter +PKG_VERSION:= 1.03 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 50093db9b64277643969ee75b83ebbd1 +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tgz +MASTER_SITES:= http://www.lowth.com/cutter/software/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,CUTTER,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +do-build: + ${TARGET_CC} ${WRKBUILD}/cutter.c -o ${WRKBUILD}/cutter + +do-install: + ${INSTALL_DIR} ${IDIR_CUTTER}/usr/sbin + ${INSTALL_BIN} ${WRKBUILD}/cutter ${IDIR_CUTTER}/usr/sbin + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/cutter/ipkg/cutter.control b/package/cutter/ipkg/cutter.control new file mode 100644 index 000000000..6c9169222 --- /dev/null +++ b/package/cutter/ipkg/cutter.control @@ -0,0 +1,5 @@ +Package: cutter +Architecture: mipsel +Section: net +Description: "Cutter" is an open source program that allows Linux firewall administrators to abort TCP/IP connections routed over the firewall or router on which it is run. +Priority: optional diff --git a/package/cutter/patches/patch-cutter_c b/package/cutter/patches/patch-cutter_c new file mode 100644 index 000000000..781c17401 --- /dev/null +++ b/package/cutter/patches/patch-cutter_c @@ -0,0 +1,21 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- cutter-1.03.orig/cutter.c 2005-04-30 09:01:03.000000000 +0200 ++++ cutter-1.03/cutter.c 2008-10-09 11:32:40.000000000 +0200 +@@ -297,7 +297,7 @@ int send_rst( + pheader.placeholder=0; + pheader.protocol=IPPROTO_TCP; + pheader.tcp_length=htons(TCPHDR); +- bcopy((char *)&tpack.tcp,(char *)&pheader.tcp,TCPHDR); ++ memcpy((char *)&pheader.tcp,(char *)&tpack.tcp,TCPHDR); + tpack.tcp.check=in_cksum((unsigned short *)&pheader,TCPHDR+12); + + /* +@@ -419,7 +419,7 @@ int send_rst( + pheader.placeholder=0; + pheader.protocol=IPPROTO_TCP; + pheader.tcp_length=htons(TCPHDR); +- bcopy((char *)&tpack.tcp,(char *)&pheader.tcp,TCPHDR); ++ memcpy((char *)&pheader.tcp,(char *)&tpack.tcp,TCPHDR); + tpack.tcp.check=in_cksum((unsigned short *)&pheader,TCPHDR+12); + + i_result = sendto(raw_sock,&tpack,PACKETSIZE,0,(void*)&hisaddr,sizeof(hisaddr)); diff --git a/package/cxxtools/Config.in b/package/cxxtools/Config.in new file mode 100644 index 000000000..bdc0168a7 --- /dev/null +++ b/package/cxxtools/Config.in @@ -0,0 +1,26 @@ +config ADK_PACKAGE_CXXTOOLS + prompt "cxxtools.......................... cxxtools" + tristate + default n + depends on ADK_CXX + select ADK_PACKAGE_LIBICONV + help + http://www.tntnet.org + +choice +prompt "C++ library to use" +depends on ADK_PACKAGE_CXXTOOLS +default ADK_COMPILE_CXXTOOLS_WITH_STDCXX if ADK_TARGET_LIB_GLIBC +default ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX if ADK_TARGET_LIB_UCLIBC + +config ADK_COMPILE_CXXTOOLS_WITH_STDCXX + bool "Standard C++ library" + select ADK_PACKAGE_LIBSTDCXX + help + +config ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX + bool "Embedded uClibc++ library" + select ADK_PACKAGE_UCLIBCXX + help + +endchoice diff --git a/package/cxxtools/Makefile b/package/cxxtools/Makefile new file mode 100644 index 000000000..42c2042c6 --- /dev/null +++ b/package/cxxtools/Makefile @@ -0,0 +1,44 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= cxxtools +PKG_VERSION:= 1.4.8 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 16ce92a83beb925fa5138fc9a52d55af +MASTER_SITES:= http://www.tntnet.org/download/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,CXXTOOLS,cxxtools,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y) +TCXXFLAGS+= -fno-builtin -nostdinc++ -I${STAGING_DIR}/usr/include/uClibc++ +TLDFLAGS+= -luClibc++ -liconv -lm -nodefaultlibs +DEPENDS= "libgcc, uclibc++, libiconv" +else +TLDFLAGS+= -liconv -shared +DEPENDS= "libgcc, libiconv, libstdcxx" +endif + +CONFIGURE_STYLE:= gnu +CONFIGURE_ARGS+= --with-libiconv-prefix='${STAGING_DIR}/usr' +BUILD_STYLE:= auto +INSTALL_STYLE:= auto confprog + +ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y) +# add workaround because libtool tries to link libstdc++ +post-configure: + ${SED} 's#postdeps="-lstdc.*#postdeps=""#' \ + ${WRKBUILD}/libtool +endif + +post-install: + ${INSTALL_DIR} ${IDIR_CXXTOOLS}/usr/lib + ${CP} ${WRKINST}/usr/lib/libcxxtools.so.* ${IDIR_CXXTOOLS}/usr/lib/ + echo Depends: ${DEPENDS} >>${IDIR_CXXTOOLS}/CONTROL/control + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/cxxtools/ipkg/cxxtools.control b/package/cxxtools/ipkg/cxxtools.control new file mode 100644 index 000000000..130236235 --- /dev/null +++ b/package/cxxtools/ipkg/cxxtools.control @@ -0,0 +1,4 @@ +Package: cxxtools +Priority: optional +Section: net +Description: cxxtools diff --git a/package/cxxtools/patches/patch-demo_Makefile_in b/package/cxxtools/patches/patch-demo_Makefile_in new file mode 100644 index 000000000..0fcb3bca3 --- /dev/null +++ b/package/cxxtools/patches/patch-demo_Makefile_in @@ -0,0 +1,67 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- cxxtools-1.4.8.orig/demo/Makefile.in 2008-05-26 19:51:34.000000000 +0200 ++++ cxxtools-1.4.8/demo/Makefile.in 2009-04-28 22:29:02.476545131 +0200 +@@ -40,7 +40,7 @@ host_triplet = @host@ + noinst_PROGRAMS = arg$(EXEEXT) arg-set$(EXEEXT) cgi$(EXEEXT) \ + dir$(EXEEXT) dlloader$(EXEEXT) dynbuffer$(EXEEXT) \ + getini$(EXEEXT) hd$(EXEEXT) httprequest$(EXEEXT) \ +- iconv$(EXEEXT) log$(EXEEXT) logbench$(EXEEXT) logsh$(EXEEXT) \ ++ log$(EXEEXT) logbench$(EXEEXT) logsh$(EXEEXT) \ + md5sum$(EXEEXT) mime$(EXEEXT) multifstream$(EXEEXT) \ + netcat$(EXEEXT) netio$(EXEEXT) netmsg$(EXEEXT) \ + pipestream$(EXEEXT) pool$(EXEEXT) signals$(EXEEXT) \ +@@ -96,10 +96,6 @@ am_httprequest_OBJECTS = httprequest.$(O + httprequest_OBJECTS = $(am_httprequest_OBJECTS) + httprequest_LDADD = $(LDADD) + httprequest_DEPENDENCIES = $(top_builddir)/src/libcxxtools.la +-am_iconv_OBJECTS = iconv.$(OBJEXT) +-iconv_OBJECTS = $(am_iconv_OBJECTS) +-iconv_LDADD = $(LDADD) +-iconv_DEPENDENCIES = $(top_builddir)/src/libcxxtools.la + am_log_OBJECTS = log.$(OBJEXT) + log_OBJECTS = $(am_log_OBJECTS) + log_LDADD = $(LDADD) +@@ -170,7 +166,7 @@ CXXLINK = $(LIBTOOL) --tag=CXX --mode=li + SOURCES = $(arg_SOURCES) $(arg_set_SOURCES) $(cgi_SOURCES) \ + $(cxxlog_SOURCES) $(dir_SOURCES) $(dlloader_SOURCES) \ + $(dynbuffer_SOURCES) $(getini_SOURCES) $(hd_SOURCES) \ +- $(httprequest_SOURCES) $(iconv_SOURCES) $(log_SOURCES) \ ++ $(httprequest_SOURCES) $(log_SOURCES) \ + $(logbench_SOURCES) $(logsh_SOURCES) $(md5sum_SOURCES) \ + $(mime_SOURCES) $(multifstream_SOURCES) $(netcat_SOURCES) \ + $(netio_SOURCES) $(netmsg_SOURCES) $(pipestream_SOURCES) \ +@@ -179,7 +175,7 @@ SOURCES = $(arg_SOURCES) $(arg_set_SOURC + DIST_SOURCES = $(arg_SOURCES) $(arg_set_SOURCES) $(cgi_SOURCES) \ + $(cxxlog_SOURCES) $(dir_SOURCES) $(dlloader_SOURCES) \ + $(dynbuffer_SOURCES) $(getini_SOURCES) $(hd_SOURCES) \ +- $(httprequest_SOURCES) $(iconv_SOURCES) $(log_SOURCES) \ ++ $(httprequest_SOURCES) $(log_SOURCES) \ + $(logbench_SOURCES) $(logsh_SOURCES) $(md5sum_SOURCES) \ + $(mime_SOURCES) $(multifstream_SOURCES) $(netcat_SOURCES) \ + $(netio_SOURCES) $(netmsg_SOURCES) $(pipestream_SOURCES) \ +@@ -319,7 +315,6 @@ dynbuffer_SOURCES = dynbuffer.cpp + getini_SOURCES = getini.cpp + hd_SOURCES = hd.cpp + httprequest_SOURCES = httprequest.cpp +-iconv_SOURCES = iconv.cpp + log_SOURCES = log.cpp + logbench_SOURCES = logbench.cpp + logsh_SOURCES = logsh.cpp +@@ -415,9 +410,6 @@ hd$(EXEEXT): $(hd_OBJECTS) $(hd_DEPENDEN + httprequest$(EXEEXT): $(httprequest_OBJECTS) $(httprequest_DEPENDENCIES) + @rm -f httprequest$(EXEEXT) + $(CXXLINK) $(httprequest_LDFLAGS) $(httprequest_OBJECTS) $(httprequest_LDADD) $(LIBS) +-iconv$(EXEEXT): $(iconv_OBJECTS) $(iconv_DEPENDENCIES) +- @rm -f iconv$(EXEEXT) +- $(CXXLINK) $(iconv_LDFLAGS) $(iconv_OBJECTS) $(iconv_LDADD) $(LIBS) + log$(EXEEXT): $(log_OBJECTS) $(log_DEPENDENCIES) + @rm -f log$(EXEEXT) + $(CXXLINK) $(log_LDFLAGS) $(log_OBJECTS) $(log_LDADD) $(LIBS) +@@ -477,7 +469,6 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getini.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hd.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httprequest.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iconv.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logbench.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logsh.Po@am__quote@ diff --git a/package/cyrus-sasl/Config.in b/package/cyrus-sasl/Config.in new file mode 100644 index 000000000..6a03bbfb4 --- /dev/null +++ b/package/cyrus-sasl/Config.in @@ -0,0 +1,14 @@ +config ADK_COMPILE_CYRUS_SASL + tristate + default n + depends ADK_PACKAGE_LIBSASL2 + +config ADK_PACKAGE_LIBSASL2 + prompt "libsasl2.......................... General purpose authentication library" + tristate + default n + select ADK_COMPILE_CYRUS_SASL + help + A general purpose authentication library. + + http://asg.web.cmu.edu/sasl/ diff --git a/package/cyrus-sasl/Makefile b/package/cyrus-sasl/Makefile new file mode 100644 index 000000000..56a1d3838 --- /dev/null +++ b/package/cyrus-sasl/Makefile @@ -0,0 +1,74 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= cyrus-sasl +PKG_VERSION:= 2.1.22 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 45dde9d19193ae9dd388eb68b2027bc9 +MASTER_SITES:= http://ftp.andrew.cmu.edu/pub/cyrus-mail/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,LIBSASL2,libsasl2,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS+= --disable-sample \ + --enable-staticdlopen \ + --disable-java \ + --disable-alwaystrue \ + --disable-checkapop \ + --enable-cram \ + --enable-digest \ + --disable-otp \ + --disable-srp \ + --disable-srp-setpass \ + --disable-krb4 \ + --disable-gssapi \ + --disable-gss_mutexes \ + --enable-plain \ + --enable-anon \ + --disable-login \ + --disable-ntlm \ + --disable-sql \ + --without-dblib \ + --without-gdbm \ + --with-devrandom="/dev/urandom" \ + --without-pam \ + --without-saslauthd \ + --without-authdaemond \ + --without-pwcheck \ + --with-ipctype=unix \ + --with-openssl="${STAGING_DIR}/usr" \ + --without-des \ + --without-opie \ + --without-ldap \ + --without-mysql \ + --without-pgsql \ + --without-sqlite \ + --without-rc4 \ + --without-dmalloc \ + --without-sfio \ + --disable-static +BUILD_STYLE= auto +INSTALL_STYLE= auto + +pre-build: + ${MAKE} -C ${WRKBUILD}/include \ + CC="${HOSTCC}" \ + LINK="${HOSTCC} -o makemd5 -lc" \ + LIBS="" \ + CFLAGS="" \ + LDFLAGS="" \ + CPPFLAGS="" \ + makemd5 + +post-install: + ${INSTALL_DIR} ${IDIR_LIBSASL2}/usr/lib/sasl2 + ${CP} ${WRKINST}/usr/lib/libsasl2.so.* ${IDIR_LIBSASL2}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/sasl2/lib*.so.* ${IDIR_LIBSASL2}/usr/lib/sasl2/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/cyrus-sasl/ipkg/libsasl2.control b/package/cyrus-sasl/ipkg/libsasl2.control new file mode 100644 index 000000000..82e0f0a48 --- /dev/null +++ b/package/cyrus-sasl/ipkg/libsasl2.control @@ -0,0 +1,4 @@ +Package: libsasl2 +Priority: optional +Section: libs +Description: a general purpose authentication library diff --git a/package/damageproto/Config.in b/package/damageproto/Config.in new file mode 100644 index 000000000..93fdbbffe --- /dev/null +++ b/package/damageproto/Config.in @@ -0,0 +1,6 @@ +config ADK_PACKAGE_DAMAGEPROTO + prompt "damageproto............................. X protocol library" + tristate + default n + help + http://www.x.org diff --git a/package/damageproto/Makefile b/package/damageproto/Makefile new file mode 100644 index 000000000..6b7f45e7a --- /dev/null +++ b/package/damageproto/Makefile @@ -0,0 +1,20 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= damageproto +PKG_VERSION:= 1.1.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= bce4477a6edd774dfca175ea46e1ba76 +MASTER_SITES:= ${MASTER_SITE_XORG} + +include $(TOPDIR)/mk/package.mk + +CONFIGURE_STYLE= gnu +BUILD_STYLE= auto +INSTALL_STYLE= auto confprog + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/davfs2/Config.in b/package/davfs2/Config.in new file mode 100644 index 000000000..d1f1c2a6d --- /dev/null +++ b/package/davfs2/Config.in @@ -0,0 +1,43 @@ +config ADK_PACKAGE_DAVFS2 + prompt "davfs2............................ WebDAV filesystem" + tristate + default n + select ADK_PACKAGE_LIBICONV + select ADK_PACKAGE_NEON + help + WebDAV is an extension to HTTP that allows remote collaborative + authoring of Web resources, defined in RFC 2518. + + davfs2 is a Linux file system driver that allows you to mount a + WebDAV server as a local file system, like a disk drive. This + way applications can access resources on a Web server without + knowing anything about HTTP or WebDAV. + + davfs2 runs as a daemon in userspace. It uses the kernel file + system coda or fuse. To connect to the WebDAV + server it makes use of the neon library. Neon supports TLS/SSL + (using OpenSSL or GnuTLS) and access via proxy server. + + davfs2 allows you to e.g. + * use a WebDAV server as workspace for a geographically + distributed work group. + * save documents on a WebDAV server and access and edit them + via internet from wherever you want. + * edit a web site in place, using your preferred development + tools. + +choice +prompt "kernel filesystem interface" +depends on ADK_PACKAGE_DAVFS2 + +config ADK_PACKAGE_DAVFS2_FUSE + bool "use the FUSE filesystem interface" + select ADK_PACKAGE_FUSE_UTILS +config ADK_PACKAGE_DAVFS2_CODA + bool "use the CODA filesystem interface" + select ADK_KPACKAGE_KMOD_CODA_FS +config ADK_PACKAGE_DAVFS2_BOTH + bool "use both filesystem interfaces" + select ADK_PACKAGE_FUSE_UTILS + select ADK_KPACKAGE_KMOD_CODA_FS +endchoice diff --git a/package/davfs2/Makefile b/package/davfs2/Makefile new file mode 100644 index 000000000..bb09a8b1e --- /dev/null +++ b/package/davfs2/Makefile @@ -0,0 +1,43 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME= davfs2 +PKG_VERSION= 1.3.3 +PKG_RELEASE= 1 +PKG_MD5SUM= 57def26e4d6d63527e01612d10fd0515 +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=dav/} + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,DAVFS2,davfs2,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS+= --with-neon +CONFIGURE_ENV+= LIBS=-liconv +BUILD_STYLE= auto +INSTALL_STYLE= auto + +ifeq (${ADK_PACKAGE_DAVFS2_FUSE},y) +DEPS= fuse-utils, kmod-fuse, libfuse, libiconv, neon +else ifeq (${ADK_PACKAGE_DAVFS2_CODA},y) +DEPS= kmod-fs-coda, libiconv, neon +else +DEPS= kmod-fs-coda, fuse-utils, kmod-fuse, libfuse, libiconv, neon +endif + +post-install: + ${INSTALL_DIR} ${IDIR_DAVFS2}/etc/davfs2 + ${INSTALL_DIR} ${IDIR_DAVFS2}/usr/sbin + $(CP) ${WRKINST}/etc/davfs2/{davfs2.conf,secrets} \ + ${IDIR_DAVFS2}/etc/davfs2 + ${INSTALL_BIN} ${WRKINST}/usr/sbin/mount.davfs \ + ${IDIR_DAVFS2}/usr/sbin + ${INSTALL_BIN} ${WRKINST}/usr/sbin/umount.davfs \ + ${IDIR_DAVFS2}/usr/sbin + echo 'Depends: ${DEPS}' >>${IDIR_DAVFS2}/CONTROL/control + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/davfs2/ipkg/davfs2.conffiles b/package/davfs2/ipkg/davfs2.conffiles new file mode 100644 index 000000000..c831d9d59 --- /dev/null +++ b/package/davfs2/ipkg/davfs2.conffiles @@ -0,0 +1,2 @@ +/etc/davfs2/davfs2.conf +/etc/davfs2/secrets diff --git a/package/davfs2/ipkg/davfs2.control b/package/davfs2/ipkg/davfs2.control new file mode 100644 index 000000000..87d85e9df --- /dev/null +++ b/package/davfs2/ipkg/davfs2.control @@ -0,0 +1,4 @@ +Package: davfs2 +Priority: optional +Section: admin +Description: WebDAV filesystem diff --git a/package/davfs2/ipkg/davfs2.postinst b/package/davfs2/ipkg/davfs2.postinst new file mode 100644 index 000000000..1d333c4a6 --- /dev/null +++ b/package/davfs2/ipkg/davfs2.postinst @@ -0,0 +1,5 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +gid=$(get_next_gid) +add_group davfs2 $gid +add_user davfs2 $(get_next_uid) $gid /nonexistent diff --git a/package/davfs2/patches/patch-src_cache_c b/package/davfs2/patches/patch-src_cache_c new file mode 100644 index 000000000..ac8b0b4f1 --- /dev/null +++ b/package/davfs2/patches/patch-src_cache_c @@ -0,0 +1,11 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- davfs2-1.3.3.orig/src/cache.c 2008-06-24 21:32:50.000000000 +0200 ++++ davfs2-1.3.3/src/cache.c 2008-12-08 00:06:51.000000000 +0100 +@@ -23,7 +23,6 @@ + + #include "config.h" + +-#include + #include + #include + #include diff --git a/package/davfs2/patches/patch-src_dav_coda2_c b/package/davfs2/patches/patch-src_dav_coda2_c new file mode 100644 index 000000000..1ef269348 --- /dev/null +++ b/package/davfs2/patches/patch-src_dav_coda2_c @@ -0,0 +1,11 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- davfs2-1.3.3.orig/src/dav_coda2.c 2008-02-02 23:23:45.000000000 +0100 ++++ davfs2-1.3.3/src/dav_coda2.c 2008-12-08 00:07:35.000000000 +0100 +@@ -23,7 +23,6 @@ + + #include "config.h" + +-#include + #include + #include + #include diff --git a/package/davfs2/patches/patch-src_dav_coda3_c b/package/davfs2/patches/patch-src_dav_coda3_c new file mode 100644 index 000000000..9a4bee68b --- /dev/null +++ b/package/davfs2/patches/patch-src_dav_coda3_c @@ -0,0 +1,11 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- davfs2-1.3.3.orig/src/dav_coda3.c 2008-02-02 23:24:10.000000000 +0100 ++++ davfs2-1.3.3/src/dav_coda3.c 2008-12-08 00:08:00.000000000 +0100 +@@ -23,7 +23,6 @@ + + #include "config.h" + +-#include + #include + #include + #include diff --git a/package/davfs2/patches/patch-src_dav_fuse5_c b/package/davfs2/patches/patch-src_dav_fuse5_c new file mode 100644 index 000000000..21c92b9a5 --- /dev/null +++ b/package/davfs2/patches/patch-src_dav_fuse5_c @@ -0,0 +1,11 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- davfs2-1.3.3.orig/src/dav_fuse5.c 2008-04-05 20:36:06.000000000 +0200 ++++ davfs2-1.3.3/src/dav_fuse5.c 2008-12-08 00:08:26.000000000 +0100 +@@ -23,7 +23,6 @@ + + #include "config.h" + +-#include + #include + #include + #include diff --git a/package/davfs2/patches/patch-src_dav_fuse7_c b/package/davfs2/patches/patch-src_dav_fuse7_c new file mode 100644 index 000000000..846f4a98a --- /dev/null +++ b/package/davfs2/patches/patch-src_dav_fuse7_c @@ -0,0 +1,11 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- davfs2-1.3.3.orig/src/dav_fuse7.c 2008-04-09 21:43:34.000000000 +0200 ++++ davfs2-1.3.3/src/dav_fuse7.c 2008-12-08 00:08:32.000000000 +0100 +@@ -23,7 +23,6 @@ + + #include "config.h" + +-#include + #include + #include + #include diff --git a/package/davfs2/patches/patch-src_kernel_interface_c b/package/davfs2/patches/patch-src_kernel_interface_c new file mode 100644 index 000000000..15d5c909b --- /dev/null +++ b/package/davfs2/patches/patch-src_kernel_interface_c @@ -0,0 +1,31 @@ +$Id$ +--- davfs2-1.3.3.orig/src/kernel_interface.c 2008-04-05 20:43:04.000000000 +0200 ++++ davfs2-1.3.3/src/kernel_interface.c 2008-12-08 00:09:01.000000000 +0100 +@@ -23,7 +23,6 @@ + + #include "config.h" + +-#include + #include + #include + #include +@@ -173,7 +172,8 @@ static int init_coda(int *dev, dav_run_m + } + + if (*dev <= 0) { +- system("/sbin/modprobe coda &>/dev/null"); ++ system("/sbin/insmod coda"); ++ sleep(1); + minor = 0; + while (*dev <= 0 && minor < MAX_CODADEVS) { + char *path; +@@ -240,7 +240,8 @@ static int init_fuse(int *dev, dav_run_m + + *dev = open(path, O_RDWR | O_NONBLOCK); + if (*dev <= 0) { +- system("/sbin/modprobe fuse &>/dev/null"); ++ system("/sbin/insmod fuse"); ++ sleep(1); + *dev = open(path, O_RDWR | O_NONBLOCK); + } + if (*dev <= 0) { diff --git a/package/davfs2/patches/patch-src_mount_davfs_c b/package/davfs2/patches/patch-src_mount_davfs_c new file mode 100644 index 000000000..ba0c030f2 --- /dev/null +++ b/package/davfs2/patches/patch-src_mount_davfs_c @@ -0,0 +1,69 @@ +$Id$ +--- davfs2-1.3.3.orig/src/mount_davfs.c 2008-06-30 20:29:42.000000000 +0200 ++++ davfs2-1.3.3/src/mount_davfs.c 2008-12-08 00:20:01.000000000 +0100 +@@ -23,12 +23,10 @@ + + #include "config.h" + +-#include + #include + #include + #include + #include +-#include + #include + #include + #include +@@ -602,15 +600,18 @@ static char *check_double_mounts(dav_arg + free to choose them. They should be configured in davfs2.conf anyway. */ + static void check_fstab(const dav_args *args) { + ++#if 0 + dav_args *n_args = new_args(); + n_args->mopts = DAV_USER_MOPTS; + + setfsent(); + struct fstab *ft = getfsfile(mpoint); + if (ft == NULL) ++#endif + error(EXIT_FAILURE, 0, _("no entry for %s found in %s"), url, +- _PATH_FSTAB); ++ "/etc/fstab"); + ++#if 0 + if (strcmp(url, ft->fs_spec) != 0) { + char *fstab_url = decode_octal(ft->fs_spec); + if (strcmp(url, fstab_url) != 0) +@@ -642,6 +643,7 @@ static void check_fstab(const dav_args * + + endfsent(); + delete_args(n_args); ++#endif + } + + +@@ -661,7 +663,7 @@ static void check_mountpoint(dav_args *a + struct passwd *pw; + + if (*mpoint != '/') { +- char *mp = canonicalize_file_name(mpoint); ++ char *mp = realpath(mpoint, NULL); + if (mp == NULL) + error(EXIT_FAILURE, 0, + _("can't evaluate path of mount point %s"), mpoint); +@@ -1754,6 +1756,7 @@ static dav_args *new_args(void) { + + static void log_dbg_config(char *argv[], dav_args *args) { + ++ /* + size_t len; + char * cmdline; + if (argz_create(argv, &cmdline, &len) == 0) { +@@ -1761,6 +1764,7 @@ static void log_dbg_config(char *argv[], + syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), cmdline); + free(cmdline); + } ++ */ + + syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), + "Configuration:"); diff --git a/package/davfs2/patches/patch-src_umount_davfs_c b/package/davfs2/patches/patch-src_umount_davfs_c new file mode 100644 index 000000000..387476f39 --- /dev/null +++ b/package/davfs2/patches/patch-src_umount_davfs_c @@ -0,0 +1,12 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- davfs2-1.3.3.orig/src/umount_davfs.c 2008-01-11 22:40:18.000000000 +0100 ++++ davfs2-1.3.3/src/umount_davfs.c 2008-12-08 00:38:43.000000000 +0100 +@@ -114,7 +114,7 @@ int main(int argc, char *argv[]) { + if (optind < (argc - 1)) + error(EXIT_FAILURE, 0, _("too many arguments")); + +- char *mpoint = canonicalize_file_name(argv[optind]); ++ char *mpoint = realpath(argv[optind], NULL); + if (mpoint == NULL) + mpoint = argv[optind]; + if (mpoint == NULL || *mpoint != '/') diff --git a/package/davfs2/patches/patch-src_webdav_c b/package/davfs2/patches/patch-src_webdav_c new file mode 100644 index 000000000..35ad27492 --- /dev/null +++ b/package/davfs2/patches/patch-src_webdav_c @@ -0,0 +1,55 @@ +$Id$ + + cf. http://sourceforge.net/tracker/index.php?func=detail&aid=1594808&group_id=26275&atid=386747 + +--- davfs2-1.3.3.orig/src/webdav.c 2008-06-28 19:20:07.000000000 +0200 ++++ davfs2-1.3.3/src/webdav.c 2008-12-08 00:37:23.000000000 +0100 +@@ -23,7 +23,6 @@ + + #include "config.h" + +-#include + #include + #include + #include +@@ -34,6 +33,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -406,6 +406,11 @@ void dav_init_webdav(const char *scheme, + suri = (ne_uri *) ne_calloc(sizeof(ne_uri)); + ne_fill_server_uri(session, suri); + ++ /* begin of GMX hack */ ++ ne_server_capabilities caps; ++ ne_options(session, "/", &caps); ++ /* end of GMX hack */ ++ + if (use_locks) { + locks = ne_lockstore_create(); + if (lock_owner == NULL) { +@@ -1859,13 +1864,18 @@ static int ssl_verify(void *userdata, in + "or there might be a man-in-the-middle-attack.\n")); + printf(_("Accept certificate for this session? [y,N] ")); + char *s = NULL; ++ regex_t *re; + size_t n = 0; + ssize_t len = 0; + len = getline(&s, &n, stdin); + if (len < 0) + abort(); +- if (rpmatch(s) < 1) +- ret = -1; ++ if (regcomp(&re, "^[yY]", REG_EXTENDED) != 0) { ++ if (regexec(&re, s, (size_t)0, NULL, 0) < 1) { ++ regfree(&re); ++ ret = -1; ++ } ++ } + free(s); + } + } diff --git a/package/dbus/Config.in b/package/dbus/Config.in new file mode 100644 index 000000000..8e8ca33fc --- /dev/null +++ b/package/dbus/Config.in @@ -0,0 +1,10 @@ +config ADK_PACKAGE_DBUS + prompt "dbus.............................. DBUS library" + tristate + default n + select ADK_PACKAGE_LIBEXPAT + help + DBUS library. + + http://www.freedesktop.org/wiki/Software/dbus + diff --git a/package/dbus/Makefile b/package/dbus/Makefile new file mode 100644 index 000000000..09219b38a --- /dev/null +++ b/package/dbus/Makefile @@ -0,0 +1,47 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= dbus +PKG_VERSION:= 1.0.2 +PKG_RELEASE:= 7 +PKG_MD5SUM:= 0552a9b54beb4a044951b7cdbc8fc855 +MASTER_SITES:= http://dbus.freedesktop.org/releases/dbus/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,DBUS,dbus,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE:= gnu +CONFIGURE_ARGS+= --disable-tests \ + --disable-abstract-sockets \ + --without-x \ + --enable-checks \ + --with-xml=expat \ + --disable-dnotify \ + --disable-kqueue \ + --disable-xml-docs \ + --disable-doxygen-docs +CONFIGURE_ENV+= ac_cv_have_abstract_sockets=no +BUILD_STYLE:= auto +INSTALL_STYLE:= confprog auto + +post-install: + ${INSTALL_DIR} ${IDIR_DBUS}/etc + ${INSTALL_DIR} ${IDIR_DBUS}/usr/lib + ${INSTALL_DIR} ${IDIR_DBUS}/usr/bin + ${INSTALL_DIR} $(STAGING_DIR)/usr/include/dbus-1.0/dbus + ${CP} ${WRKINST}/etc/dbus-1 ${IDIR_DBUS}/etc/ + ${CP} ${WRKINST}/usr/lib/libdbus-1.so.* ${IDIR_DBUS}/usr/lib/ + $(CP) $(WRKINST)/usr/lib/dbus-1.0/include/dbus/dbus-arch-deps.h \ + $(STAGING_DIR)/usr/include/dbus-1.0/dbus/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/dbus-daemon ${IDIR_DBUS}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/dbus-launch ${IDIR_DBUS}/usr/bin/ + ${INSTALL_DIR} ${IDIR_DBUS}/etc/init.d + ${INSTALL_BIN} ./files/dbus.init \ + ${IDIR_DBUS}/etc/init.d/dbus + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/dbus/files/dbus.init b/package/dbus/files/dbus.init new file mode 100644 index 000000000..dd1761271 --- /dev/null +++ b/package/dbus/files/dbus.init @@ -0,0 +1,27 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${dbus:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + mkdir -p /var/run/dbus + dbus-daemon --config-file=/etc/dbus-1/system.conf + ;; +stop) + killall dbus-daemon + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/dbus/ipkg/dbus.control b/package/dbus/ipkg/dbus.control new file mode 100644 index 000000000..d1cecbd8a --- /dev/null +++ b/package/dbus/ipkg/dbus.control @@ -0,0 +1,5 @@ +Package: dbus +Priority: optional +Section: net +Description: DBUS library +Depends: libexpat diff --git a/package/dbus/ipkg/dbus.postinst b/package/dbus/ipkg/dbus.postinst new file mode 100644 index 000000000..8dd0a50c8 --- /dev/null +++ b/package/dbus/ipkg/dbus.postinst @@ -0,0 +1,6 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +gid=$(get_next_gid) +add_group messagebus $gid +add_user messagebus $(get_next_uid) $gid /var/run/dbus +add_rcconf dbus dbus NO diff --git a/package/deco/Config.in b/package/deco/Config.in new file mode 100644 index 000000000..3bdde9a21 --- /dev/null +++ b/package/deco/Config.in @@ -0,0 +1,10 @@ +config ADK_PACKAGE_DECO + prompt "deco.............................. Text-based full featured file manager" + tristate + default n + select ADK_PACKAGE_LIBNCURSES + help + A clone of Norton Commander for Unix. Text-based, full featured + file manager. + + http://deco.sourceforge.net/ diff --git a/package/deco/Makefile b/package/deco/Makefile new file mode 100644 index 000000000..0a7bb2619 --- /dev/null +++ b/package/deco/Makefile @@ -0,0 +1,30 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= deco +PKG_VERSION:= 39 +PKG_RELEASE:= 1 +PKG_MD5SUM:= f77f60e8be0cae1f814cba1ef61bf4d0 +DISTFILES:= ${PKG_NAME}${PKG_VERSION}.tgz +MASTER_SITES:= ${MASTER_SITE_SOURCEFORGE:=deco/} +WRKDIST= ${WRKDIR}/${PKG_NAME}${PKG_VERSION} + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,DECO,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +BUILD_STYLE= auto + +do-install: + ${INSTALL_DIR} ${IDIR_DECO}/usr/bin + ${INSTALL_DIR} ${IDIR_DECO}/usr/lib/deco + ${INSTALL_BIN} ${WRKBUILD}/deco ${IDIR_DECO}/usr/bin/deco + ${INSTALL_DATA} ${WRKBUILD}/profile ${IDIR_DECO}/usr/lib/deco/profile + ${INSTALL_DATA} ${WRKBUILD}/menu ${IDIR_DECO}/usr/lib/deco/menu + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/deco/ipkg/deco.control b/package/deco/ipkg/deco.control new file mode 100644 index 000000000..f7e8c4348 --- /dev/null +++ b/package/deco/ipkg/deco.control @@ -0,0 +1,5 @@ +Package: deco +Priority: optional +Section: misc +Depends: libncurses +Description: Text-based, full featured file manager diff --git a/package/deco/patches/100-tty.c.patch b/package/deco/patches/100-tty.c.patch new file mode 100644 index 000000000..f37e4e2a6 --- /dev/null +++ b/package/deco/patches/100-tty.c.patch @@ -0,0 +1,11 @@ +--- src/tty.c 2005-09-25 00:23:41.671022039 -0700 ++++ str_new/tty.c 2005-09-25 01:09:37.189119615 -0700 +@@ -14,7 +14,7 @@ + #if HAVE_TERMIOS_H + # include + # if HAVE_SYS_IOCTL_H +-# include ++/*# include */ + # endif + # define HAVE_TERMIO_H 1 + # define termio termios diff --git a/package/device-mapper/Config.in b/package/device-mapper/Config.in new file mode 100644 index 000000000..162b07794 --- /dev/null +++ b/package/device-mapper/Config.in @@ -0,0 +1,6 @@ +config ADK_PACKAGE_DEVICE_MAPPER + prompt "device-mapper..................... device mapper tool and lib" + tristate + default n + help + device mapper tool and libdevice mapper tool and lib diff --git a/package/device-mapper/Makefile b/package/device-mapper/Makefile new file mode 100644 index 000000000..1d97db9a3 --- /dev/null +++ b/package/device-mapper/Makefile @@ -0,0 +1,43 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= device-mapper +PKG_VERSION:= 1.02.28 +PKG_RELEASE:= 1 +PKG_MD5SUM:= c9ae0776994a419f9e1ba842164bb626 +DISTFILES:= ${PKG_NAME}.${PKG_VERSION}.tgz +MASTER_SITES:= ftp://sources.redhat.com/pub/dm/ + +WRKDIST= ${WRKDIR}/${PKG_NAME}.${PKG_VERSION} + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,DEVICE_MAPPER,device-mapper,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +ifeq ($(DEBUG),1) +CONFIGURE_ARGS+= --enable-debug +else +CONFIGURE_ARGS+= --disable-debug +endif + +CONFIGURE_STYLE:= gnu +CONFIGURE_ARGS+= --with-user="" --with-group="" \ + --with-optimisation="" \ + --with-kernel-dir=${LINUX_DIR} +BUILD_STYLE:= auto +INSTALL_STYLE:= auto +INSTALL_TARGET+= install_static_lib + +post-install: + ${INSTALL_DIR} ${IDIR_DEVICE_MAPPER}/usr/sbin + ${INSTALL_DIR} ${IDIR_DEVICE_MAPPER}/usr/lib + ${CP} ${WRKINST}/usr/lib/libdevmapper.so* \ + ${IDIR_DEVICE_MAPPER}/usr/lib + ${INSTALL_BIN} ${WRKINST}/usr/sbin/dmsetup \ + ${IDIR_DEVICE_MAPPER}/usr/sbin + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/device-mapper/ipkg/device-mapper.control b/package/device-mapper/ipkg/device-mapper.control new file mode 100644 index 000000000..cb6cddad9 --- /dev/null +++ b/package/device-mapper/ipkg/device-mapper.control @@ -0,0 +1,4 @@ +Package: device-mapper +Priority: optional +Section: utils +Description: device mapper tools and libs diff --git a/package/device-mapper/patches/patch-lib_Makefile_in b/package/device-mapper/patches/patch-lib_Makefile_in new file mode 100644 index 000000000..d20b9d5c9 --- /dev/null +++ b/package/device-mapper/patches/patch-lib_Makefile_in @@ -0,0 +1,21 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- device-mapper.1.02.28.orig/lib/Makefile.in 2008-06-06 22:44:35.000000000 +0200 ++++ device-mapper.1.02.28/lib/Makefile.in 2008-11-11 12:18:25.000000000 +0100 +@@ -76,7 +76,7 @@ install_static: install_@interface@_stat + $(LN_S) -f libdevmapper.a.$(LIB_VERSION) $(libdir)/libdevmapper.a + + install_ioctl: ioctl/libdevmapper.$(LIB_SUFFIX) +- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ ++ $(INSTALL) -D $(OWNER) $(GROUP) -m 755 $(STRIP) $< \ + $(libdir)/libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION) + + install_pkgconfig: +@@ -84,7 +84,7 @@ install_pkgconfig: + $(usrlibdir)/pkgconfig/devmapper.pc + + install_ioctl_static: ioctl/libdevmapper.a +- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ ++ $(INSTALL) -D $(OWNER) $(GROUP) -m 755 $(STRIP) $< \ + $(libdir)/libdevmapper.a.$(LIB_VERSION) + + $(VERSIONED_SHLIB): %.$(LIB_SUFFIX).$(LIB_VERSION): $(interface)/%.$(LIB_SUFFIX) diff --git a/package/device-mapper/patches/patch-make_tmpl_in b/package/device-mapper/patches/patch-make_tmpl_in new file mode 100644 index 000000000..69285fbe5 --- /dev/null +++ b/package/device-mapper/patches/patch-make_tmpl_in @@ -0,0 +1,16 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- device-mapper.1.02.28.orig/make.tmpl.in 2008-06-06 22:44:35.000000000 +0200 ++++ device-mapper.1.02.28/make.tmpl.in 2009-01-04 14:47:10.000000000 +0100 +@@ -25,10 +25,10 @@ MSGFMT = @MSGFMT@ + LN_S = @LN_S@ + LIBS = @LIBS@ + DEFS += @DEFS@ +-CFLAGS += @CFLAGS@ ++CFLAGS ?= @CFLAGS@ + CLDFLAGS += @CLDFLAGS@ + LDDEPS += @LDDEPS@ +-LDFLAGS += @LDFLAGS@ ++LDFLAGS ?= @LDFLAGS@ + LIB_SUFFIX = @LIB_SUFFIX@ + + # Setup directory variables diff --git a/package/dhcp-forwarder/Config.in b/package/dhcp-forwarder/Config.in new file mode 100644 index 000000000..cfe8f7d36 --- /dev/null +++ b/package/dhcp-forwarder/Config.in @@ -0,0 +1,8 @@ +config ADK_PACKAGE_DHCP_FORWARDER + prompt "dhcp-forwarder.................... DHCP relay agent" + tristate + default n + help + A DHCP relay agent + + http://www.nongnu.org/dhcp-fwd/ diff --git a/package/dhcp-forwarder/Makefile b/package/dhcp-forwarder/Makefile new file mode 100644 index 000000000..880e1a3cb --- /dev/null +++ b/package/dhcp-forwarder/Makefile @@ -0,0 +1,36 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= dhcp-forwarder +PKG_VERSION:= 0.7 +PKG_RELEASE:= 12 +PKG_MD5SUM:= e7f876e615ebc3f96418f6477b4451e2 +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 +MASTER_SITES:= http://savannah.nongnu.org/download/dhcp-fwd/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,DHCP_FORWARDER,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +CONFIGURE_ENV+= ac_cv_func_malloc_0_nonnull="yes" +CONFIGURE_ARGS+= --disable-dietlibc +BUILD_STYLE= auto +INSTALL_STYLE= auto +XAKE_FLAGS+= cfg_filename="/etc/dhcp-fwd.conf" + +post-install: + ${INSTALL_DIR} ${IDIR_DHCP_FORWARDER}/etc/init.d + ${INSTALL_DIR} ${IDIR_DHCP_FORWARDER}/usr/sbin + ${INSTALL_DATA} ${WRKBUILD}/contrib/dhcp-fwd.conf \ + ${IDIR_DHCP_FORWARDER}/etc/ + ${INSTALL_BIN} ./files/dhcp-fwd.init \ + ${IDIR_DHCP_FORWARDER}/etc/init.d/dhcp-fwd + ${INSTALL_BIN} ${WRKINST}/usr/sbin/dhcp-fwd \ + ${IDIR_DHCP_FORWARDER}/usr/sbin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/dhcp-forwarder/files/dhcp-fwd.init b/package/dhcp-forwarder/files/dhcp-fwd.init new file mode 100644 index 000000000..1481095fe --- /dev/null +++ b/package/dhcp-forwarder/files/dhcp-fwd.init @@ -0,0 +1,26 @@ +#!/bin/sh +#FWINIT 80 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${dhcp-fwd:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + dhcp-fwd + ;; +stop) + killall dhcp-fwd + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/dhcp-forwarder/ipkg/dhcp-forwarder.conffiles b/package/dhcp-forwarder/ipkg/dhcp-forwarder.conffiles new file mode 100644 index 000000000..70be85a8a --- /dev/null +++ b/package/dhcp-forwarder/ipkg/dhcp-forwarder.conffiles @@ -0,0 +1 @@ +/etc/dhcp-fwd.conf diff --git a/package/dhcp-forwarder/ipkg/dhcp-forwarder.control b/package/dhcp-forwarder/ipkg/dhcp-forwarder.control new file mode 100644 index 000000000..9958ddb39 --- /dev/null +++ b/package/dhcp-forwarder/ipkg/dhcp-forwarder.control @@ -0,0 +1,4 @@ +Package: dhcp-forwarder +Priority: optional +Section: net +Description: a DHCP relay agent diff --git a/package/dhcp-forwarder/ipkg/dhcp-forwarder.postinst b/package/dhcp-forwarder/ipkg/dhcp-forwarder.postinst new file mode 100644 index 000000000..9ba16f5b0 --- /dev/null +++ b/package/dhcp-forwarder/ipkg/dhcp-forwarder.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf dhcp_fwd dhcp_fwd NO diff --git a/package/dhcp-forwarder/patches/00-big_endian.patch b/package/dhcp-forwarder/patches/00-big_endian.patch new file mode 100644 index 000000000..add157d3f --- /dev/null +++ b/package/dhcp-forwarder/patches/00-big_endian.patch @@ -0,0 +1,11 @@ +--- dhcp-forwarder-0.7/src/dhcp.h 2004-06-22 03:46:56.000000000 -0700 ++++ dhcp-forwarder-0.7-x/src/dhcp.h 2005-10-06 17:04:14.000000000 -0700 +@@ -89,7 +89,7 @@ + optDHCP_COOKIE = 0x63538263u, + flgDHCP_BCAST = 0x0080u + #else +- DHCP_COOKIE = 0x63825363u, ++ optDHCP_COOKIE = 0x63825363u, + flgDHCP_BCAST = 0x8000u + #endif + }; diff --git a/package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch b/package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch new file mode 100644 index 000000000..ef8491330 --- /dev/null +++ b/package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch @@ -0,0 +1,35 @@ +diff -pur dhcp-forwarder-0.7-orig/src/wrappers.h dhcp-forwarder-0.7-patched/src/wrappers.h +--- dhcp-forwarder-0.7-orig/src/wrappers.h 2004-06-22 12:46:56.000000000 +0200 ++++ dhcp-forwarder-0.7-patched/src/wrappers.h 2005-12-27 12:28:10.464289435 +0100 +@@ -65,7 +65,14 @@ Egetgrnam(char const *name) + /*@*/ + { + /*@observer@*/struct group const *res = getgrnam(name); +- FatalErrnoError(res==0, 1, "getgrnam()"); ++ ++ FatalErrnoError((res == NULL) && (errno != 0), 1, "getgrnam()"); ++ ++ if (res == NULL) ++ { ++ fprintf (stderr, "No such group: `%s'\n", name); ++ exit (1); ++ } + + /*@-freshtrans@*/ + /*@-mustfreefresh@*/ +@@ -80,7 +87,14 @@ Egetpwnam(char const *name) + /*@*/ + { + struct passwd const *res = getpwnam(name); +- FatalErrnoError(res==0, 1, "getpwnam()"); ++ ++ FatalErrnoError((res == NULL) && (errno != 0), 1, "getpwnam()"); ++ ++ if (res == NULL) ++ { ++ fprintf (stderr, "No such user: `%s'\n", name); ++ exit (1); ++ } + + return res; + } diff --git a/package/dhcp/Config.in b/package/dhcp/Config.in new file mode 100644 index 000000000..37d2aa7b6 --- /dev/null +++ b/package/dhcp/Config.in @@ -0,0 +1,30 @@ +#menu "dhcp.............................. ISC DHCP (Dynamic Host Configuration Protocol) implementation" + +config ADK_COMPILE_DHCP + tristate + default n + depends ADK_PACKAGE_DHCP_RELAY || ADK_PACKAGE_DHCP_SERVER + +config ADK_PACKAGE_DHCP_RELAY + prompt "dhcp-relay........................ ISC DHCP relay" + tristate + default n + select ADK_COMPILE_DHCP + help + ISC (Internet Software Consortium) DHCP (Dynamic Host Configuration + Protocol) relay daemon. + + http://www.isc.org/ + +config ADK_PACKAGE_DHCP_SERVER + prompt "dhcp-server....................... ISC DHCP server" + tristate + default n + select ADK_COMPILE_DHCP + help + ISC (Internet Software Consortium) DHCP (Dynamic Host Configuration + Protocol) server daemon. + + http://www.isc.org/ + +#endmenu diff --git a/package/dhcp/Makefile b/package/dhcp/Makefile new file mode 100644 index 000000000..c2e49a0b6 --- /dev/null +++ b/package/dhcp/Makefile @@ -0,0 +1,37 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= dhcp +PKG_VERSION:= 3.0.7 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 426bfa1712ababaff4be6dadee9c1982 +MASTER_SITES:= ftp://ftp.isc.org/isc/dhcp/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,DHCP_RELAY,dhcp-relay,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,DHCP_SERVER,dhcp-server,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +do-configure: + (cd ${WRKBUILD} ; \ + ./configure --copts "${TARGET_CFLAGS}" linux-2.2 \ + ); + +MAKE_FLAGS+= RANLIB=${TARGET_CROSS}ranlib +BUILD_STYLE= auto +INSTALL_STYLE= auto + +post-install: + ${INSTALL_DIR} ${IDIR_DHCP_RELAY}/usr/sbin + ${CP} ${WRKINST}/usr/sbin/dhcrelay ${IDIR_DHCP_RELAY}/usr/sbin/ + ${INSTALL_DIR} ${IDIR_DHCP_SERVER}/etc/init.d + ${INSTALL_DIR} ${IDIR_DHCP_SERVER}/usr/sbin + ${INSTALL_BIN} ./files/dhcpd.init \ + ${IDIR_DHCP_SERVER}/etc/init.d/dhcpd + ${INSTALL_BIN} ${WRKINST}/usr/sbin/dhcpd ${IDIR_DHCP_SERVER}/usr/sbin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/dhcp/files/dhcpd.init b/package/dhcp/files/dhcpd.init new file mode 100644 index 000000000..31c182948 --- /dev/null +++ b/package/dhcp/files/dhcpd.init @@ -0,0 +1,27 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostart) + [[ $dhcpd_flags = NO ]] && exit 0 + exec sh $0 start + ;; +start) + mkdir -p /var/state/dhcp + touch /var/state/dhcp/dhcpd.leases + dhcpd $dhcpd_flags + ;; +autostop|stop) + killall dhcpd + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/dhcp/ipkg/dhcp-relay.control b/package/dhcp/ipkg/dhcp-relay.control new file mode 100644 index 000000000..fbd3d20b8 --- /dev/null +++ b/package/dhcp/ipkg/dhcp-relay.control @@ -0,0 +1,4 @@ +Package: dhcp-relay +Priority: optional +Section: net +Description: ISC DHCP relay diff --git a/package/dhcp/ipkg/dhcp-server.control b/package/dhcp/ipkg/dhcp-server.control new file mode 100644 index 000000000..a9b86a183 --- /dev/null +++ b/package/dhcp/ipkg/dhcp-server.control @@ -0,0 +1,4 @@ +Package: dhcp-server +Priority: optional +Section: net +Description: ISC DHCP server diff --git a/package/dhcp/ipkg/dhcp-server.postinst b/package/dhcp/ipkg/dhcp-server.postinst new file mode 100644 index 000000000..592120cdc --- /dev/null +++ b/package/dhcp/ipkg/dhcp-server.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf 'e.g. "eth0.1 eth1"' dhcpd_flags diff --git a/package/dhcp6/Config.in b/package/dhcp6/Config.in new file mode 100644 index 000000000..cbb5bccc4 --- /dev/null +++ b/package/dhcp6/Config.in @@ -0,0 +1,12 @@ +config ADK_PACKAGE_DHCP6 + prompt "dhcp6............................. IPv6 DHCP server and client" + depends on ADK_IPV6 + tristate + default n + select ADK_PACKAGE_LIBNCURSES + help + This is the first ever open source implementation of Dynamic + Host Configuration Protocol for IPv6 (DHCPv6) server and client + on Linux Operating System. The server provides leases + (durations or lifetimes) on IPv6 addresses to the clients who + request for it diff --git a/package/dhcp6/Makefile b/package/dhcp6/Makefile new file mode 100644 index 000000000..3aa5ddcc7 --- /dev/null +++ b/package/dhcp6/Makefile @@ -0,0 +1,32 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= dhcp6 +PKG_VERSION:= 1.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 86193dfa62137db3ea459543db4f1102 +DISTFILES:= dhcpv6-linux-${PKG_VERSION}.zip +MASTER_SITES:= ${MASTER_SITE_SOURCEFORGE:=dhcpv6-linux/} +WRKDIST= ${WRKDIR} + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,DHCP6,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +do-build: + ${MAKE} CC="${TARGET_CC}" STAGING_DIR=${STAGING_DIR} -C ${WRKBUILD}/server + ${MAKE} CC="${TARGET_CC}" STAGING_DIR=${STAGING_DIR} -C ${WRKBUILD}/client + +do-install: + ${INSTALL_DIR} ${IDIR_DHCP6}/usr/sbin + ${INSTALL_DIR} ${IDIR_DHCP6}/etc/dhcp{d6,6} + ${INSTALL_BIN} ${WRKBUILD}/client/cli ${IDIR_DHCP6}/usr/sbin/dhcp6client + ${INSTALL_BIN} ${WRKBUILD}/server/serv ${IDIR_DHCP6}/usr/sbin/dhcpd6 + ${CP} ${WRKBUILD}/server/*.conf ${IDIR_DHCP6}/etc/dhcpd6/ + ${CP} ${WRKBUILD}/client/*.conf ${IDIR_DHCP6}/etc/dhcp6/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/dhcp6/ipkg/dhcp6.control b/package/dhcp6/ipkg/dhcp6.control new file mode 100755 index 000000000..cc030a0e2 --- /dev/null +++ b/package/dhcp6/ipkg/dhcp6.control @@ -0,0 +1,5 @@ +Package: dhcp6 +Section: net +Architecture: mipsel +Priority: optional +Description: This is the first ever open source implementation of Dynamic Host Configuration Protocol for IPv6 (DHCPv6) server and client on Linux Operating System. The server provides leases (durations or lifetimes) on IPv6 addresses to the clients who request for it. diff --git a/package/dhcp6/ipkg/files/conffiles b/package/dhcp6/ipkg/files/conffiles new file mode 100644 index 000000000..267baa94d --- /dev/null +++ b/package/dhcp6/ipkg/files/conffiles @@ -0,0 +1,4 @@ +/etc/dhcpd6/dhcpd6.conf +/etc/dhcpd6/leases6.conf +/etc/dhcpd6/partial_leases6.conf +/etc/dhcp6/sollicit.conf diff --git a/package/dhcp6/patches/patch-client_Makefile b/package/dhcp6/patches/patch-client_Makefile new file mode 100644 index 000000000..6004a355b --- /dev/null +++ b/package/dhcp6/patches/patch-client_Makefile @@ -0,0 +1,58 @@ +$Id$ +--- w-dhcp6-1.0-1.orig/client/Makefile 2025-06-28 23:21:40.000000000 +0200 ++++ w-dhcp6-1.0-1/client/Makefile 2008-10-20 13:29:40.000000000 +0200 +@@ -1,42 +1,40 @@ +- +-CC = gcc + STD_HEADERS = stdhead.h head.h struct.h options_type.h message_type.h states.h timer_val.h constants.h macros.h status_codes.h + OBJECT_FILES = client.o solicit.o clilib.o parse.o request.o decline.o renew.o rebind.o release.o + HEADER_FILES = solicit.h clilib.h parse.h request.h decline.h renew.h rebind.h release.h +- ++IFLAGS = -I$(STAGING_DIR)/usr/include + + dhcpv6_client : dhcpv6_client.c cli +- $(CC) -g3 dhcpv6_client.c -o dhcpv6_client ++ $(CC) $(IFLAGS) dhcpv6_client.c -o dhcpv6_client + + cli : $(OBJECT_FILES) +- $(CC) -g3 $(OBJECT_FILES) -o cli -lncurses ++ $(CC) $(IFLAGS) $(OBJECT_FILES) -o cli -L$(STAGING_DIR)/usr/lib -lncurses + + client.o : client.c $(STD_HEADERS) $(HEADER_FILES) +- $(CC) -g3 -c client.c -o client.o ++ $(CC) $(IFLAGS) -c client.c -o client.o + + release.o : release.c release.h clilib.h +- $(CC) -g3 -c release.c -o release.o ++ $(CC) $(IFLAGS) -c release.c -o release.o + + rebind.o : rebind.c rebind.h clilib.h +- $(CC) -g3 -c rebind.c -o rebind.o ++ $(CC) $(IFLAGS) -c rebind.c -o rebind.o + + renew.o : renew.c renew.h clilib.h +- $(CC) -g3 -c renew.c -o renew.o ++ $(CC) $(IFLAGS) -c renew.c -o renew.o + + request.o : request.c request.h clilib.h +- $(CC) -g3 -c request.c -o request.o ++ $(CC) $(IFLAGS) -c request.c -o request.o + + decline.o : decline.c decline.h clilib.h parse.h solicit.h +- $(CC) -g3 -c decline.c -o decline.o ++ $(CC) $(IFLAGS) -c decline.c -o decline.o + + solicit.o : solicit.c solicit.h clilib.h parse.h +- $(CC) -g3 -c solicit.c -o solicit.o ++ $(CC) $(IFLAGS) -c solicit.c -o solicit.o + + clilib.o : clilib.c clilib.h parse.h +- $(CC) -g3 -c clilib.c -o clilib.o ++ $(CC) $(IFLAGS) -c clilib.c -o clilib.o + + parse.o : parse.c parse.h clilib.h +- $(CC) -g3 -c parse.c -o parse.o ++ $(CC) $(IFLAGS) -c parse.c -o parse.o + + clean : + rm -f *.o cli dhcpv6_client diff --git a/package/dhcp6/patches/patch-client_clilib_c b/package/dhcp6/patches/patch-client_clilib_c new file mode 100644 index 000000000..a9f416fa6 --- /dev/null +++ b/package/dhcp6/patches/patch-client_clilib_c @@ -0,0 +1,22 @@ +$Id$ +--- w-dhcp6-1.0-1.orig/client/clilib.c Sat Jun 28 23:21:17 2025 ++++ w-dhcp6-1.0-1/client/clilib.c Tue Jul 25 10:37:06 2006 +@@ -554,7 +554,7 @@ u_int8_t convert_character_to_hex (char + + void generate_trans_id (u_int32_t *trans_id) + { +- extern u_int32_t g_trans_id; ++ extern int g_trans_id; + time_t t; + srand (time (&t)); + *trans_id = 0; +@@ -890,9 +890,7 @@ void read_option (char *m, int index, in + break; + + default : +-#if DEBUG == 3 + printf ("Unrecognized DUID type\n"); +-#endif + } + + next_opt = (struct OPTIONS *) malloc (sizeof (struct OPTIONS)); diff --git a/package/dhcp6/patches/patch-client_macros_h b/package/dhcp6/patches/patch-client_macros_h new file mode 100644 index 000000000..f918cd5fd --- /dev/null +++ b/package/dhcp6/patches/patch-client_macros_h @@ -0,0 +1,10 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- w-dhcp6-1.0-1.orig/client/macros.h 2025-06-28 23:21:40.000000000 +0200 ++++ w-dhcp6-1.0-1/client/macros.h 2008-10-20 15:31:08.000000000 +0200 +@@ -1,5 +1,5 @@ + #define INITIALIZE_SOCKADDR(x){ \ +- bzero((char *) &(x), sizeof((x))); \ ++ memset((char *) &(x), 0, sizeof((x))); \ + (x).sin6_family = AF_INET6; \ + (x).sin6_flowinfo = htonl(0); \ + (x).sin6_scope_id = 0; \ diff --git a/package/dhcp6/patches/patch-client_solicit_c b/package/dhcp6/patches/patch-client_solicit_c new file mode 100644 index 000000000..7214598f0 --- /dev/null +++ b/package/dhcp6/patches/patch-client_solicit_c @@ -0,0 +1,12 @@ +$Id$ +--- w-dhcp6-1.0-1.orig/client/solicit.c Sat Jun 28 23:21:17 2025 ++++ w-dhcp6-1.0-1/client/solicit.c Tue Jul 25 10:37:07 2006 +@@ -18,7 +18,7 @@ struct DHCP_MESSAGE * create_solicit_mes + dhcp_message_ptr -> opt = add_client_id_option (interface_details); + + opt_ptr = (struct OPTIONS *) dhcp_message_ptr -> opt; +- (struct OPTIONS *) ((struct DUID *) opt_ptr -> opt_data) -> opt = add_ia_option (interface_details); ++ ((struct DUID *) opt_ptr -> opt_data) -> opt = add_ia_option (interface_details); + return dhcp_message_ptr; + } + diff --git a/package/dhcp6/patches/patch-server_Makefile b/package/dhcp6/patches/patch-server_Makefile new file mode 100644 index 000000000..0ae2e4825 --- /dev/null +++ b/package/dhcp6/patches/patch-server_Makefile @@ -0,0 +1,38 @@ +$Id$ +--- w-dhcp6-1.0-1.orig/server/Makefile Fri Jun 28 14:49:42 2002 ++++ w-dhcp6-1.0-1/server/Makefile Tue Jul 25 10:37:06 2006 +@@ -1,27 +1,26 @@ +-CC = gcc + STD_HEADERS = stdhead.h head.h struct.h options_type.h message_type.h macros.h status_codes.h constants.h + OBJECT_FILES = server.o lib.o advertise.o parse.o leases.o reply.o + + serv: $(OBJECT_FILES) +- $(CC) -g3 $(OBJECT_FILES) -o serv ++ $(CC) $(OBJECT_FILES) -o serv + + lib.o: lib.c lib.h $(STD_HEADERS) +- $(CC) -g3 -c lib.c -o lib.o ++ $(CC) -c lib.c -o lib.o + + parse.o: parse.c parse.h $(STD_HEADERS) +- $(CC) -g3 -c parse.c -o parse.o ++ $(CC) -c parse.c -o parse.o + + leases.o: leases.c leases.h $(STD_HEADERS) +- $(CC) -g3 -c leases.c -o leases.o ++ $(CC) -c leases.c -o leases.o + + advertise.o: advertise.c advertise.h $(STD_HEADERS) +- $(CC) -g3 -c advertise.c -o advertise.o ++ $(CC) -c advertise.c -o advertise.o + + reply.o: reply.c reply.h $(STD_HEADERS) +- $(CC) -g3 -c reply.c -o reply.o ++ $(CC) -c reply.c -o reply.o + + server.o: server.c lib.h advertise.h reply.h leases.h parse.h $(STD_HEADERS) +- $(CC) -g3 -c server.c -o server.o ++ $(CC) -c server.c -o server.o + + clean: + rm -f *.o serv diff --git a/package/dhcp6/patches/patch-server_macros_h b/package/dhcp6/patches/patch-server_macros_h new file mode 100644 index 000000000..916e4c798 --- /dev/null +++ b/package/dhcp6/patches/patch-server_macros_h @@ -0,0 +1,10 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- w-dhcp6-1.0-1.orig/server/macros.h 2002-06-28 14:50:04.000000000 +0200 ++++ w-dhcp6-1.0-1/server/macros.h 2008-10-20 15:30:53.000000000 +0200 +@@ -1,5 +1,5 @@ + #define INITIALIZE_SOCKADDR(x){ \ +- bzero((char *) &(x), sizeof((x))); \ ++ memset((char *) &(x), 0, sizeof((x))); \ + (x).sin6_family = AF_INET6; \ + (x).sin6_flowinfo = htonl(0); \ + (x).sin6_scope_id = 0; \ diff --git a/package/dhcp6/patches/patch-server_reply_c b/package/dhcp6/patches/patch-server_reply_c new file mode 100644 index 000000000..bafca5ae1 --- /dev/null +++ b/package/dhcp6/patches/patch-server_reply_c @@ -0,0 +1,21 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- w-dhcp6-1.0-1.orig/server/reply.c 2002-06-28 14:50:04.000000000 +0200 ++++ w-dhcp6-1.0-1/server/reply.c 2008-10-20 15:29:52.000000000 +0200 +@@ -147,7 +147,7 @@ struct DHCP_MESSAGE * create_dummy_reply + opt_ptr -> u_opt_len.opt_len = opt_src_ptr -> u_opt_len.opt_len; + ia_ptr = (struct IA *) malloc (sizeof (struct IA)); + opt_ptr -> opt_data = ia_ptr; +- bzero (ia_ptr, sizeof (struct IA)); ++ memset (ia_ptr, 0, sizeof (struct IA)); + ia_ptr -> u_iaid.iaid = ia_src_ptr -> u_iaid.iaid; + + // set IAADDR option with values set to null +@@ -159,7 +159,7 @@ struct DHCP_MESSAGE * create_dummy_reply + opt_ptr -> u_opt_len.opt_len = opt_src_ptr -> u_opt_len.opt_len; + iaaddr_ptr = (struct IA_ADDRESS *) malloc (sizeof (struct IA_ADDRESS)); + opt_ptr -> opt_data = iaaddr_ptr; +- bzero (iaaddr_ptr, sizeof (struct IA_ADDRESS)); ++ memset (iaaddr_ptr, 0, sizeof (struct IA_ADDRESS)); + + return dhcp_message_ptr; + } diff --git a/package/digitemp/Config.in b/package/digitemp/Config.in new file mode 100644 index 000000000..2c1152661 --- /dev/null +++ b/package/digitemp/Config.in @@ -0,0 +1,17 @@ +config ADK_PACKAGE_DIGITEMP + prompt "digitemp.......................... Simple Tool to read 1-wire temperature sensors" + tristate + default n + select ADK_PACKAGE_LIBUSB + help + DigiTemp is a simple to use program for reading values from + 1-wire devices. Its main use is for reading temperature + sensors, but it also reads counters, and understands the + 1-wire hubs with devices on different branches of the + network. DigiTemp now supports the following 1-wire + temperature sensors: DS18S20 (and DS1820), DS18B20, DS1822, + the DS2438 Smart Battery Monitor, DS2422 and DS2423 + Counters, DS2409 MicroLAN Coupler (used in 1-wire hubs), and + the AAG TAI-8540 humidity sensor. + + http://www.digitemp.com/ diff --git a/package/digitemp/Makefile b/package/digitemp/Makefile new file mode 100644 index 000000000..841fa06e9 --- /dev/null +++ b/package/digitemp/Makefile @@ -0,0 +1,26 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= digitemp +PKG_VERSION:= 3.3.2 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 0b6cfb36d198767836de54d9fb11bbdb +MASTER_SITES:= http://www.digitemp.com/software/linux/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,DIGITEMP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +ALL_TARGET= ds2490 +BUILD_STYLE= auto + +do-install: + ${INSTALL_DIR} ${IDIR_DIGITEMP}/usr/sbin + ${INSTALL_BIN} ${WRKBUILD}/digitemp_DS2490 \ + ${IDIR_DIGITEMP}/usr/sbin/digitemp_DS2490 + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/digitemp/ipkg/digitemp.control b/package/digitemp/ipkg/digitemp.control new file mode 100644 index 000000000..a1aff9b2c --- /dev/null +++ b/package/digitemp/ipkg/digitemp.control @@ -0,0 +1,5 @@ +Package: digitemp +Priority: optional +Section: app +Depends: libusb +Description: DigiTemp is a simple to use program for reading values from 1-wire devices. diff --git a/package/digitemp/patches/001-Makefile.patch b/package/digitemp/patches/001-Makefile.patch new file mode 100644 index 000000000..a08164b86 --- /dev/null +++ b/package/digitemp/patches/001-Makefile.patch @@ -0,0 +1,29 @@ +--- digitemp-3.3.2.orig/Makefile 2004-02-04 15:17:10.000000000 +0100 ++++ digitemp-3.3.2/Makefile 2006-08-16 20:17:27.000000000 +0200 +@@ -15,8 +15,6 @@ + + VERSION = 3.3.2 + +- +-CC = gcc + CFLAGS = -I./src -I./userial -O2 # -g -Wall + LIBS = -lm + +@@ -57,7 +55,7 @@ + CFLAGS += -DLINUX + + # Set LOCK to yes for serial port locking support +- LOCK = yes ++ #LOCK = yes + + endif + +@@ -123,7 +121,7 @@ + $(CC) $(OBJS) $(ONEWIREOBJS) $(DS9097UOBJS) -o digitemp_DS9097U $(LIBS) + + ds2490: $(OBJS) $(HDRS) $(ONEWIREOBJS) $(ONEWIREHDRS) $(DS2490OBJS) +- $(CC) $(OBJS) $(ONEWIREOBJS) $(DS2490OBJS) -o digitemp_DS2490 $(LIBS) ++ $(CC) $(LDFLAGS) $(OBJS) $(ONEWIREOBJS) $(DS2490OBJS) -o digitemp_DS2490 $(LIBS) + + + # Clean up the object files and the sub-directory for distributions diff --git a/package/dnsmasq/Config.in b/package/dnsmasq/Config.in new file mode 100644 index 000000000..0fd2a5ce0 --- /dev/null +++ b/package/dnsmasq/Config.in @@ -0,0 +1,11 @@ +config ADK_PACKAGE_DNSMASQ + prompt "dnsmasq........................... Lightweight DNS and DHCP server" + tristate + default n + help + A lightweight DNS and DHCP server. It is intended to + provide coupled DNS and DHCP service to a LAN. Dnsmasq + supports static and dynamic DHCP leases and BOOTP/TFTP for + network booting of diskless machines. + + http://www.thekelleys.org.uk/dnsmasq/ diff --git a/package/dnsmasq/Makefile b/package/dnsmasq/Makefile new file mode 100644 index 000000000..11c9669a8 --- /dev/null +++ b/package/dnsmasq/Makefile @@ -0,0 +1,31 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= dnsmasq +PKG_VERSION:= 2.47 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 4524081e56d0b935717d493e8e8d3e11 +MASTER_SITES:= http://thekelleys.org.uk/dnsmasq/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,DNSMASQ,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +BUILD_STYLE:= auto +INSTALL_STYLE= manual +MAKE_FLAGS+= BINDIR=/usr/sbin MANDIR=/usr/man COPTS="${TCFLAGS}" +ifneq ($(ADK_IPV6),y) +MAKE_FLAGS+= COPTS="${TCFLAGS} -DNO_IPV6" +endif + +do-install: + ${INSTALL_DIR} ${IDIR_DNSMASQ}/{etc/init.d,usr/sbin} + ${INSTALL_BIN} ${WRKBUILD}/src/dnsmasq ${IDIR_DNSMASQ}/usr/sbin/ + ${INSTALL_DATA} files/dnsmasq.conf ${IDIR_DNSMASQ}/etc/dnsmasq.conf + ${INSTALL_BIN} files/dnsmasq.init ${IDIR_DNSMASQ}/etc/init.d/dnsmasq + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/dnsmasq/files/dnsmasq.conf b/package/dnsmasq/files/dnsmasq.conf new file mode 100644 index 000000000..086a0b7f7 --- /dev/null +++ b/package/dnsmasq/files/dnsmasq.conf @@ -0,0 +1,39 @@ +# filter what we send upstream +user=dnsmasq +domain-needed +bogus-priv +localise-queries + +# allow /etc/hosts and dhcp lookups via *.lan +local=/lan/ +domain=lan +expand-hosts + +# add more dhcp-range options for every subnet +dhcp-range=192.168.1.129,192.168.1.254,255.255.255.0,72h +interface=lo +interface=eth0.0 +#interface=eth1 +interface=br0 + +# Enable dnsmasq's built-in TFTP server +#enable-tftp +# Set the root directory for files available via TFTP. +#tftp-root=/tftpboot + +dhcp-authoritative +dhcp-leasefile=/tmp/dhcp.leases + +# use /etc/ethers for static hosts +# +#read-ethers + +# other useful options (0.0.0.0 means server itself) +# default route(s): +dhcp-option=3,0.0.0.0 +# DNS server(s): +dhcp-option=6,0.0.0.0 +# NTP server(s): +dhcp-option=42,0.0.0.0 +# WINS server(s): +#dhcp-option=44,0.0.0.0 diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init new file mode 100644 index 000000000..e92ad3acc --- /dev/null +++ b/package/dnsmasq/files/dnsmasq.init @@ -0,0 +1,26 @@ +#!/bin/sh +#FWINIT 50 +. /etc/rc.conf + +case $1 in +(autostop) ;; +(autostart) + [[ $dns_dhcp = NO ]] && exit 0 + exec sh $0 start + ;; +start) + [ -f /etc/dnsmasq.conf ] || exit + /usr/sbin/dnsmasq + ;; +(stop) + killall dnsmasq + ;; +(restart) + sh $0 stop + sh $0 start + ;; +(*) + echo "Usage: $0 {start | stop | restart}" + ;; +esac +exit $? diff --git a/package/dnsmasq/ipkg/dnsmasq.conffiles b/package/dnsmasq/ipkg/dnsmasq.conffiles new file mode 100644 index 000000000..e30eba8f6 --- /dev/null +++ b/package/dnsmasq/ipkg/dnsmasq.conffiles @@ -0,0 +1 @@ +/etc/dnsmasq.conf diff --git a/package/dnsmasq/ipkg/dnsmasq.control b/package/dnsmasq/ipkg/dnsmasq.control new file mode 100644 index 000000000..6f61edc65 --- /dev/null +++ b/package/dnsmasq/ipkg/dnsmasq.control @@ -0,0 +1,4 @@ +Package: dnsmasq +Priority: essential +Section: net +Description: A lightweight DNS and DHCP server diff --git a/package/dnsmasq/ipkg/dnsmasq.postinst b/package/dnsmasq/ipkg/dnsmasq.postinst new file mode 100644 index 000000000..f2ff69e58 --- /dev/null +++ b/package/dnsmasq/ipkg/dnsmasq.postinst @@ -0,0 +1,7 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh + +gid=$(get_next_gid) +add_user dnsmasq $(get_next_uid) $gid /tmp +add_group dnsmasq $gid +add_rcconf dnsmasq dns_dhcp NO diff --git a/package/dnsmasq/patches/patch-src_config_h b/package/dnsmasq/patches/patch-src_config_h new file mode 100644 index 000000000..297097565 --- /dev/null +++ b/package/dnsmasq/patches/patch-src_config_h @@ -0,0 +1,23 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- dnsmasq-2.47.orig/src/config.h 2009-02-05 13:14:24.000000000 +0100 ++++ dnsmasq-2.47/src/config.h 2009-03-19 18:40:37.000000000 +0100 +@@ -45,7 +45,7 @@ + # elif defined(__sun__) || defined (__sun) + # define LEASEFILE "/var/cache/dnsmasq.leases" + # else +-# define LEASEFILE "/var/lib/misc/dnsmasq.leases" ++# define LEASEFILE "/tmp/dnsmasq.leases" + # endif + #endif + +@@ -282,8 +282,9 @@ typedef unsigned long in_addr_t; + /* We assume that systems which don't have IPv6 + headers don't have ntop and pton either */ + +-#if defined(INET6_ADDRSTRLEN) && defined(IPV6_V6ONLY) && !defined(NO_IPV6) ++#if defined(INET6_ADDRSTRLEN) && !defined(NO_IPV6) + # define HAVE_IPV6 ++# define IPV6_V6ONLY 26 + # define ADDRSTRLEN INET6_ADDRSTRLEN + # if defined(SOL_IPV6) + # define IPV6_LEVEL SOL_IPV6 diff --git a/package/dosfstools/Config.in b/package/dosfstools/Config.in new file mode 100644 index 000000000..af9ea7902 --- /dev/null +++ b/package/dosfstools/Config.in @@ -0,0 +1,6 @@ +config ADK_PACKAGE_DOSFSTOOLS + prompt "dosfstools........................ Utilities to create and check MS-DOS FAT filesystems" + tristate + default n + help + Utilities to create and check MS-DOS FAT filesystems. diff --git a/package/dosfstools/Makefile b/package/dosfstools/Makefile new file mode 100644 index 000000000..36ce4187f --- /dev/null +++ b/package/dosfstools/Makefile @@ -0,0 +1,30 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= dosfstools +PKG_VERSION:= 3.0.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 94c2ea84b191de958f765ee239457bd9 +MASTER_SITES:= http://www.daniel-baumann.ch/software/dosfstools/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,DOSFSTOOLS,dosfstools,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +BUILD_STYLE= auto +INSTALL_STYLE= auto +XAKE_FLAGS+= PREFIX="" \ + OPTFLAGS="${TARGET_CFLAGS} -D_FILE_OFFSET_BITS=64" + +post-install: + ${INSTALL_DIR} ${IDIR_DOSFSTOOLS}/sbin + ${CP} ${WRKINST}/sbin/dosfsck ${IDIR_DOSFSTOOLS}/sbin/ + ${CP} ${WRKINST}/sbin/fsck.{msdos,vfat} ${IDIR_DOSFSTOOLS}/sbin/ + ${CP} ${WRKINST}/sbin/mkdosfs ${IDIR_DOSFSTOOLS}/sbin/ + ${CP} ${WRKINST}/sbin/mkfs.{msdos,vfat} ${IDIR_DOSFSTOOLS}/sbin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/dosfstools/ipkg/dosfstools.control b/package/dosfstools/ipkg/dosfstools.control new file mode 100644 index 000000000..4ec52a01f --- /dev/null +++ b/package/dosfstools/ipkg/dosfstools.control @@ -0,0 +1,4 @@ +Package: dosfstools +Priority: optional +Section: admin +Description: Utilities to create and check MS-DOS FAT filesystems diff --git a/package/dovecot/Config.in b/package/dovecot/Config.in new file mode 100644 index 000000000..0baade464 --- /dev/null +++ b/package/dovecot/Config.in @@ -0,0 +1,10 @@ +config ADK_PACKAGE_DOVECOT + prompt "dovecot........................... an imap server" + tristate + default n + help + Dovecot is an open source IMAP and POP3 server for Linux/UNIX-like + systems, written with security primarily in mind. Dovecot is an + excellent choice for both small and large installations. It's fast, + simple to set up, requires no special administration and it uses + very little memory. diff --git a/package/dovecot/Makefile b/package/dovecot/Makefile new file mode 100644 index 000000000..3e31c2f62 --- /dev/null +++ b/package/dovecot/Makefile @@ -0,0 +1,61 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= dovecot +PKG_VERSION:= 1.1.14 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 60b1deccc0ae77e5669060d2b1894e5e +MASTER_SITES:= http://www.dovecot.org/releases/1.1/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,DOVECOT,dovecot,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE:= gnu +CONFIGURE_ENV+= ignore_signed_size=1 \ + have_rquota=no \ + signed_size_t=no \ + gmtime_max_time_t=32 \ + fd_passing=yes \ + lib_cv_va_copy=yes \ + lib_cv___va_copy=yes \ + lib_cv_va_val_copy=yes \ + mmap_plays_with_write=yes \ + i_cv_gmtime_max_time_t=31 \ + i_cv_posix_fallocate_works=no \ + i_cv_epoll_works=yes \ + i_cv_signed_time_t=yes \ + i_cv_mmap_plays_with_write=yes \ + i_cv_signed_size_t=yes \ + i_cv_c99_vsnprintf=yes \ + i_cv_fd_passing=yes +CONFIGURE_ARGS+= --with-notify=none \ + --without-gssapi \ + --without-pam \ + --with-ioloop=epoll \ + --with-ssl \ + --with-moduledir=/usr/lib/dovecot/modules +BUILD_STYLE:= auto +INSTALL_STYLE:= auto + +post-install: + ${INSTALL_DIR} ${IDIR_DOVECOT}/etc + ${INSTALL_DIR} ${IDIR_DOVECOT}/usr/sbin/dovecot + ${INSTALL_DATA} ./files/dovecot.conf ${IDIR_DOVECOT}/etc + ${INSTALL_DIR} ${IDIR_DOVECOT}/usr/lib/dovecot/modules/{imap,lda,pop3} + $(CP) ${WRKINST}/usr/lib/dovecot/modules/*.so \ + ${IDIR_DOVECOT}/usr/lib/dovecot/modules/ + $(CP) ${WRKINST}/usr/lib/dovecot/modules/imap/*.so \ + ${IDIR_DOVECOT}/usr/lib/dovecot/modules/imap/ + $(CP) ${WRKINST}/usr/lib/dovecot/modules/lda/*.so \ + ${IDIR_DOVECOT}/usr/lib/dovecot/modules/lda/ + $(CP) ${WRKINST}/usr/lib/dovecot/modules/pop3/*.so \ + ${IDIR_DOVECOT}/usr/lib/dovecot/modules/pop3/ + $(CP) ${WRKINST}/usr/sbin/dovecot/* \ + ${IDIR_DOVECOT}/usr/sbin/dovecot/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/dovecot/files/dovecot.conf b/package/dovecot/files/dovecot.conf new file mode 100644 index 000000000..eb1a2cd01 --- /dev/null +++ b/package/dovecot/files/dovecot.conf @@ -0,0 +1,1153 @@ +## Dovecot configuration file + +# If you're in a hurry, see http://wiki.dovecot.org/QuickConfiguration + +# "dovecot -n" command gives a clean output of the changed settings. Use it +# instead of copy&pasting this file when posting to the Dovecot mailing list. + +# '#' character and everything after it is treated as comments. Extra spaces +# and tabs are ignored. If you want to use either of these explicitly, put the +# value inside quotes, eg.: key = "# char and trailing whitespace " + +# Default values are shown for each setting, it's not required to uncomment +# any of the lines. Exception to this are paths, they're just examples with +# the real defaults being based on configure options. The paths listed here +# are for configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var +# --with-ssldir=/etc/ssl + +# Base directory where to store runtime data. +#base_dir = /var/run/dovecot/ + +# Protocols we want to be serving: imap imaps pop3 pop3s +# If you only want to use dovecot-auth, you can set this to "none". +protocols = imap imaps + +# A space separated list of IP or host addresses where to listen in for +# connections. "*" listens in all IPv4 interfaces. "[::]" listens in all IPv6 +# interfaces. Use "*, [::]" for listening both IPv4 and IPv6. +# +# If you want to specify ports for each service, you will need to configure +# these settings inside the protocol imap/pop3 { ... } section, so you can +# specify different ports for IMAP/POP3. For example: +# protocol imap { +# listen = *:10143 +# ssl_listen = *:10943 +# .. +# } +# protocol pop3 { +# listen = *:10100 +# .. +# } +#listen = * + +# Disable LOGIN command and all other plaintext authentications unless +# SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP +# matches the local IP (ie. you're connecting from the same computer), the +# connection is considered secure and plaintext authentication is allowed. +#disable_plaintext_auth = yes + +# Should all IMAP and POP3 processes be killed when Dovecot master process +# shuts down. Setting this to "no" means that Dovecot can be upgraded without +# forcing existing client connections to close (although that could also be +# a problem if the upgrade is eg. because of a security fix). This however +# means that after master process has died, the client processes can't write +# to log files anymore. +#shutdown_clients = yes + +## +## Logging +## + +# Log file to use for error messages, instead of sending them to syslog. +# /dev/stderr can be used to log into stderr. +#log_path = + +# Log file to use for informational and debug messages. +# Default is the same as log_path. +#info_log_path = + +# Prefix for each line written to log file. % codes are in strftime(3) +# format. +#log_timestamp = "%b %d %H:%M:%S " + +# Syslog facility to use if you're logging to syslog. Usually if you don't +# want to use "mail", you'll use local0..local7. Also other standard +# facilities are supported. +#syslog_facility = mail + +## +## SSL settings +## + +# IP or host address where to listen in for SSL connections. Defaults +# to above if not specified. +#ssl_listen = + +# Disable SSL/TLS support. +#ssl_disable = no + +# PEM encoded X.509 SSL/TLS certificate and private key. They're opened before +# dropping root privileges, so keep the key file unreadable by anyone but +# root. Included doc/mkcert.sh can be used to easily generate self-signed +# certificate, just make sure to update the domains in dovecot-openssl.cnf +#ssl_cert_file = /etc/ssl/certs/dovecot.pem +#ssl_key_file = /etc/ssl/private/dovecot.pem + +# If key file is password protected, give the password here. Alternatively +# give it when starting dovecot with -p parameter. Since this file is often +# world-readable, you may want to place this setting instead to a different +# root owned 0600 file by using !include_try . +#ssl_key_password = + +# File containing trusted SSL certificate authorities. Set this only if you +# intend to use ssl_verify_client_cert=yes. The CAfile should contain the +# CA-certificate(s) followed by the matching CRL(s). +#ssl_ca_file = + +# Request client to send a certificate. If you also want to require it, set +# ssl_require_client_cert=yes in auth section. +#ssl_verify_client_cert = no + +# Which field from certificate to use for username. commonName and +# x500UniqueIdentifier are the usual choices. You'll also need to set +# ssl_username_from_cert=yes. +#ssl_cert_username_field = commonName + +# How often to regenerate the SSL parameters file. Generation is quite CPU +# intensive operation. The value is in hours, 0 disables regeneration +# entirely. +#ssl_parameters_regenerate = 168 + +# SSL ciphers to use +#ssl_cipher_list = ALL:!LOW:!SSLv2 + +# Show protocol level SSL errors. +#verbose_ssl = no + +## +## Login processes +## + +# + +# Directory where authentication process places authentication UNIX sockets +# which login needs to be able to connect to. The sockets are created when +# running as root, so you don't have to worry about permissions. Note that +# everything in this directory is deleted when Dovecot is started. +#login_dir = /var/run/dovecot/login + +# chroot login process to the login_dir. Only reason not to do this is if you +# wish to run the whole Dovecot without roots. +#login_chroot = yes + +# User to use for the login process. Create a completely new user for this, +# and don't use it anywhere else. The user must also belong to a group where +# only it has access, it's used to control access for authentication process. +# Note that this user is NOT used to access mails. +#login_user = dovecot + +# Set max. process size in megabytes. If you don't use +# login_process_per_connection you might need to grow this. +#login_process_size = 64 + +# Should each login be processed in it's own process (yes), or should one +# login process be allowed to process multiple connections (no)? Yes is more +# secure, espcially with SSL/TLS enabled. No is faster since there's no need +# to create processes all the time. +#login_process_per_connection = yes + +# Number of login processes to keep for listening new connections. +#login_processes_count = 3 + +# Maximum number of login processes to create. The listening process count +# usually stays at login_processes_count, but when multiple users start logging +# in at the same time more extra processes are created. To prevent fork-bombing +# we check only once in a second if new processes should be created - if all +# of them are used at the time, we double their amount until the limit set by +# this setting is reached. +#login_max_processes_count = 128 + +# Maximum number of connections allowed per each login process. This setting +# is used only if login_process_per_connection=no. Once the limit is reached, +# the process notifies master so that it can create a new login process. +#login_max_connections = 256 + +# Greeting message for clients. +#login_greeting = Dovecot ready. + +# Space-separated list of elements we want to log. The elements which have +# a non-empty variable value are joined together to form a comma-separated +# string. +#login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c + +# Login log format. %$ contains login_log_format_elements string, %s contains +# the data we want to log. +#login_log_format = %$: %s + +## +## Mailbox locations and namespaces +## + +# Location for users' mailboxes. This is the same as the old default_mail_env +# setting. The default is empty, which means that Dovecot tries to find the +# mailboxes automatically. This won't work if the user doesn't have any mail +# yet, so you should explicitly tell Dovecot the full location. +# +# If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u) +# isn't enough. You'll also need to tell Dovecot where the other mailboxes are +# kept. This is called the "root mail directory", and it must be the first +# path given in the mail_location setting. +# +# There are a few special variables you can use, eg.: +# +# %u - username +# %n - user part in user@domain, same as %u if there's no domain +# %d - domain part in user@domain, empty if there's no domain +# %h - home directory +# +# See doc/wiki/Variables.txt for full list. Some examples: +# +# mail_location = maildir:~/Maildir +# mail_location = mbox:~/mail:INBOX=/var/mail/%u +# mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n +# +# +# +#mail_location = + +# If you need to set multiple mailbox locations or want to change default +# namespace settings, you can do it by defining namespace sections. +# NOTE: Namespaces currently work ONLY with IMAP! POP3 and LDA currently ignore +# namespaces completely, they use only the mail_location setting. +# +# You can have private, shared and public namespaces. The only difference +# between them is how Dovecot announces them to client via NAMESPACE +# extension. Shared namespaces are meant for user-owned mailboxes which are +# shared to other users, while public namespaces are for more globally +# accessible mailboxes. +# +# REMEMBER: If you add any namespaces, the default namespace must be added +# explicitly, ie. mail_location does nothing unless you have a namespace +# without a location setting. Default namespace is simply done by having a +# namespace with empty prefix. +#namespace private { + # Hierarchy separator to use. You should use the same separator for all + # namespaces or some clients get confused. '/' is usually a good one. + # The default however depends on the underlying mail storage format. + #separator = + + # Prefix required to access this namespace. This needs to be different for + # all namespaces. For example "Public/". + #prefix = + + # Physical location of the mailbox. This is in same format as + # mail_location, which is also the default for it. + #location = + + # There can be only one INBOX, and this setting defines which namespace + # has it. + #inbox = no + + # If namespace is hidden, it's not advertised to clients via NAMESPACE + # extension. You'll most likely also want to set list=no. This is mostly + # useful when converting from another server with different namespaces which + # you want to deprecate but still keep working. For example you can create + # hidden namespaces with prefixes "~/mail/", "~%u/mail/" and "mail/". + #hidden = yes + + # Show the mailboxes under this namespace with LIST command. This makes the + # namespace visible for clients that don't support NAMESPACE extension. + #list = yes + + # Namespace handles its own subscriptions. If set to "no", the parent + # namespace handles them (empty prefix should always have this as "yes") + #subscriptions = yes +#} + +# System user and group used to access mails. If you use multiple, userdb +# can override these by returning uid or gid fields. You can use either numbers +# or names. +#mail_uid = +#mail_gid = + +# Group to enable temporarily for privileged operations. Currently this is +# used only with INBOX when either its initial creation or dotlocking fails. +# Typically this is set to "mail" to give access to /var/mail. +#mail_privileged_group = + +# Grant access to these supplementary groups for mail processes. Typically +# these are used to set up access to shared mailboxes. Note that it may be +# dangerous to set these if users can create symlinks (e.g. if "mail" group is +# set here, ln -s /var/mail ~/mail/var could allow a user to delete others' +# mailboxes, or ln -s /secret/shared/box ~/mail/mybox would allow reading it). +#mail_access_groups = + +# Allow full filesystem access to clients. There's no access checks other than +# what the operating system does for the active UID/GID. It works with both +# maildir and mboxes, allowing you to prefix mailboxes names with eg. /path/ +# or ~user/. +#mail_full_filesystem_access = no + +## +## Mail processes +## + +# Enable mail process debugging. This can help you figure out why Dovecot +# isn't finding your mails. +#mail_debug = no + +# Log prefix for mail processes. See doc/wiki/Variables.txt for list of +# possible variables you can use. +#mail_log_prefix = "%Us(%u): " + +# Max. number of lines a mail process is allowed to log per second before it's +# throttled. 0 means unlimited. Typically there's no need to change this +# unless you're using mail_log plugin, which may log a lot. This setting is +# ignored while mail_debug=yes to avoid pointless throttling. +#mail_log_max_lines_per_sec = 10 + +# Don't use mmap() at all. This is required if you store indexes to shared +# filesystems (NFS or clustered filesystem). +#mmap_disable = no + +# Rely on O_EXCL to work when creating dotlock files. NFS supports O_EXCL +# since version 3, so this should be safe to use nowadays by default. +#dotlock_use_excl = yes + +# Don't use fsync() or fdatasync() calls. This makes the performance better +# at the cost of potential data loss if the server (or the file server) +# goes down. +#fsync_disable = no + +# Mail storage exists in NFS. Set this to yes to make Dovecot flush NFS caches +# whenever needed. If you're using only a single mail server this isn't needed. +#mail_nfs_storage = no +# Mail index files also exist in NFS. Setting this to yes requires +# mmap_disable=yes and fsync_disable=no. +#mail_nfs_index = no + +# Locking method for index files. Alternatives are fcntl, flock and dotlock. +# Dotlocking uses some tricks which may create more disk I/O than other locking +# methods. NFS users: flock doesn't work, remember to change mmap_disable. +#lock_method = fcntl + +# Drop all privileges before exec()ing the mail process. This is mostly +# meant for debugging, otherwise you don't get core dumps. It could be a small +# security risk if you use single UID for multiple users, as the users could +# ptrace() each others processes then. +#mail_drop_priv_before_exec = no + +# Show more verbose process titles (in ps). Currently shows user name and +# IP address. Useful for seeing who are actually using the IMAP processes +# (eg. shared mailboxes or if same uid is used for multiple accounts). +#verbose_proctitle = no + +# Valid UID range for users, defaults to 500 and above. This is mostly +# to make sure that users can't log in as daemons or other system users. +# Note that denying root logins is hardcoded to dovecot binary and can't +# be done even if first_valid_uid is set to 0. +#first_valid_uid = 500 +#last_valid_uid = 0 + +# Valid GID range for users, defaults to non-root/wheel. Users having +# non-valid GID as primary group ID aren't allowed to log in. If user +# belongs to supplementary groups with non-valid GIDs, those groups are +# not set. +#first_valid_gid = 1 +#last_valid_gid = 0 + +# Maximum number of running mail processes. When this limit is reached, +# new users aren't allowed to log in. +#max_mail_processes = 512 + +# Set max. process size in megabytes. Most of the memory goes to mmap()ing +# files, so it shouldn't harm much even if this limit is set pretty high. +#mail_process_size = 256 + +# Maximum allowed length for mail keyword name. It's only forced when trying +# to create new keywords. +#mail_max_keyword_length = 50 + +# ':' separated list of directories under which chrooting is allowed for mail +# processes (ie. /var/mail will allow chrooting to /var/mail/foo/bar too). +# This setting doesn't affect login_chroot, mail_chroot or auth chroot +# settings. +# WARNING: Never add directories here which local users can modify, that +# may lead to root exploit. Usually this should be done only if you don't +# allow shell access for users. +#valid_chroot_dirs = + +# Default chroot directory for mail processes. This can be overridden for +# specific users in user database by giving /./ in user's home directory +# (eg. /home/./user chroots into /home). Note that usually there is no real +# need to do chrooting, Dovecot doesn't allow users to access files outside +# their mail directory anyway. If your home directories are prefixed with +# the chroot directory, append "/." to mail_chroot. +#mail_chroot = + +## +## Mailbox handling optimizations +## + +# The minimum number of mails in a mailbox before updates are done to cache +# file. This allows optimizing Dovecot's behavior to do less disk writes at +# the cost of more disk reads. +#mail_cache_min_mail_count = 0 + +# When IDLE command is running, mailbox is checked once in a while to see if +# there are any new mails or other changes. This setting defines the minimum +# time in seconds to wait between those checks. Dovecot can also use dnotify, +# inotify and kqueue to find out immediately when changes occur. +#mailbox_idle_check_interval = 30 + +# Save mails with CR+LF instead of plain LF. This makes sending those mails +# take less CPU, especially with sendfile() syscall with Linux and FreeBSD. +# But it also creates a bit more disk I/O which may just make it slower. +# Also note that if other software reads the mboxes/maildirs, they may handle +# the extra CRs wrong and cause problems. +#mail_save_crlf = no + +## +## Maildir-specific settings +## + +# By default LIST command returns all entries in maildir beginning with a dot. +# Enabling this option makes Dovecot return only entries which are directories. +# This is done by stat()ing each entry, so it causes more disk I/O. +# (For systems setting struct dirent->d_type, this check is free and it's +# done always regardless of this setting) +#maildir_stat_dirs = no + +# When copying a message, do it with hard links whenever possible. This makes +# the performance much better, and it's unlikely to have any side effects. +#maildir_copy_with_hardlinks = yes + +# When copying a message, try to preserve the base filename. Only if the +# destination mailbox already contains the same name (ie. the mail is being +# copied there twice), a new name is given. The destination filename check is +# done only by looking at dovecot-uidlist file, so if something outside +# Dovecot does similar filename preserving copies, you may run into problems. +# NOTE: This setting requires maildir_copy_with_hardlinks = yes to work. +#maildir_copy_preserve_filename = no + +## +## mbox-specific settings +## + +# Which locking methods to use for locking mbox. There are four available: +# dotlock: Create .lock file. This is the oldest and most NFS-safe +# solution. If you want to use /var/mail/ like directory, the users +# will need write access to that directory. +# dotlock_try: Same as dotlock, but if it fails because of permissions or +# because there isn't enough disk space, just skip it. +# fcntl : Use this if possible. Works with NFS too if lockd is used. +# flock : May not exist in all systems. Doesn't work with NFS. +# lockf : May not exist in all systems. Doesn't work with NFS. +# +# You can use multiple locking methods; if you do the order they're declared +# in is important to avoid deadlocks if other MTAs/MUAs are using multiple +# locking methods as well. Some operating systems don't allow using some of +# them simultaneously. +#mbox_read_locks = fcntl +#mbox_write_locks = dotlock fcntl + +# Maximum time in seconds to wait for lock (all of them) before aborting. +#mbox_lock_timeout = 300 + +# If dotlock exists but the mailbox isn't modified in any way, override the +# lock file after this many seconds. +#mbox_dotlock_change_timeout = 120 + +# When mbox changes unexpectedly we have to fully read it to find out what +# changed. If the mbox is large this can take a long time. Since the change +# is usually just a newly appended mail, it'd be faster to simply read the +# new mails. If this setting is enabled, Dovecot does this but still safely +# fallbacks to re-reading the whole mbox file whenever something in mbox isn't +# how it's expected to be. The only real downside to this setting is that if +# some other MUA changes message flags, Dovecot doesn't notice it immediately. +# Note that a full sync is done with SELECT, EXAMINE, EXPUNGE and CHECK +# commands. +#mbox_dirty_syncs = yes + +# Like mbox_dirty_syncs, but don't do full syncs even with SELECT, EXAMINE, +# EXPUNGE or CHECK commands. If this is set, mbox_dirty_syncs is ignored. +#mbox_very_dirty_syncs = no + +# Delay writing mbox headers until doing a full write sync (EXPUNGE and CHECK +# commands and when closing the mailbox). This is especially useful for POP3 +# where clients often delete all mails. The downside is that our changes +# aren't immediately visible to other MUAs. +#mbox_lazy_writes = yes + +# If mbox size is smaller than this (in kilobytes), don't write index files. +# If an index file already exists it's still read, just not updated. +#mbox_min_index_size = 0 + +## +## dbox-specific settings +## + +# Maximum dbox file size in kilobytes until it's rotated. +#dbox_rotate_size = 2048 + +# Minimum dbox file size in kilobytes before it's rotated +# (overrides dbox_rotate_days) +#dbox_rotate_min_size = 16 + +# Maximum dbox file age in days until it's rotated. Day always begins from +# midnight, so 1 = today, 2 = yesterday, etc. 0 = check disabled. +#dbox_rotate_days = 0 + +## +## IMAP specific settings +## + +protocol imap { + # Login executable location. + #login_executable = /usr/libexec/dovecot/imap-login + + # IMAP executable location. Changing this allows you to execute other + # binaries before the imap process is executed. + # + # This would write rawlogs into ~/dovecot.rawlog/ directory: + # mail_executable = /usr/libexec/dovecot/rawlog /usr/libexec/dovecot/imap + # + # This would attach gdb into the imap process and write backtraces into + # /tmp/gdbhelper.* files: + # mail_executable = /usr/libexec/dovecot/gdbhelper /usr/libexec/dovecot/imap + # + #mail_executable = /usr/libexec/dovecot/imap + + # Maximum IMAP command line length in bytes. Some clients generate very long + # command lines with huge mailboxes, so you may need to raise this if you get + # "Too long argument" or "IMAP command line too large" errors often. + #imap_max_line_length = 65536 + + # Maximum number of IMAP connections allowed for a user from each IP address. + # NOTE: The username is compared case-sensitively. + #mail_max_userip_connections = 10 + + # Support for dynamically loadable plugins. mail_plugins is a space separated + # list of plugins to load. + #mail_plugins = + #mail_plugin_dir = /usr/lib/dovecot/imap + + # Send IMAP capabilities in greeting message. This makes it unnecessary for + # clients to request it with CAPABILITY command, so it saves one round-trip. + # Many clients however don't understand it and ask the CAPABILITY anyway. + #login_greeting_capability = no + + # IMAP logout format string: + # %i - total number of bytes read from client + # %o - total number of bytes sent to client + #imap_logout_format = bytes=%i/%o + + # Override the IMAP CAPABILITY response. + #imap_capability = + + # Workarounds for various client bugs: + # delay-newmail: + # Send EXISTS/RECENT new mail notifications only when replying to NOOP + # and CHECK commands. Some clients ignore them otherwise, for example OSX + # Mail (= 2.1.4) : %v.%u + # Dovecot v0.99.x : %v.%u + # tpop3d : %Mf + # + # Note that Outlook 2003 seems to have problems with %v.%u format which was + # Dovecot's default, so if you're building a new server it would be a good + # idea to change this. %08Xu%08Xv should be pretty fail-safe. + # + #pop3_uidl_format = %08Xu%08Xv + + # POP3 logout format string: + # %i - total number of bytes read from client + # %o - total number of bytes sent to client + # %t - number of TOP commands + # %p - number of bytes sent to client as a result of TOP command + # %r - number of RETR commands + # %b - number of bytes sent to client as a result of RETR command + # %d - number of deleted messages + # %m - number of messages (before deletion) + # %s - mailbox size in bytes (before deletion) + #pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s + + # Maximum number of POP3 connections allowed for a user from each IP address. + # NOTE: The username is compared case-sensitively. + #mail_max_userip_connections = 3 + + # Support for dynamically loadable plugins. mail_plugins is a space separated + # list of plugins to load. + #mail_plugins = + #mail_plugin_dir = /usr/lib/dovecot/pop3 + + # Workarounds for various client bugs: + # outlook-no-nuls: + # Outlook and Outlook Express hang if mails contain NUL characters. + # This setting replaces them with 0x80 character. + # oe-ns-eoh: + # Outlook Express and Netscape Mail breaks if end of headers-line is + # missing. This option simply sends it if it's missing. + # The list is space-separated. + #pop3_client_workarounds = +} + +## +## LDA specific settings +## + +protocol lda { + # Address to use when sending rejection mails. + postmaster_address = postmaster@example.com + + # Hostname to use in various parts of sent mails, eg. in Message-Id. + # Default is the system's real hostname. + #hostname = + + # Support for dynamically loadable plugins. mail_plugins is a space separated + # list of plugins to load. + #mail_plugins = + #mail_plugin_dir = /usr/lib/dovecot/lda + + # If user is over quota, return with temporary failure instead of + # bouncing the mail. + #quota_full_tempfail = no + + # Format to use for logging mail deliveries. You can use variables: + # %$ - Delivery status message (e.g. "saved to INBOX") + # %m - Message-ID + # %s - Subject + # %f - From address + #deliver_log_format = msgid=%m: %$ + + # Binary to use for sending mails. + #sendmail_path = /usr/lib/sendmail + + # Human readable error message for rejection mails. Use can use variables: + # %n = CRLF, %r = reason, %s = subject, %t = recipient + #rejection_reason = Your message to <%t> was automatically rejected:%n%r + + # UNIX socket path to master authentication server to find users. + #auth_socket_path = /var/run/dovecot/auth-master +} + +## +## Authentication processes +## + +# Executable location +#auth_executable = /usr/libexec/dovecot/dovecot-auth + +# Set max. process size in megabytes. +#auth_process_size = 256 + +# Authentication cache size in kilobytes. 0 means it's disabled. +# Note that bsdauth, PAM and vpopmail require cache_key to be set for caching +# to be used. +#auth_cache_size = 0 +# Time to live in seconds for cached data. After this many seconds the cached +# record is no longer used, *except* if the main database lookup returns +# internal failure. We also try to handle password changes automatically: If +# user's previous authentication was successful, but this one wasn't, the +# cache isn't used. For now this works only with plaintext authentication. +#auth_cache_ttl = 3600 +# TTL for negative hits (user not found). 0 disables caching them completely. +#auth_cache_negative_ttl = 3600 + +# Space separated list of realms for SASL authentication mechanisms that need +# them. You can leave it empty if you don't want to support multiple realms. +# Many clients simply use the first one listed here, so keep the default realm +# first. +#auth_realms = + +# Default realm/domain to use if none was specified. This is used for both +# SASL realms and appending @domain to username in plaintext logins. +#auth_default_realm = + +# List of allowed characters in username. If the user-given username contains +# a character not listed in here, the login automatically fails. This is just +# an extra check to make sure user can't exploit any potential quote escaping +# vulnerabilities with SQL/LDAP databases. If you want to allow all characters, +# set this value to empty. +#auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@ + +# Username character translations before it's looked up from databases. The +# value contains series of from -> to characters. For example "#@/@" means +# that '#' and '/' characters are translated to '@'. +#auth_username_translation = + +# Username formatting before it's looked up from databases. You can use +# the standard variables here, eg. %Lu would lowercase the username, %n would +# drop away the domain if it was given, or "%n-AT-%d" would change the '@' into +# "-AT-". This translation is done after auth_username_translation changes. +#auth_username_format = + +# If you want to allow master users to log in by specifying the master +# username within the normal username string (ie. not using SASL mechanism's +# support for it), you can specify the separator character here. The format +# is then . UW-IMAP uses "*" as the +# separator, so that could be a good choice. +#auth_master_user_separator = + +# Username to use for users logging in with ANONYMOUS SASL mechanism +#auth_anonymous_username = anonymous + +# More verbose logging. Useful for figuring out why authentication isn't +# working. +#auth_verbose = no + +# Even more verbose logging for debugging purposes. Shows for example SQL +# queries. +#auth_debug = no + +# In case of password mismatches, log the passwords and used scheme so the +# problem can be debugged. Enabling this also enables auth_debug. +#auth_debug_passwords = no + +# Maximum number of dovecot-auth worker processes. They're used to execute +# blocking passdb and userdb queries (eg. MySQL and PAM). They're +# automatically created and destroyed as needed. +#auth_worker_max_count = 30 + +# Number of auth requests to handle before destroying the process. This may +# be useful if PAM plugins leak memory. +#auth_worker_max_request_count = 0 + +# Host name to use in GSSAPI principal names. The default is to use the +# name returned by gethostname(). +#auth_gssapi_hostname = + +# Kerberos keytab to use for the GSSAPI mechanism. Will use the system +# default (usually /etc/krb5.keytab) if not specified. +#auth_krb5_keytab = + +# Do NTLM authentication using Samba's winbind daemon and ntlm_auth helper. +# +#auth_ntlm_use_winbind = no + +# Path for Samba's ntlm_auth helper binary. +#auth_winbind_helper_path = /usr/bin/ntlm_auth + +# Number of seconds to delay before replying to failed authentications. +#auth_failure_delay = 2 + +auth default { + # Space separated list of wanted authentication mechanisms: + # plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi otp skey + # gss-spnego + # NOTE: See also disable_plaintext_auth setting. + mechanisms = plain + + # + # Password database is used to verify user's password (and nothing more). + # You can have multiple passdbs and userdbs. This is useful if you want to + # allow both system users (/etc/passwd) and virtual users to login without + # duplicating the system users into virtual database. + # + # + # + # By adding master=yes setting inside a passdb you make the passdb a list + # of "master users", who can log in as anyone else. Unless you're using PAM, + # you probably still want the destination user to be looked up from passdb + # that it really exists. This can be done by adding pass=yes setting to the + # master passdb. + + # Users can be temporarily disabled by adding a passdb with deny=yes. + # If the user is found from that database, authentication will fail. + # The deny passdb should always be specified before others, so it gets + # checked first. Here's an example: + + #passdb passwd-file { + # File contains a list of usernames, one per line + #args = /etc/dovecot.deny + #deny = yes + #} + + # PAM authentication. Preferred nowadays by most systems. + # Note that PAM can only be used to verify if user's password is correct, + # so it can't be used as userdb. If you don't want to use a separate user + # database (passwd usually), you can use static userdb. + # REMEMBER: You'll need /etc/pam.d/dovecot file created for PAM + # authentication to actually work. + #passdb pam { + # [session=yes] [setcred=yes] [failure_show_msg=yes] + # [cache_key=] [] + # + # session=yes makes Dovecot open and immediately close PAM session. Some + # PAM plugins need this to work, such as pam_mkhomedir. + # + # setcred=yes makes Dovecot establish PAM credentials if some PAM plugins + # need that. They aren't ever deleted though, so this isn't enabled by + # default. + # + # cache_key can be used to enable authentication caching for PAM + # (auth_cache_size also needs to be set). It isn't enabled by default + # because PAM modules can do all kinds of checks besides checking password, + # such as checking IP address. Dovecot can't know about these checks + # without some help. cache_key is simply a list of variables (see + # doc/wiki/Variables.txt) which must match for the cached data to be used. + # Here are some examples: + # %u - Username must match. Probably sufficient for most uses. + # %u%r - Username and remote IP address must match. + # %u%s - Username and service (ie. IMAP, POP3) must match. + # + # The service name can contain variables, for example %Ls expands to + # pop3 or imap. + # + # Some examples: + # args = session=yes %Ls + # args = cache_key=%u dovecot + #args = dovecot + #} + + # System users (NSS, /etc/passwd, or similiar) + # In many systems nowadays this uses Name Service Switch, which is + # configured in /etc/nsswitch.conf. + passdb passwd { + # [blocking=yes] - See userdb passwd for explanation + #args = + } + + # Shadow passwords for system users (NSS, /etc/shadow or similiar). + # Deprecated by PAM nowadays. + # + #passdb shadow { + # [blocking=yes] - See userdb passwd for explanation + #args = + #} + + # PAM-like authentication for OpenBSD. + # + #passdb bsdauth { + # [cache_key=] - See cache_key in PAM for explanation. + #args = + #} + + # passwd-like file with specified location + # + #passdb passwd-file { + # [scheme=] [username_format=] + # + #args = + #} + + # checkpassword executable authentication + # NOTE: You will probably want to use "userdb prefetch" with this. + # + #passdb checkpassword { + # Path for checkpassword binary + #args = + #} + + # SQL database + #passdb sql { + # Path for SQL configuration file, see doc/dovecot-sql-example.conf + #args = + #} + + # LDAP database + #passdb ldap { + # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf + #args = + #} + + # vpopmail authentication + #passdb vpopmail { + # [cache_key=] - See cache_key in PAM for explanation. + # [quota_template=